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
1.73k stars 335 forks source link

Connectivity Issues with GE VH3000 UPS (Now owned by ABB) #2466

Open MartinKurtz opened 3 weeks ago

MartinKurtz commented 3 weeks ago

Hello,

I am trying to connect a GE VH3000 UPS via USB to a raspberry pi which is supposed to be serving as a NUT server, but i am not able to find guidance on your website on which driver to use. The UPS presents as

Bus 001 Device 006: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port / Mobile Phone Data Cable

The ups.conf is currently

xretry = 5
pollinterval = 5
[VH3000]

        driver = blazer_ser
        port = /dev/ttyUSB0
        desc = "GE VH3000"

but has contained various drivers including nutdrv_qx, which its telling me to use

the nut.conf contains the line MODE=netserver

and the upsd.conf contains both 127.0.0.1 and my network in the form 123.123.123.* with port 3493 for both and upsmon.conf contains MONITOR VH3000@localhost 1 with credentials and master.

I have a headache, pls help

jimklimov commented 3 weeks ago

I've looked in the code, and this USB vendor is not known to NUT. Typically Prolifics are used in USB-Serial dongles, so if the UPS is internally using a serial protocol - trying drivers like blazer_ser vs. blazer_usb was a good approach. Note that nutdrv_qx is almost unique as it can handle both serial and USB devices; most other NUT drivers are dedicated to one type of media.

Can you please try starting the NUT driver program directly, and with higher verbosity, to see what it discovers about the device or what issues it encounters (e.g. permissions for the nut user account to open the device)?

You can even specify all arguments via CLI while testing, to avoid going back and forth to edit the ups.conf file (and only write down the successful combo there), e.g. on a typical Debian/Ubuntu derived distro with drivers in /lib/nut:

:; /lib/nut/nutdrv_qx -DDDDDD -s testups -x port=/dev/ttyUSB0

or in case it talks actual USB protocols:

:; /lib/nut/nutdrv_qx -DDDDDD -s testups -x port=auto -x vendorid=067b -x productid=2303

to check if it talks something similar to Megatec Qx protocols (replies would start with a parenthesis and a series of numbers for voltage etc.), or give a shot to real USB HID:

:; /lib/nut/usbhid-ups -DDDDDD -s testups -x port=auto -x vendorid=067b -x productid=2303

Note that currently NUT codebase does not know of such vendor, so for USB drivers - you would need to run those drivers with a --help option to check which subdriver and/or protocol options they offer and provide those on command line explicitly. The usbhid-ups only offers the subdriver tuning in recent releases (NUT v2.8.1 or newer).

Also try adding -x user=root while testing (and start the driver tests as root, perhaps via sudo), to make sure that devfs node ownership is not a problem when the normally running driver drops privileges to nut or ups. If those permissions are indeed the problem, you can keep user=root in ups.conf section for the device, or find a way with your OS to make it remember such permissions across reboots and re-plugs of USB devices (e.g. using udev or upower subsystems on recent Linux).

MartinKurtz commented 3 weeks ago

Hi,

none of the 3 options you provided made a successful connection and all 3 complained about lacking permissions. the results of blazer_ser were that it tried all 4 available protocols, all timed out, for blazer_usb they were similar to the second option you gave.

The NUT compatibility list on the website does know the vendor, that being GE Digital Energy, but it doesnt list the VH series of UPS

Number one without root being explicitly stated to the driver:

root@raspberrypi:/home/martin# :; /lib/nut/nutdrv_qx -DDDDDD -s testups -x port=/dev/ttyUSB0
Network UPS Tools - Generic Q* USB/Serial driver 0.32 (2.8.0)
USB communication driver (libusb 1.0) 0.43
   0.000000     [D3] main_arg: var='port' val='/dev/ttyUSB0'
   0.000187     [D5] send_to_all: SETINFO driver.parameter.port "/dev/ttyUSB0"
   0.000281     [D1] debug level is '6'
   0.002461     [D5] send_to_all: SETINFO device.type "ups"
   0.002606     [D1] upsdrv_initups...

Unable to open /dev/ttyUSB0: Permission denied

  Current user id: nut (109)
Serial port owner: root (0)
Serial port group: dialout (20)
     Mode of port: 0660

Things to try:

 - Use another port (with the right permissions)

 - Fix the port owner/group or permissions on this port

 - Run this driver as another user (upsdrvctl -u or 'user=...' in ups.conf).
   See upsdrvctl(8) and ups.conf(5).

   0.003957     Fatal error: unusable configuration

and then with root

