Zigbee network optimization: a how-to guide for avoiding radio frequency interference + adding Zigbee Router devices (repeaters/extenders) to get a stable Zigbee network mesh with best possible range and coverage by fully utilizing Zigbee mesh networking

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:

1 Like

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.

That depend will depend on many different things;

  • Are they running Zigbee 3.0 (or later) firmware? If not they may not be interoperability friendly.
  • Do you have many of them close enough to each other? If so then that might compensate for them not being great repeaters, but on the other hand if you have loads of them then you might sooner or later reach the maximum limitation of total amount of Zigbee 3.0 devices you can add to your Zigbee Coordinator adapter (if which case you might need to setup a second Zigbee network).
  • And most importantly; Do they always have mains power or are they sometimes powered off because still connected to wall-switch or cord-switch?
    • Zigbee Router devices need to always be powered on and it will not be good for your Zigbee network mesh if your Zigbee Router devices are sometimes powered off because of “bad usage” as they will stop routing and devices connected to them will take time to reconnect.
      • Tip is to otherwise remove the physically wall-switch / cord-switch if and when smart lightbulbs is used as then they will not be accidentally powered off and stop routing.

Personally recommend using smart wall-switches/modules instead of smart lightbulbs for these reasons.

Yes, they should show as “Unavailable” in ZHA UI (or Zigbee2MQTT GUI) if they are working properly.

If that does not work on a specific device then there might be a bug in the device firmware that prevents that or your Zigbee Router devices are not passing along the message. Regardless suggest upgrading firmware on both your Zigbee Coordinator and your Zigbee devices, including Zigbee Router devices.

FYI, devices becoming “Unavailable” or not changing state on command is otherwise the most common symptoms of interference problems and range issues.

The bulbs are gen 1 and gen 2 Phillips Hue, so I haven’t been able to confirm they are running Zigbee 3.0 firmware, but I’m thinking they’re not since they’re the older variety? I started this post specific to my setup and experience to not stray too far from this thread.

To answer some of your other questions/suggestions here:

  • Yes, they’re strategically placed throughout my home with only a couple that are further than I’d like…but those haven’t been troublesome for me.
  • All mains powered devices are on all the time and not tied to a manual switch. Some have smart switches attached, but those are set to be on all the time and not allow for power cutting by the action.
  • My controller is a SkyConnect and fully updated per the information I’ve found so far.

Good to know that I should see “Unavailable” when they’re “unavailable.” I’m going to start unpairing and repairing these troublesome devices through the nearest router if/when I see issues moving forward to see if that helps. Appreciate the response and suggestions.

1 Like

I have a couple of questions. My setup is a Sonoff Zigbee Dongle-P coordinator and I have various aqara sensors throughout my house. I followed @Hedda advice and bought a Sonoff Zigbee Dongle-E and got it flashed with the router firmware. Started working immediately and seemed to have great range. I did have problems with some of my sensors that were relying on the router for connection, IIRC they would go offline and then i discovered my dongle wasn’t working. I tried a couple of things and ended up using a different power brick as opposed to the usb hub with a usb extension cable. For whatever reason it started working again. Until a power cut recently which seemed to kill the Zigbee dongle - there was quite a big power surge for about 3 seconds before the power went out. I have a feeling a power cut may have also been responsible for the problems i had in the first instance.

I looked online extensively for a place I could get the Tradfri repeater from but no where ships to my country (NZ).

I ended up buying 2 of these instead as I seen some people review them saying they act as repeaters and work with HA. They do indeed appear in ZHA as a router, but they are not great. I got 2 in case they didn’t give enough range hoping I could daisy chain them. Up until right now I had the question can a router talk to another router then back to the coordinator and I’ve just checked the network map and can see that is how they are connected although the second (further) router also has a link to the coordinator which I find strange as I thought it was out of range. The closest router is around 13m from coordinator and farthest one is 16m, and around 6m between each, all going through walls. I’m finding the sensors in the far corner of the house another 10m or so away are dropping off every now and again which is frustrating. In comparison the Zigbee Dongle-E which was around 23m from the coordinator and between the 2 of them seemed to provide stable connection for all devices.

I’m at the point where I’m sick of spending money on cheap dongles and plugs from china and just want a reliable solution even if it means I have to spend a bit more. I just looked at the Aeotec repeater and seems Amazon.com reviews are good but not so good on Amazon.de, might have to do more research here.

I am curious about whether I could run an RP SMA extension cable into the ceiling and then use a tee joiner to add in another antenna every 10-15m or so instead of all these routers/repeaters that need mains power. This way everything talks to 1 device - the coordinator. Can anyone see any problems with this? My only other option is to move my HA set up to a more central location which should work better but then creates a problem moving my RF bridge too far from a sensor outside so then I have to try and extend the range on that somehow.

@bigdogevan Would you mind sharing specifics as to how you successfully flashed the Dongle-E with the Router Firmware? Or even share via DM? I’ve literally tried three different devices with three OSes and multiple app methods (as outlined multiple times above), but have been completely unsuccessful in getting these devices to the Router Firmware.

I too thought it would be straight forward but struggled for a few hours until I found this post. See my reply also.

Thanks a lot @Hedda!
I was struggling a lot with my Qnap NAS HA in VM and the Sky Connect dongle.
At the end it was the USB 3.2 Port. I added a old USB2 Hub and now it works flawlessly!
Thanks for the detailed explanation.

1 Like