Cannot get any Zigbee devices to stay online (ZHA)

Wow. What is to stop it changing to Ch11 after you move your zigbee channel?

It is supposed to choose the least used channel but a quick search reveals this is not always the case and users have been calling for manual control for years.

I’d definitely be looking into alternate wifi hardware.

I have

    "energy_scan": {
      "11": 9.411764705882353,
      "12": 11.764705882352942,
      "13": 7.0588235294117645,
      "14": 15.294117647058824,
      "15": 12.941176470588236,
      "16": 31.764705882352942,
      "17": 49.411764705882355,
      "18": 52.94117647058823,
      "19": 30.58823529411765,
      "20": 2.3529411764705883,
      "21": 17.647058823529413,
      "22": 25.88235294117647,
      "23": 23.529411764705884,
      "24": 29.41176470588235,
      "25": 25.88235294117647,
      "26": 54.11764705882353
    }

What does that tell me?

Channel 20 has the least traffic so in theory the best one to use.(If I have that right…)

I appreciate all the comments, but we seem to be wandering off-topic. I am not looking for advice in setting up a new network. I am looking for a way of diagnosing a working network that suddenly stopped working. Almost, but not quite, completely. Practically the whole network is down and I do not know how to go about diagnosing the problem. The debug log seemed the obvious answer, but I cannot make head or tail of it. :anguished:

Does the debug log extract that I posted not give any clues?
Would a different part of the debug log help more?
Is there a way of adding a zip file (of the whole log) to a post on this forum?

In a possibly related problem, I cannot get my Zigbee network to move away from channel 15 :man_shrugging: If I try to change the channel it goes busy for a long while, then shows the channel as still 15. This is odd because I set up a different network before on channel 25 using the same type of dongle :thinking: Maybe I need to do some kind of reset on the dongle??

I was thinking that Zigbee was useless here until I added one of these in each room of my house. Two in large rooms.

Zigbee is susceptible to degradation by other 2.4 GHz devices because it has, by regulation, the lowest legal transmit power. Any radiation in the 2.4GHz band will decrease the signal to noise ratio of the Zigbee device, and if the background radiation is strong enough, the Zigbee device will not hear the Zigbee network. This is called desense.

I don’t recall if you said what Zigbee controller you are using, but if it’s a Zigbee Dongle, do not plug it into a USB 3.0 port.

1 Like

@AndySymons probably best if you open an issue to Home Assistant core and provide debug logs from ZHA as judging by the short snippet of debugging messages it might be a problem with the new OTA update features → https://www.home-assistant.io/integrations/zha#reporting-issues (i.e. create a new issue to Issues · home-assistant/core · GitHub and post all your details there so that ZHA developers can properly analyze the full logs).

As this is not the right place to post full debug logs and ZHA developers do not hang out here :stuck_out_tongue:

However if you wanted then you could upload the full logs to pastebin.com and post the URL to it.

That could be related so you should definitely mention that when you start the issue as per above.

It is possible to backup your Zigbee network to a file and then reset the Zigbee Coordinator before restoring the network from the file, (you can do all that by using zigpy-cli and as a stand-alone command line tool on a different computer or with the ZHA integration disabled), but I would advice to first open a new issue to Home Assistant core and wait to get a reply from ZHA developers after they analyzed your full debug logs.

That procedure would work similarly to migrating to a new Zigbee Coordinator adapter inside ZHA, with the difference that you reset the adapter instead of switching to a new adapter → https://www.home-assistant.io/integrations/zha#migrating-to-a-new-zigbee-coordinator-adapter-inside-zha

Understand that the way a Zigbee Coordinator NCP (Network Co-Processor) adapter works is not just a dumb radio adapter but instead, the Zigbee stack for the Zigbee Coordinator is running locally on that adapter and it controls the whole Zigbee network, while the host application running on the computer is more or less just keeping presenting the objects and only sending commands to it telling the Zigbee Coordinator what to change.

Yes if your computer only has USB 3.x/4.x ports then it recommend to buy a powered USB 2.0 hub for connecting Zigbee, Thread, and Bluetooth Low Energy (BLE) radio adapter dongles, because USB 3.x/4.x is infamously known for causing serious interference for all of those low-powered radios that use the 2.4GHz frequency range.

Read and follow → Zigbee networks: how to guide for avoiding interference and optimize for getting better range + coverage

That includes making sure all Zigbee, Thread, and BLE radio adapter dongles and devices are not located physically close to any other sources of EMF/EMI/RMI (like WiFi router/access points, alarm-system, electric appliances/Philippians/devices, power supplies, power cables/wired, etc.). Best to put on a tin-foil hat and overkill this whole task :wink:

If you have the ITead’s “Sonoff Zigbee 3.0 USB Dongle Plus” (model “ZBDongle-P” based on Texas Instruments CC2652P) then you should upgrade the Z-Stack Zigbee Coordinator NCP firmware on it → ITead's "Sonoff Zigbee 3.0 USB Dongle Plus" (model "ZBDongle-P") based on Texas Instruments CC2652P +20dBm radio SoC/MCU

