Thanks so much for posting this. I had real trouble trying to integrate my CyberPower PR750ELCD, just trying to get it to connect, and then it would disconnect after 20 minutes. At first I thought it was the USB port going to sleep, but even after disabling that in Windows, (and failing to find a similar setting in the VM), it still dropped out. I also needed to pass the USB port to the virtual machine.
Another thing that stumped me, that seems totally obvious afterwards, was that Home Assistant has its own built in NUT server. I’m so used to just going to the integration page, it didn’t occur to me to go to the Supervisor Add-on store, and look there. I had been struggling with command lines in Windows, which are really badly documented. For anyone else wanting to go this route:
libgcc_s_dw2-1.dll
ssleay32.dll
libeay32.dll
needed to be in both sbin, and bin folders, and from memory some of them weren’t included in the package.
Please improve Windows port documentation/packaging · Issue #262 · networkupstools/nut · GitHub helped but unlike any other program I’ve ever used in a Windows DOS/command prompt, you had to have two separate windows, and keep them open: one to run upsdrvctl start, and another to run upsd.exe
It also required making its own .inf using libusb-win32 files.
All in all a bit of a nightmare compared to how easily the Home Assistant add-on was, except for the pollinterval = 15 thing which needed to be under config.
I haven’t needed to bother with the vendor ID, but it is listed as 0764
Bus 002 Device 006: ID 0764:0601 Cyber Power System, Inc. PR1500LCDRT2U UPS
which is the wrong UPS, but still seems to work. Here is my config in case it helps anyone else:
users:
- username: remote
password: xxxxxxxxxxxxx
instcmds:
- all
actions: []
devices:
- name: cyberpower
driver: usbhid-ups
port: auto
config:
- pollinterval = 15
mode: netserver
shutdown_host: false
list_usb_devices: true
upsd_maxage: 25
upsmon_deadtime: 25