UPS NUT Legrand

Sziasztok!

Van egy Legrand UPS USB felülettel. Szeretnén NUT alá (és majd Home Assistant) tenni, már mindent feltúrtam a neten, de semmi. Azaz a gyári UPSView-val megy...

Ez van (Debian 11):
/var/log/messages részlet:
Dec 16 13:40:18 domo2 kernel: [1983611.264566] usb 2-4: New USB device found, idVendor=1cb0, idProduct=0032, bcdDevice= 1.00
Dec 16 13:40:18 domo2 kernel: [1983611.264574] usb 2-4: New USB device strings: Mfr=3, Product=1, SerialNumber=5
Dec 16 13:40:18 domo2 kernel: [1983611.264578] usb 2-4: Product: Legrand UPS
Dec 16 13:40:18 domo2 kernel: [1983611.264581] usb 2-4: Manufacturer: Legrand

lsusb részlet:
Bus 002 Device 006: ID 1cb0:0032 Legrand   Legrand UPS

és ez lesz:
$ sudo upsdrvctl -u root start
Network UPS Tools - UPS driver controller 2.7.4
Network UPS Tools - Generic HID driver 0.41 (2.7.4)
USB communication driver 0.33
No matching HID UPS found
Driver failed to start (exit status=1)

/etc/nut/ups.conf

maxretry=3

[legrand]
    driver = usbhid-ups
    port = auto
    vendorid = 1cb0
    productid = 0032

/etc/udev/rules.d/50-ups.rules

#  Legrand
ACTION=="ADD",SUBSYSTEM=="usb", ATTR{idVendor}=="1cb0", ATTR{idProduct}=="0032", MODE="0660", GROUP="nut"

Nem tudom, hogy mit hagyok ki, vagy mit bökök el.
Köszönöm, Roland

Hozzászólások

A kernel üzenetek között kellene látnod egy ehhez hasonlót:

hid-generic 0003:051D:0002.0007: hiddev2,hidraw2: USB HID v1.10 Device [American Power Conversion Smart-UPS 1500 FW:653.19.I USB FW:11.01] on usb-0000:00:1d.7-3.3/input0

(Ez egy APC UPS-é, de az most lényegtelen.)

Ha nincs ilyen sor, akkor a kernel nem tudja, hogy ehhez az eszközhöz az usbhid drivert kellene használnia.

Indítsd el magát az usbhid-ups drivert a -DDD (debug) opciókkal, hogy ő milyen vendorid-t és productid-t lát az eszközről... A konfigban arra kell matchelni regex-szel.

Rém buta kérdés, de mi van akkor, ha egyáltalán nem adsz meg vendorid-t és productid-t? Elvileg azt csak akkor kell megadni, ha egynél több UPS-ed van, és specifikálni akarod, hogy melyiket akarod használni.

Köszi, nut remove --purge-val, majd forrásból lefordítottam és install, megszűnt a hiba! Sőt párszor az upsc is ment (igaz, powert nem láttam, input fesz.67V...), aztán próbára teszi az idegeim, most vmi miatt
nem:
domo@domo2:~$ upsc legrand
Error: Connection failure: Cannot assign requested address
 

