Recovery from a power failure... best practices?

Posted on
Mon Mar 12, 2018 5:54 pm
Professor Falken offline
User avatar
Posts: 267
Joined: Mar 29, 2015

Recovery from a power failure... best practices?

I was at home today for a somewhat brief weather induced power failure, which allowed me to observe the behavior of my HA system while first on UPS, then as the UPS ran out. I have some questions after this process...

1) As near as I can tell, you can set a Mac to automatically restart after a power outage, but only if the power was suddenly cut, not if you did a controlled shutdown.

2) Ditto for a Widows 10 box, though this was slightly more painful, having to edit the BIOS settings.

3) I have all of these systems on a UPS, which is monitored by Indigo via plugin. In theory, I think I could have both the Mac and the PC undergo a controlled shutdown when the UPS is nearing complete discharge (about an hour or so after the outage). I would think this would be preferable from a health-of-the-computer standpoint. But if I understand #1 & 2 above correctly, shutting the machines down before running out of juice would leave me in a lurch for getting both machines back up and running in my absence. So is it better, then, to just let the UPS run out and have them both crash due to a sudden outage, and thus having them both hopefully wake up on power resumption?

I know there are forum members who have mentioned leaving their Indigo domoticized houses for significant stretches of time while traveling, so I'm hoping someone can give me some insight here.

Posted on
Mon Mar 12, 2018 6:16 pm
lanbrown offline
Posts: 326
Joined: Sep 26, 2017

Re: Recovery from a power failure... best practices?

IMO, it really depends on some systems as the BIOS allows a settings that says to turn on after a power failure. So some do not remember the previous state, only the state that they should be in. Most systems do not like to be shutdown abruptly. You can have filesystem issues, lose data, etc.

You should test your system in how they handle a graceful power down, unplug them and plug them back in and see what they do.

Posted on
Tue Mar 13, 2018 11:17 am
Colorado4Wheeler offline
User avatar
Posts: 2559
Joined: Jul 20, 2009
Location: Colorado

Re: Recovery from a power failure... best practices?

Professor Falken wrote:
about an hour or so after the outage

Either you have giant UPS's or not much on them :).

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Tue Mar 13, 2018 12:24 pm
Professor Falken offline
User avatar
Posts: 267
Joined: Mar 29, 2015

Re: Recovery from a power failure... best practices?

Colorado4Wheeler wrote:
Professor Falken wrote:
about an hour or so after the outage

Either you have giant UPS's or not much on them :).



It was around 50 mins.

Mac mini, a Dell optiplex, Tivo, router, modem, a Pi, a switch, and a few other assorted very small draw items. It's a decent sized UPS.

Posted on
Tue Mar 13, 2018 1:59 pm
Different Computers offline
User avatar
Posts: 1762
Joined: Jan 02, 2016
Location: East Coast

Re: Recovery from a power failure... best practices?

Two different things:

SOME UPSes can talk to the Mac OS, telling it to begin a controlled shutdown.

I live out in the boonies and get lots of power outages, thankfully usually short ones. Smartest thing relative to this fact and Indigo I've done is have a series of triggers that make their best guess at the initial preferred state of devices based on time of day. So when Indigo comes back up, if it's 2AM it assumes the house lights should be off and it goes through the process of turning off all the Hue lights that just came back on.
If it's the middle of the day, very similar, where most lights don't turn on. In the evening, the lights set themselves to reasonable levels.

I could use the house state variables I have set up, but they might be 8 hours old if it was an 8 hour outage, so this seemed a reasonable way to do things that has worked well so far.

SmartThings refugee, so happy to be on Indigo. 10.12.6 on an i5 MBP w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKit Bridge, MatplotLib, Plex, uniFAP, Wunderground, Nanoleaf, LED Simple Effects, Airfoil Pro, Grafana.

Posted on
Tue Mar 13, 2018 4:38 pm
Colorado4Wheeler offline
User avatar
Posts: 2559
Joined: Jul 20, 2009
Location: Colorado

Re: Recovery from a power failure... best practices?

I've been thinking about how I might answer your question all day since you first posted because it doesn't seem to be a question about what to do after a power failure as much as it is "well, what about when things shut down gracefully how do you get them to come back up again without being there to press the button" kind of question.

To that question my answer is: nothing. There's not much you can do for a device that is powered off that you cannot physically access. I have a drive bank that when it loses power it won't come up automatically (I've been thinking of hard-wiring it) and Mac's that are all on UPS's that will do graceful shutdowns after 20-40 minutes of no power. I also spend a decent amount of time in my RV and if things go south then I'm in a pickle.

I do have the benefit of having employees that are around town and an automated lock system that can grant them access so if it were really urgent I have a contingency.

I do the best with what I have. When power goes out then my UPS's know and those can let Indigo know which lets me try to be proactive. I have all my computers on some kind of HA system, so I could power them off if needed. While I don't currently do this (because a long term power outage is pretty rare) it would be a simple task to write a script that says "if the UPS says it's on battery then in 10 minutes hard power off all servers". Could this mess something up? Sure. Is it likely to? Not really. So it's a last resort because I'm likely to be home 99% of the time when a power outage happens so I could enable this easily and tie it to my "I am not home" setting in Indigo.

But, in all of this, I try to mitigate my chances as much as I can. That drive bay that won't come back on? Well it's just my entertainment array, movies and TV shows, so if it stays down while I'm in my RV for a couple of weeks it's no big deal. If I don't want to gracefully shut down for fear of not coming back then I can script to quit all open programs (such as Indigo) and force it to sleep or to turn off so that when power returns I'm in good shape again.

The alternative would be to have cellular access to the house when the power is down so you could get a notification of the problem and remote in to handle it, but I don't have such a mission critical home automation that I need to fork over data fees for the 1% contingency either.

That's my take ;).

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Tue Mar 13, 2018 4:55 pm
roussell offline
User avatar
Posts: 930
Joined: Aug 18, 2008
Location: Alabama

Recovery from a power failure... best practices?

I wrote this on the subject a while back (still haven’t tried it though):

Black-Out and remote powering
https://r.tapatalk.com/shareLink?share_ ... are_type=t


Sent from my iPhone using Tapatalk

Posted on
Tue Mar 13, 2018 5:22 pm
Colorado4Wheeler offline
User avatar
Posts: 2559
Joined: Jul 20, 2009
Location: Colorado

Re: Recovery from a power failure... best practices?

roussell wrote:
I wrote this on the subject a while back (still haven’t tried it though):

Black-Out and remote powering
https://r.tapatalk.com/shareLink?share_ ... are_type=t


Sent from my iPhone using Tapatalk


Too bad we can't +1, great command.

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Tue Mar 13, 2018 6:12 pm
Professor Falken offline
User avatar
Posts: 267
Joined: Mar 29, 2015

Re: Recovery from a power failure... best practices?

These are all useful points. Thanks.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest