I have Home Assistant installed on a NUC. I don’t understand the naming, but I used the HA image and flashed that, so whatever that’s called.
I have the NUC plugged into a UPS that has a USB connection. Does anyone know how to get the NUC to shut down when the battery is almost dead? This is the only device in the UPS so it should stay running for quite a while, but I’d like to know if there is a method, integration, or add-on that I am missing. I did see a network UPS add-on, but this is just USB.
I don’t use it but I think that after you have the sensors in home assistant it will be up to you to trigger an automation on the battery state of charge or time left and shut down home assistant in the actions.
Through that integration page, I found the following, for USB UPS devices.
The automation part seems easy, its the configuration.yaml part that scares me. This all seems like a great way to brick my HA instance. Perhaps I just let the UPS keep the NUC on for 3-4hrs and hope the power comes back on.
This will create 3 sensors for current UPS status (online, on-battery, etc), current line voltage and battery charge. There are many more options you can add.
I can’t really comment on that unofficial addon as I’m not using HASS OS myself (I have apcupsd running natively). But I suppose you have to use that to get the APCUPS daemon running on HASS OS.
The USB port is autodetected by default. It’s not HA managing this, but the apcupsd daemon. HA simply connects to the daemon to retrieve the data you ask it to.
I created the Network UPS Tools (NUT) add-on specifically for USB-connected UPS devices. The add-on simply runs a NUT server that the Network UPS Tools (NUT) integration can connect to.
The reason I chose NUT over any other integration is because of its vast support for UPS devices.