networkupstools / nut

The Network UPS Tools repository. UPS management protocol Informational RFC 9271 published by IETF at https://www.rfc-editor.org/info/rfc9271 Please star NUT on GitHub, this helps with sponsorships!
https://networkupstools.org/
Other
2.13k stars 355 forks source link

is it supported? Network UPS Tools upsstats 2.8.0 - energenie - [error: Driver not connected] on myups2@localhost #2298

Open estatistics opened 10 months ago

estatistics commented 10 months ago

model eg-ups-ps2000-01 (energenie by gembird)

lsusb Bus 002 Device 003: ID 0001:0000 Fry's Electronics

sudo nut-scanner -U

Scanning USB bus.
[nutdev1]
        driver = "nutdrv_qx"
        port = "auto"
        vendorid = "0001"
        productid = "0000"
        bus = "002"

sudo /lib/nut/nutdrv_qx -a myups2

Network UPS Tools - Generic Q* USB/Serial driver 0.32 (2.8.0) USB communication driver (libusb 1.0) 0.43 libusb1: Could not open any HID devices: insufficient permissions on everything No supported devices found. Please check your device availability with 'lsusb' and make sure you have an up-to-date version of NUT. If this does not help, try running the driver with at least 'subdriver', 'vendorid' and 'productid' options specified. Please refer to the man page for details about these options (man 8 nutdrv_qx). sudo cat /etc/nut/ups.conf

[myups]
    driver = usbhid-ups
    port = auto
    vendorid = "0001:0000"
    productid = "0000"
    bus = "002"

[myups2]
    driver = nutdrv_qx
    port = auto
    vendorid = "0001:0000"
    productid = "0000"
    bus = "002"

sudo cat /etc/nut/upsd.conf

sudo cat /etc/nut/upsd.users

[admin1]
  password = s1
  admin1 m1

sudo cat /etc/nut/upsmon.conf

MONITOR myups2@localhost 1 admin1 s1 m1

sudo cat /etc/nut/upsset.conf

I_HAVE_SECURED_MY_CGI_DIRECTORY
jimklimov commented 10 months ago

As nut-scanner says, vendorid is just the 4 digits.

Regarding "no permissions", check if your udev/upower/... rules are set up to delegate the vid:pid to the nut run-time account (if that's what your packaging calls it). As a workaround for this bit, you can say user=root in the driver config section.

Finally, this vendor chose to use an unregistered vid:pid, so there are no surefire pre-sets to identify the device or the protocols it talks. You may have to scavenge the NUT DDL and/or github issue reports for fine-tuned settings (subdriver and others) if needed.