[BETA]Power Outage Manager

Application monitors one or more devices with the Power Source attribute and when it detects a change from mains power to battery power (outage) schedules a set of predetermined actions. When power is restored (battery to mains) the app will execute the defined recovery actions. App has 3 outage action queues that can be set for differing delays to allow a staggered response in the event of an extended outage.



Created from the vision of @rlithgow1.

Available through HPM or at https://raw.githubusercontent.com/thebearmay/hubitat/main/apps/powOutMgr.groovy

30 Likes

@aldomekin2021

1 Like

One change I did is on line 78, added ",multiple:true" ...

input "notifyDev", "capability.notification", title: "Send notifications to", submitOnChange:true, multiple:true

Wife likes to have that info also :slight_smile:

Thanks, I normally set that one that way. I'll make that change real quick.

4 Likes

The only info my wife wants is that there is no info. (I.e., "It had better be perfect!!" :wink: )

Great stuff as usual, @thebearmay. I think we may need to change your screen name to "@thebearwillgivenenoughtime." :smiley:

9 Likes

:rofl:

1 Like

:rofl: Usually that's often the case, but this kind of info she likes, when it's raining and the power is out, she gets nervous and usually calls the neighbor to go check our sump pump just in case (even if we have a high water sensor and a critical water sensor on it).

@thebearmay, the RM rule I had for power outages would set a global variable, when the hub boots up I have a rule that checks if that variable is set or not to let us know that the power was restored and refresh the ring range extender driver if it's still on battery (in the driver since the hub was off when coming back and did not get the message that it was back on main). This could be a nice feature to add since most use this kind of device to monitor power.

2 Likes

Denny Page's (@dennypage's) Ring Extender driver, which I use, does a scheduled delayed (1 sec.) refresh() on initialize to handle exactly this case.

2 Likes

Thanks I'll check it out

1 Like
2 Likes

Found it, but I use the gen 1 range extender because the C-5 does not support the gen-2, since it's working great I still use it with my C-7, to bad, RM will keep doing it's thing I guess.

1 Like

Added the option to issue a refresh() to trigger devices that support it on hub restart.

4 Likes

I was initially setting this up and had just selected "Hub Security Enabled" and got this error:

I had to delete and re-add it to clear the error.

@jlv v0.1.4 should fix that - was checking security before it let you enter credentials. Should be in HPM now.

4 Likes

The C-5 does not support S2 security, but the Ring Gen2 extender works fine without it, and there really isn't a good reason to use S2 for a range extender.

To include without security, use Classic inclusion mode--press and hold the button on the front of the device for ~3 seconds, then release.

5 Likes

Love the app...Thanks!

One question...Can we have multiple instances of the app running? For instance, I have a couple of Ring range extenders in the house that I will use to notify me and shut down the hub during an extended power outage. But I also have one extender plugged into an outlet in the garage that is on a GFCI. I just want to get notified if the GFCI trips, I don't want to shut down the hub. If this is not possible it is no big deal,...I will just leave the RM I have for the garage extender to notify me.

1 Like

Just don't pick that particular unit as a trigger. Really you only need to pick one trigger... In my case it's my Ring v2 extender in the hallway. If that on battery the house is off.

But I also want to get notified if the GFCI in the garage trips, but I dont want this to shut down the house. No big deal... I have a RM rule that I will keep for this one instance.

Right simply use the notification app instead to send you a notification when power source changes..

1 Like

I envy you people whose internet stays up during a power outage. Ours inevitably goes out along with the power. Some type of cell or Elon Musk's solution might work I guess.