root@raspberrypi:/home/martin# :; /lib/nut/nutdrv_qx -u root -DDDDDD -s testups -x port=/dev/ttyUSB0
Network UPS Tools - Generic Q* USB/Serial driver 0.32 (2.8.0)
USB communication driver (libusb 1.0) 0.43
   0.000000     [D3] main_arg: var='port' val='/dev/ttyUSB0'
   0.000189     [D5] send_to_all: SETINFO driver.parameter.port "/dev/ttyUSB0"
   0.000300     [D1] debug level is '6'
   0.002464     [D5] send_to_all: SETINFO device.type "ups"
   0.002618     [D1] upsdrv_initups...
   0.107894     [D3] send: 'QGS'
   1.109219     [D3] read: timeout (0)
   1.109377     [D2] qx_process_answer: short reply (input.voltage)
   1.109918     [D3] send: 'QGS'
   2.111153     [D3] read: timeout (0)
   2.111344     [D2] qx_process_answer: short reply (input.voltage)
   2.111673     [D3] send: 'QGS'
   3.112941     [D3] read: timeout (0)
   3.113114     [D2] qx_process_answer: short reply (input.voltage)
   3.113467     [D3] send: 'M'
   4.114695     [D3] read: timeout (0)
   4.114841     [D2] qx_process_answer: short reply (ups.firmware.aux)
   4.115338     [D3] send: 'M'
   5.116542     [D3] read: timeout (0)
   5.116690     [D2] qx_process_answer: short reply (ups.firmware.aux)
   5.117121     [D3] send: 'M'
   6.118365     [D3] read: timeout (0)
   6.118503     [D2] qx_process_answer: short reply (ups.firmware.aux)
   6.118953     [D3] send: 'M'
   7.120190     [D3] read: timeout (0)
   7.120341     [D2] qx_process_answer: short reply (ups.firmware.aux)
   7.120735     [D3] send: 'M'
   8.122129     [D3] read: timeout (0)
   8.122508     [D2] qx_process_answer: short reply (ups.firmware.aux)
   8.123221     [D3] send: 'M'
   9.124662     [D3] read: timeout (0)
   9.125110     [D2] qx_process_answer: short reply (ups.firmware.aux)
   9.125898     [D3] send: 'QS'
  10.127464     [D3] read: timeout (0)
  10.127823     [D2] qx_process_answer: short reply (input.voltage)
  10.128469     [D3] send: 'QS'
  11.129875     [D3] read: timeout (0)
  11.130295     [D2] qx_process_answer: short reply (input.voltage)
  11.131130     [D3] send: 'QS'
  12.132657     [D3] read: timeout (0)
  12.133007     [D2] qx_process_answer: short reply (input.voltage)
  12.133629     [D3] send: 'D'
  13.135016     [D3] read: timeout (0)
  13.135447     [D2] qx_process_answer: short reply (input.voltage)
  13.136130     [D3] send: 'D'
  14.137570     [D3] read: timeout (0)
  14.137746     [D2] qx_process_answer: short reply (input.voltage)
  14.138078     [D3] send: 'D'
  15.139292     [D3] read: timeout (0)
  15.139432     [D2] qx_process_answer: short reply (input.voltage)
  15.139764     [D3] send: 'Q1'
  16.141021     [D3] read: timeout (0)
  16.141210     [D2] qx_process_answer: short reply (input.voltage)
  16.141519     [D3] send: 'Q1'
  17.142738     [D3] read: timeout (0)
  17.142879     [D2] qx_process_answer: short reply (input.voltage)
  17.143209     [D3] send: 'Q1'
  18.144431     [D3] read: timeout (0)
  18.144588     [D2] qx_process_answer: short reply (input.voltage)
  18.144941     [D3] send: 'Q1'
  19.146186     [D3] read: timeout (0)
  19.146345     [D2] qx_process_answer: short reply (input.voltage)
  19.146665     [D3] send: 'Q1'
  20.147892     [D3] read: timeout (0)
  20.148261     [D2] qx_process_answer: short reply (input.voltage)
  20.148881     [D3] send: 'Q1'
  21.150355     [D3] read: timeout (0)
  21.150705     [D2] qx_process_answer: short reply (input.voltage)
  21.151372     [D3] send: 'Q1'
  22.152738     [D3] read: timeout (0)
  22.153064     [D2] qx_process_answer: short reply (input.voltage)
  22.153614     [D3] send: 'Q1'
  23.154839     [D3] read: timeout (0)
  23.155099     [D2] qx_process_answer: short reply (input.voltage)
  23.155757     [D3] send: 'Q1'
  24.157283     [D3] read: timeout (0)
  24.157675     [D2] qx_process_answer: short reply (input.voltage)
  24.158243     [D3] send: 'Q1'
  25.159672     [D3] read: timeout (0)
  25.160074     [D2] qx_process_answer: short reply (input.voltage)
  25.160779     [D3] send: 'Q1'
  26.162300     [D3] read: timeout (0)
  26.162699     [D2] qx_process_answer: short reply (input.voltage)
  26.163463     [D3] send: 'Q1'
  27.164904     [D3] read: timeout (0)
  27.165692     [D2] qx_process_answer: short reply (input.voltage)
  27.166045     [D2] find_nut_info: info type series not found
  27.166438     [D2] claim: cannot find series
  27.166815     [D2] find_nut_info: info type series not found
  27.167278     [D2] claim: cannot find series
  27.167710     [D2] find_nut_info: info type series not found
  27.168071     [D2] claim: cannot find series
  27.169861     [D3] send: 'Q1'
  28.171336     [D3] read: timeout (0)
  28.171711     [D2] qx_process_answer: short reply (input.voltage)
  28.172495     [D3] send: 'Q1'
  29.173895     [D3] read: timeout (0)
  29.174006     [D2] qx_process_answer: short reply (input.voltage)
  29.174205     [D3] send: 'Q1'
  30.175328     [D3] read: timeout (0)
  30.175421     [D2] qx_process_answer: short reply (input.voltage)
  30.175620     [D3] send: 'Q1'
  31.176753     [D3] read: timeout (0)
  31.176847     [D2] qx_process_answer: short reply (input.voltage)
  31.177053     [D3] send: 'Q1'
  32.178178     [D3] read: timeout (0)
  32.178270     [D2] qx_process_answer: short reply (input.voltage)
  32.178474     [D3] send: 'Q1'
  33.179250     [D3] read: timeout (0)
  33.179340     [D2] qx_process_answer: short reply (input.voltage)
  33.179527     [D3] send: 'Q1'
  34.180706     [D3] read: timeout (0)
  34.180862     [D2] qx_process_answer: short reply (input.voltage)
  34.181300     [D3] send: 'Q1'
  35.182559     [D3] read: timeout (0)
  35.182710     [D2] qx_process_answer: short reply (input.voltage)
  35.183071     [D3] send: 'Q1'
  36.184336     [D3] read: timeout (0)
  36.184498     [D2] qx_process_answer: short reply (input.voltage)
  36.184588     Device not supported!
  36.184673     Device not supported!

