Power Outage Detection w/Zigbee

As we all know, zigbee lights all turn themselves on after a power outage. This of course is by design to make them work more like normal light bulbs. However, it is also a huge problem, especially when one is away from home for many days and a power outage occurs. Nothing like coming come after being away for 2 weeks and every single light in the house has been one for multiple days.

I am just curious, what methods exist to counter this problem, if any? This has been a problem for the 15 plus years Zigbee has been in existence so surely by now there have been some solutions created to combat this problem.

It seems like you could set up a rule on the gateway to notify you when all of your lights are on, assuming that’s not a normal occurrence.

BTW, the OP was meant to be a community question. Not just for the devs.

I was also thinking something along these lines. Perhaps a virtual switch connected to ALL Zigbee lights. This would at least allow an easy way to turn them all back off. Maybe a USB connection from a smart UPS could be helpful too for power state detection/monitoring.

Perhaps if the Gateway could take an active state snapshot every minute or two along with the time taken. If a pre-determind amount of time passes between snapshots (say if an entire hour of snapshots was missed), it could revert back to the last known good snapshot whenever the gateway becomes active again.

Just throwing some ideas out here.

I guess there is little interest in this subject.

I have a start on brute force sidestepping it: My gateway is connected to an APC UPS because I really, really hate dirty shutdowns. I run apcupsd to do a controlled shutdown when the power is out and the UPS battery starts running low. I have apcupsd configured to send me an email when the power goes out.

I haven’t tested an unattended extended power outage and power restoration. In my case, if it didn’t power up I can have a relative come in and manually restart the UPS, if needed.

I like apcupsd. I also have it running on my Windows desktop machines (that are all connected to an APC IPS.)

Not exactly what I was looking for. I am like you, I also hate dirty shutdowns, and have mine also running off a small UPS.

Since Zigbee lights tend to always come on and stay on after a power outage, I am looking for a way to turn them back off, or back to a known state or preset when the power returns. I have frequent outages where I live and there is nothing worse than a short power bump turning nearly every single light in the house in the middle of the night. Maybe the easiest way would be to create an “All Lights Off” rule, but it would be a quite large and very messy rule in my case.

If you can use apcupsd, this gives you something that launches a script whenever there is a change in the power (like the power going off and then returning.) You can hang anything you want to on the script (it is a bash script). I added stuff to give system information to the emails that are sent by the script.
You do need to use an APC UPS that can signal to apcupsd. I think that the cheapest ones now are Back-UPSs (that come with a USB signal cable.)

Nice. I will certainly look into this.