ZHA / Sonoff keeps losing all devices

At the end of March, I had this problem, which I posted on a HA Facebook group:

As of about 5pm yesterday, all my Zigbee devices started showing as unavailable.
They connect through a Sonoff Zigbee bridge that is flashed with Tasmota ZHA ZBBridge.
I can access the Sonoff over the wifi, so it’s running, but none of my motion, door or other sensors seem to be connecting to it.

Since then, it has happened multiple times, but always seems to be triggered by me updating HA to the latest build.

It happened yet again yesterday, and I had to get all my devices one by one and put them right next to the coordinator to pair again. I couldn’t do this with the door sensor, so I had to unplug the Sonoff to move it closer, but it did seem that all was well. All my motion sensors were triggering on movement, and the door sensor worked.

Now this evening, they are ALL showing as offline again. Reboots do not work, I will have go round and pair them all again. :frowning:

Someone suggested the Sonoff has problems, but it does allow me to run it in the house where most of my Zigbee devices are. I run HA on a Pi in my garden office, so if I put a USB Zigbee stick in there, I might not get the devices connecting anyway.

So, I’m looking for thoughts/ideas/suggestions. Would it be a bug in the ZHA integration perhaps? Hardware issue with the Sonoff? Or maybe the stuff I flashed on there with Tasmota is out of date ?

I’ve seen posts on here from years ago with the same problem but none seem to relate directly to mine - pretty sure it’s not wifi interference as they were all working perfectly for 6 months.

All help appreciated - I am pulling out what little hair I have left

Yeah using hacked ITead’s Sonoff ZBBridge is generally not recommended due to it using Wi-Fi. Read:

https://www.home-assistant.io/integrations/zha#warning-about-wi-fi-based-zigbee-to-serial-bridgesgateways

(same at https://www.zigbee2mqtt.io/advanced/remote-adapter/connect_to_a_remote_adapter.html)

You are not suppose to do that. You are suppose to always leave your Zigbee Coordinator in one place and then pair your devics in their final location, not move them as some will not auto-switch router later.

Be sure to 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

1 Like

This happens to me about once a month - all zigbee devices suddenly show unavailable. I also have a Sonoff Zigbee bridge that is flashed with Tasmota ZHA ZBBridge so maybe this is the common factor. I updated Tasmota on the Zigbee bridge recently but this still keeps happening. I have two CC2530 routers and 10 zigbee devices mainly sonoff and aqara and everything shows unavailable so this suggests to me its the Sonoff Bridhe or ZHA itself. I’ve tried rebooting just the Sonoff Bridge with no effect. When I restart HA everything comes back normally, I’ve never had to re-pair any devices.

Suggest replacing it with either a USB Zigbee Coordinator or a (wired) LAN Zigbee Coordinator adapter.

Other things you can try to do if possible is to upgrade firmware on both your Zigbee Coordinator and all your Zigbee Router devices which can be upgraded, as well as add more Zigbee Router devices.

I also recommend modern dedicated Zigbee Router devices like a few “IKEA Tradfri Signal Repeater” or buying a few “Itead Sonoff Zigbee 3.0 USB Dongle Plus” and flashing with latest Zigbee Router firmware.

Again, be sure to follow all these general tips and best practices as well:

https://github.com/home-assistant/home-assistant.io/pull/18864

and

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

Thanks for the suggestions. I checked the Tasmota ZHA ZBBridge version - its was 9.4.0.4 and 11.1.0 was available so I flashed the new firmware. Its all up and running now, so I’ll wait a few more weeks to see if it fails again and if it does I’ll try a USB or LAN Zigbee co-ordinator as you suggest.

Thanks for the suggestions.

I ordered a Sonoff 3.0 USB dongle (which arrived yesterday) and ironically since I hit the “buy” button, my current setup has worked flawlessly.
I upgraded HA to 2022.5.0 and when it started back up, it still working fine. (I see 2022.5.1 is available this morning).

So, I now have to decide whether to leave it as is for a while or switch to the dongle and maybe move to using z4mqtt…

Checkout easy migration path in this video (note commands there might need to be changed slightly):

@gregf Note that the Tasmota firmware is not the same as the Zigbee Coordinator firmware. For the Zigbee module in the ITead Sonoff ZBBridge see https://github.com/xsp1989/zigbeeFirmware/ and guide for flashing that firmware image at https://www.digiblur.com/2020/07/how-to-use-sonoff-zigbee-bridge-with.html

Zigbee to WiFi/LAN bridges got two chips/modules. They got one chip/module for the bridge that controls WiFi/LAN and a separate chip/module, and those got separate firmware.

ITead Sonoff ZBBridge specifically got an ESP8266/8285 for bridge + WiFi and a Silicon Labs EFR32MG21 for Zigbee Coordinator.

Thanks @Hedda for your assistance. I flashed the bridge with the latest firmware I could find (ncp-uart-nsw-6.8.2.0_115200) and this caused all zigbee devices to show unavailable. I flashed each preceding version in turn and finally got it working again with ncp-uart-nsw_6.7.8_115200. Also had to delete and reinstall ZHA. I will now wait and see if it is stable.

Once more I like to stress the importance of having many always-on main-powered Zigbee Router devices and the avoidance of EMF/EMI/RMI interference in order to achieve a stable Zigbee network.

Again, recommend buying modern dedicated Zigbee Router devices like a few “IKEA Tradfri Signal Repeater” or “Itead Sonoff Zigbee 3.0 USB Dongle Plus” then flashing latest Zigbee Router firmware.

PS: You should also know that devices originally made by Tuya and Aqara/Xiaomi are infamous for not working well as Zigbee Router devices and even deleting messages from devices from other brands.

Sorry for reviving this topic, but I came across the same issue (devices unavailable, reconfigure not working, only delete re-add helps).
First I started by removing devices one by one and re-adding them.
But it seems removing the ZHA integration itself, then re-adding it with keeping the radio settings will get back all the devices without needing to go to each one and put them in pairing mode.

Hope it helps someone who stumbles upon this thread.

I have similar behavior, very hectic occurrences where a switch or a sensor will stop responding. Only way to recover is to start again the paying process ( if we don’t delete the guilty device, it’s data will be restored; if we delete we need to define again the names of entities).
Annoying. Where does it come from? I don’t know as it can affect any device be it far or near from the Zigbee dongle (TI Coordinator).