/modules/xenforum/uploads/3689_1702044479_battery_test.png
/modules/xenforum/uploads/3689_1702044479_battery_test.png
Nathan provided valuable insight when I enquired about connecting a remote host running the open source Network UPS Tools to an APC UPS, specifically the SMT2200i.
Now that I've done this, I can report that it is entirely straightforward. It just didn't feel like it at the time.
There are at least two ways to physically connect a 2200i to the host. Either the RJ45 outlet on the 2200i can be used, or the USB outlet (mini USB). I couldn't get the former to work, but the mini USB-USB is fine.
My remote host runs Home Assistant (Yellow) on a Pi4. Installing the HA add-on for NUT is easy -- just take the defaults. This invokes the driver "usbhid-ups". One the add-on is started, the NUT logfile should confirm what USB devices have been connected-
Bus 001 Device 003: ID 051d:0003 American Power Conversion UPS
Bus 001 Device 002: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
The next step is to restart HA and run the NUT integration. However, the setup screen for the integration contains two gotchas. First of all, the local host name should be given as a0d7b954-nut. I don't know why. And second, the username and password are requested -- these are the details from the NUT add-on. But if you enter them, the integration won't connect.
It turns out that you need to enter a blank password (i.e. a zero-length string), not the real thing. Sigh.
After that, various UPS parameters are available in Home Assistant. As a test, I switched off the mains supply to the UPS at 09:15 and left it for three hours (no load). Then switched the mains back on -- see attached image.