Recovery after power failure
Recovery after power failure
With the recent disaster in Tx I would to get a working solution to restart mac and indigo after power failure
Here the main challenge
- Mac OS does not restart when power is back when shutdown gracefully
With an apc you have the opportunity to get a signal when in battery / less then x energy left ..
then you can decide to shutdown the mac.
But then when power comes back the mac does not restart.
One could stop indigo and let the the mac crash at the end of power so that it restarts
- not the preferred solution
And when the power comes back before the battery is drained indigo does not know it should restart.
Here my qs:
- Does a wol package wake a mac or how YI configure it
- How to start indigo from the command line
- has anyone solved this or any other ideas?
Karl
Sent from my iPhone using Tapatalk
Here the main challenge
- Mac OS does not restart when power is back when shutdown gracefully
With an apc you have the opportunity to get a signal when in battery / less then x energy left ..
then you can decide to shutdown the mac.
But then when power comes back the mac does not restart.
One could stop indigo and let the the mac crash at the end of power so that it restarts
- not the preferred solution
And when the power comes back before the battery is drained indigo does not know it should restart.
Here my qs:
- Does a wol package wake a mac or how YI configure it
- How to start indigo from the command line
- has anyone solved this or any other ideas?
Karl
Sent from my iPhone using Tapatalk
- Different Computers
- Posts: 2730
- Joined: Sat Jan 02, 2016 10:07 am
- Location: East Coast
- Contact:
Re: Recovery after power failure
A less than complete answer is to use Energy Saver Preferences to start the mac at a set time each day. That's less than optimal because if the power goes 3 minutes after the daily start schedule it won't boot up until tomorrow, but it's, excuse the pun, a start.
https://techviral.net/schedule-startup-shutdown-on-mac/
As for starting Indigo, can you have auto-login enabled? If so, then just configure Indigo server to start on login.
https://techviral.net/schedule-startup-shutdown-on-mac/
As for starting Indigo, can you have auto-login enabled? If so, then just configure Indigo server to start on login.
Sonoma on a Mac Mini M1 running Airfoil Pro, Bond Home, Camect, Roku Network Remote, Hue Lights, DomoPad, Adapters, Home Assistant Agent, HomeKitLinkSiri, EPS Smart Dimmer, Fantastic Weather, Nanoleaf, LED Simple Effects, Grafana, Yamaha RX Receiver.
Recovery after power failure
I remember. And you could set it in a command every 5 minutes to now+2 hours.
But that also is bad if the power outage lasts 2hours and 5 minutes.
Sent from my iPhone using Tapatalk
But that also is bad if the power outage lasts 2hours and 5 minutes.
Sent from my iPhone using Tapatalk
Re: Recovery after power failure
What about putting a SwitchBot on the power button (if the Mac model allows it) and restart it “manually”?
Gesendet von iPhone mit Tapatalk
Gesendet von iPhone mit Tapatalk
Re: Recovery after power failure
i'm running indigo at a remote location with unreliable mains power, so tried unsuccessfully for a long time to find a solution to this - my compromise [pending a whole of house battery being cost-effective] is a UPS to cover typical outages but allow a hard shutdown at in the end.
It does occur to me it would be possible to partly soften the shutdown by eg unmounting drives just before the shutdown hits (and reversing if mains power returns) but have never put in the effort.
Pre-indigo i used a telephone-line actuated relay to remotely reboot when required various 12-volt network appliances including a Vera unit. Small DTMF driven relays are readily available for this purpose [but i assume require a traditional POTS landline?]. It worked really well.
It does occur to me it would be possible to partly soften the shutdown by eg unmounting drives just before the shutdown hits (and reversing if mains power returns) but have never put in the effort.
Pre-indigo i used a telephone-line actuated relay to remotely reboot when required various 12-volt network appliances including a Vera unit. Small DTMF driven relays are readily available for this purpose [but i assume require a traditional POTS landline?]. It worked really well.
Re: Recovery after power failure
works, just tested, soft shutdown of indigo mac server (mojave)
then in terminal on an rpi:
wakeonlan 40:6c:8f:bc:19:ed (that is the mac number of my indigo mac )
and mac came back up
So here a possible setup:
indigo shutsdown at 10% bat left, then the mac shuts down
On an RPi that goes up/down w power
run the script (symbolic):
that should do it. will test
Karl
then in terminal on an rpi:
wakeonlan 40:6c:8f:bc:19:ed (that is the mac number of my indigo mac )
and mac came back up
So here a possible setup:
indigo shutsdown at 10% bat left, then the mac shuts down
On an RPi that goes up/down w power
run the script (symbolic):
Code: Select all
lastOk = time.time()
while true:
if testpin(ipofmac): # test if mac server answers ping
lastOk = time.time()
continue
if time.time () - lastok > 300 secs # every 5 minutes
subprocess.popen("wakeonlan mac#of indigoserver", shell=true)
lastOk = time.time()
Karl
Re: Recovery after power failure
great idea...which reminded me of an old vera i use to run a device that won't talk to indigo. I can use the Vera WOL plugin to do the same.
Re: Recovery after power failure
it only worked once. the second time i tried it nothing happened.. mac stayed off
need to dig deeper
need to dig deeper
Re: Recovery after power failure
It looks like the mac has to be in sleep mode not in power off mode tor wol to work. That might also depend on the type of mac: Mac Pro, mac book, Mac mini ...
Sent from my iPhone using Tapatalk
Sent from my iPhone using Tapatalk
Re: Recovery after power failure
Nice and interesting thread!
We are using an APC 650 UPS for ~10 years now (with the UPS and Battery monitor Plugin).
In 7 of 8 times of a power failure in 10 years it does what is has to do: continuously and stable provide the power for almost an hour.
So, you have also to calculate the risk how many times this (big) problem of a loooong power failure happens?
This one is for you Karl:
https://www.youtube.com/watch?v=GKyLJRs5Q3k

We are using an APC 650 UPS for ~10 years now (with the UPS and Battery monitor Plugin).
In 7 of 8 times of a power failure in 10 years it does what is has to do: continuously and stable provide the power for almost an hour.
So, you have also to calculate the risk how many times this (big) problem of a loooong power failure happens?
This one is for you Karl:
https://www.youtube.com/watch?v=GKyLJRs5Q3k
Re: Recovery after power failure
And I really like the Italian.
Sent from my iPhone using Tapatalk
Sent from my iPhone using Tapatalk
Re: Recovery after power failure
... and it is a problem that needs a solution. Even if it happens once every 100 years. We can’t just give up. I could not sleep without trying to solve it.
Sent from my iPhone using Tapatalk
Sent from my iPhone using Tapatalk
Re: Recovery after power failure
My approach was to buy an oversized UPS and a backup generator. I have the whole computer closet (all the networking, cameras and indigo) connected to a server ups that will run all of this for a bit over five hours. Since I'm hardly ever longer than that away from the house, this gives me enough time to spin up the generator (on a manual transfer switch). Id love to have an automatic transfer switch with an auto start generator, but until now the it has been out of my price range.
Re: Recovery after power failure
That could be my text Karl. I completely agree with you!kw123 wrote:... and it is a problem that needs a solution. Even if it happens once every 100 years. We can’t just give up. I could not sleep without trying to solve it.
So, shall I contact the Italian?
An extension of the Arduino Plugin?
Or maybe a redirect from the Mac mini power switch (inside) to a relais or so to the GPIO port of an Rpi?