Zigbee networks: how to guide for avoiding interference + optimizing using Zigbee Router devices (repeaters/extenders) to get best possible range and coverage

Possibly off topic but:

Does anyone know where, in a home assistant backup, the ZigBee coordinator backup is?

If I needed to restore a ZigBee coordinator backup to a new coordinator then where would I find the backup?

Zigbee database (zigbee.db) is part of the standard Home Assistant core backup but not exactly sure now that you ask if a complete backup is also done automaically of Zigbee network of APS keys or NWK address tables that are stored in NVRAM on the Zigbee Coordinator adapter, but that is anyway probably more on-topic if asked in this other thread instead → https://community.home-assistant.io/t/zha-integration-to-do-nightly-backup-of-both-zigbee-coordinator-adapter-dongle-stick-and-zigbee-network-database/357558

Note that it is at least easy to download latest backup in JASON format via the ZHA GUI (and also option there to migrate to a other adapter which automatically runs a procedure for backup and restore).

Thank you for the guide @Hedda !

I have one question which is not specifically pointed out in the guide.
Is there any problems using a USB 3.0 extension cable when it is connected to a USB 2.0 port?

There is no problem since USB cables are backwards compatible, in fact it is usually better since USB 3.0 cables are normally betted shielded. USB 3.0 cables have the same numbers of wires/pins so in practice the only difference is just that they are better shielded. Shielded cables are better to use for radios and long cable lenghts.

Other than better shielding USB 3.0 cables also have lower resistance and use thicker gage so can therefor be rated to transfer more power and higher data rates but that only matter to USB 3.0 devices and not to USB 2.0 devices.

Thank you,
I know of the backwards compatibility (since it is what I am currently using). It was mostly if a usb 3 cable connected to usb 2 port could create EMF interference similarly to if it was connected to a usb 3 port. But I guess not :slight_smile:

My external SSD is connected to usb 3 port though. I have shielded that cable in tinoil to minimize the interference.

Hi, few days ago I’ve tried to ask something similar on reddit, might go off topic here a bit but it’s related.

From what I read here, I should move the dongle few meters away to deal with Zigbee, but what about other devices interfering with each other:

I am about to make a setup with HA running on r4 pi 8gb. I plan to stack two sonoff 4ch pro’s and several mini r3’s (controlling SSR’s located in the fuse box, which in turn control heating and water boiler) alongside router, switch and pi4 in a large in-wall media box, say 500x500mm
Are there EMI issues here with router-sonoff or sonoff-sonoff or sonoff-pi4 and what would you recommend?

Thanks,
Veljko

First of all, are any of those really Zigbee devices? (Sonoff also make WiFi devices and if they are WiFi devices and not Zigbee devices then it is off-topic here in this specific thread).

If they are Zigbee devices then there should be no problem as long as you have a Zigbee Router devices (such for example an IKEA Trådfri Signal Repeater) close enough but not too close to those devices and still got good connection to the Zigbee network mesh as a whole, like in the same room but not right next to all those sources of EMF.

So the general recommendation is to build out your Zigbee network mesh by adding more Zigbee Router devices.

Thank you @Hedda for this very comprehensive write-up. Much appreciated!

Does anyone have constructive feedback on how to best rewrite this pull request for the ZHA docs?

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

I have already rewritten it many times and now I’m no longer sure how to proceed (or if I even want to).

Home Assistant posted a video to clearly show Zigbee’s symptoms with electromagnetic interference:

That does however not answer the follow-up question of the Home Assistant Skyconnect dongle and the short USB extension cable that it ships with is more susceptible to interference than other dongles and cables, as in do they have good enough shielding or not, nor if it the short length of the included USB extension cable is long enough. That is, the Home Assistant Skyconnect dongle is not EMF shielded and the USB extension cable that it ships is both very short and relatively thin so it could be assumed that it does not have a lot of shielding.

https://community.home-assistant.io/t/home-assistant-skyconnect-usb-stick-announced-will-be-compatible-with-both-zigbee-and-thread-including-matter-chip-over-thread/433594/158

For reference, Home Assistant SkyConnect website and FAQ on webpage where to buy it now contain some of this information:

https://skyconnect.home-assistant.io/connectivity/

https://www.home-assistant.io/skyconnect → FAQs → “Why include a USB extension cable?

  • USB 3.0 ports (the ones with blue on the inside) are known to cause significant noise and radio interference to any 2.4Ghz wireless devices. This includes Zigbee and Thread. If you do not use the extension cable, it may not work at all, and if it does, it could be flaky at best with intermittent problems (issues with pairing, device dropouts, unreachable devices, timeout errors, etc).

Issue with USB 3.0 interference for Zigbee was also mentioned in Home Assistant’s latest newsletter for Building the Open Home:

https://building.open-home.io/assisting-the-open-home/

Zigbee interference caused by USB 3.0

A lot of users build their smart home around a Raspberry Pi. It’s quite popular to expand the storage using an external hard drive connected to the Raspberry Pi via USB 3. What most users don’t know is that USB 3 causes enormous interference with any Zigbee device or stick that comes close, to a point that it no longer works.

Gabriela recently joined the Nabu Casa team as a technical documentation writer and has been focusing on documentation to help users avoid common pitfalls like these. She updated the documentation for the Home Assistant SkyConnect including this 30 second video that shows how bad the issue is:

3 Likes

The advice already posted above in a this thread stands as my recommended guidelines for general best practice, and as you can read there my recommendation is that it is better to have many good Zigbee Router devices than a just one or two great Zigbee Router device(s).

So for a small budget I personally suggest buying three of more of the IKEA Trådfri Signal Repeater if the alternative is buying just one or two Zigbee USB dongle(s) to use a dedicated Zigbee Routers for the about the same amount of money instead.

Again, for a stable Zigbee network mesh is much better to have many good Zigbee Router devices which are always on than just a couple of great ones

PS: @bigdogevan posted reply in public thead instead of private message as do not want to offer personal one-to-one support as then no one else have the opertunity to learn and would also have to repeat the same message even more.

1 Like

Related to this, consider voting on ZHA feature request for adding UI options to change Zigbee channel:

https://community.home-assistant.io/t/zha-ui-options-to-perform-zigbee-energy-scan-and-change-zigbee-network-channel/541020

1 Like

Thank you for this extensive write-up! :bowing_man:

Thank you very much for the detailed write-up @Hedda, much appreciated. I have a related question. One of the biggest issues I had initially with my ZigBee network was related to my wifi router. I have set up my ZigBee network to use channel 15. Initially, I had my wifi router set up to choose the 2.4 channel automatically. My ZigBee devices would sometimes work great, but other times would become really unreliable. I couldn’t figure it out so I even bought the new Aqara P1 motion sensors to see if their better ZigBee 3.0 compatibility would solve the problem, but it didn’t. Ultimately, I realized what was happening was my wifi router would sometimes choose channels 1 or 6, which interfered with my ZigBee channel 15. I went ahead and changed the WiFi channel to 11 and the problems stopped immediately.

The only issue now is that from time to time, my wifi devices get poor connection during times when channel 11 is congested in my neighborhood. I’ve looked into buying a wifi 6.0 mesh system like the TP link Deco, Google/Nest wifi, Eero, etc. but I’m afraid that may actually interfere with my ZigBee network again as I’ve read you can’t really specify which 2.4 channel those mesh systems use. Ideally, I’d love to have a wifi router/system that allows me to exclude certain channels, while still being able to use a number of other channels to switch automatically based on traffic.

So my question is, is there a wifi router/mesh system you would recommend that has the best features/specs for coexisting with ZigBee networks? I’d love to figure this out as both my wifi and ZigBee networks continue to grow.

Best if you can use as few devices that use Wi-Fi 2.4GHz as possible. So if poissible try to buy more modern WiFi devices that either use wired Ethernet or support Wi-Fi 5GHz and/or Wi-Fi 6GHz bands.

Not really, hopefully can make it work as long as can set static channel(s) on your Wi-Fi access-points.

I personally primarily use wired Ethernet everywhere it is possible and have three “Unify U6 Lite” WiFi access-point units configured to use different static channels and placed far a part and located where fast WiFi is more important, that works great for me.

Most important is to add loads of Zigbee Router devices (mains-powered devices) to build out a large Zigbee network mesh and keeping all your Zigbee devices as far away as possible from sources of interference, which include trying not to place any Zigbee devices too close to any WiFi access-points.

Thanks for the reply. That was my suspicion. I still have a bunch of Tuya-based light bulbs and switches (e.g., Treatlife) that I run using localtuya, which work well, but I agree moving forward I’ll likely stick to newer wifi gear or ZigBee devices exclusively. One of the things I’ve noticed is the selection of ZB dimmer switches is not great, but that will probably improve in the future. Thanks again for the writeup, very helpful.