Option 2:

root not explicitly stated:

root@raspberrypi:/home/martin# :; /lib/nut/nutdrv_qx -DDDDDD -s testups -x port=auto -x vendorid=067b -x productid=2303
Network UPS Tools - Generic Q* USB/Serial driver 0.32 (2.8.0)
USB communication driver (libusb 1.0) 0.43
   0.000000     [D3] main_arg: var='port' val='auto'
   0.000162     [D5] send_to_all: SETINFO driver.parameter.port "auto"
   0.000285     [D3] main_arg: var='vendorid' val='067b'
   0.000389     [D5] send_to_all: SETINFO driver.parameter.vendorid "067b"
   0.000481     [D3] main_arg: var='productid' val='2303'
   0.000594     [D5] send_to_all: SETINFO driver.parameter.productid "2303"
   0.000685     [D1] debug level is '6'
   0.003029     [D5] send_to_all: SETINFO device.type "ups"
   0.003167     [D1] upsdrv_initups...
   0.045388     [D2] Checking device 1 of 5 (067B/2303)
   0.045682     [D1] Failed to open device (067B/2303), skipping: Access denied (insufficient permissions)
   0.045801     [D2] Checking device 2 of 5 (0424/7800)
   0.045960     [D1] Failed to open device (0424/7800), skipping: Access denied (insufficient permissions)
   0.046079     [D2] Checking device 3 of 5 (0424/2514)
   0.046275     [D1] Failed to open device (0424/2514), skipping: Access denied (insufficient permissions)
   0.046397     [D2] Checking device 4 of 5 (0424/2514)
   0.046571     [D1] Failed to open device (0424/2514), skipping: Access denied (insufficient permissions)
   0.046684     [D2] Checking device 5 of 5 (1D6B/0002)
   0.046847     [D1] Failed to open device (1D6B/0002), skipping: Access denied (insufficient permissions)
   0.046955     [D2] libusb1: No appropriate HID device found
   0.047066     libusb1: Could not open any HID devices: insufficient permissions on everything
   0.047169     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).

and with root explicitly stated

 root@raspberrypi:/home/martin# :; /lib/nut/nutdrv_qx -u root -DDDDDD -s testups -x port=/dev/ttyUSB0
