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

Please start a new separate thread about that as binding and type of switches as those do do have anything directly to do with the original topic as thus this discussion is getting way too off-topic. So not to highjack this thread.

I will however leave you with the tips that you can create a Zigbee group in ZHA or Zigbee2MQTT and then create a binding for that Zigbee group, (but note that all devices in that Zigbee group must support binding, which most light devices do but not all Zigbee devices do).

Update: New thread here → Use binding as a stopgap/backup solution if HA is not available

1 Like

Oh, I now understand how the zigbee relay switch works. Thank you for the clarification!

The topic is being discussed here.

1 Like

New Zigbee Router tip; ITead has released a “SONOFF Micro Zigbee USB Smart Adaptor” (ZBMicro based on EFR32MG21) spec say doubles as a Zigbee Router device when powered via USB-charger:

Besides, ZBMicro can work as a Zigbee router to help transmit the Zigbee signal to ensure a stable connection when multiple Zigbee devices are used for your home. Elevate your network capabilities with Turbo Mode, featuring advanced technology that boosts signal range and strength but also provides a seamless and stable connection for your devices.

https://sonoff.tech/product/diy-smart-switches/zbmicro/

Note! I have not tested it so have no idea if it works well if used as a dedicated Zigbee Router device.

1 Like

I need this! H0w did I survived without turbo mode till now?

We hope you didn’t got anything in exchange for copying the marketing material from sonoff here :joy:

Nope, I did not, I have not accepted anything, I also post marketing materials from all manufacturers to stay unbiased :stuck_out_tongue_winking_eye:

2 Likes

Fwiw after nearly two years of zigbee mesh network issues here are my experiences. I hope this helps others avoid the immense frustration I’ve felt wasting time managing this god awful network instead of, you know, building helpful automations and making my life easier :smiling_face_with_tear:.

Aqara
Aqara battery devices repeatedly fall off the network. In particular, those devices that use a single 3v battery (contact or temp sensor) fared worse than those that use two batteries / are Zigbee 3.0 devices (TVOC / TRV E1 / motion P1 sensor). One exception, with my recent switch to Z2M the motion P1 has become a disaster, falling off the network all the time.

IKEA
After a year of using the IKEA signal repeater with no issues they have started to drop off my network and show as unavailable every week or so. This has also occurred with my IKEA LED drivers so it could be IKEA devices aren’t built to last although I’ve has zero issues with my IKEA tradfri bulbs (although the GU10 bulbs do get extremely hot, though that’s a separate concern).

IKEA battery devices repeatedly falling off the network, although not as frequently as the Aqara devices.

Sonoff
Sonoff battery devices were rock solid on ZHA, in particular the SNZB-02 temp sensor and SNZB-03 motion sensor, but with my recent switch to Z2M I’ve started to experience issues with the SNZB-01 button falling off the network.

TuYa
TuYa ZG-204ZL motion sensor and TuYa contact sensor have been rock solid

Not device specific issues

  • Physical zigbee button presses OR clicking on entities in the Home Assistant app failing to result in a device executing an expected action e.g. opening blinds. In ZHA this was often accompanied by the log Failed to deliver message: <EmberStatus .DELIVERY_FAILED: 102>
  • Light groups in Home Assistant responding inconsistently to commands after switching to Z2M, e.g. only 2 of 3 bulbs turn on or off

Steps taken
The issues I’ve described with zigbee have remained consistent across the following steps taken to address my network:

  1. Move from ZHA to Z2M
  2. Moving my zigbee channel from 15 to 25 and moving my 2.4 ghz wifi to channel 1 (none of my neighbours seem to use wifi channel 11)
  3. Changing my coordinator device from the Home Assistant Yellow to the Smlight SLZB-06 and moving it to a room away from my router (the router and Yellow are both in my understairs cupboard)
  4. Getting rid of all my 2.4 ghz wifi Ring cameras, having a separate SSID for 5 ghz wifi and connecting laptops, mobile phones, tablets and media devices to 5 ghz wifi
  5. Gradually building up the number of router devices to over 50 in a 140 m2 two story house plus garden, as well as using four dedicated repeater devices (2x IKEA repeaters, 1x Tuya TS0207, 1x Sonoff Dongle Plus P)
  6. Using a multimeter to test battery voltage and replacing all batteries that dipped below 2.9V in my 3V battery powered end devices
  7. Removing all ZHA groups and using Home Assistant groups instead so as to minimise zigbee broadcast signals

