Could "recovered from power loss" be used to reliably detect power outages?


I see the new (w 2.5.2.xxx) "recovered from power loss" in the startup log. I'd like to use that to detect if some of my lights need to be returned to previous state after a power outage. When power returns after a power outage many of my lights are ON - especially annoying during brief power outages overnight.
Could I use RM to monitor the logs every few minutes for this condition and then act if found?


There was an issue with that report in 2.5.2.135, fixed in 2.5.2.139. Give it a couple more weeks so we can fully confirm the fix.

I'll wait for a while so the fix can be confirmed.
Would using RM to monitor logs be the best way to detect a power loss in the log? Is there another (better?) way?

This got me thinking if HE has something akin to the old autoexec.bat file or the Windows Startup folder...? This would make it easier to look for a power loss in the log after startup. If HE does not have this could it be considered as feature in future updates? Seems like it could be used for all kinds of useful things :slight_smile:

Unless I’m missing something, the new alert tells you the hub itself experienced an unplanned power outage. This is something you should try very hard to make sure never happens.

Get a Zooz ZAC38 (preferred) or Ring Range Extender to be alerted when the rest of your house has a power outage while your hub and its database sailed through it.

I.e., put it behind a UPS.

I was hoping not to spend extra money for a small UPS and a device to notify HE of a power loss. We have a whole home generator so the power only stays off for about 1 minute but when it comes back on most of my lights come back ON.

You really want your hub on a UPS.

Unexpected power loss can corrupt the database.

You might get lucky and never corrupt a database or damage hardware due to dirty shutdown and startup. But then, you might not. If a UPS isn’t practical, there are batteries that supply power and charge at the same time. But if you go that route, search the community here for discussions about which ones are known to work well with the hub.

I've been using a USB-C power pack with pass-through charging as a UPS. It's not an industrial strength setup, but it worked for me :person_shrugging:

I've went ahead and ordered a small UPS (for hub and starlink router) and a ZAC38 so I can create automations that run after a power outage (including email notification).
UPS: CyberPower ST425

Thanks for your help!

When you detect a power outage, consider shutting down your hub down nicely before the ups runs out, in case the generator doesn't start.

You'll need a way to power it off then on possibly (so it comes back on when power is restored).

The Starlink is power thirsty.

@timloga - I second @rob9's suggestion, and FWIW, there's a new Hubitat integration for Genmon