If you instead have [Tead’s “Sonoff Zigbee 3.0 USB Dongle Plus V2” (model “ZBDongle-E” based on Silicon Labs EFR32MG21) then you probably do not need to update as the older Zigbee EmberZNet 6.10.x firmware they still ship on them is known to be very stable, however, if you can not solve your problems by other means then you should consider upgrading to the latest Zigbee EmberZNet 7.3.x bug-fix version (but not EmberZNet 7.4.x or later yet) → ITead’s “Sonoff Zigbee 3.0 USB Dongle Plus V2” (model "ZBDongle-E") based on Silicon Labs EFR32MG21 +20dBm radio SoC/MCU

FYI, unfortunately, Zigbee is low-energy, and thus the signals are so weak that your Wi-Fi channels will not even notice that they are there. That is, Wi-Fi can jam Zigbee/Thread/BLE but not vice versa.

PS: This was just one of the many reasons that made me migrate from having six TP-Link Deco M5 WiFi mesh routers to four Unifi U6 Lite access points (and the Unifi Dream Machine) a few years ago.

This is by design. Stupid, but still an artifact of the USB3 protocol. In order to get 5Gb data from USB3, you need a clock frequency of half or 1/4 of the data rate. This is the source of the RF noise at 2.5GHz that desenses receivers in the 2.4GHz band.

What does that mean exactly?

I said in the original post that it is a SONOFF 3.0. It is already plugged into a USB 2.0 port (the DELL Optiplex provides both USB 2.0 and USB 3 Gen 1) via a 2m extension cable. I also mentioned that I already have several repeaters. I am not setting up a new network; I am trying to debug one that was working and then stopped.

It means that you should open an issue on the GitHub reposity for Home Assistant core and there you provide debug logs from ZHA → Issues · home-assistant/core · GitHub

Follow the instructions from this ZHA docs section on reporting issues for details on what is needed → https://www.home-assistant.io/integrations/zha#reporting-issues

It will help to be more precise. Itead sell two different Zigbee dongles based on different radio chips (using different Zigbee stacks with different firmware), the Sonoff ZBDongle-P based on Texas Instruments CC2652P and the Sonoff ZBDongle-E based on Silicon Labs EFR32MG21.

What exact firmware version are you using?

FYI, most common problem symtoms are due to Zigbee network that is not optimized or user error in the setup/configuration, which is why it a generally a good idea to make sure you are already following all the best practices before as it makes troubleshooting much harder if you are not, see → Zigbee networks: how to guide for avoiding interference and optimize for getting better range + coverage

Not a good idea to assume that you are already following all best practices when most other people are not.

That is too technical for me!

What I did do today, in the absence of a reset procedure, was to unplug the SONOFF Zigbee dongle, delete the Zigbee coordinator device in HA, restart HA, then plug in the dongle and start from scratch. At least that unstuck whatever was stopping me change the channel, so I took the opportunity to change it to 25, though I do not expect that to solve the problem.

I then went around the house re-attaching all 47 devices – a good couple of hours work because HA had lost the friendly names for my devices so did not make a match. However, eventually everything worked.

I then made the mistake of updating the HA core to 24.02.1 without making my own backup. I did tick the box for HA to make one. After the restart, it started falling apart again – some of the repeaters went offline.

Thinking that the upgrade had caused the problem, I reverted to the previous release using the HA backup. That only made matters worse. Now the repeaters are online but 29 of the battery-operated devices have gone offline.

I have not had a good HA day!

I assure you I did all that back in October 2023. I even got a spectrum analyser so that I could find interference sources (like the TV I mentioned) and check the operation of the WiFi mesh. I have applied this in two houses now.

It is the Sonoff ZBDongle-P

DONE: Cannot get my Zigbee devices to stay online. · Issue #110759 · home-assistant/core · GitHub

While probably not related to your problem you should still consider upgrading to latest Z-Stack Zigbee Coordinator firmware if you have not already (do a Zigbee network backup before you do) → Z-Stack-firmware/coordinator at master · Koenkk/Z-Stack-firmware · GitHub

I think it updated the firmware automatically when I re-installed it.
It is now on Z-Stack 20210708.

I have OTA enabled for both SONOFF and IKEA, so the repeaters also upgraded themselves.

No, ZHA will never ever update the Zigbee Coordinator firmware automatically.

Your firmware version Z-Stack 20210708 is the date so it is from 2021-07-08 (8th of July 2021).

There has been several new releases every year, see → Z-Stack-firmware/coordinator/Z-Stack_3.x.0 at master · Koenkk/Z-Stack-firmware · GitHub

Again, it is recommend to upgrade but it will probably not fix your specific problem so you should still open an issue as instructed above.

Oh, disable that as it is generally not recommend to upgrade device firmware unless having problem with that device, and especially the later IKEA firmware have recently caused problems.

OK I will do that