Network UPS Tools - Generic Q* USB/Serial driver 0.32 (2.8.0)
USB communication driver (libusb 1.0) 0.43
   0.000000     [D3] main_arg: var='port' val='/dev/ttyUSB0'
   0.000189     [D5] send_to_all: SETINFO driver.parameter.port "/dev/ttyUSB0"
   0.000300     [D1] debug level is '6'
   0.002464     [D5] send_to_all: SETINFO device.type "ups"
   0.002618     [D1] upsdrv_initups...
   0.107894     [D3] send: 'QGS'
   1.109219     [D3] read: timeout (0)
   1.109377     [D2] qx_process_answer: short reply (input.voltage)
   1.109918     [D3] send: 'QGS'
   2.111153     [D3] read: timeout (0)
   2.111344     [D2] qx_process_answer: short reply (input.voltage)
   2.111673     [D3] send: 'QGS'
   3.112941     [D3] read: timeout (0)
   3.113114     [D2] qx_process_answer: short reply (input.voltage)
   3.113467     [D3] send: 'M'
   4.114695     [D3] read: timeout (0)
   4.114841     [D2] qx_process_answer: short reply (ups.firmware.aux)
   4.115338     [D3] send: 'M'
   5.116542     [D3] read: timeout (0)
   5.116690     [D2] qx_process_answer: short reply (ups.firmware.aux)
   5.117121     [D3] send: 'M'
   6.118365     [D3] read: timeout (0)
   6.118503     [D2] qx_process_answer: short reply (ups.firmware.aux)
   6.118953     [D3] send: 'M'
   7.120190     [D3] read: timeout (0)
   7.120341     [D2] qx_process_answer: short reply (ups.firmware.aux)
   7.120735     [D3] send: 'M'
   8.122129     [D3] read: timeout (0)
   8.122508     [D2] qx_process_answer: short reply (ups.firmware.aux)
   8.123221     [D3] send: 'M'
   9.124662     [D3] read: timeout (0)
   9.125110     [D2] qx_process_answer: short reply (ups.firmware.aux)
   9.125898     [D3] send: 'QS'
  10.127464     [D3] read: timeout (0)
  10.127823     [D2] qx_process_answer: short reply (input.voltage)
  10.128469     [D3] send: 'QS'
  11.129875     [D3] read: timeout (0)
  11.130295     [D2] qx_process_answer: short reply (input.voltage)
  11.131130     [D3] send: 'QS'
  12.132657     [D3] read: timeout (0)
  12.133007     [D2] qx_process_answer: short reply (input.voltage)
  12.133629     [D3] send: 'D'
  13.135016     [D3] read: timeout (0)
  13.135447     [D2] qx_process_answer: short reply (input.voltage)
  13.136130     [D3] send: 'D'
  14.137570     [D3] read: timeout (0)
  14.137746     [D2] qx_process_answer: short reply (input.voltage)
  14.138078     [D3] send: 'D'
  15.139292     [D3] read: timeout (0)
  15.139432     [D2] qx_process_answer: short reply (input.voltage)
  15.139764     [D3] send: 'Q1'
  16.141021     [D3] read: timeout (0)
  16.141210     [D2] qx_process_answer: short reply (input.voltage)
  16.141519     [D3] send: 'Q1'
  17.142738     [D3] read: timeout (0)
  17.142879     [D2] qx_process_answer: short reply (input.voltage)
  17.143209     [D3] send: 'Q1'
  18.144431     [D3] read: timeout (0)
  18.144588     [D2] qx_process_answer: short reply (input.voltage)
  18.144941     [D3] send: 'Q1'
  19.146186     [D3] read: timeout (0)
  19.146345     [D2] qx_process_answer: short reply (input.voltage)
  19.146665     [D3] send: 'Q1'
  20.147892     [D3] read: timeout (0)
  20.148261     [D2] qx_process_answer: short reply (input.voltage)
  20.148881     [D3] send: 'Q1'
  21.150355     [D3] read: timeout (0)
  21.150705     [D2] qx_process_answer: short reply (input.voltage)
  21.151372     [D3] send: 'Q1'
  22.152738     [D3] read: timeout (0)
  22.153064     [D2] qx_process_answer: short reply (input.voltage)
  22.153614     [D3] send: 'Q1'
  23.154839     [D3] read: timeout (0)
  23.155099     [D2] qx_process_answer: short reply (input.voltage)
  23.155757     [D3] send: 'Q1'
  24.157283     [D3] read: timeout (0)
  24.157675     [D2] qx_process_answer: short reply (input.voltage)
  24.158243     [D3] send: 'Q1'
  25.159672     [D3] read: timeout (0)
  25.160074     [D2] qx_process_answer: short reply (input.voltage)
  25.160779     [D3] send: 'Q1'
  26.162300     [D3] read: timeout (0)
  26.162699     [D2] qx_process_answer: short reply (input.voltage)
  26.163463     [D3] send: 'Q1'
  27.164904     [D3] read: timeout (0)
  27.165692     [D2] qx_process_answer: short reply (input.voltage)
  27.166045     [D2] find_nut_info: info type series not found
  27.166438     [D2] claim: cannot find series
  27.166815     [D2] find_nut_info: info type series not found
  27.167278     [D2] claim: cannot find series
  27.167710     [D2] find_nut_info: info type series not found
  27.168071     [D2] claim: cannot find series
  27.169861     [D3] send: 'Q1'
  28.171336     [D3] read: timeout (0)
  28.171711     [D2] qx_process_answer: short reply (input.voltage)
  28.172495     [D3] send: 'Q1'
  29.173895     [D3] read: timeout (0)
  29.174006     [D2] qx_process_answer: short reply (input.voltage)
  29.174205     [D3] send: 'Q1'
  30.175328     [D3] read: timeout (0)
  30.175421     [D2] qx_process_answer: short reply (input.voltage)
  30.175620     [D3] send: 'Q1'
  31.176753     [D3] read: timeout (0)
  31.176847     [D2] qx_process_answer: short reply (input.voltage)
  31.177053     [D3] send: 'Q1'
  32.178178     [D3] read: timeout (0)
  32.178270     [D2] qx_process_answer: short reply (input.voltage)
  32.178474     [D3] send: 'Q1'
  33.179250     [D3] read: timeout (0)
  33.179340     [D2] qx_process_answer: short reply (input.voltage)
  33.179527     [D3] send: 'Q1'
  34.180706     [D3] read: timeout (0)
  34.180862     [D2] qx_process_answer: short reply (input.voltage)
  34.181300     [D3] send: 'Q1'
  35.182559     [D3] read: timeout (0)
  35.182710     [D2] qx_process_answer: short reply (input.voltage)
  35.183071     [D3] send: 'Q1'
  36.184336     [D3] read: timeout (0)
  36.184498     [D2] qx_process_answer: short reply (input.voltage)
  36.184588     Device not supported!
  36.184673     Device not supported!