I’m now in the process of either (a) adding more Sonoff Dongle P repeaters and moving over to TuYa battery devices or (b) giving up entirely on my zigbee mesh…tbh I keep switching back and forth daily…it’s been two years of one zigbee issue after another and I’m beyond frustrated.

Fwiw, in contrast I’ve had zero issues with my zwave and bluetooth devices although to be fair I have very few of those devices.

(Just to clarify if anyone is wondering, my zigbee light bulbs are hardwired and all router devices are permanently on.)

FYI, using ZHA or Zigbee2MQTT does not affect if a device will drop of the network more or not if usibg the exact same Zigbee Coordinator chip model and firmware version as the Zigbee network is managed by the Zigbee stack running on it.

What will affect connection other that the device that that have problems is amount, type and location/placement of Zigbee Router devices as well as EMI/RMI/EMF interference (which also includes Zigbee channel uses).

If you use the exact same Zigbee Coordinator and Zigbee devices in the exact same location then the mesh network topology and stability of the connections would be exctly the same in ZHA or Z2M.

So that should not be reason for moving from the ZHA integration to Zigbee2MQTT or vice versa. See:

Zigbee

1 Like

I am adding here some info I found by testing. Maybe it will be useful to someone.

It seems you can directly connect 32 end devices to the adapter. And you can connect 6 additional end devices for each router you add to the network. For example in my circumstance, I cannot add any more end devices as the adaptor and all routers are full. I have to add another router so I can add other end devices.

I don’t know if this is a limitation of zigbee devices or just the limitation of the Ikea devices I am using as routers.

Good callout. It’s standard design philosophy

… and actually smaller (16 I think? ) on some older Zigbee coordinators. Some incorrectly read that direct connect limit as ‘device limit’ where it’s much higher per yojr notes. Hedda would know the specifics.

Its only a mesh device limit if you don’t have routing devices :rofl:

1 Like

Limits depends on products used. Regardless, the easiest way to resolve that scenario is by first temporary removing a few of your (older) Zigbee devices and then adding a few newer Zigbee Router devices products that you know allow more devices to connect to them (like example the dedicated Zigbee Router devices that are recommend in my original guide post above), and only af6er that can you add more devices to your Zigbee network mesh (including the older Zigbee devices that you temporary removed). You can alternatively also get a better Zigbee Coordinator and/or firmware configured to allow more child devices to connect directly (but that is less ideal as you do not want too many devices connected directly to the Zigbee Coordinator, instead you want most of your devices to be able to connect to multiple Zigbee Router devices as that will give you better performance as Zigbee Router offload the Zigbee Coordinator). The best solution is to just add more “known good” and/or “known great” Zigbee Router devices.

Anyway, both of those are not limitations in the hardware or Zigbee Gateway application but they are instead limits configured and set on purpose by the firmware developers of every Zigbee product, with the firmware developers decision on what that limit should be on each device being based on a compromise how powerful SoC (chip component and its Zigbee stack) it uses and the intended purpose on the product itself. So those are limitations on each specific device that you are using, or more specifically, they are limitations set by the firmware developers of each specific device.

So for a newer ”dedicated Zigbee Router device” (as described in the original first guide post above) the firmware developers will on purpose have configured that product’s firmware to allow more devices connected to them than what th same developer would configure a “non-dedicated Zigbee Router” product like for example a mains-powered Zigbee power-plug or wall-switch which can act Zigbee Router too but was really designed to mainly service another function. This is as well partially due to “non-dedicated Zigbee Router” products usually using less expensive Zigbee SoC chips which have less resources and should therefor not be configured to route as many devices, For example for the CC2652P based dedicated products by TubeZB the firmware developers have set the limit to support up to 50 devices to connect and routed via it (which is around 10-times more than most common non-dedicated Zigbee Router devices). See → Zigbee Router/Repeater – TubesZB

Similar scenario if you have a Zigbee Coordinator based on an older SoC chip (which is also likely to be based on an older Zigbee stack / firmware version) as then the firmware developer might have set the limit of direct children to 20 (or even lower like for CC2530/CC2631 or the older ConBee/RaspBee), however if you have a newer Zigbee Coordinator adapter that is based on a newer and faster SoC (like the EFR32MG21 or CC2652P) then the firmware will have more likely configured the limit of direct children devices to somewhere between 32 and 64 (or even higher if using the even newer EFR32MG24 or later). See the example table here for the community Z-Stack Zigbee Coordinator firmware → Z-Stack-firmware/coordinator at master · Koenkk/Z-Stack-firmware · GitHub

Another thing that affects this is if your connecting devices are using the Zigbee 3.0 specification as that has a much higher security overhead than devices that connect using older Zigbee specifications. Fact is that while you can in practice connect practically an unlimited total amount of older Zigbee Router devices to a Zigbee network with a CC2652 or EFR32MG21 based Zigbee Coordinator, even those have a soft limits of around 200 Zigbee 3.0 devices simply because their SoC will run out of onboard RAM-memory (due to the higher security overhead of the Zigbee 3.0 protocol). Thus if you ever want to have a total amount of devices higher than 200 connected to your Zigbee network at the same time then you will need to upgrade to an even faster Zigbee Coordinator that uses a newer chip like the EFR32MG24 or EFR32MG26 because those SoCs more RAM-memory. See example → TubesZB EFR32 MGM24 PoE Coordinator 2024 – TubesZB

As such you might now better understand why having a newer Zigbee Coordinator adapter in combination of newer dedicated Zigbee Router devices and/or non-dedicated Zigbee Router devices where at least some are based on the higher performing SoC chips (with more onboard RAM) that have been configured by the firmware developers to allow you to connect more total number of devices to them. Only some of this is by the way explained in simpler terms in the ZHA integration here so please feel free to improve that text → https://www.home-assistant.io/integrations/zha#using-router-devices-to-add-more-devices

Yeap. I read somewhere that the actual limit is 16 000 or smth ;))

But it seems I can add more routers even in this situation where I am full. I can’t add end devices though without adding new routers. But for sure I don’t have to delete any end devices to add new routers. I don’t know the limit with routers. It probably goes towards the 1000s. :slight_smile:

Note! Due to new higher security requirements in the Zigbee 3.0 specifications, Zigbee 3.0 coordinators can only support a limited amount of Zigbee 3.0 devices. For older Zigbee Coordinators that uses the older Zigbee Home Automation 1.2 there is is no limit on the max number of Zigbee 3.0 devices that can join because they will connect in backwards-compatible mode (e.i. not use the higher security).

As I tried to explain above, while the theoretical limit for total amount of devices you can add to your Zigbee network if they use older Zigbee specifications is 64,000 nodes per network, but you will unfortunate hit the bottleneck of the Zigbee Coordinator running out of RAM (i.e. data memory) much sooner if you have a Zigbee 3.0 network and connect Zigbee 3.0 devices that use that newer protocol. Meaning that it will in practice not be possible to connect more Zigbee 3.0 devices than your Zigbee Coordinator has computational and data memory (RAM) to handle.

Again, the newer Zigbee 3.0 protocol have much better security which as a downside adds much higher overhead as each device you takes more RAM-memory, especially for the onboard RAM (i.e. data memory) of the Zigbee Coordinator, and in practice your Zigbee Coordinator will run out of much RAM sooner that you will hit any theoretical limits what the Zigbee specification can handle.

For reference, the most popular “modern” MCU radio SoCs used in Zigbee Coordinator adapters today are EFR32MG21 (running EmberZNet Zigbee stack/firmware from Silicon Labs) and CC2652P (running Z-Stack Zigbee stack/firmware from Texas Instruments) which both feature up to 96 kB of RAM depending on the specific SKU model uses, and those have been proven by members in the ZHA and Zigbee2MQTT community to at most handle around 200 Zigbee 3.0 devices in total on the same Zigbee network (note that is in total including those connected via Zigbee Routers and not only directly connected devices.

The newer generation’s of Silabs Zigbee MCU radio SoCs are; EFR32MG24 which can up to 256 kB RAM data memory, while the even newer EFR32MG24 can up to 512 kB RAM data memory. Similarly goes for TI’s CC2674 (CC2674P/CC2674R) and CC1354 (CC1354P) which can have up to 296 kB RAM data memory. I do not think it has been proven by members in the ZHA and Zigbee2MQTT community, but at least in theory if your existing Zigbee Coordinator is a CC2652P with 88 kB of RAM data memory can handle a maximum of 200 Zigbee 3.0 devices in total then is logical that the newer CC2674P with 296 kB RAM data memory should have no problems handling 500 Zigbee 3.0 devices in total.

So again, it is only OK to add more devices if and when you just add older Zigbee devices that use the now old Zigbee Home Automation 1.0 (or Zigbee Light Link 1.0) protocol specifications that you can connect 1000+ devices (probably only a few thousands of older Zigbee devices as the adviced workable limit). But would want to only use older devices today?

Summery; if you already have a EFR32MG21 or CC2652P based Zigbee Coordinator today then there should not be any need for you to replace it with a newer model until either you reach that approximate 200 Zigbee 3.0 device limitation when it runs out of RAM or until the MCU SoC manufacturers stop maintaining your old MCU SoC model and thus you can not get firmware updates with bug-fixes/security-patches.

1 Like

Hedda,
There are some devices that “pollute” the network with a lot of information, making it unstable. Some MMW and Tuya energy meters, for example.
In these cases, do these devices end up consuming a lot of the coordinator’s RAM memory or do they cause other types of problems?

1 Like

Those kinds of problem devices usually cause by other problems as they either flood the Zigbee network (basically jaming it so no other devices get a free alot in to send their messages) or in the case of some Tuya, Aqara, and Xiaomi Zigbee Router devices they will not router/fordware messages that are not using the same brand (essentially creating a black-hole that swallow and kill messages from other brand devices that connect to them). This is why it is usually ok to buy battery-powered devices from those companies but you should be extra careful before buying any mains-powered devices from those companies if they are meant to act as Zigbee Router devices, (nothing that you can not disable the routing feature on Zigbee Router devices).

2 Likes

Thank you, Hedda, for all the info.

This is how my network looks like now while testing an interactive project where I need to use 100 switches.

I have 102 end devices running. I think I need to add more routers for a more stable network.

BTW, Do you know why the device on the left is shown as not being connected? It does work. Is it a problem that it does not show as being connected to a router of the coordinator?

Thank you!

Yeah you deffinitivly need to add a few more Zigbee Router devices and place those in strategic places for best coverage. Suggest you start by adding additional Zigbee Router devices closer those that connect directly to the Zigbee Coordinator and wait until they move.

Best practice is that each device should preferably also be placed so that it is within range of a at least two Zigbee Router devices for redundancy so each device can have multiple paths if any one device break.

You should open and issue in Zigbee2MQTT repository on GitHub with logs for that but you should first try power-cycle the Zigbee Router closest to it and then also reset the device itself.

Here is by the way a new video from Linus Tech Tips demonstrating what happens to WiFi connections and data transfers (which are always relativly high-power) when your neighbors WiFi-routers use the same Wi-Fi channel as you (or you yourself have multiple access-points. From that you can use your imagination and draw your own conclusions what will happen to your Zigbee devices and Zigbee Coordinator (which are all always low-power) when they are trying to use the same or a close frequency range as yours or your neibours Wi-Fi channels:

Also keep in mind and remember that Wi-Fi channels have sideband lobes that spread out wider than you might think:

Wi-Fi’s three non-overlapping channels (1, 6, and 11) use the exact same frequencies as ZigBee channels 11-22.

ZigBee channels 25-26 aren’t immune either, because they can be caught in Wi-Fi channel 11’s sideband lobe (see ”Sideband Lobes” below). ZigBee channel 26 is usually relatively unaffected by Wi-Fi, but many ZigBee devices do not support it.

Sideband Interference

An 802.11g/n signature in the spectrum has two components: The 20 MHz “square” section that contains the data subcarriers Sideband lobes on each side, which are a normal side effects. Sideband lobes might not carry Wi-Fi data, but they are fully capable of drowning out ZigBee transmissions.

Data Subcarriers and Sideband Lobe

image

Sideband lobes are usually only visible when you are very close to to the device that is actively transmitting (try doing a speed test or streaming an HD video). This is especially evident when your ZigBee access point and Wi-Fi access point are in very close proximity with each other (like in the same comm closet).

1 Like

Considering each router supports 6 end devices, if one router breaks, what happens with the end devices that used to connect to it, considering the other close by routers are full?

I mean for sure I can fix this problem by having so many routers to cover for 1 or 2 router losses.

But I am still curious what would happen if you don’t have extra.

[quote]
You should open and issue in Zigbee2MQTT repository on GitHub with logs for that but you should first try power-cycle the Zigbee Router closest to it and then also reset the device itself. [/quote]

No idea how to quote again ;))

