Losing devices with ZHA

Again, highly recommend reading/following all these general best practice guides and ZHA/Zigbee information:

You really do need to take some of the most basic actions suggested there to avoid EMF/EMI/RMI interference!

As FloatingBoater pointed out, be sure to pair devices in their final location, but also keep in mind that you may need to manually re-pair some ”Zigbee End Device” devices if you later add more ”Zigbee Router” devices because not all devices will automatically change their connection to a new Zigbee Rouer device after their initial pairing/joining, (at least some with buggy firmware like older Aqara/Xiaomi will not move to a other Zigbee Router without being manually re-raired/re-joined).

The important thing to understand there is that while Zigbee Router devices (which are normally mains-powered) will build up the network mesh and thus rearrange its connections, many Zigbee End Devices (usually battery-powered) will most of the time not automatically connect to a closer Zigbee Router on its own, instead you will need to manually re-pair/re-join that device if you later add Zigbee Router devices that are closer to it, otherwise it is a good chance they will keep their being connected to the first device that it connected through .

Unfortunately the ZHA does not include OTA (Over-The-Air) firmeware updates for Philips Hue devices by default so you either need to manually download and copy the OTA files to the ZHA installation and enable it in for the ZHA / zigpy config the configuration YAML file for Home Assistant, or you can use the ZHA Toolkit (custom component) whích makes downloading and adding OTA files at least some what easier → https://github.com/mdeweerd/zha-toolkit

There is newer unofficial Zigbee Coordinator firmware for the Sonoff ZBDongle-E however the default firmware that it ships with should be fine as it is known to be very stable if the rest of your setup is good, but if you done every other action to workaround potential interference and so on, including upgrading Philips Hue device firmware then you should consider also upgrading to a later version, see this other thread → ITead’s “Sonoff Zigbee 3.0 USB Dongle Plus V2” (model "ZBDongle-E") based on Silicon Labs EFR32MG21 +20dBm radio SoC/MCU

Not in the ZHA integration at this point as it is not a feature in the zigpy library that it depends on.

As mention above, best practice is to first add more known good Zigbee Router devices to your network mesh and then manually re-pair any devices that does not automatically move over to a closer Zigbee Router after a 24-hour period.

2 Likes

The information above is very useful – thank you Hedda.

I have tried various things (resetting the sensors multiple times, placing them closer to repeaters, pairing them via the closest repeater, pinging them at regular intervals) but I’m still having issues.
It is clear now that this is only affecting my Hue Motion Sensors (model SML001) while all other door and window sensors continue to work flawlessly despite being in roughly the same location.
These sensors are placed all throughout the house and so connecting via different repeaters.
Today four of these sensors became unavailable all at the same time.

I’m probably experiencing some unique incompatibility or behaviour of these sensors (though, as previously mentioned, this is rather odd since the exact same devices and placement were working fine before in SmartThings) so I might end up either moving the sensors back to the Hue bridge (since these are transparent to HA via the Hue API) or bringing the Hue lights over in HA and hoping that improves coverage and reliability of the motion sensors (being same manufacturer and all…)

I have the exact same issue.
A moderate size network with many different devices, and my two SML001 allways go “offline” after around 12 hours since I moved to skyconnect.

One of them is even directly connected to the skyconnect, so it’s not a distance/interference thing…

TLDR: The solution for me was to change the Zigbee channel.

Strangely, this is never one of the recommendations as a troubleshooting step and we are in fact advised against it.

A wi-fi analyser in my case showed there was not much activity around the Zigbee default channel 15 so I suspect whatever interference there was it would have been from an analog device (eg neighbour’s baby monitor or dect phone)

But since my SmartThings was working just fine on channel 20 and I decommissioned it, I had the channel free now so was worth a try.
It’s been almost a week now and had no dropouts :crossed_fingers:

Changing the Zigbee channel is not complicated at all in ZHA, but you will have to manually repair all devices. By that I mean you just have to put HA in pairing and press each device pairing button; no need to delete the device from HA, so all your settings stay the same. Even better, I paired the edge devices via the closest repeater device (wall plugs) to make sure they establish a solid connection (it’s not clear if that actually helps)
To change the Zigbee channel I simply created a ZHA local backup then modified the channel in that json file. I also added this to the configuration.yaml just to be sure. Then proceeded with the Migrate Radio step by step process using that local backup and it only took a minute.

Hope this helps

Hi!

Today I did just that… after 2 ours getting all my devices reconnected, the Hue Motion sensors still disconnect.
I guess you were really lucky. I also moved to channel 20 as it was the least impacted by other wifi signals…

Maybe try Zigbee channel 25?
In my case wifi channels looked like they wouldn’t impact Zigbee, but interference could be from analogue sources which wouldn’t show on a wifi analyser.
It’s also important to rebuild Zigbee or any mesh network starting with the repeaters (eg wall plugs) and give those a few hours to establish a solid mesh first. Then add the edge devices.
Good luck!

1 Like

This didn’t last… :disappointed:
It worked perfectly for two or three weeks, but a couple of days ago all my Hue motion sensors became unavailable at roughly the same time.
As before, this only impacted the Philips Hue motion sensors, all the other Zigbee devices continued to work fine.

I’ve now moved everything to channel 24 and so far had no problems.