root@raspberrypi:/home/martin# :; /lib/nut/nutdrv_qx -DDDDDD -s testups -x port=auto -x vendorid=067b -x productid=2303
Network UPS Tools - Generic Q* USB/Serial driver 0.32 (2.8.0)
USB communication driver (libusb 1.0) 0.43
   0.000000     [D3] main_arg: var='port' val='auto'
   0.000162     [D5] send_to_all: SETINFO driver.parameter.port "auto"
   0.000285     [D3] main_arg: var='vendorid' val='067b'
   0.000389     [D5] send_to_all: SETINFO driver.parameter.vendorid "067b"
   0.000481     [D3] main_arg: var='productid' val='2303'
   0.000594     [D5] send_to_all: SETINFO driver.parameter.productid "2303"
   0.000685     [D1] debug level is '6'
   0.003029     [D5] send_to_all: SETINFO device.type "ups"
   0.003167     [D1] upsdrv_initups...
   0.045388     [D2] Checking device 1 of 5 (067B/2303)
   0.045682     [D1] Failed to open device (067B/2303), skipping: Access denied (insufficient permissions)
   0.045801     [D2] Checking device 2 of 5 (0424/7800)
   0.045960     [D1] Failed to open device (0424/7800), skipping: Access denied (insufficient permissions)
   0.046079     [D2] Checking device 3 of 5 (0424/2514)
   0.046275     [D1] Failed to open device (0424/2514), skipping: Access denied (insufficient permissions)
   0.046397     [D2] Checking device 4 of 5 (0424/2514)
   0.046571     [D1] Failed to open device (0424/2514), skipping: Access denied (insufficient permissions)
   0.046684     [D2] Checking device 5 of 5 (1D6B/0002)
   0.046847     [D1] Failed to open device (1D6B/0002), skipping: Access denied (insufficient permissions)
   0.046955     [D2] libusb1: No appropriate HID device found
   0.047066     libusb1: Could not open any HID devices: insufficient permissions on everything
   0.047169     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).

root@raspberrypi:/home/martin# :; /lib/nut/nutdrv_qx -u root -DDDDDD -s testups -x port=auto -x vendorid=067b -x productid=2303
Network UPS Tools - Generic Q* USB/Serial driver 0.32 (2.8.0)
USB communication driver (libusb 1.0) 0.43
   0.000000     [D3] main_arg: var='port' val='auto'
   0.000174     [D5] send_to_all: SETINFO driver.parameter.port "auto"
   0.000286     [D3] main_arg: var='vendorid' val='067b'
   0.000441     [D5] send_to_all: SETINFO driver.parameter.vendorid "067b"
   0.000554     [D3] main_arg: var='productid' val='2303'
   0.000668     [D5] send_to_all: SETINFO driver.parameter.productid "2303"
   0.000778     [D1] debug level is '6'
   0.002990     [D5] send_to_all: SETINFO device.type "ups"
   0.003128     [D1] upsdrv_initups...
   0.038476     [D2] Checking device 1 of 5 (067B/2303)
   0.040892     [D2] - VendorID: 067b
   0.040991     [D2] - ProductID: 2303
   0.041061     [D2] - Manufacturer: Prolific Technology Inc.
   0.041128     [D2] - Product: USB-Serial Controller
   0.041197     [D2] - Serial Number: unknown
   0.041268     [D2] - Bus: 001
   0.041338     [D2] - Device: unknown
   0.041401     [D2] - Device release number: 0300
   0.041468     [D2] Trying to match device
   0.041535     [D3] match_function_regex: matching a device...
   0.042012     [D2] Device does not match - skipping
   0.042218     [D2] Checking device 2 of 5 (0424/7800)
   0.042416     [D2] - VendorID: 0424
   0.042487     [D2] - ProductID: 7800
   0.042563     [D2] - Manufacturer: unknown
   0.042630     [D2] - Product: unknown
   0.042701     [D2] - Serial Number: unknown
   0.042765     [D2] - Bus: 001
   0.042822     [D2] - Device: unknown
   0.042892     [D2] - Device release number: 0300
   0.042956     [D2] Trying to match device
   0.043020     [D3] match_function_regex: matching a device...
   0.043099     [D2] match_function_regex: failed match of VendorID:  424
   0.043173     [D2] Device does not match - skipping
   0.043277     [D2] Checking device 3 of 5 (0424/2514)
   0.043428     [D2] - VendorID: 0424
   0.043497     [D2] - ProductID: 2514
   0.043560     [D2] - Manufacturer: unknown
   0.043716     [D2] - Product: unknown
   0.043786     [D2] - Serial Number: unknown
   0.043971     [D2] - Bus: 001
   0.044042     [D2] - Device: unknown
   0.044110     [D2] - Device release number: 0bb3
   0.044184     [D2] Trying to match device
   0.044252     [D3] match_function_regex: matching a device...
   0.044332     [D2] match_function_regex: failed match of VendorID:  424
   0.044405     [D2] Device does not match - skipping
   0.044520     [D2] Checking device 4 of 5 (0424/2514)
   0.044679     [D2] - VendorID: 0424
   0.044748     [D2] - ProductID: 2514
   0.044811     [D2] - Manufacturer: unknown
   0.044872     [D2] - Product: unknown
   0.044943     [D2] - Serial Number: unknown
   0.045004     [D2] - Bus: 001
   0.045068     [D2] - Device: unknown
   0.045139     [D2] - Device release number: 0bb3
   0.045204     [D2] Trying to match device
   0.045269     [D3] match_function_regex: matching a device...
   0.045351     [D2] match_function_regex: failed match of VendorID:  424
   0.045424     [D2] Device does not match - skipping
   0.045532     [D2] Checking device 5 of 5 (1D6B/0002)
   0.046747     [D2] - VendorID: 1d6b
   0.046845     [D2] - ProductID: 0002
   0.046913     [D2] - Manufacturer: Linux 6.1.21-v8+ dwc_otg_hcd
   0.046978     [D2] - Product: DWC OTG Controller
   0.047041     [D2] - Serial Number: 3f980000.usb
   0.047105     [D2] - Bus: 001
   0.047171     [D2] - Device: unknown
   0.047235     [D2] - Device release number: 0601
   0.047306     [D2] Trying to match device
   0.047374     [D3] match_function_regex: matching a device...
   0.047446     [D2] match_function_regex: failed match of VendorID: 1d6b
   0.047517     [D2] Device does not match - skipping
   0.047639     [D2] libusb1: No appropriate HID device found
   0.047750     libusb1: Could not open any HID devices: insufficient permissions on everything
   0.047826     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).

and last but not least option 3 without root explicitly being stated


root@raspberrypi:/home/martin# :; /lib/nut/usbhid-ups -DDDDDD -s testups -x port=auto -x vendorid=067b -x productid=2303
Network UPS Tools - Generic HID driver 0.47 (2.8.0)
USB communication driver (libusb 1.0) 0.43
   0.000000     [D3] main_arg: var='port' val='auto'
   0.000162     [D5] send_to_all: SETINFO driver.parameter.port "auto"
   0.000256     [D3] main_arg: var='vendorid' val='067b'
   0.000358     [D5] send_to_all: SETINFO driver.parameter.vendorid "067b"
   0.000464     [D3] main_arg: var='productid' val='2303'
   0.000564     [D5] send_to_all: SETINFO driver.parameter.productid "2303"
   0.000655     [D1] debug level is '6'
   0.002417     [D5] send_to_all: SETINFO device.type "ups"
   0.002529     [D2] Initializing an USB-connected UPS with library libusb-1.0.26 (API: 0x1000109) (NUT subdriver name='USB communication driver (libusb 1.0)' ver='0.43')
   0.002622     [D1] upsdrv_initups (non-SHUT)...
   0.043060     [D2] Checking device 1 of 5 (067B/2303)
   0.043399     [D1] Failed to open device (067B/2303), skipping: Access denied (insufficient permissions)
   0.043626     [D2] Checking device 2 of 5 (0424/7800)
   0.043787     [D1] Failed to open device (0424/7800), skipping: Access denied (insufficient permissions)
   0.043929     [D2] Checking device 3 of 5 (0424/2514)
   0.044055     [D1] Failed to open device (0424/2514), skipping: Access denied (insufficient permissions)
   0.044323     [D2] Checking device 4 of 5 (0424/2514)
   0.044440     [D1] Failed to open device (0424/2514), skipping: Access denied (insufficient permissions)
   0.044511     [D2] Checking device 5 of 5 (1D6B/0002)
   0.044613     [D1] Failed to open device (1D6B/0002), skipping: Access denied (insufficient permissions)
   0.044678     [D2] libusb1: No appropriate HID device found
   0.044745     libusb1: Could not open any HID devices: insufficient permissions on everything
   0.044896     No matching HID UPS found

and with root being stated

   root@raspberrypi:/home/martin# :; /lib/nut/usbhid-ups -DDDDDD -s testups -x port=auto -x vendorid=067b -x productid=2303
Network UPS Tools - Generic HID driver 0.47 (2.8.0)
USB communication driver (libusb 1.0) 0.43
   0.000000     [D3] main_arg: var='port' val='auto'
   0.000162     [D5] send_to_all: SETINFO driver.parameter.port "auto"
   0.000256     [D3] main_arg: var='vendorid' val='067b'
   0.000358     [D5] send_to_all: SETINFO driver.parameter.vendorid "067b"
   0.000464     [D3] main_arg: var='productid' val='2303'
   0.000564     [D5] send_to_all: SETINFO driver.parameter.productid "2303"
   0.000655     [D1] debug level is '6'
   0.002417     [D5] send_to_all: SETINFO device.type "ups"
   0.002529     [D2] Initializing an USB-connected UPS with library libusb-1.0.26 (API: 0x1000109) (NUT subdriver name='USB communication driver (libusb 1.0)' ver='0.43')
   0.002622     [D1] upsdrv_initups (non-SHUT)...
   0.043060     [D2] Checking device 1 of 5 (067B/2303)
   0.043399     [D1] Failed to open device (067B/2303), skipping: Access denied (insufficient permissions)
   0.043626     [D2] Checking device 2 of 5 (0424/7800)
   0.043787     [D1] Failed to open device (0424/7800), skipping: Access denied (insufficient permissions)
   0.043929     [D2] Checking device 3 of 5 (0424/2514)
   0.044055     [D1] Failed to open device (0424/2514), skipping: Access denied (insufficient permissions)
   0.044323     [D2] Checking device 4 of 5 (0424/2514)
   0.044440     [D1] Failed to open device (0424/2514), skipping: Access denied (insufficient permissions)
   0.044511     [D2] Checking device 5 of 5 (1D6B/0002)
   0.044613     [D1] Failed to open device (1D6B/0002), skipping: Access denied (insufficient permissions)
   0.044678     [D2] libusb1: No appropriate HID device found
   0.044745     libusb1: Could not open any HID devices: insufficient permissions on everything
   0.044896     No matching HID UPS found
root@raspberrypi:/home/martin# :; /lib/nut/usbhid-ups -u root -DDDDDD -s testups -x port=auto -x vendorid=067b -x productid=2303
Network UPS Tools - Generic HID driver 0.47 (2.8.0)
USB communication driver (libusb 1.0) 0.43
   0.000000     [D3] main_arg: var='port' val='auto'
   0.000162     [D5] send_to_all: SETINFO driver.parameter.port "auto"
   0.000288     [D3] main_arg: var='vendorid' val='067b'
   0.000481     [D5] send_to_all: SETINFO driver.parameter.vendorid "067b"
   0.000753     [D3] main_arg: var='productid' val='2303'
   0.000882     [D5] send_to_all: SETINFO driver.parameter.productid "2303"
   0.000986     [D1] debug level is '6'
   0.003030     [D5] send_to_all: SETINFO device.type "ups"
   0.003265     [D2] Initializing an USB-connected UPS with library libusb-1.0.26 (API: 0x1000109) (NUT subdriver name='USB communication driver (libusb 1.0)' ver='0.43')
   0.003599     [D1] upsdrv_initups (non-SHUT)...
   0.039917     [D2] Checking device 1 of 5 (067B/2303)
   0.042713     [D2] - VendorID: 067b
   0.043005     [D2] - ProductID: 2303
   0.043188     [D2] - Manufacturer: Prolific Technology Inc.
   0.043274     [D2] - Product: USB-Serial Controller
   0.043516     [D2] - Serial Number: unknown
   0.043789     [D2] - Bus: 001
   0.044054     [D2] - Device: unknown
   0.044229     [D2] - Device release number: 0300
   0.044313     [D2] Trying to match device
   0.044397     [D2] match_function_subdriver (non-SHUT mode): matching a device...
   0.044628     [D2] match_function_subdriver (non-SHUT mode): failed to match a subdriver to vendor and/or product ID
   0.045060     [D2] Device does not match - skipping
   0.045460     [D2] Checking device 2 of 5 (0424/7800)
   0.045924     [D2] - VendorID: 0424
   0.046263     [D2] - ProductID: 7800
   0.046526     [D2] - Manufacturer: unknown
   0.046834     [D2] - Product: unknown
   0.047210     [D2] - Serial Number: unknown
   0.047618     [D2] - Bus: 001
   0.047940     [D2] - Device: unknown
   0.048030     [D2] - Device release number: 0300
   0.048113     [D2] Trying to match device
   0.048203     [D2] match_function_subdriver (non-SHUT mode): matching a device...
   0.048317     [D2] match_function_subdriver (non-SHUT mode): failed to match a subdriver to vendor and/or product ID
   0.048700     [D2] Device does not match - skipping
   0.049235     [D2] Checking device 3 of 5 (0424/2514)
   0.049732     [D2] - VendorID: 0424
   0.049989     [D2] - ProductID: 2514
   0.050252     [D2] - Manufacturer: unknown
   0.050432     [D2] - Product: unknown
   0.050726     [D2] - Serial Number: unknown
   0.051020     [D2] - Bus: 001
   0.051166     [D2] - Device: unknown
   0.051261     [D2] - Device release number: 0bb3
   0.051594     [D2] Trying to match device
   0.051992     [D2] match_function_subdriver (non-SHUT mode): matching a device...
   0.052267     [D2] match_function_subdriver (non-SHUT mode): failed to match a subdriver to vendor and/or product ID
   0.052688     [D2] Device does not match - skipping
   0.052947     [D2] Checking device 4 of 5 (0424/2514)
   0.053253     [D2] - VendorID: 0424
   0.053386     [D2] - ProductID: 2514
   0.053483     [D2] - Manufacturer: unknown
   0.053732     [D2] - Product: unknown
   0.053911     [D2] - Serial Number: unknown
   0.054259     [D2] - Bus: 001
   0.054524     [D2] - Device: unknown
   0.054694     [D2] - Device release number: 0bb3
   0.054839     [D2] Trying to match device
   0.054934     [D2] match_function_subdriver (non-SHUT mode): matching a device...
   0.055085     [D2] match_function_subdriver (non-SHUT mode): failed to match a subdriver to vendor and/or product ID
   0.055492     [D2] Device does not match - skipping
   0.055763     [D2] Checking device 5 of 5 (1D6B/0002)
   0.057593     [D2] - VendorID: 1d6b
   0.057866     [D2] - ProductID: 0002
   0.058063     [D2] - Manufacturer: Linux 6.1.21-v8+ dwc_otg_hcd
   0.058149     [D2] - Product: DWC OTG Controller
   0.058320     [D2] - Serial Number: 3f980000.usb
   0.058767     [D2] - Bus: 001
   0.058924     [D2] - Device: unknown
   0.059008     [D2] - Device release number: 0601
   0.059092     [D2] Trying to match device
   0.059237     [D2] match_function_subdriver (non-SHUT mode): matching a device...
   0.059396     [D2] match_function_subdriver (non-SHUT mode): failed to match a subdriver to vendor and/or product ID
   0.059495     [D2] Device does not match - skipping
   0.059701     [D2] libusb1: No appropriate HID device found
   0.059960     libusb1: Could not open any HID devices: insufficient permissions on everything
   0.060270     No matching HID UPS found
MartinKurtz commented 3 weeks ago

Curiously enough, i did some further attempts with the blazer drivers as well, and after looking at the output, what strikes me, is that these drivers dont seem to attempt to connect to the UPS, no matter with what options ive tried. i suspect this is because the device shows up as Unknown, but i am not to knowledgeable on the topic