Kezd a ...öm tele lenni :(

sudo nut-scanner -U
Scanning USB bus.
 

Most ez is fejreállt.
 

 sudo upsdrvctl -u root start:
Network UPS Tools - UPS driver controller 2.7.4
Network UPS Tools - Generic HID driver 0.49 (2.8.0-Windows-190-g9fb8d6d5f)
USB communication driver (libusb 1.0) 0.43
Duplicate driver instance detected (PID file /var/run/nut/usbhid-ups-legrand.pid exists)! Terminating other driver!
kill: No such process
interrupt pipe disabled (add 'pollonly' flag to 'ups.conf' to get rid of this message)
Using subdriver: Legrand HID 0.2

/lib/nut/usbhid-ups -a legrand -DDD:

$ sudo /lib/nut/usbhid-ups -a legrand -DDD
Network UPS Tools - Generic HID driver 0.49 (2.8.0-Windows-190-g9fb8d6d5f)
USB communication driver (libusb 1.0) 0.43
   0.000000     [D1] debug level is '3'
   0.000582     [D1] Succeeded to become_user(nut): now UID=107 GID=113
   0.000602     [D2] Initializing an USB-connected UPS with library libusb-1.0.24 (API: 0x1000108) (NUT subdriver name='USB communication driver (libusb 1.0)' ver='0.43')
   0.000614     [D1] upsdrv_initups (non-SHUT)...
   0.003860     [D2] Checking device 1 of 10 (8087/8000)
   0.003886     [D1] Failed to open device (8087/8000), skipping: Access denied (insufficient permissions)
   0.003894     [D2] Checking device 2 of 10 (1D6B/0002)
   0.003906     [D1] Failed to open device (1D6B/0002), skipping: Access denied (insufficient permissions)
   0.003914     [D2] Checking device 3 of 10 (8087/8008)
   0.003924     [D1] Failed to open device (8087/8008), skipping: Access denied (insufficient permissions)
   0.003931     [D2] Checking device 4 of 10 (1D6B/0002)
   0.003943     [D1] Failed to open device (1D6B/0002), skipping: Access denied (insufficient permissions)
   0.003952     [D2] Checking device 5 of 10 (152D/0567)
   0.003965     [D1] Failed to open device (152D/0567), skipping: Access denied (insufficient permissions)
   0.003973     [D2] Checking device 6 of 10 (1D6B/0003)
   0.003986     [D1] Failed to open device (1D6B/0003), skipping: Access denied (insufficient permissions)
   0.003993     [D2] Checking device 7 of 10 (0BDA/0129)
   0.004004     [D1] Failed to open device (0BDA/0129), skipping: Access denied (insufficient permissions)
   0.004013     [D2] Checking device 8 of 10 (1CB0/0032)
   0.004984     [D2] - VendorID: 1cb0
   0.004992     [D2] - ProductID: 0032
   0.004995     [D2] - Manufacturer: Legrand
   0.004998     [D2] - Product: Legrand UPS
   0.005002     [D2] - Serial Number:
   0.005008     [D2] - Bus: 002
   0.005014     [D2] - Device: unknown
   0.005022     [D2] - Device release number: 0100
   0.005029     [D2] Trying to match device
   0.005038     [D2] match_function_subdriver (non-SHUT mode): matching a device...
   0.005049     interrupt pipe disabled (add 'pollonly' flag to 'ups.conf' to get rid of this message)
   0.005057     [D3] match_function_regex: matching a device...
   0.005104     [D2] Device matches
   0.005110     [D2] Reading first configuration descriptor
   0.005121     [D3] libusb_kernel_driver_active() returned 0
   0.005129     [D2] failed to claim USB device: Resource busy
   0.005137     [D2] Kernel driver already detached
   0.005144     [D2] failed to claim USB device: Resource busy
   0.005149     [D2] Kernel driver already detached
   0.005156     [D2] failed to claim USB device: Resource busy
   0.005164     [D2] Kernel driver already detached
   0.005171     [D2] failed to claim USB device: Resource busy
   0.005179     [D2] Kernel driver already detached
   0.005189     Can't claim USB device [1cb0:0032]@0/0: Entity not found
/lib/nut/usbhid-ups -a legrand -DDD:

  62.075810     [D2] Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Feature, ReportID: 0x32, Offset: 16, Size: 1, Value: 1
  62.075819     [D3] Report[buf]: (4 bytes) => 32 00 00 19
  62.075827     [D2] Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type: Feature, ReportID: 0x32, Offset: 18, Size: 1, Value: 0
  62.075836     [D3] Report[buf]: (4 bytes) => 32 00 00 19
  62.075844     [D2] Path: UPS.PowerSummary.PresentStatus.Charging, Type: Feature, ReportID: 0x32, Offset: 20, Size: 1, Value: 1
  62.075853     [D3] Report[buf]: (4 bytes) => 32 00 00 19
  62.075860     [D2] Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Feature, ReportID: 0x32, Offset: 21, Size: 1, Value: 0
  64.077533     [D1] upsdrv_updateinfo...
  64.077554     [D1] Not using interrupt pipe...
  64.077562     [D1] Full update...
  64.077703     [D3] Report[get]: (3 bytes) => 18 43 09
  64.077712     [D2] Path: UPS.PowerConverter.Input.Voltage, Type: Feature, ReportID: 0x18, Offset: 0, Size: 16, Value: 6.7e-05
  64.077856     [D3] Report[get]: (3 bytes) => 20 88 00
  64.077869     [D2] Path: UPS.BatterySystem.Battery.Voltage, Type: Feature, ReportID: 0x20, Offset: 0, Size: 16, Value: 0.000136
  64.078038     [D3] Report[get]: (2 bytes) => 34 64
  64.078051     [D2] Path: UPS.PowerSummary.RemainingCapacity, Type: Feature, ReportID: 0x34, Offset: 0, Size: 8, Value: 100
  64.078221     [D3] Report[get]: (3 bytes) => 35 0b 0a
  64.078232     [D2] Path: UPS.PowerSummary.RuntimeToEmpty, Type: Feature, ReportID: 0x35, Offset: 0, Size: 16, Value: 2571
  64.078362     [D3] Report[get]: (3 bytes) => 1b 92 09
  64.078371     [D2] Path: UPS.PowerConverter.Output.Voltage, Type: Feature, ReportID: 0x1b, Offset: 0, Size: 16, Value: 0.000146
  64.078489     [D3] Report[get]: (2 bytes) => 1e 0e
  64.078497     [D2] Path: UPS.OutletSystem.Outlet.PercentLoad, Type: Feature, ReportID: 0x1e, Offset: 0, Size: 8, Value: 14
  64.078656     [D3] Report[get]: (4 bytes) => 32 00 00 19
  64.078672     [D2] Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Feature, ReportID: 0x32, Offset: 16, Size: 1, Value: 1
  64.078681     [D3] Report[buf]: (4 bytes) => 32 00 00 19
  64.078694     [D2] Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type: Feature, ReportID: 0x32, Offset: 18, Size: 1, Value: 0
  64.078703     [D3] Report[buf]: (4 bytes) => 32 00 00 19
  64.078710     [D2] Path: UPS.PowerSummary.PresentStatus.Charging, Type: Feature, ReportID: 0x32, Offset: 20, Size: 1, Value: 1
  64.078717     [D3] Report[buf]: (4 bytes) => 32 00 00 19
  64.078724     [D2] Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Feature, ReportID: 0x32, Offset: 21, Size: 1, Value: 0

A Voltage 0.000136 !!!?

viszont:

upsc legrand
Error: Connection failure: Cannot assign requested address

:(

Szia!

SNMP kártya nincs hozzá?

Sok szempontból jobb az SNMP-kártya, mint az USB-n a "reszelés".

Hol láttad, hogy "baszomdrága"? Én elég kedvező áron vettem...