I have a network of about 20 zigbee devices. I had a power cut the other day and two of the devices didn’t connect back to the network. One of them required me to ‘Add device’ when it was in pairing mode to connect it, the other took a couple of trys of switching off power at the wall then reconnecting.
Is there anything to set on the device, or the Sonoff Zigbee 3.0 USB Dongle Plus V2 that will more robustly recover from a power outage?
They reliably stay connected when power remains on.
Also both of the device restarted in power off mode, even though their power on state was either set to ‘On’ or ‘Last State’ and both were on when the power was lost.
That was information you omitted from your first post. If your Zigbee coordinator stays online through a power outage, you will have less problems with devices not reconnecting when power comes back up.
We had an almost 2-hour power cut yesterday. My RPi running HA is on a UPS, along with the Zigbee dongle. Most of my Zigbee devices came through just fine, or came back after power was restored.
However, five of the mains-powered devices didn’t. They went into pairing mode and had to be re-discovered in the ZHA integration. And of course some of them were far enough from the coordinator that they had to wait for the mesh to re-form before they were seen by the coordinator.
The good news is they were all eventually able to be re-added, and were recognized by HA so all the entity names remained the same. Two of them (eWeLink branded smart plugs) did come back switched “off” which wasn’t what I wanted, but once connected, turning them back on from within HA was not an issue. I don’t see a way to set the power on state for these devices, so presumably that’s not an option.
But this got me thinking. I could create an automation to power them back on if they’re ever detected off. The only reason these are even on a smart plug is so I can power-cycle the cameras they’re connected to when those lock up or lose connection.
That’s basically the same as me. Most devices reconnected but a few didn’t. I wonder if it is a mix of signal strength and timeouts but I don’t really know.
Interestingly the two that didn’t reconnect also started in powered off state, even though both were set to ‘last state’ and were powered on prior to the power cut.
Since Zigbee is a mesh network, it will use the closest router to join the mesh. A Zigbee router has to be powered via electricity. If your electricity goes out, the routers can no longer function as a router and thus you could lose some of your end nodes that were using the routers in the mesh. This may be what you are experiencing.
Yes, that appears to be what’s happening. Obviously when the mains-powered router devices aren’t available, the edge devices depending on them to reach the coordinator can’t do so.
But what seems to happen with some, but not all, edge devices is that they give up and go back into pairing mode. Others just pick up where they left off when the power comes back. I wish we know which was which before we bought them.
Yes understanding those failure modes and why some appear to behave differently - or at least end up in a different state is the issue.
I don’t think it is a device issue as such, as I had different outcomes from devices bought in the same batch and otherwise identical. Clearly they could be different but it probably isn’t that at the root cause of this.
Just to be clear, this past power cut, when a few devices went into pairing mode, was probably the longest I’ve ever had. It was late spring so I didn’t need heating or cooling, and (rarely for springtime around here) the water in the basement was down to a slow stream so I could get by without pumps for a while. I didn’t bother to start the generator before the power came back a couple of hours later.
Previous outages have been much shorter, because I’d have to start the generator. In those cases all the Zigbee devices came back OK.