ZHA some (aqara) devices stoped working

Hi,

I just started using Home Assistant and I’ve ran into a problem which I can seem to fix my self so I would very much like your help!

When I started using Home Assistant it was very stable and had no issue’s but today my ZHA setup failed on some devices (most of the devices are still running and I can switch them on and off without any problems, some sensors are also still working).
I’ve tried to reboot the setup, removing the conbee stick and plugging it again, removing and adding the failing devices, but nothing seems to work.

Error in Core:
2022-04-26 21:38:06 ERROR (MainThread) [frontend.js.latest.202204050] http://192.168.1.13:8123/frontend_latest/b4570d1b.js:91:808 Uncaught TypeError: Cannot read properties of undefined (reading 'entity_id')

System details:
core-2022.4.7
supervisor-2022.04.0
Home Assistant OS 7.6

I have Home Assistant running on a Raspberry Pi 4 with:

  • Conbee 2
  • Aeotec Z-wave
  • P1 monitor (USB)
  • Hue
  • Conexxoon
  • Unify

Zigbee devices:

  • 4x Blitzwolf smartplugs (still working)
  • 1x Tradfri motion (still works)
    - 4x Aqara temp/hum sensor (all failing)
    - 2x Aqara wall switch (both failing)
  • 1x Aqara button (still works)
  • 1x Aqara motion (still works)
  • 1x Aqara double wall switch (tried to add after the other failed, could pair the device but no data came trough)

The only thing I’ve changed to the system today is adding HACS and the mushroom cards/themes. After doing this everything stil worked like a charm. Hours later issues started so I don’t think this is the cause of the issues.

Help is much appreciated!

UPDATE:
2/4 - Aqara temp/hum sensors are working again. Don 't understand why or how, but they do.
Other sensors/switches still down

Might be interference, and/or an unstable Zigbee mesh (perhaps because the battery-operated devices are on the edge of the network).

Also, if you’re not using an extension lead between your RPi4 and the Conbee, it’s very much advised to add one.

HI Robert,

This was also my first estimate so I checked all my devices and the failing devices are all very close to an active mesh point (ac powered). Also sensors with much more distance to an active mesh point still seem to work perfectly.

The decons stick has been placed with an extension cable away from other devices.

Also the are al devices used in my previous domoticz setup which I used before migrating to Home Assistant

Aqara devices can be picky, they also don’t like to switch between Zigbee routers. Make sure that when you add them to the network, they are at the location where you intend to use them (so don’t pair them next to the Conbee and then move them to their final location).

I assume their batteries are still okay?

Yes I’ve done it this way, unfortunately no success.

Battery was replaced 2 day’s ago for one of the sensors.

I’ve now again tried to remove the malfunctioning devices from ZHA and resetting them. After this removed the battery.

Freshly pairing after the full reset, the zigbee network pick it up within seconds but at the ready to use window all stats are yellow triangles with exclamation marks :frowning:
2022-04-27_114440

I don’t have a lot of experience with ZHA (only z2m) so I don’t know the specifics on how this may happen :frowning:

Happens after upgrades sometimes for me and my aqara sensors. Happened this month and hadn’t happened for a few previous, not sure why, but my routine is go wake them up by pressing their button a few times. If the reconnect perfect, if they don’t then repair and they connect back with all previous names/automations, just need to put them in correct room.

Thank you! I will try it if it happens again (hopefully not). For now I’ve done a full Home Assistant reinstall to fix it (a little drastical). Now it works again with ZHA.

Are you following these general tips and best practices?

https://github.com/home-assistant/home-assistant.io/pull/18864/commits/970295a277e8f01d3ee39eeeaacf453625b988d3 from https://github.com/home-assistant/home-assistant.io/pull/18864

and

https://www.home-assistant.io/integrations/zha#best-practices-to-avoid-pairingconnection-difficulties

Remember to also regularly upgrade firmware on your Zigbee Coordinator adapter as it get bug-fixes