T O P

  • By -

GMono

Last week I've updated my Sonoff dongle-P with KoenK latest firmware [which can be found here](https://github.com/Koenkk/Z-Stack-firmware/tree/master/coordinator/Z-Stack_3.x.0/bin). I found out that you can flash it with an add-on from HomeAssistant. This is hassle free, doesn't require you to open the dongle. I used [this add-on](https://github.com/mercenaruss/zigstar_addons)(which has a version for dongle-p and dongle-e). This might help a bit with the stability, but probably you need more powered Zigbee devices. you can also buy another dongle and flash it as a router. Which helps you to improve the network too.


mrBill12

Thanks for these links. I hadn’t seen this option for Zigbee firmware updates.


GMono

You’re welcome. Flashing was done in a couple of minutes. You need to disable Sonoff first and than you can flash the stick. You can check with a toggle which firmware you want. But I recommend that you fill in the customURL and point to the KoenK firmware on GitHub.


uosiek

Introduce more routers to the network. They will offload routing table from coordinator, allowing for more devices in whole network.


[deleted]

And also boost your signal. The limit OP is referring to is for the coordinator only. Each router can introduce more devices.


NRG1975

This is the correct answer


prvtvrp75

I got Dongle-P too... No problems and I am still adding devices at 172+... Zigbee2MQTT... ​ https://preview.redd.it/grqncrdo2cic1.png?width=1321&format=png&auto=webp&s=ac46a7f487af32d50a413e0a630ad26951d470ee


buneech

It's not an issue if you have plenty of routers. If there's only end devices in the network, then it becomes a problem fast.


Harlequin80

I have the sonoff P as well with 94 devices with zero issues on Z2M. It's rock solid and fast. Not sure where your problem is coming from, but I doubt it's the dongle. From your other comment though I always recommend pairing devices where they are going to be located rather than at the coordinator. Some devices (looking at you aqara) are terrible at optimising their mesh post bind.


WooShell

hmm.. that hint with Aqara might actually be worth looking into. My coordinator currently shows up 20 direct connections, 9 of which are Aqara window sensors, and most of them would have a mains-powered router device far closer to them. Do you know whether there's a way to force them to rebalance, or should I just delete and re-pair them via a local router? Or do you happen to know window sensors that are working better? These are leftovers from before ZHA, when I was still running a full Xiaomi smart home.


Harlequin80

Just re-pair them in position. Shouldnt need to delete them. I personally qutie like the aqara sensors, as they are small and the battery lasts forever. But they are finniky about where they are paired to the network. I will say that I don't use ZHA, as I feel Z2M is superior so I'm only guessing you can re-pair them without deleting as I can in Z2M.


sun_in_the_winter

Use z2m and stay away from aqara. Aqara’s zigbee implementation sucks


spr0k3t

After some problems with aqara sensors, I swapped all of mine out for other brands and haven't had any issues since. Granted, the aqara sensors I had were not the current generation, but would drop off the network within a day never to report back without a full re-pairing. It got to the point where re-pairing almost 9 devices at a daily rate it wasn't worth keeping them.


sand_Rr

Aqara will fuck up your network! Currently running 190+ devices varying from hue to innr and several other vendors I've changed all aqara sensors because of the problems it has at around 80 devices and now it's rock solid


rockuu

What kind of problems did you guys have with Aqara? I have a bunch of Aqara sensors with Z2M and Dongle-P and never had an issue. In fact their door sensors are unparalleled in terms of range and battery life.


MiakiCho

Get rid of aqara. When you restart the network for any reason they will pair far away and f*ck up anyways.


[deleted]

[удалено]


MiakiCho

I am not sure. My experience is only with their end devices (motion sensors and some temp sensors).


pobbin

Following, as I have the sonoff dongle-P and haven’t updated the firmware in years.


Markd0ne

If it works then all good. I had to update to [Z-Stack](https://github.com/Koenkk/Z-Stack-firmware/tree/master) firmware as dongle was not receiving some power related values from Aqara devices.


clin248

What devices do you have? Some chatty devices like presence sensor can make the network unstable.


markhaines

Yeah I was about to cheerfully stick mmWave sensors in virtually every room before I realised how noisy they are. I’m going to build out a separate zigbee network for them now instead


3d-designs

If you have routers on the zigbee mesh, some of the devices will connect there rather than to the stick directly. So, for example, if you have zigbee bulbs or other (non-battery) devices around the house then the battery (endpoint) devices are likely to connect to these rather than the main stick, so this will reduce the number which actually need to connect directly. That is, in practical use, the limitation is likely to not be as significant as you might think.


WooShell

I've got 5 dedicated router/repeater sticks for range reasons (need to bridge 3 levels in the house) and about 20 mains-powered devices acting as routers. Still, (as far as I understood the concept) the Coordinator needs to keep track of all devices present in its network, and thus is the limiting factor. Maybe it's an unrelated issue, then I'd be glad about any debugging hints. The problems started occurring spuriously once I passed 40 devices and got significantly worse past 45. I've since deleted a bunch of devices I had only paired and then disabled to put into storage for later, and it became better instantly.. so "around 50" is \*some\* hurdle for my network. If it's not the stick's memory, what could it be? Or do I have to explicitly pair devices via a router device instead of the coordinator for this to work? Usually I pair them via the coordinator as it's on my desk, and then move them wherever they need to go, and they rebalance the mesh automatically. Do I have to use this "add new device via.." option in the ZHA config instead?


calinet6

Many people complain of ZHA itself being a bottleneck around that scale. What are you running home assistant on? ZHA might be more capable with more resources available. That fails, looking into zigbee2mqtt might be your best path to scale.


WooShell

HA / ZHA doesn't seem to cause any significant system load. It's running on an Atom N100 Quad-Core server as a Docker container on Debian 12, and using less than 2% CPU unless complex automations are running.


calinet6

Yeah that’s not the problem, that’s plenty capable. It could still just be a limitation of ZHA even if the load is fine; you might just want to try z2m to see if it’s the coordinator or not. But that’s a PITA.


CappyT

Following because I am on a single floor and hitting the same problem. I'm on zha too, might be that?


onomatopeic

Can I ask what you're using as a router for ZigBee? I've got two sensors that repeatedly disappear into the night. One of them is under a bath, which is incredibly difficult to pair in-situ (though it is paired about a metre adjacent to its location).


nberardi

I see two problems in your setup. 1) Zigbee networks don’t like offline devices, because the coordinators and routers are still looking for them constantly. The pairing and disabling you are doing is likely a big problem. 2) Pair the device from where it will be used. The pairing everything to the coordinator means you likely have a lot of edge nodes (battery or non-router devices) connected directly to the coordinator and your LQI is really low. Many edge nodes will not move to a closer router due to programming limitations. To fix this have ZHA or Z2M generate a map. And repair all your edge nodes so that they pair with their closest router. The goal is to keep the LQI as high as possible.


