Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Traceback when running get_cync_config_from_cloud #19

Closed
untraceablez opened this issue Jul 21, 2023 · 4 comments
Closed

Traceback when running get_cync_config_from_cloud #19

untraceablez opened this issue Jul 21, 2023 · 4 comments
Assignees

Comments

@untraceablez
Copy link

Excited to get my Cync lights finally under the Home Assistant umbrella. I went through the git pull and everything else just fine, but once I get to the get_cync_config_from_cloud run, I seem to authenticate fine, but I get the following traceback error:

Traceback (most recent call last):
   File "/usr/bin/get_cync_config_from_cloud", line 30, in <module>
     main()
   File "/usr/bin/get_cync_config_from_cloud", line 19, in main
     meshinfo=acync.get_app_meshinfo()
              ^^^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/lib/python3.11/site-packages/acync/__init__.py", line 82 in get_app_meshinfo
     mesh['properties']=acync._get_properties(auth, mesh['product_id'],mesh['id])
                                                    ~~~~^^^^^^^^^^^^^^
TypeError: string indices must be integers, not 'str'

From my own very limited python experience, seems that somehow the variables product_id and id aren't getting replaced with the proper integer values so they're just staying a strings, hence the TypeError?

@juanboro juanboro self-assigned this Jul 22, 2023
@juanboro
Copy link
Owner

It looks like they changed their API. I got the previous details on the 2fa authentication here: https://github.com/unixpickle/cbyge/blob/main/login.go. I'll see if I there is a reasonably easy fix (without having to mess with digging into the app).

@juanboro
Copy link
Owner

Confirmed - this is also seen here: nikshriv/cync_lights#72 --- (direct HA integration using the cync API). All my development tablets have too old android versions to run the new Cync app to try to use mitmproxy. If someone else doesn't figure this out first - I'll try to get ahold of a newer tablet to debug with).

@juanboro
Copy link
Owner

Hi - Give it a try now - it should be fixed. It looks like the only change is they've decoupled from the Telink cloud in China.

@untraceablez
Copy link
Author

@juanboro I was able to successfully pull down the cync mesh configuration! I am still having issues getting it to work, but I believe the issue lies in my MQTT configuration, so not related. Thanks so much for the fix, seriously appreciate it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants