How to boot HA after UPS controlled host shutdown?

Hi, I have an automation to safely shut down HA (in RPi4) in case of power failure - triggered by a APC UPS status.

Is there a way to restart HA automatically once power has been restored - again based on the UPS status? I guess I cannot do this with an automation given the system at that point will be offline - how have you guys done this? or is it not at all possible?

The rpi should automatically boot after power is resumed if power was actually interrupted. That’s independent of any UPS status.
If power was never lost, the rpi is just “soft” shut down, and it never was powered off.

Not sure what to make of this - so if I do a shutdown (even if “soft”), how do I then get HA up and running again? I simulated a power failure by unplugging the UPS and it shut down nicely, but it did not automatically reboot as you suggest? Hours later I still don’t have HA access…

Have you tried unplugging/re-plugging the Pi itself instead of the UPS?

I think that was the point of the comment. If the pi shuts down but never loses power then there is no reason for the pi to start back up again since power was never truly “restored”.

1 Like

The UPS shutdown mechanism usually will send the shutdown signal before power is completely drained from the UPS battery. What happens is HAOS is shutdown but the Pi is never powered off. Since it doesn’t loose power, it won’t automatically start back up when power to the UPS is restored. If power is lost long enough to fully drain the UPS battery, then the Pi will boot back up when mains power is restored.

Your options are to toggle power by some other means (like a WiFi smart plug that can be toggled independent of HA or an ESP32 setup as a relay) or just unplug/plug the Pi back in as mentioned above or add a power button.

1 Like

Thanks, this must be the way!