Hi everybody, I want to document how I am setting things up and get feedback.
Use case: Unifi Dream Router and Unifi Express routers lose power at a remote location and need to safely shutdown.
I had to send a UDR7 for an RMA after a power outage / brown out put the device into a bootloop.
Proposed solution: 1.) Deploy UPS devices for both the UDR and Unifi Express. 2.) Deploy HomeAssistant on a Raspberry pi 4 and connect to UPS near UDR7 3.) Automate an SSH login and safe shutdown of each router on 50% battery power.
Progress so far: Deployed the NUT addon in HA on a Raspberry Pi. Connected the pi to a CP1500AVRLCD and using the following config
There are no nice tools available like “nutscanner -U” to get the driver and device info. Had to google my UPS for the info and yolo it. Add your own username and password for nut-clients. I tried not adding a user name and password and the add-on boot loops.
Unfortunately, the NUT add-on in server mode DOES NOT open port 3493 on the pi, so the only way to use it is through a nut-client within HA itself. Furthermore, HA will not automatically detect the NUT server for integration. You have to add the integration manually.
From the HA phone app, go to Settings, Devices and services, Add Integration. Search for Network UPS Tools (NUT).
To connect to the local NUT server, localhost will not work, you have to use a0d7b954-nut. I am not kidding.
Enter the user name and password configured in the NUT add-on. It should connect HA to the local NUT server and default to 60s refresh. Once working, the result looks something like this:
Now to get that shutdown automation working!