Hey,

/usr/local/share/doc/pkg-readmes/nut is a really good source of information on 
how to set it up.

When it comes down to my UPS (same "usbhid-ups" driver) I had to:
# printf 'disable upd\nquit\n' | config -e -o /bsd-upd /bsd

It might be necesary to disable uhid too, but I didn't need that so far for 
some reason. (Keep in mind that you can lose your keyboard/mouse in this latter 
case)

Device node permissions also play a role in making this work. Check the output 
of:
# usbdevs -vd /dev/usb0

And figure out which device node permission you need to adjust. In my case:
# ls -la /dev/ugen0.* /dev/usb*
crw-rw----  1 root  _ups   63,  0 Oct  8 13:02:30 2024 /dev/ugen0.00
crw-rw----  1 root  _ups   63,  1 Oct  8 13:02:30 2024 /dev/ugen0.01
[...]
crw-rw----  1 root  _ups   61,  0 Oct  8 13:02:30 2024 /dev/usb0


But really, the pkg doc is very detailed and helpful.


Daniel




On Monday, February 10th, 2025 at 15:21, Ben Short <b...@benshort.co.uk> wrote:

> 
> 
> Hi,
> 
> I'm trying to get NUT running.
> 
> I've installed it with pkg_add nut
> 
> I can see my UPS as follows:
> 
> # nut-scanner
> Cannot load SNMP library (libnetsnmp.so) : file not found. SNMP search
> disabled.
> Cannot load XML library (libneon.so) : file not found. XML search disabled.
> Cannot load AVAHI library (libavahi-client.so) : file not found. AVAHI
> search disabled.
> Scanning USB bus.
> No start IP, skipping NUT bus (old connect method)
> Scanning NUT simulation devices.
> [nutdev-usb1]
> driver = "usbhid-ups" # alternately: apc_modbus
> port = "auto"
> vendorid = "051D"
> productid = "0003"
> product = "Smart-UPS X 2200 FW:UPS 07.4 / ID=01003"
> serial = "AS2039254737"
> vendor = "American Power Conversion"
> # bus = "000"
> # device = "005"
> # busport = "004"
> 
> I've added the details to /etc/nut/ups.conf
> 
> But get the following error:
> 
> # upsdrvctl start
> Network UPS Tools - UPS driver controller 2.8.2
> Network UPS Tools - Generic HID driver 0.53 (2.8.2)
> USB communication driver (libusb 1.0) 0.47
> libusb1: Could not open any HID devices: no USB buses found
> No matching HID UPS found
> upsnotify: failed to notify about state 4: no notification tech defined,
> will not spam more about it
> Driver failed to start (exit status=1)
> 
> Any ideas?

Reply via email to