Hi,
I cannot get NUT service to work properly...
My problem is very similar to this older post: https://forum.opnsense.org/index.php?topic=20218.0 (https://forum.opnsense.org/index.php?topic=20218.0).
Running the following command: /usr/local/libexec/nut/usbhid-ups -a ups1 -DDDD gives:
0.000211 [D1] debug level is '4'
0.000495 [D1] Succeeded to become_user(nut): now UID=316 GID=316
0.000533 [D1] upsdrv_initups (non-SHUT)...
0.000541 [D2] Initializing an USB-connected UPS with library libusb-1.0.0 (API: 0x1000102) (NUT subdriver name='USB communication driver (libusb 1.0)' ver='0.47')
0.000716 [D2] libusb1: No appropriate HID device found
0.000731 libusb1: Could not open any HID devices: no USB buses found
0.000736 No matching HID UPS found
0.000749 upsnotify: failed to notify about state 4: no notification tech defined, will not spam more about it
But running it as root work just fine:
/usr/local/libexec/nut/usbhid-ups -a ups1 -DDDD -u root:
0.000467 [D1] Succeeded to become_user(root): now UID=0 GID=0
0.000506 [D1] upsdrv_initups (non-SHUT)...
0.000869 [D1] nut_libusb_open: invalid libusb bus number 0
0.000952 [D1] nut_libusb_open: invalid libusb bus number 0
0.001005 [D1] nut_libusb_open: invalid libusb bus number 0
0.001055 [D1] nut_libusb_open: invalid libusb bus number 0
0.016313 Using subdriver: CyberPower HID 0.80
0.016324 [D1] 82 HID objects found
0.017039 [D1] Path: UPS.PowerSummary.iProduct, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8, Value: 1
...
Executing usbconfig, I can see my UPS is correctly connected:
ugen2.2: <PR1500LCDRT2U UPS Cyber Power System, Inc.> at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA)
If anyone has a suggestion it would be welcome.
Strangely, unplug / re-plug the USB cable triggered something that fixed the permissions.