Network UPS Tools - Megatec/Q1 protocol USB driver 0.14 (2.8.0)
   0.000000     [D3] main_arg: var='port' val='auto'
   0.000237     [D5] send_to_all: SETINFO driver.parameter.port "auto"
   0.000454     [D3] main_arg: var='vendorid' val='067b'
   0.000569     [D5] send_to_all: SETINFO driver.parameter.vendorid "067b"
   0.000823     [D3] main_arg: var='productid' val='2303'
   0.001046     [D5] send_to_all: SETINFO driver.parameter.productid "2303"
   0.001148     [D1] debug level is '6'
   0.003206     [D5] send_to_all: SETINFO device.type "ups"
   0.044866     [D2] Checking device 1 of 5 (067B/2303)
   0.048633     [D2] - VendorID: 067b
   0.048876     [D2] - ProductID: 2303
   0.049988     [D2] - Manufacturer: Prolific Technology Inc.
   0.050714     [D2] - Product: USB-Serial Controller
   0.050816     [D2] - Serial Number: unknown
   0.050913     [D2] - Bus: 001
   0.051008     [D2] - Device: unknown
   0.051119     [D2] - Device release number: 0300
   0.051216     [D2] Trying to match device
   0.051312     [D3] match_function_regex: matching a device...
   0.051898     [D2] Device does not match - skipping
jimklimov commented 3 weeks ago

Thinking of it, probably the direct USB driver connection fails because the ttyUSB provided by the kernel driver took over that device first. Well, was worth trying...

https://library.industrialsolutions.abb.com/publibrary/checkout/OPM_VHU208VUL?TNR=Installation%20and%20Instruction%7COPM_VHU208VUL%7CPDF&filename=GE_UPS_OPM_VHU_208_2K0_3K0_XUS_V010.pdf Chapter 5 details the use of "The RJ11 port is a plug-in contact interface port" and the vague "UPS software required ... For more information please refer to the user manual that comes with the interface software. We strongly recommend to use only original GE software products in combination with the interface port." regarding the USB port.

Probably the device came from a different OEM or team than those talking already known protocols (blazer => megatec)...

MartinKurtz commented 3 weeks ago

yeah, ive got that software and also the serial number to use it, but it doesnt run on arm, e.g. a raspi and it also doesnt seem to be able to shut everything down in the was i need it to. the software is this one https://www.generex.de/de/products/software/upsman.

So if possible at all, id like to get nut working with the ups

jimklimov commented 3 weeks ago

Well, at least it is something to try searching for (if anyone deciphered the protocol devices use with UPSMan so it can be used with NUT too), but so far I googled up no hits :(

Still, as a paying customer you may have a better standing to request the protocol documentation, at least.

As for the "Device: unknown" -- it was a problem fixed in I think NUT v2.8.1, so you can try https://github.com/networkupstools/nut/wiki/Building-NUT-for-in%E2%80%90place-upgrades-or-non%E2%80%90disruptive-tests with the current codebase to see if it helps. This is however the part where the manually specified subdriver options can come in handy, so the NUT driver would not discard the variants just because they do not have those so-far-unknown identifiers built in.

But the lack of Q1 etc. responses in one of the tests gives little hope that their protocol is Megatec Qx series compatible :\

jimklimov commented 3 weeks ago

I gather that a few drivers were made by listening on the wire for protocol communications between vendor tools and device, and making some sense of that. Unfortunately, I've never gone that deep into the rabbit hole myself, so can't help specifically - but maybe the mailing list members can.

MartinKurtz commented 3 weeks ago

Hm, i suppose i could borrow a protocol analyzer from my local computer museum and see what goes, ive got a baud rate and a serial something, but i dont know what the hell i am doing when going further than that, let alone writing drivers

jimklimov commented 3 weeks ago

I think it might not even have to be something from a museum. From what I gather, if there's an existing software for Windows or Linux, earlier similar efforts used a variant of WireShark with USB sniffing capability (not sure if they do serial... but then some VM with a virtual serial port as a man in the middle can do). Not sure where a serial-over-USB falls here for sniffing - perhaps serial (if this device is indeed such a serial protocol using an USB plug).

This way they recorded the bits from the wire during communications initialization, readings collection, perhaps some commands (calibration, shutdown...) so there can be educated guesses made for the protocol.

The number one option is getting the protocol spec officially - and maybe as a customer you can convince them you are entitled to that? :)

MartinKurtz commented 3 weeks ago

Worth a try, but getting to a human being that knows what the hell i want from them is going to be a challenge, i will keep you updated

MartinKurtz commented 2 weeks ago

Well, unsurprisingly ive gotten no answer yet, so what now

nan0desu commented 2 weeks ago

I have a GE VH-series too and facing the same problem. Tried fabula subdriver: /lib/nut/nutdrv_qx -DDDDDD -s testups -x port=auto -x vendorid=067b -x productid=2303 -x user=root -x subdriver=fabula And it replies to Q1 with 30 0D and echoes back all other commands. Removed usbserial driver with modprobe -r pl2303 fabula.log

jimklimov commented 1 week ago

Posted a question on the mailing list, maybe someone would have a guess about the protocol (or how to implement some).

MartinKurtz commented 24 minutes ago

Update, i have been in contact with someone at ABB and generex, they have the documentation and are absolutely willing to give it out, but some company rules prevent them from just giving it. They are quite friendly and aware that they arent gonna be making money with this and are in the process of determining under what conditions they can give the info out.