I tried channel 25 but my SmartThings presence sensors don’t seem to support this channel.
Interestingly, my Hue sensors and some other ST sensors all migrated on their own from channel 25 to channel 24 while I was waiting for the repeaters to establish a solid mesh :astonished:
They were all flashing red to indicate that they couldn’t connect to the controller, but within a few hours they all came back online.
I did not know Zigbee devices can do that…

Have you had better results @sergio_pt ?

Hi @cipnt ,

I had great results as soon as I migrated to zigbee2mqtt with my Conbee II. :smiley:
They are working great.

That’s interesting - I believe both zigbee2mqtt and homeassistant zha are using the same underlying libraries. Are any of your parameters different? e.g. channel?

Yes… move from SkyConnect to Conbee II.

I use the zzh adapter, which is a cc2652 chip based adapter, with zigbee2mqtt. It’s worked well for me. There are many combinations of adapters and using zha or zigbee2mqtt. They are different programs- some adapters work better on zha vs zigbee2mqtt and vice versa. The skyconnect is EFR32 based and meant for zha, but is listed as “experimental” and not recommended for a stable setup in zigbee2mqtt. I’ve never tried the conbee, some say it works great, but you will find other threads on here that mention problems

Certain conbee firmware has noted compatibility problems with zigbee2mqtt- see the docs and this github issue. You will see many reporting issues with the conbee on that github issue.

I think your issues point to a larger problem with Zigbee in general. It is supposed to be a “standard”, but unlike zwave where each device is thoroughly tested by the zwave alliance prior to certification, zigbee is looser and more of a self certification. There are devices, like aqara, that don’t fully conform to zigbee standards, and have compatibility issues with other zigbee devices. Hue has done some proprietary things with their devices in the past as well.

It will be a bit of trial and error ultimately to get things working. Personally though, if you’re getting a new adapter, I would go with one of the cc2652 based adapters from the zigbee2mqtt docs I linked above over the conbee.

I have ~130 zigbee devices, mostly IKEA bulbs. I find that every few months a 5-10 of them lose their network connection. This isn’t a radio issue as they are sitting within 20cm of another identical device that doesn’t lose the connection, but I have to re-add them.

Possibly relevant: I’ve seen this with my ~130 device ZHA network where the devices are often shut off from wall switches, but not on my other ~50 device Deconz network where the devices are not shut off from wall switches. Both are using ConbeeII radios.

-David

Had the same problem with ZHA. Zigebee Coordinator SONOFF Zigbee 3.0 USB Dongle Plus-P with latest firmware.

My Sonoff SNZB-04 door/window contacts became sporadically unavailable after 12-36 hours with ZHA.

After switching to Z2M this no longer happens.(Knock on wood - switched to Z2M about 1 week ago)

I think I read that this is probably due to the reporting interval, which is fixed with the latest Z2M version. Can’t find it anymore though unfortunately.

Strange… I have four of these and they have been the most reliable zigbee devices on my ZHA network, no matter what channel or settings

Same issue here, SML001 loosing Connection. I also have a network with many Router devices. Before it was running on Z2M without any issue. And Yes I can switch back, but would give the Official Skyconnect Dongle and ZHA a go.

Same issue with ZHA here. Some devices drop out of the network.
I also have a SkyConnect dongle, so I wanted to give ZHA a go.
Z2M had no issues (ZZH dongle).
Got 110 devices, and about 60% are router devices.
I´m using the same channel as I did on Z2M.

Is it an issue with SkyConnect, ZHA, or a combination?

There is something going with ZHA - I’ve noticed that simply restarting ZHA solves a lot of glitches.

Tried… Not working :frowning:

It turned out @Hedda was right all along… at least in my case.

There are two version of the Sonoff Zigbee dongle.
The ZBDongle-E and the SkyConnect dongle I used both have the same chip which is newer and supposedly better, but it still has some bugs.
I switched to the older ZBDongle-P controller and everything worked great since.

That Zigbee guide he linked to was also very useful, but initially I didn’t read it as carefully as I should have done.
When they say that Zigbee is very sensitive to interference, they really mean it.
Some steps that turned out to have a significant impact on the Zigbee signal for me were:

  • Use a long USB extension cable to place the Zigbee adapter away from interference and obstacles.
  • Try to place the Zigbee adapter at some distance away from walls, ceilings, and floors.
  • Try to place your Zigbee adapter away from Wi-Fi access points or sources of WiFi.
  • Place Zigbee adapters far away from electrical/power wires/cables, power supplies, and household appliances.
1 Like

Yeps, 2024 still same challenges with SML021, also with ZHA but on the Yellow.
No problems on Deconz at all. And SML022 works like a charm on ZHA+Yellow…

Weird, have tried the usual suspects, wifi separation channels/physical, different better shielded USB extension cable on the Deconz dongle that also sits in the my Yellow. When I moved from RP4+Deconz+Phoscon to Yellow, I kept my Deconz dongle and run two Zigbee networks at the moment. Wanted to see how that panned out. Also saving me from re- pairing the many different bulbs in our home…
So slowly moving from Deconz to the built in Yellow Zigbee.
So far it seems a bit weak on radio (only how I experience it, haven’t any measuring or data on it.)

(Deconz=ConbeeII)