Reply to @adamantivm’s thread Seeking advice to get to reliable ZigBee, incl. low level diagnosing

Highly recommend starting by trying to follow all actions here as that should at least workaround some root causes → Zigbee networks: how to guide for avoiding interference and optimize for getting better range + coverage

I also live in a three-story house (with dense walls) and I recommend considering relocating your Zigbee Coordinator adapter to the middle floor as much as in the centre of your house if that is possible.

If you can pull a long cable then relocating the Zigbee Coordinator adapter can relatively easily be achieved by either simply a long USB cable or using an inexpensive “USB Ethernet RJ45 Extender Adapter” converter that can convert a very long Ethernet cables into a very long USB extension cable.

Alternatively, buy to a network-attached Zigbee Coordinator serial adapter like those from d TubeZB or ZigStar and migrate to it, (as mentioned in the above thread).

Note that a network-attached Zigbee Coordinator serial adapter over WiFi is not recommended as the serial protocol they use is not designed to handle package drops or delays!

That is a good beginning, but understand that not all Zigbee Router devices are created equal, so if you have a large house with a complex layout and/or walls that have dense building materials then it is a good idea to buy a few dedicated Zigbee Router devices that serve no other purpose than acting as Zigbee signal repeaters.

For a three-floor house I suggest buying at least three dedicated Zigbee Router devices, with one on each floor (including one on the same floor as the Zigbee Coordinator but placed a little bit away from it).

Personally, I recommend either the “IKEA Tradfri Signal Repeater” if just want a plug-and-play product, however, if you want the best then you should buy a few Sonoff ZBDongle-E (EFR32MG21 based) and Sonoff ZBDongle-P (CC2652P) adapters to repurpose as dedicated Zigbee repeater devices by reflashing them with Zigbee Router firmware and put in USB-chargers to use as stand-alone products.

This is also mentioned in the above guide.

There are still things can do; such as pull wired Ethernet cables to all your WiFi access-points so they will use wired “Ethernet Backhaul” network between them instead of WiFi as their backbone network, as using a “Wireless Backhaul” (a.k.a. WiFi-mesh) will generate a lot of unnecessary traffic between APs:

https://www.tp-link.com/us/support/faq/1794/

Also moving all Zigbee devices so they are not too close to any WiFi access-points or any other equipment/appliances/power supplies/cables/wires that have electricity. Especially the Zigbee Coordinator adapter and any dedicated Zigbee Router devices so they do not get reception issues.

Possibly test changing the Zigbee channel too if you can find out which WiFi channels your APs us:

https://support.metageek.com/hc/en-us/articles/203845040-ZigBee-and-WiFi-Coexistence

Again, there are even more tips posted in the original guide post and the thread’s discussions above.

I think the best would however be to consider selling your TP-Link WiFi mesh system if they do not allow you to set static WiFi channels and instead buy some other WiFi access-points that allow you to set static Wi-Fi channel(s) on your WiFi access-points, because dynamic Wi-Fi channel switching will cause intermittent problems which basically makes troubleshooting impossible or extremely hard so all you can really do is try your best to avoid known issues, such as most of the generic tips about removing other sources of electromagnetic interference as such.

I can recommend UniFi WiFi equipment from Ubiquiti as I personally have three UniFi U6 Lite which currently is their least expensive Wi-Fi access points, those are not a terribly costly solution if can run the UniFi Controller package on an existing computer, server, or NAS in your home, …and running a UniFi ecosystem brings additional benefits to Home Assistant, such as for example great presence detection and more → https://www.home-assistant.io/integrations/#search/unifi

Not low-level but first step for deeper ZHA troubleshooting is to enable debugging and read debug logs:

https://www.home-assistant.io/integrations/zha#debug-logging

If you want to do real low-level diagnostics then Zigbee sniffing with Wireshark for packet capture and analyses (which is same skills as a network engineer and requires knowledge of the Zigbee protocol):

To sniff Zigbee traffic you will need another separate Zigbee Coordinator adapter (Silabs or TI based):

Those are not mentioned above as it is too advanced so should be discussed in a separate threads :wink:

If the ideal location is away from any surface, how are people mounting and securing their dongles? I’ve got mine on USB 2.0 extensions, but it seems like I need some sort of tripod or some kind of extension to get it away from a wall or ceiling. Would anyone be willing to share details of how they’ve mounted their dongles?

For my situation, I have both Zwave and Zigbee, and while I have 50 repeaters (most are Hue Lights), I’m finding Zigbee to be far less reliable and forgiving as Zwave, which I’m thinking may be due to the location of the controller.

Also - I’m curious how best to “fix” a network that was not necessarily setup following this guide. Since I wasn’t certain I was going to migrate my Hue devices to my SkyConnect, I did it piecemeal one room at a time. Due to the distance, I mistakenly took a few stubborn bulbs down to where the controller was to pair them and then moved them back (Which could be contributing to my reliability). Without having to unpair and repair the bulbs, is there a concept for “healing” a network like we have in Z-wave where it’ll remap the neighbors? Any recommendations on how to address this for those that set up their networks BEFORE seeing this awesome guide?

Each individual Zigbee device in your Zigbee network mesh constantly evaluates and collects information about all its possible connections and they will always try to automatically connect to the Zigbee Router with the strongest signal power about once every 24 hours or so.

So there is no need for you to do anything to initiate the healing of a Zigbee network, but if you like to try to speed up that process then you can try making a troublesome device powerless for a while and then replugging it.

In that case, the smart thing, to begin with, is simply to add more good Zigbee Router devices in the best possible location and then just wait until the next day for your other Zigbee devices to connect to them.

Note however that as mentioned in the guide above, not all devices behave well like this or play nice with other manufacturers/brands, so it is possible that some devices will not use other manufacturers/brands as Zigbee Router devices, and in a few rare occasions some bad devices suppose to work as Zigbee Router devices but not forward messages from other brands (in which case there is nothing to do other than completly remove that bad device from your Zigbee network).

Suggest adding a few “known good” dedicated Zigbee Router devices and place in different areas.

  • Buy a few known good dedicated Zigbee Router products and place them strategically as Zigbee repeaters. Personally, I suggest buying and adding at least three such devices.
    • For example, the “IKEA Tradfri Signal Repeater ” and “Aeotec Range Extender Zi ” are products that work very well out-of-the-box, while a more powerful alternative is to make yourself some semi-DIY variant by flashing the correct Zigbee Router firmware to Zigbee Coordinator USB dongles and then using them as stand-alone Zigbee Signal Repeater devices in USB-chargers for power, like, for example, either the Sonoff ZBDongle-E (EFR32MG21 based) or the Sonoff ZBDongle-P (CC2652P) work great as dedicated stand-alone Zigbee Signal Repeaters with recommended firmware.
      • Search community forums for more “Zigbee signal repeater” or “Zigbee range extender” Zigbee Router tips.
  • Buy a few additional new Zigbee USB adapters to use after re-flashing them with Zigbee Router firmware.
    • Reflash/reuse modern Zigbee USB adapters to act as Zigbee Router devices by changing Zigbee firmware.

Jerry-rigged mine since it is hidden anyway, however, I heard docking USB extension cables work nice, (especially if Zigbee Coordinator has an external antenna like Sonoff’s ZBDongle-P or ZBDongle-E):

Thanks. Well based on this and the rest of your post, I’ve really done almost everything I can at this point. I purchased three Aeotec Range Extender Zis (1 for reach floor and in strategic locations).

And I also purchased three Sonoff ZBDongle-E’s, but I’ve been unable to get the firmware to flash as I’m running into this same issue where it’s getting to the bootloader, but never actually transferring on all combinations of the Sonoff dongles and my Mac and Windows devices for flashing them. And unfortunately, I’ve been unable to get any of the other known methods you’ve shared multiple times to recognize the Dongle. I really don’t get why these devices will not take the firmware transfer.

So aside from the Zigbee dongle router issues, it sounds like there’s no need to heal and my system should optimize over time, but I guess my last two questions are:

  1. Are Hue Bulbs known to be bad routers?
  2. Is there anyway for HA to know one of the bulbs (routers) is not actively connected or unavailable?

It sometimes find a device unresponsive to commands via the UI, but the ZHA interface shows it has good RSSI and was seen within seconds of my interaction. These are all Hue bulbs that I’m finding this with by the way, so the questions are related. Back when they were managed by Hue Hub and before I found a good location in my home, I would sometimes find bulbs Unavailable, but they would show this way in HA. It’s really weird that ZHA continues to show them as good despite clearly not working.