Losing devices with ZHA

I have a Sonoff USB dongle with ZHA - 44 devices around the house, plenty of routers with Philips hue bulbs but I keep losing one device every week. It is most frequently one of the older Hue switches - they just become unreachable until I repair them but also I recently lost a Sonoff presence sensor. These become unavailable and haven’t been able to get them back on the zigbee network without repairing them. Some devices seem to be more affected than others, I’ve never lost any of the hue bulbs or sonoff plugs but the battery powered devices seem to be more sensitive.

Any suggestions?

1 Like

Add more mains powered switches to act as Zigbee routers (and reduce battery drain)?

(Cheap, widely available and good once paired - IKEA mains switches. Only issue is the tiny pairing button hole.)

I’ve seen issues with IKEA battery kit (very recent firmware updates need pre-release quirks files - full docs in the forunds & github), but Sonoff Zigbee kit has been pretty solid. The Sonoff USB 3 coordinator had better range than my current Yellow SilLabs radio.

Which exact Zigbee Coordinator model? The Sonoff "ZBDongle-E" or the Sonoff “ZBDongle-P” model?

Regardless suggest test upgrade Zigbee Coordinator firmware (but perform a backup first so can revert back if get worse result).

Also recommend read and follow → https://community.home-assistant.io/t/guide-for-zigbee-interference-avoidance-and-network-range-coverage-optimization/515752

You should take note there that Zigbee can be extremly sensitive to EMF/EMI/RMI interference and you should follow the recommendations about taking actions to avoid it.

1 Like

I’ve been having similar issues with my new HA installation using the official SkyConnect dongle so maybe it’s not your controller at fault, but rather the signal strength throughout the network and the devices’ proximity to the controller/repeaters, as suggested by James above.
I’ve noticed that after one or two repairings (leaving the device as is in HA, initiating the Add New Device in ZHA, and pressing the pair button on the sensor) the devices are now a bit more stable so I’m keeping my fingers crossed it stays this way.

The odd thing for me is that I migrated all my devices from SmartThings and they were all working just fine there, but I’ve been doing the migration in stages so maybe I didn’t yet had all the wall plug repeaters for a more solid mesh. The mesh also takes a few hours to “stabilise” and for each repeater to build its neighbours list (check in your /config/zha/visualization).

Another issue is the Zigbee mesh.

The standard advice is to pair device in their final location, but several IKEA devices will only pair with the coordinator, and continue to ignore closer mains-powered routers and drain battery power in 24-48h.

A bodge fix is to turn off HASS for over an hour - this apparently forces Zigbee to time out and re-calculate the mesh and in process, devices start using closer mains-powered routers.

The Sonoff v3.0 dongle has definitely better Zigbee radio range than a Yellow, but then again, both work well with ZHA just as long as you have enough mains powered routers to establish decent mesh radio coverage.

1 Like

I have the ZBDongle-E (Silicon Labs EFR32MG21) - I did some research on the firmware but I cannot find anything tangible about updates on this one. Is there a recommended version for ZHA?

Thanks for the link - I’ve read couple other good guides on optimizing Zigbee… I’m wondering if the Hue firmware on the bulbs could be to blame… Also I know Philips did issue an update recently but it hasn’t been published on any of the sites…

Same here but that tends me to think that it has to be a software or mesh issue somewhere - not a signal one. From the network map, it looks like my hue bulbs have really a lot of connections - is there a way to prevent some devices from being a router? Also wondering if they possibly have too many connections?

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.


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


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.


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.