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.55k stars 30.72k forks source link

ZHA integration fails after a few minutes #126227

Open schneemaier opened 1 month ago

schneemaier commented 1 month ago

The problem

I recently added ZHA integration to my HA installation with 3 switches and an Generic Zigbee Coordinator (EZSP Firmware: 6.10.3.0 build 297).

Zigbee switches randomly work or not work. If I reload the intergration they work for a few minutes that it starts failing again. The error message I see on the UI is: Failed to perform the action homeassistant/turn_on. Failed to send request: Failed to enqueue message after 3 attempts: <sl_Status.ALLOCATION_FAILED: 25>

What version of Home Assistant Core has the issue?

core-2024.9.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Zigbee Home Automation

Link to integration documentation on our website

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

Diagnostics information

home-assistant_zha_2024-09-18T18-50-29.470Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

First I thought that this is an interfrence issue with Wifi, but neither changing the AP channels nor turning of some of the APs fixed the issue.

home-assistant[bot] commented 1 month ago

Hey there @dmulcahey, @adminiuga, @puddly, @thejulianjes, mind taking a look at this issue as it has been labeled with an integration (zha) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `zha` 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 zha` 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)


zha documentation zha source (message by IssueLinks)

TheJulianJES commented 1 month ago

Might not be it, but please also confirm the issue is still present with 2024.9.2. There were some changes in the EZSP radio library.

puddly commented 1 month ago

It looks like you're probably using a Sonoff coordinator. Try updating its firmware: https://darkxst.github.io/silabs-firmware-builder/

schneemaier commented 1 month ago

Might not be it, but please also confirm the issue is still present with 2024.9.2. There were some changes in the EZSP radio library.

Thanks I will do an update and check

It looks like you're probably using a Sonoff coordinator. Try updating its firmware: https://darkxst.github.io/silabs-firmware-builder/

I have this version: https://www.aliexpress.us/item/3256805084701578.html?spm=a2g0o.order_list.order_list_main.17.91f41802wHhaqs&gatewayAdapt=glo2usa I have to check which one is this based on the versions on the suggested page

schneemaier commented 1 month ago

I did the upgrade to 2024.9.2 but it did not solve the issue. I did a fimrware update after on my Zigbee stick and so far it is working. I am going to monitor it for the next couple of days and see if it fully resolved the issue

Thevion commented 1 month ago

I have a similar error. Since version 2024.09, the integration stops working several times a day. Temporarily, reloading intergration solves the problem. I have a Sonoff Dongle Plus-E coordinator, and HA is running on a Raspberry Pi 3.

schneemaier commented 1 month ago

As an update: version 2024.9.2 with the latest firmware (https://darkxst.github.io/silabs-firmware-builder/) for the Zigbee coordinator works for the last 24 hours

Thevion commented 1 month ago

I updated the coordinator's firmware—so far it works. I will monitor the situation.

Thevion commented 1 month ago

Unfortunately, despite updating the coordinator to the latest version, ZHA froze again after just two hours. Reloading it helped, as usual—probably for another two hours.

schneemaier commented 1 month ago

Unfortunately, despite updating the coordinator to the latest version, ZHA froze again after just two hours. Reloading it helped, as usual—probably for another two hours.

Can it be some WiFi interference? I had to reconfigure my WiFi to use channels 1,5,9 (instead of 1,6,12), so Zigbee can use channel 25 without interference. See OFDM table in 2.4 GHz (802.11b/g/n/ax/be) section

Thevion commented 1 month ago

The router dynamically sets the WiFi channel to optimize the signal. After reverting to the older version of HA 2024.8.3, the problem no longer occurs—for now, I'll stick with this version.

puddly commented 1 month ago

@Thevion Please record a ZHA debug log with 2024.8.3 for an hour or so and one with 2024.9.2 that reproduces the crash. Without logs, there's no way to investigate the problem you're having.