home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.7k stars 30.82k forks source link

Deako randomly breaks #130546

Open brandontravis opened 2 days ago

brandontravis commented 2 days ago

The problem

When using the new Deako integration, eventually HA will stop communicating with Deako lights and will not be able to control them anymore. The only solve at that point is to restart HA. My log is full of these:

2024-11-13 12:24:57.850 ERROR (MainThread) [pydeako.deako.utils] Error receiving data: [Errno 104] Connection reset by peer 2024-11-13 12:25:05.489 WARNING (MainThread) [pydeako.deako] Never received pong! Dumping this connection 2024-11-13 12:25:15.510 WARNING (MainThread) [pydeako.deako] No devices to connect to 2024-11-13 13:14:34.020 ERROR (MainThread) [pydeako.deako] Timeout attempting to connect. Trying again 2024-11-13 13:14:34.021 WARNING (MainThread) [pydeako.deako] No connection to send data to 2024-11-13 13:14:42.753 WARNING (MainThread) [pydeako.deako] No devices to connect to 2024-11-13 13:14:44.033 WARNING (MainThread) [homeassistant.components.deako] Device not responding to device list 2024-11-13 13:14:52.774 WARNING (MainThread) [pydeako.deako] No devices to connect to 2024-11-13 13:15:02.794 WARNING (MainThread) [pydeako.deako] No devices to connect to 2024-11-13 13:15:12.817 WARNING (MainThread) [pydeako.deako] No devices to connect to 2024-11-13 13:15:22.842 WARNING (MainThread) [pydeako.deako] No devices to connect to s6-rc: info: service legacy-services: stopping 2024-11-13 13:15:26.913 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Deako for deako Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 635, in __async_setup_with_context result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/deako/__init__.py", line 30, in async_setup_entry await connection.connect() File "/usr/local/lib/python3.12/site-packages/pydeako/deako/_deako.py", line 115, in connect await self.connection_manager.init_connection() File "/usr/local/lib/python3.12/site-packages/pydeako/deako/_manager.py", line 80, in init_connection await asyncio.sleep(CONNECTED_POLLING_INTERVAL_S) File "/usr/local/lib/python3.12/asyncio/tasks.py", line 665, in sleep return await future ^^^^^^^^^^^^

What version of Home Assistant Core has the issue?

core-2024.11.1

What was the last working version of Home Assistant Core?

unknown

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Deako

Link to integration documentation on our website

https://www.home-assistant.io/integrations/deako

Diagnostics information

home-assistant_deako_2024-11-13T15-06-28.058Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

I found this issue which seems to be related but then it says it was resolved. https://github.com/home-assistant/core/issues/128468

home-assistant[bot] commented 2 days ago

Hey there @sebirdman, @balake, @deakolights, mind taking a look at this issue as it has been labeled with an integration (deako) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `deako` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign deako` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


deako documentation deako source (message by IssueLinks)

Balake commented 2 days ago

@brandontravis thanks for the report! Please provide some additional info:

brandontravis commented 2 days ago

@Balake Thanks for the quick follow up! Currently have 10 devices spread throughout the house. Eventually is hard to pin down. Typically within a few hours this seems to occur, however last night I removed and re-added the integration and the connection persisted through the night. I was surprised when I attempted to turn the lights on this morning and it actually worked, so I had thought that maybe it was resolved but a few hours later it stopped working again.

RajUmadas commented 2 days ago

I can confirm that I am experiencing the same behavior. This seems to have started about a week ago. It was working so well when I first set it up.

I have to do some more debugging, but my guess is that it has something to do with how I think different switch’s join the WiFi network at different times.

Balake commented 2 days ago

Thanks for all the info guys. I'll take a look into it and see what I can find. I suspect that there are still issues with stale device addresses. I'll see if I can find out when the mDNS fix is coming device side.

The changes I made improved the setups that I have access to, but I'll do some more testing.

RajUmadas commented 1 day ago

I also noticed that recently I am able to just reload the integration to get things working, however about a week ago, I don’t think that worked.

It might be a fluke, but figured I’d share.

RajUmadas commented 1 day ago

I’ll also throw it out there, if you need beta testers with HA setups for device firmware tweaks, sign me up.

Balake commented 1 day ago

I also noticed that recently I am able to just reload the integration to get things working, however about a week ago, I don’t think that worked.

It might be a fluke, but figured I’d share.

Good! The changes that went out are most likely responsible for this.

Balake commented 1 day ago

I’ll also throw it out there, if you need beta testers with HA setups for device firmware tweaks, sign me up.

Thanks for the interest! You can use this sign up form to get on the beta channel.

brandontravis commented 1 day ago

Thanks for looking at this @Balake. FWIW, I've also sometimes had success just reloading the integration, but other times after I do the plugin fails to initialize. The only sure fire thing that repairs this for me is restarting HA.

RajUmadas commented 17 hours ago

Btw. Ive noticed that over the past 2 days, it has not broken. Not sure if I did anything, or if you all did something.