core: ZHA - Network dies once a day or becomes "flaky"

The problem

Once a day the Zigbee network becomes unstable or simple just die. It happens shortly after this message in the logs: “No response to ‘Command.aps.data.indication’ command with seq id ‘xxxx’” - After this message control of the units and the entites becomes unstable or unavaible

What is version of Home Assistant Core has the issue?

2021.3.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

ZHA

Link to integration documentation on our website

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

Example YAML snippet

# Put your YAML below this line

Anything in the logs that might be useful for us?

Logger: zigpy_deconz.api Source: /usr/local/lib/python3.8/site-packages/zigpy_deconz/api.py:307 First occurred: 9.10.39 (2 occurrences) Last logged: 10.18.25

No response to ‘Command.aps_data_indication’ command with seq id ‘0x85’ No response to ‘Command.write_parameter’ command with seq id ‘0xa7’



I tried almost everything to fix this. Here is what i have tried so far:

- Putting the conbee on different USB cables of different lenght to see if it made any difference
- Changing the channel of the zigbee network to see if it had any effect
- Deleting the integration and installing all devices again
- Manually upgrading the firmware on the Conbee2 
- Switching the channel of the Wi-fi
- Physically moving the Pi with the HA instance 

Probably many other things but with no fix. I am loosing the last WAF i had in spare :( 

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 36 (20 by maintainers)

Most upvoted comments

Sorry tried installing the fix friday evening. I havent restarted HA since your fix. What i can report from using it for 48 hours is that the stability has been increased drasticly. It has been online ever since. Sometimes it can be a bit flaky (you press a button and it takes 2-3 seconds for the responce) The “funny” things is that killed all my camera feeds so it seems to have some influence on the “stream” integration some how.

I have no clue on what you did mister magic man but it made a huge difference in all cases!

Fun fact, I recently saw another issue here that was closed with no solution regarding something similar. Reporter stated his ZHA was going offline and not working properly in a daily basis. I was following that conversation because I was having problems with ZHA also, where my devices were going unresponsive for large amounts of time. In the end he migrated out of ZHA and this is why the issue was closed.

My ZHA issues are still coming and going, but it affects just light devices, and only one at a time and it happens occasionally, like once a week.

The funny thing about this whole story is the coordinator, me, you and the other issue author, we all seem to use conbee II.

The “funny” things is that killed all my camera feeds so it seems to have some influence on the “stream” integration some how

Unlikely, but who knows. Running ZHA as a custom component shouldn’t have any bearing on any other component. But as I mentioned, your SD card is going bad and it is likely you are going to see more other issues now.

The fix should be in next release, so when updating to 2021.4.0 don’t forget to remove /config/custom_componenst/zha on upgrade

go to the root and download the whole HA zip file https://github.com/home-assistant/core/tree/2021.3.4 and from there extract only zha folder and put it into /config/custom_components/zha

if running the latest stable version, then:

  1. take backups
  2. take backups
  3. copy https://github.com/home-assistant/core/tree/2021.3.4/homeassistant/components/zha into your /config/custom_components/zha
  4. modify /config/custom_components/zha/manifest.json and change "zigpy-deconz==0.11.1", to "git+https://github.com/zigpy/zigpy-deconz@dev#zigpy_deconz==0.11.2",
  5. stop HA Instance (not restart)
  6. start HA instance or reboot

collect logs

I am running on RPI4 4GB - I dont recall anything in the logs when trying to control the lights but i will check them when / if it happens again. I am also using the official power supply for the PI

I already odered a new SD card classed A2 just in case that would solve anything.

Since yesterday evening i disabled the custom component and the error hasnt occured since. But i will wait a bit before popping the champagne as in the past it has taken up till 24 hours before the error ocurred. And if it is the case that a custom component which has to do with the wifi-robot vacuum is able interfere with the Zigbee network there must be some sort of way of fixing it. Will update this post when my logs show something

I am not able to tell you the last working version as this has been a problem for me since i got the conbeeII last christmas. I just tried to solve the issued with different fixes ex. the extension USB cable of different lengths and quality, reinstalling ZHA or the entire HA

Just rebooted HA in order to get control of the lights again. Will post the logs when the error happens again.

from the issue template:

What was the last working version of Home Assistant Core?

Logging https://www.home-assistant.io/integrations/zha/#reporting-issues