HA, UPS & Power

Hello friends,

Running Home Assistant on HAGreen, I ordered an UPS with USB connection.
My HAGreen box and my ADSL box (BBox) are protected by UPS against power cut.

My UPS USB Cable being USB-connected to one of my HA’s USB ports,
I defined automation to trigger power cut down (UPS on bat enabled) and to send me notifications in case of power events. The Internet box being also protected by UPS, Ok no prob to send notification via SMTP, SMS (via SevenIO) or even Smarphone’s notification.

I defined automations that monitor UPS Battery level. When UPS bat < 15%, HA initiates is own shutdown properly. My setup works like a charm.

  • When bat is at 0% and power is resumed, HA reboot normally after proper shutdown.

  • When power is resumed while battery level is > 15%, fully transparent, the UPS Bat starts recharging and HA stay up and running.

But I still have a school case I cannot solve yet, needing your advises : if power is resumed while UPS battery level is between 0 and 15, … the power is not cut behind the ups and the HA Green box plug remains powered up but HA is shutdown.

Any idea how to wake it up ? Make me crazy …
Connect additional devices on the UPS to faster its drain ?

Wishing you all happy new year …

Th

I use a battery value of <5% to shutdown. This lessens the probability of the power coming back on during shutdown but allows enough power to actually shutdown.

A smart switch, triggered by another source, to cycle the HA Green power might be a solution.

1 Like

If you’re using NUT, you have the status:

image

OL means you’re on power. OB = on battery, LB = low battery, …

Hello,
Thanks. Yes, I use NUT. I use also the OnBat/OnGrid status. When OnBat and BatLevel <15 conditions to trigger shutdown. That’s ok. But as the HA is shutdown, I cannot read battery status from HA to powercycle/reboot HA :slight_smile:

Seems Mark’s idea to use bat level to 5% to be a good trick. I was also looking at
using power plug to trigger on something (bulb for eg) before issuing HA Shutdown to faster drain …

Wishing you happy new year.

Cheers

Th

Ah right, sorry, I missed your point.

You could use NUT shutdown script to call an HA webhook, maybe.
But I’m pretty sure you would get a specific status when the UPS is about to shut down (and not before) that yopu could trap.