But the device works. It is just not connected in the map. :confused:

Again, one recommended partial workaround for all those kind of problem scenarios is to simply buy and pair/join a few “known good” or “known great” dedicated Zigbee Router devices to your Zigbee network (meaning purposely made Zigbee repeater/extender products designed for only that use-case and no other purpose. Because if you place a few such dedicated Zigbee Router products in strategic locations/areas as dedicated Zigbee repeaters/extenders then they will kind of act like a network-backbone in your Zigbee network mesh and hopefully make up for the lack of not having loads of Zigbee Router devices everywhere.

  • Two “known gooddedicated Zigbee Router products are the “IKEA Tradfri Signal Repeater ” and “Aeotec Range Extender Zi ”, as both those are well tested and proven work very good out-of-the-box, (so only need to be paired to your Zigbee network).

  • Two "known great" dedicated Zigbee Router products are the semi-DIY solution of buying and using Sonoff ZBDongle-E (EFR32MG21-based) or the Sonoff ZBDongle-P (CC2652P-based) after flashing them with correct Zigbee Router firmware and then powering them via USB-chargers (just for power). That flashing process is simpler than you might think and both of those are proven to work as awesome stand-alone Zigbee signal repeaters/extenders.

I can personally recommend buying those above specific devices for that purpose and placed spread out in your home (suggest adding at least three even in a small home):

Please read my while original guide post and try to understand that because Zigbee has such poor radio propagation in an indoor environment (which translate to very short signal range when passing signals point-to-point through building materials in walls/floors/ceiling or furniture as obstacles), as such it will usually not be enough to only have Zigbee Router devices “to cover for 1 or 2 router losses” like you say as your Zigbee Router devices on one side of your home will not be able to cover for losses on the other side of your home.So I believe that if you think more about it then you can figure that out yourself as should be obvious that redundancy and possible fail-over scenarios needs to be considered for each individual Zigbee device.

Anyway, basic calculations are also explained in both in Zigbee2MQTT’s FAQ (and somewhat better in the ZHA documentation), but those calculations do not consider the Zigbee radio propagation:

However no home is the same, so suggest you just try unplugging a few of your Zigbee Router devices (as in power-off multiple Zigbee Routes in the same area) to at least simulate a power outage of a blowned fuse (as that should kill all devices on the same electrical phase/circuit), then wait to test what happens, (personally I would try to test all possible scenarios to at least test killing all fuses/phases). I think it is much more likely scenario that a fuse blows then more than one Zigbee Router dies on its own.

Actually see that it is explained in Zigbee2MQTT’s FAQ here:

"Why are some links missing from my networkmap? : No worry, in case it happens with end devices (battery powered) it most of the times does not mean the devices aren’t connected to the network map anymore. Some end devices (e.g. Xiaomi door sensor) sleep for a too long time which causes the parent (router child ageing) to remove it from it from its child table. This is what causes the missing link. Even while its not in the child table anymore, the end device can still communicate via the router. This does not always happen since not all routers use child ageing (this is a Zigbee 3.0 feature)."

You can do what you like, but please understand and try to respect that this is not the right place to ask Zigbee2MQTT-specific questions, so you should still refer to Zigbee2MQTT’s own community for Zigbee2MQTT-specific questions and answers, see:

PS: Keep in mind that this “Zigbee” subsection in Home Assistant’s community forum is primarly meant to be about Home Assistant’s native ZHA integration (which is Home Assistant’s built-in Zigbee gateway) and Zigbee devices that can be used with it, and not about third-party Zigbee gateways, regardless if those third-party Zigbee gateways are software applikcations like Zigbee2MQTT, deCONZ/Phoscon, and Z-Way, or third-party hardware appliance Zigbee gateways like Philips Hue Bridge, Samsung SmartThings, IKEA Trandfri Gateway, etc.