nikshriv / cync_lights

Home Assistant Integration for controlling Cync switches, plugs, and bulbs
160 stars 53 forks source link

Connection to Cync server reset #8

Closed StevenSeiden closed 1 year ago

StevenSeiden commented 1 year ago

Hi! After setting up the integration, logging in and adding the lights I am experiencing an error. When I try to turn on a light nothing happens. Here is the log:

Logger: custom_components.cync_lights.cync_hub Source: custom_components/cync_lights/cync_hub.py:38 Connection to Cync server reset, restarting in 15 seconds Cync client shutting down

nikshriv commented 1 year ago

Are your still logged into the Cync app somewhere else? Unfortunately, the Cync server only allows one device to be logged in at a time and will kick off my HA integration when logged in elsewhere. I have designed the integration to retry logging in every 15 seconds if it gets kicked off to allow you to use the Cync app when needed, but your integration will not work while you're using the Cync app.

StevenSeiden commented 1 year ago

I tried logging out of the Cync app everywhere, but I'm still experiencing the issue. Also, if this is noteworthy, it seems that no new logs are being made, so perhaps this issue is unrelated to the log in my previous post, but I can't be sure. Below you can see specifically what happens, where the switch turns back off on its own: rec

StevenSeiden commented 1 year ago

This error might also be contributing to the problem:

Traceback (most recent call last): File "/config/custom_components/cync_lights/cync_hub.py", line 125, in _maintain_connection raise ShuttingDown custom_components.cync_lights.cync_hub.ShuttingDown

nikshriv commented 1 year ago

I tried logging out of the Cync app everywhere, but I'm still experiencing the issue. Also, if this is noteworthy, it seems that no new logs are being made, so perhaps this issue is unrelated to the log in my previous post, but I can't be sure. Below you can see specifically what happens, where the switch turns back off on its own: rec rec

Does this happen with all of your device or just this specific one? Does the Desk Lamp actually turn on when you toggle the switch? This behavior occurs when the integration is not receiving the current state of the Desk Lamp. Not sure why that would happen, but will try to investigate...

Would be helpful if you can download my cync_data.py script which is at github.com/nikshriv/cync_data and run it on a computer with python (not your home assistant instance). Then post your cbyge_rooms.json file contents in this thread.

StevenSeiden commented 1 year ago

I'm not exactly sure what has happened, but I am now unable to reproduce this error. I really appreciate all of your help and hard work, it isn't going unappreciated :)