I try to connect a APC Power-Saving Back-UPS Pro 900VA Line-Interactive USV on my nethserver via usb.
I tried usbhid-ups as driver and USB(auto) but i have a failed message.
How to debug that and make it work ? I didn’t find a way where to look to find info on what append.
xxx@neth:~$ lsusb
Bus 001 Device 002: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
and it give :
Aug 24 10:51:21 neth upsmon: UPS [UPS@127.0.0.1]: connect failed: Connection failure: Connection refused
on any USB peripheral (Auto, ttyUSB0, ttyUSB1).
I also got
Aug 24 10:50:51 neth systemd: Starting Network UPS Tools - power device monitor and shutdown controller…
Aug 24 10:50:51 neth systemd-tmpfiles: Failed to open ‘/etc/tmpfiles.d/nut-run.conf’, ignoring: No such file or directory
Aug 24 10:50:51 neth systemd: Started Network UPS Tools - power device monitor and shutdown controller.
Aug 24 10:50:51 neth esmith::event[602]: [INFO] nut-monitor has been started
Aug 24 10:50:51 neth upsmon: fopen /var/run/nut/upsmon.pid: No such file or directory
Aug 24 10:50:51 neth upsmon: Using power down flag file /etc/killpower
Aug 24 10:50:51 neth upsmon: UPS: UPS@127.0.0.1 (master) (power value 1)
Aug 24 10:50:51 neth upsmon: UPS [UPS@127.0.0.1]: connect failed: Connection failure: Connection refused
Can you try if it works after restarting the server, or connecting the cable to another USB port and running:
signal-event nethserver-nut-save
Some more info:
config show nut-server # you can leave out the password
tail -4 /etc/ups/ups.conf # shall match your selection on GUI (port could be auto)
# status of nut services
systemctl -l status nut-{driver,server,monitor}
Some tests:
# allows to try to start the driver for the configured UPS (could report errors)
upsdrvctl -DD start
# poll status of UPS
upsc `upsc -l|head -1`
Another test (EDIT: beware it can be left running in background and consuming many CPU resources, unless killed):
usbhid-ups -DD -a `upsc -l|head -1` -x vendorid=051d -x productid=0002
maxreport
With this option, the driver activates a tweak to workaround buggy firmware returning invalid HID report length. Some APC Back-UPS units are known to have this bug.
So it’s not for all cases but a few, but just in case you could try the same command appending -x maxreport
Also note that nut 2.7.4 fixed some missing USB strings in APC.