NUT - No matching HID UPS found
I installed nut from testing and ran nut-scanner to find my device, which results in the following:
mail:~# nut-scanner
Scanning USB bus.
No start IP, skipping SNMP
Scanning XML/HTTP bus.
No start IP, skipping NUT bus (old connect method)
[nutdev1]
driver = "usbhid-ups"
port = "auto"
vendorid = "0463"
productid = "FFFF"
product = "Ellipse ECO"
serial = "000000000"
vendor = "EATON"
bus = "002"
I added that to /etc/nut/ups.conf
, but the controller will not start:
mail:~# upsdrvctl start
Network UPS Tools - UPS driver controller 20210212-471-g17c662d69e
Network UPS Tools - Generic HID driver 0.41 (20210212-471-g17c662d69e)
USB communication driver 0.33
No matching HID UPS found
Driver failed to start (exit status=1)
Running lsusb will also list the device properly:
mail:~# lsusb
Bus 002 Device 003: ID 0463:ffff EATON Ellipse ECO
Bus 002 Device 004: ID 0424:2660
Bus 002 Device 001: ID 1d6b:0002 Linux 5.10.59-0-lts xhci-hcd xHCI Host Controller
Bus 001 Device 001: ID 1d6b:0002 Linux 5.10.59-0-lts ehci_hcd EHCI Host Controller
Bus 003 Device 001: ID 1d6b:0003 Linux 5.10.59-0-lts xhci-hcd xHCI Host Controller
If I try to start the driver manually with debug flags I get the following, which hints at the problem:
mail:~# /usr/lib/nut/usbhid-ups -DDDD -a nutdev1
Network UPS Tools - Generic HID driver 0.41 (20210212-471-g17c662d69e)
USB communication driver 0.33
0.000000 debug level is '4'
0.000081 upsdrv_initups...
0.000464 Checking device (0463/FFFF) (002/003)
0.000476 Failed to open device, skipping. (Permission denied)
0.000480 Checking device (0424/2660) (002/004)
0.000486 Failed to open device, skipping. (Permission denied)
0.000489 Checking device (1D6B/0002) (002/001)
0.000494 Failed to open device, skipping. (Permission denied)
0.000498 Checking device (1D6B/0002) (001/001)
0.000505 Failed to open device, skipping. (Permission denied)
0.000510 Checking device (1D6B/0003) (003/001)
0.000516 Failed to open device, skipping. (Permission denied)
0.000521 No appropriate HID device found
0.000525 No matching HID UPS found
And, indeed, the following works:
mail:~# upsdrvctl -u root start
Network UPS Tools - UPS driver controller 20210212-471-g17c662d69e
Network UPS Tools - Generic HID driver 0.41 (20210212-471-g17c662d69e)
USB communication driver 0.33
Using subdriver: MGE HID 1.39
The ugly workaround, given the output that indicate the bus and device numbers, was to chown nut.nut /dev/bus/usb/002/003
. After that everything works as expected, but I am sure there is a better solution?