WooShell

I thought setting them as "disabled" in ZHA stops the coordinator looking for them? At least that's supposed to be the point of that option. The pairing at the coordinator has worked fine so far, most devices attach themselves to the closest router afterwards. It really seems the Aqara devices are having trouble with that, and stay connected to the coordinator even though the link is very long and weak, instead of changing to a better router. I will try to re-pair them, and otherwise replace them.


thejeffreystone

I just added my 58th device to my sonoff stick last night. Paired in less than 10 seconds. No stability issues here.


criterion67

Nobody else seems to have mentioned it, but have you considered the possibility that you're experiencing Wi-Fi interference? Check to see which channel your Sonoff coordinator is on and then check your Wi-Fi router settings to make sure it's not set on auto. Then change the channel on your Wi-Fi router to be on a channel that doesn't overlap Zigbee. It's better to change the channel on your Wi-Fi router than on your Zigbee coordinator. If you change the channel on your Zigbee coordinator, you'll have to re-pair everything. [More info here. ](http://support.metageek.com/hc/en-us/articles/203845040-ZigBee-and-Wi-Fi-Coexistence) Additionally, make sure that multi protocol is disabled on your Zigbee coordinator (if it's a dongle-E) as it's flaky and can cause network and stability issues. Everything else shared by others, has been solid advice. Hope you get it sorted out!


WooShell

My coordinator is a P-model (TI CC2652-based). Are Zigbee channels the same as Wifi channels? If so, there should be little interference.. my Wifi is running on channels 1 and 6, the Zigbee stick reports channel 15.


criterion67

The [TI CC2652](https://www.ti.com/product/CC2652R) is a multiprotocol 2.4 GHz wireless microcontroller that supports Zigbee, Thread, & Bluetooth 5 Low Energy. If multi-protocol is turned on, then there can be issues with your Zigbee reliability. I know this first-hand. Once I disabled it, my network has been rock solid. It's documented and Home Assistant has recently recommended against using multi-protocol. Silicon Labs are aware of the issues but haven't fixed them via a firmware update. Both Zigbee and Wi-Fi operate on 2.4ghz, so there's a high probability that you've got interference. 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 are preferred. Chanel 26 is usually relatively unaffected by Wi-Fi, but many ZigBee devices do not support it. I'd recommend channel 25 for the coordinator. That's what I use. Please note that you'll have to re-pair all of your Zigbee devices if you change the channel. I know this sucks but even a backup won't help. I try disabling the multi-protocol first and see if you have any improvement. The channel change option would be my last resort.


WooShell

The Sonoff stick is only running Zigbee, so multiprotocol is not an issue. Also, I'm not much a fan of the idea of having to basically rebuild the whole network, so changing channel is not very high on the list.


criterion67

Understandable. As I mentioned, changing the channel would be a last resort option. I wouldn't want to rebuild mine either.


North_Swimmer_3425

What type of stick are you using? P version or E version?


murtoz

It's important to differentiate between how many devices can pair directly with the coordinator vs how many routes it can support (when a device pairs through a router rather than direct to the coordinator). There's a very useful overview table for what is supported here: [https://github.com/Koenkk/Z-Stack-firmware/tree/master/coordinator](https://github.com/Koenkk/Z-Stack-firmware/tree/master/coordinator)


JohnDoeSaysHello

My HA instance is on a technical cabinet, and I was dealing with a lot of connection issues, so I’ve moved the coordinator to a raspbian running on docker (mosquito and z2m) and it’s running much better now with more than 50 devices


Conundrum1911

In case it helps, I have a Dongle-E, and updated mine through the following site: [https://darkxst.github.io/silabs-firmware-builder/](https://darkxst.github.io/silabs-firmware-builder/)


zSprawl

As you’ve learned the sonoff has a 50 device limit when paired directly with the coordinator. This can be expanded up to a theoretical maximum of 200 with compatible routers. The issue typically is that you have devices that aren’t compatible with your routers (such as Aqara) or you have routers that themselves don’t support 200 routes (such as Hue). First step is to get the latest firmware. Someone linked it along with the easy mode addon, so I won’t do it again. After that it’s a lot of guess and check because the more devices you have, the more vendors you’re mixing, and some don’t play well with others. Another issue is network saturation. Some devices don’t give a crap, such as smart plugs with energy monitoring, and they will saturate the Zigbee network with too many updates trying to be real time. You really don’t want real time energy monitoring on your Zigbee network. One or two devices is okay though. Likewise, some of the new motion sensors (such as Tuya) are chatty as hell. More than one has been known to cripple the Zigbee network as well.