nikshriv / cync_lights

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

Cync account credentials #5

Closed Pvtjoker77 closed 1 year ago

Pvtjoker77 commented 2 years ago

I log in then it sends the 2 factor verification code but when I enter it I get "Unknown error occurred while retrieving Cync configuration"

Screen Shot 2022-09-04 at 4 52 49 PM
Pvtjoker77 commented 2 years ago

I did log out of the App and log back in just to make sure the username and password were correct.

nikshriv commented 1 year ago

Please check your log and see if there is an error reported there. There are some occasional variations in the Cync configuration from account to account that could be the source of the problem. Post that and I will take a look.

jameslb commented 1 year ago

@Pvtjoker77 - I had a similar error because the integration did not detect any compatible WIFI devices in one of my "home" groups.

@nikshriv - For me this was an index out of range exception when the code attempted to associate the devices to a home controller. This was because my devices were not yet added to the array of device types.

https://github.com/nikshriv/cync_lights/blob/8cb50431a3246a1166c69b5ec560419bafd9d0f7/custom_components/cync_lights/config_flow.py#L234

StevenSeiden commented 1 year ago

Here is the error that I received: Unexpected exception Traceback (most recent call last): File "/config/custom_components/cync_lights/config_flow.py", line 104, in async_step_two_factor_code info["data"]["cync_config"] = await self.cync_hub.get_cync_config() File "/config/custom_components/cync_lights/config_flow.py", line 239, in get_cync_config room_controller = home_controllers[home_id][0] IndexError: list index out of range

I previously had two "homes" in my Cync account, but after deleting one, the issue was resolved, and I was able to login properly.

nikshriv commented 1 year ago

Thanks, I'll put in a filter for empty homes...