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.12k stars 355 forks source link

DEXP CEE-E1500VA #2645

Open big-vl opened 2 months ago

big-vl commented 2 months ago

I decided to try to raise nut for the subject, but alas it doesn’t work, and the application was written for Windows in 2018.

Could you maybe advance me a little?

server@debian:/etc/nut$ nut-scanner
Neon library not found. XML search disabled.
IPMI library not found. IPMI search disabled.
Scanning USB bus.
No start IP, skipping SNMP
No start IP, skipping NUT bus (old connect method)
[nutdev1]
    driver = "nutdrv_atcl_usb"
    port = "auto"
    vendorid = "0001"
    productid = "0000"
    bus = "003"
server@debian:/etc/nut$ sudo nano ups.conf
server@debian:/etc/nut$ sudo /lib/nut/nutdrv_atcl_usb -a ups -u root
Network UPS Tools - 'ATCL FOR UPS' USB driver 1.1 (2.7.4)
Warning: This is an experimental driver.
Some features may not function correctly.

Communications with UPS lost: Can't open USB device, retrying ...
Communications with UPS lost: Can't open USB device, retrying ...
Communications with UPS lost: Can't open USB device, retrying ...
Unable to find ATCL FOR UPS

Things to try:
 - Connect UPS device to USB bus
 - Run this driver as another user (upsdrvctl -u or 'user=...' in ups.conf).
   See upsdrvctl(8) and ups.conf(5).

Fatal error: unusable configuration
jimklimov commented 2 months ago

Unfortunately, this device has a useless identification so it is a guesswork at what driver might work.

In NUT HCL there's an entry for a DEXP though:

data/driver.list.in:"DEXP" "ups" "2" "MIX 850VA" "USB" "blazer_usb langid_fix=0x0409 runtimecal=240,100,720,50 default.battery.voltage.high=2.27 default.battery.voltage.low=1.72" # https://github.com/networkupstools/nut/issues/721

So you can try blazer_usb or nutdrv_qx drivers.

Also, NUT v2.7.4 is old, so see if you can get a newer package or build from source (see wiki).

big-vl commented 2 months ago
server@debian:/usr/local/ups/bin$ ls /dev | grep hid
hidraw0
hidraw1
hidraw2
uhid

hidraw2 is the ups itself, after launching blazer_usb the device disappears.


sudo ./blazer_usb -DDD -a dexp
Network UPS Tools 2.8.2.1082-1082-g1560afe33 (development iteration after 2.8.2) - Megatec/Q1 protocol USB driver 0.20
   0.000001 [D1] Using USB implementation: libusb-0.1 (or compat)
   0.000138 [D3] main_arg: var='driver' val='blazer_usb'
   0.000181 [D3] main_arg: var='port' val='auto'
   0.000223 [D3] main_arg: var='desc' val='DEXP IEC LCD ONLINE 3000VA'
   0.000268 [D3] main_arg: var='vendorid' val='0001'
   0.000317 [D3] main_arg: var='productid' val='0000'
   0.000376 [D1] Network UPS Tools version 2.8.2.1082-1082-g1560afe33 (development iteration after 2.8.2) built with gcc (Debian 10.2.1-6) 10.2.1 20210110 and configured with flags: --with-user=ups --with-group=nut --with-usb --with-cgi
   0.000418 [D1] debug level is '3'
   0.002368 [D1] Succeeded to become_user(ups): now UID=1001 GID=1001
   0.002451 [D1] Signalling UPS [dexp]: driver.exit (quietly, no fuss if no driver is running or responding)
   0.002535 Can't open /var/state/ups/blazer_usb-dexp: No such file or directory
   0.002574 [D1] Request for other driver to exit returned code -1
   0.002612 [D1] Socket dialog with the other driver instance (may be absent) failed: No such file or directory
   0.264276 [D3] usb_busses=0x56004fb82ae0
   0.264315 [D2] Checking device (1D6B/0003) (004/001)
   0.290637 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   0.340758 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   0.390877 [D1] nut_libusb_open: get Manufacturer string failed
   0.390907 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   0.441037 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   0.492546 [D1] nut_libusb_open: get Product string failed
   0.492744 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   0.542943 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   0.593086 [D1] nut_libusb_open: get Serial Number string failed
   0.593302 [D2] - VendorID: 1d6b
   0.594768 [D2] - ProductID: 0003
   0.594817 [D2] - Manufacturer: unknown
   0.594855 [D2] - Product: unknown
   0.594954 [D2] - Serial Number: unknown
   0.594993 [D2] - Bus: 004
   0.595081 [D2] - Device: 001
   0.595126 [D2] - Device release number: 0510
   0.595218 [D2] Trying to match device
   0.595258 [D3] match_function_regex: matching a device...
   0.595371 [D2] match_function_regex: failed match of VendorID: 1d6b
   0.595468 [D2] Device does not match - skipping
   0.595682 [D2] Checking device (0001/0000) (003/007)
   0.597278 [D1] nut_usb_get_string: Broken language identifier, assuming en_US
   0.599991 [D2] - VendorID: 0001
   0.600225 [D2] - ProductID: 0000
   0.600264 [D2] - Manufacturer: unknown
   0.600342 [D2] - Product: MEC0003
   0.600381 [D2] - Serial Number: unknown
   0.600416 [D2] - Bus: 003
   0.600451 [D2] - Device: 007
   0.600487 [D2] - Device release number: 0100
   0.600523 [D2] Trying to match device
   0.600567 [D3] match_function_regex: matching a device...
   0.600658 [D2] Device matches
   0.600724 [D2] failed to claim USB device: could not claim interface 0: Device or resource busy
   0.601637 [D2] detached kernel driver from USB device...
   0.601728 [D3] nut_libusb_set_altinterface: skipped usb_set_altinterface(udev, 0)
   0.601788 Please note that this driver is deprecated and will not receive
new development. If it works for managing your devices - fine,
but if you are running it to try setting up a new device, please
consider the newer nutdrv_qx instead, which should handle all 'Qx'
protocol variants for NUT. (Please also report if your device works
with this driver, but nutdrv_qx would not actually support it with
any subdriver!)

   0.601902 [D2] Trying megatec protocol...
   0.601942 [D3] send: Q1
   0.603307 [D3] read: could not claim interface 0: Device or resource busy
   0.603928 [D2] blazer_status: short reply
   0.604190 [D2] Status read 1 failed
   0.960542 [D3] usb_busses=0x56004fb82ae0
   0.960592 [D2] Checking device (1D6B/0003) (004/001)
   0.986737 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   1.036909 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   1.087237 [D1] nut_libusb_open: get Manufacturer string failed
   1.089053 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   1.139481 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   1.189611 [D1] nut_libusb_open: get Product string failed
   1.189639 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   1.239764 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   1.289929 [D1] nut_libusb_open: get Serial Number string failed
   1.290100 [D2] - VendorID: 1d6b
   1.290554 [D2] - ProductID: 0003
   1.290567 [D2] - Manufacturer: unknown
   1.290572 [D2] - Product: unknown
   1.290577 [D2] - Serial Number: unknown
   1.290581 [D2] - Bus: 004
   1.290585 [D2] - Device: 001
   1.290590 [D2] - Device release number: 0510
   1.290597 [D2] Trying to match device
   1.290604 [D3] match_function_exact: matching a device...
   1.290612 [D2] match_function_exact: failed match of VendorID: 1d6b !=    1
   1.290620 [D2] Device does not match - skipping
   1.290762 [D2] Checking device (0001/0000) (003/007)
   1.292076 [D1] nut_usb_get_string: Broken language identifier, assuming en_US
   1.293416 [D2] - VendorID: 0001
   1.293441 [D2] - ProductID: 0000
   1.293463 [D2] - Manufacturer: unknown
   1.293470 [D2] - Product: MEC0003
   1.293476 [D2] - Serial Number: unknown
   1.293483 [D2] - Bus: 003
   1.293490 [D2] - Device: 007
   1.293511 [D2] - Device release number: 0100
   1.293549 [D2] Trying to match device
   1.293562 [D3] match_function_exact: matching a device...
   1.293573 [D3] match_function_regex: matching a device...
   1.293592 [D2] Device matches
   1.293639 [D3] nut_libusb_set_altinterface: skipped usb_set_altinterface(udev, 0)
   1.293660 [D3] send: Q1
   1.294962 [D3] read: error sending control message: Operation not permitted
   1.295075 [D2] blazer_status: short reply
   1.295118 [D2] Status read 2 failed
   1.628457 [D3] usb_busses=0x56004fb82ae0
   1.628491 [D2] Checking device (1D6B/0003) (004/001)
   1.654745 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   1.705151 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   1.755323 [D1] nut_libusb_open: get Manufacturer string failed
   1.755513 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   1.805674 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   1.855797 [D1] nut_libusb_open: get Product string failed
   1.855836 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   1.905943 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   1.956066 [D1] nut_libusb_open: get Serial Number string failed
   1.956099 [D2] - VendorID: 1d6b
   1.956111 [D2] - ProductID: 0003
   1.956122 [D2] - Manufacturer: unknown
   1.956132 [D2] - Product: unknown
   1.956142 [D2] - Serial Number: unknown
   1.956152 [D2] - Bus: 004
   1.956161 [D2] - Device: 001
   1.956171 [D2] - Device release number: 0510
   1.956181 [D2] Trying to match device
   1.956192 [D3] match_function_exact: matching a device...
   1.956202 [D2] match_function_exact: failed match of VendorID: 1d6b !=    1
   1.956211 [D2] Device does not match - skipping
   1.956339 [D2] Checking device (0001/0000) (003/007)
   1.957723 [D1] nut_usb_get_string: Broken language identifier, assuming en_US
   1.960040 [D2] - VendorID: 0001
   1.960081 [D2] - ProductID: 0000
   1.960096 [D2] - Manufacturer: unknown
   1.960110 [D2] - Product: MEC0003
   1.960121 [D2] - Serial Number: unknown
   1.960130 [D2] - Bus: 003
   1.960140 [D2] - Device: 007
   1.960151 [D2] - Device release number: 0100
   1.960161 [D2] Trying to match device
   1.960171 [D3] match_function_exact: matching a device...
   1.960180 [D3] match_function_regex: matching a device...
   1.960202 [D2] Device matches
   1.960400 [D3] nut_libusb_set_altinterface: skipped usb_set_altinterface(udev, 0)
   1.960436 [D3] send: Q1
   1.961734 [D3] read: error sending control message: Operation not permitted
   1.961799 [D2] blazer_status: short reply
   1.961814 [D2] Status read 3 failed
   1.961827 [D2] Trying mustek protocol...
   2.316381 [D3] usb_busses=0x56004fb82ae0
   2.316412 [D2] Checking device (1D6B/0003) (004/001)
   2.342662 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   2.392838 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   2.443004 [D1] nut_libusb_open: get Manufacturer string failed
   2.443036 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   2.494594 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   2.544958 [D1] nut_libusb_open: get Product string failed
   2.544986 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   2.595147 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   2.645283 [D1] nut_libusb_open: get Serial Number string failed
   2.645312 [D2] - VendorID: 1d6b
   2.645329 [D2] - ProductID: 0003
   2.645340 [D2] - Manufacturer: unknown
   2.645349 [D2] - Product: unknown
   2.645358 [D2] - Serial Number: unknown
   2.645366 [D2] - Bus: 004
   2.645374 [D2] - Device: 001
   2.645382 [D2] - Device release number: 0510
   2.645390 [D2] Trying to match device
   2.645397 [D3] match_function_exact: matching a device...
   2.645405 [D2] match_function_exact: failed match of VendorID: 1d6b !=    1
   2.645411 [D2] Device does not match - skipping
   2.645543 [D2] Checking device (0001/0000) (003/007)
   2.646876 [D1] nut_usb_get_string: Broken language identifier, assuming en_US
   2.648199 [D2] - VendorID: 0001
   2.648211 [D2] - ProductID: 0000
   2.648222 [D2] - Manufacturer: unknown
   2.648235 [D2] - Product: MEC0003
   2.648245 [D2] - Serial Number: unknown
   2.648255 [D2] - Bus: 003
   2.648264 [D2] - Device: 007
   2.648275 [D2] - Device release number: 0100
   2.648284 [D2] Trying to match device
   2.648294 [D3] match_function_exact: matching a device...
   2.648306 [D3] match_function_regex: matching a device...
   2.648326 [D2] Device matches
   2.648362 [D3] nut_libusb_set_altinterface: skipped usb_set_altinterface(udev, 0)
   2.648381 [D3] send: QS
   2.648392 [D3] read: QS
   2.648411 [D2] blazer_status: short reply
   2.648425 [D2] Status read 1 failed
   2.648438 [D3] send: QS
   2.648449 [D3] read: QS
   2.648459 [D2] blazer_status: short reply
   2.648469 [D2] Status read 2 failed
   2.648479 [D3] send: QS
   2.648489 [D3] read: QS
   2.648498 [D2] blazer_status: short reply
   2.648507 [D2] Status read 3 failed
   2.648517 [D2] Trying megatec/old protocol...
   2.648526 [D3] send: D
   2.648536 [D3] read: D
   2.648545 [D2] blazer_status: short reply
   2.648554 [D2] Status read 1 failed
   2.648564 [D3] send: D
   2.648573 [D3] read: D
   2.648582 [D2] blazer_status: short reply
   2.648591 [D2] Status read 2 failed
   2.648601 [D3] send: D
   2.648609 [D3] read: D
   2.648618 [D2] blazer_status: short reply
   2.648627 [D2] Status read 3 failed
   2.648637 [D2] Trying zinto protocol...
   2.648646 [D3] send: Q1
   2.649904 [D3] read: error sending control message: Operation not permitted
   2.649952 [D2] blazer_status: short reply
   2.649963 [D2] Status read 1 failed
   2.966997 [D3] usb_busses=0x56004fb82ae0
   2.967029 [D2] Checking device (1D6B/0003) (004/001)
   2.994710 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   3.044926 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   3.095048 [D1] nut_libusb_open: get Manufacturer string failed
   3.095656 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   3.145874 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   3.196020 [D1] nut_libusb_open: get Product string failed
   3.196342 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   3.246499 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   3.296656 [D1] nut_libusb_open: get Serial Number string failed
   3.296701 [D2] - VendorID: 1d6b
   3.296718 [D2] - ProductID: 0003
   3.296731 [D2] - Manufacturer: unknown
   3.296741 [D2] - Product: unknown
   3.296750 [D2] - Serial Number: unknown
   3.296759 [D2] - Bus: 004
   3.296768 [D2] - Device: 001
   3.296778 [D2] - Device release number: 0510
   3.296787 [D2] Trying to match device
   3.296797 [D3] match_function_exact: matching a device...
   3.296807 [D2] match_function_exact: failed match of VendorID: 1d6b !=    1
   3.296818 [D2] Device does not match - skipping
   3.296923 [D2] Checking device (0001/0000) (003/007)
   3.298256 [D1] nut_usb_get_string: Broken language identifier, assuming en_US
   3.299587 [D2] - VendorID: 0001
   3.299608 [D2] - ProductID: 0000
   3.299618 [D2] - Manufacturer: unknown
   3.299628 [D2] - Product: MEC0003
   3.299637 [D2] - Serial Number: unknown
   3.299646 [D2] - Bus: 003
   3.299655 [D2] - Device: 007
   3.299665 [D2] - Device release number: 0100
   3.299674 [D2] Trying to match device
   3.299685 [D3] match_function_exact: matching a device...
   3.299695 [D3] match_function_regex: matching a device...
   3.299724 [D2] Device matches
   3.299780 [D3] nut_libusb_set_altinterface: skipped usb_set_altinterface(udev, 0)
   3.299803 [D3] send: Q1
   3.301113 [D3] read: error sending control message: Operation not permitted
   3.301164 [D2] blazer_status: short reply
   3.301175 [D2] Status read 2 failed
   3.670734 [D3] usb_busses=0x56004fb82ae0
   3.670801 [D2] Checking device (1D6B/0003) (004/001)
   3.698762 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   3.749281 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   3.799395 [D1] nut_libusb_open: get Manufacturer string failed
   3.799425 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   3.849522 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   3.899641 [D1] nut_libusb_open: get Product string failed
   3.899678 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   3.949778 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   4.001159 [D1] nut_libusb_open: get Serial Number string failed
   4.001191 [D2] - VendorID: 1d6b
   4.001203 [D2] - ProductID: 0003
   4.001216 [D2] - Manufacturer: unknown
   4.001226 [D2] - Product: unknown
   4.001236 [D2] - Serial Number: unknown
   4.001245 [D2] - Bus: 004
   4.001255 [D2] - Device: 001
   4.001266 [D2] - Device release number: 0510
   4.001275 [D2] Trying to match device
   4.001286 [D3] match_function_exact: matching a device...
   4.001297 [D2] match_function_exact: failed match of VendorID: 1d6b !=    1
   4.001307 [D2] Device does not match - skipping
   4.001419 [D2] Checking device (0001/0000) (003/007)
   4.002754 [D1] nut_usb_get_string: Broken language identifier, assuming en_US
   4.004870 [D2] - VendorID: 0001
   4.004923 [D2] - ProductID: 0000
   4.004932 [D2] - Manufacturer: unknown
   4.004940 [D2] - Product: MEC0003
   4.004947 [D2] - Serial Number: unknown
   4.004953 [D2] - Bus: 003
   4.004967 [D2] - Device: 007
   4.004980 [D2] - Device release number: 0100
   4.004990 [D2] Trying to match device
   4.005000 [D3] match_function_exact: matching a device...
   4.005011 [D3] match_function_regex: matching a device...
   4.005038 [D2] Device matches
   4.005094 [D3] nut_libusb_set_altinterface: skipped usb_set_altinterface(udev, 0)
   4.005120 [D3] send: Q1
   4.006426 [D3] read: error sending control message: Operation not permitted
   4.006502 [D2] blazer_status: short reply
   4.006537 [D2] Status read 3 failed
   4.006552 No supported UPS detected
   4.006592 upsnotify: failed to notify about state 4: no notification tech defined, will not spam more about it

But after launch nutdrv_qx, but it is important to check if the device is in /dev


sudo ./nutdrv_qx -a dexp
Network UPS Tools 2.8.2.1082-1082-g1560afe33 (development iteration after 2.8.2) - Generic Q* USB/Serial driver 0.37
USB communication driver (libusb 0.1) 0.48
Using protocol: Megatec 0.07
No values for battery high/low voltages
Using 'guesstimation' (low: 20.800000, high: 26.000000)!
Autodetected 1 as number of battery packs [24/26.80]
Battery runtime will not be calculated (runtimecal not set)
Network UPS Tools 2.8.2.1082-1082-g1560afe33 (development iteration after 2.8.2) - Generic Q* USB/Serial driver 0.37
USB communication driver (libusb 0.1) 0.48
   0.000000 [D1] upsdrv_makevartable...
   0.000077 [D1] Using USB implementation: libusb-0.1 (or compat)
   0.000195 [D3] main_arg: var='driver' val='nutdrv_qx'
   0.000217 [D3] main_arg: var='port' val='auto'
   0.000235 [D3] main_arg: var='vendorid' val='0001'
   0.000255 [D3] main_arg: var='productid' val='0000'
   0.000286 [D3] main_arg: var='default.battery.voltage.low' val='20.80'
   0.000307 [D3] main_arg: var='default.battery.voltage.high' val='26'
   0.000329 [D3] main_arg: var='langid_fix' val='0x0409'
   0.000356 [D1] Network UPS Tools version 2.8.2.1082-1082-g1560afe33 (development iteration after 2.8.2) built with gcc (Debian 10.2.1-6) 10.2.1 20210110 and configured with flags: --with-user=ups --with-group=nut --with-usb --with-cgi
   0.000368 [D1] debug level is '3'
   0.001887 [D1] Succeeded to become_user(ups): now UID=1001 GID=1001
   0.001936 [D1] Signalling UPS [dexp]: driver.exit (quietly, no fuss if no driver is running or responding)
   0.003368 Write to socket 4 failed: Broken pipe
   0.003697 [D1] Request for other driver to exit returned code 0
   0.003766 Duplicate driver instance detected (local Unix socket exists)! Asked the other driver nicely to self-terminate!
   5.004000 Can't open /var/state/ups/nutdrv_qx-dexp: No such file or directory
   5.004205 [D1] Subsequent request for other driver to exit returned code -1
   5.004237 [D1] upsdrv_initups...
   5.004272 [D2] Language ID workaround enabled (using '0x409')
   5.463284 [D3] usb_busses=0x55a674163720
   5.463324 [D2] Checking device (1D6B/0003) (004/001)
   5.489465 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   5.539684 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   5.589804 [D1] nut_libusb_open: get Manufacturer string failed
   5.589857 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   5.639959 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   5.690257 [D1] nut_libusb_open: get Product string failed
   5.690747 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   5.740864 [D1] nut_usb_get_string_descriptor: string descriptor 0 request failed, retrying...
   5.791049 [D1] nut_libusb_open: get Serial Number string failed
   5.791141 [D2] - VendorID: 1d6b
   5.791154 [D2] - ProductID: 0003
   5.791162 [D2] - Manufacturer: unknown
   5.791168 [D2] - Product: unknown
   5.791175 [D2] - Serial Number: unknown
   5.791182 [D2] - Bus: 004
   5.791189 [D2] - Device: 001
   5.791902 [D2] - Device release number: 0510
   5.792058 [D2] Trying to match device
   5.792188 [D3] match_function_regex: matching a device...
   5.792300 [D2] match_function_regex: failed match of VendorID: 1d6b
   5.792396 [D2] Device does not match - skipping
   5.792596 [D2] Checking device (0001/0000) (003/009)
   5.794125 [D1] nut_usb_get_string: Broken language identifier, assuming en_US
   5.795462 [D2] - VendorID: 0001
   5.795490 [D2] - ProductID: 0000
   5.795628 [D2] - Manufacturer: unknown
   5.795643 [D2] - Product: MEC0003
   5.795654 [D2] - Serial Number: unknown
   5.795666 [D2] - Bus: 003
   5.795677 [D2] - Device: 009
   5.795688 [D2] - Device release number: 0100
   5.795698 [D2] Trying to match device
   5.795709 [D3] match_function_regex: matching a device...
   5.796021 [D2] Device matches
   5.796150 [D3] nut_libusb_set_altinterface: skipped usb_set_altinterface(udev, 0)
   5.797489 [D3] send: QGS
   5.797520 [D3] read: QGS
   5.797543 [D2] qx_process_answer: short reply (input.voltage)
   5.797579 [D3] send: QGS
   5.797613 [D3] read: QGS
   5.797661 [D2] qx_process_answer: short reply (input.voltage)
   5.797715 [D3] send: QGS
   5.797765 [D3] read: QGS
   5.797817 [D2] qx_process_answer: short reply (input.voltage)
   5.797868 [D3] send: M
   5.797881 [D3] read: M
   5.797901 [D2] voltronic_qs_protocol: invalid protocol [M]
   5.797914 [D3] send: M
   5.797930 [D3] read: M
   5.797943 [D2] voltronic_qs_protocol: invalid protocol [M]
   5.797960 [D3] send: M
   5.797976 [D3] read: M
   5.797988 [D2] voltronic_qs_protocol: invalid protocol [M]
   5.798006 [D3] send: M
   5.798017 [D3] read: M
   5.798036 [D2] voltronic_qs_hex_protocol: invalid protocol [M]
   5.798054 [D3] send: M
   5.798065 [D3] read: M
   5.798083 [D2] voltronic_qs_hex_protocol: invalid protocol [M]
   5.798094 [D3] send: M
   5.798104 [D3] read: M
   5.798115 [D2] voltronic_qs_hex_protocol: invalid protocol [M]
   5.798126 [D3] send: QS
   5.798136 [D3] read: QS
   5.798146 [D2] qx_process_answer: short reply (input.voltage)
   5.798157 [D3] send: QS
   5.798167 [D3] read: QS
   5.798178 [D2] qx_process_answer: short reply (input.voltage)
   5.798188 [D3] send: QS
   5.798199 [D3] read: QS
   5.798209 [D2] qx_process_answer: short reply (input.voltage)
   5.798220 [D3] send: D
   5.798229 [D3] read: D
   5.798240 [D2] qx_process_answer: short reply (input.voltage)
   5.798250 [D3] send: D
   5.798260 [D3] read: D
   5.798271 [D2] qx_process_answer: short reply (input.voltage)
   5.798284 [D3] send: D
   5.798295 [D3] read: D
   5.798305 [D2] qx_process_answer: short reply (input.voltage)
   5.798316 [D3] send: Q1
   5.798327 [D3] asking for: 00
   5.813747 [D3] read: (243.0 000.0 210.0 015 50.1 26.9 29.0 00101000
   5.813810 [D3] send: ID
   5.813825 [D3] read: ID
   5.813841 [D3] send: Q1
   5.813852 [D3] asking for: 0D
   5.816956 [D3] read: (243.0 000.0 210.0 015 50.1 26.9 29.0 00101000
   5.817008 [D3] send: ID
   5.817022 [D3] read: ID
   5.817040 [D3] send: Q1
   5.819279 [D3] read: (243.0 000.0 210.0 015 50.1 26.9 29.0 00101000
   5.819386 [D3] send: ID
   5.819417 [D3] read: ID
   5.819445 [D3] send: Q1
   5.820146 [D3] asking for: 0C
   5.823002 [D3] read: (243.0 000.0 210.0 015 50.1 26.9 29.0 00101000
   5.823053 [D3] send: QPI
   5.823068 [D3] read: QPI
   5.823080 [D2] qx_process_answer: short reply (ups.firmware.aux)
   5.823093 [D3] send: Q1
   5.823103 [D3] asking for: 0D
   5.826105 [D3] read: (243.0 000.0 210.0 015 50.1 26.9 29.0 00101000
   5.826166 [D3] send: QPI
   5.826180 [D3] read: QPI
   5.826190 [D2] qx_process_answer: short reply (ups.firmware.aux)
   5.826202 [D3] send: Q1
   5.827652 [D3] read: (243.0 000.0 210.0 015 50.1 26.9 29.0 00101000
   5.827679 [D3] send: QPI
   5.827691 [D3] read: QPI
   5.827700 [D2] qx_process_answer: short reply (ups.firmware.aux)
   5.827714 [D3] send: Q1
   5.827724 [D3] asking for: 0C
   5.831910 [D3] read: (243.0 000.0 210.0 015 50.1 26.9 29.0 00101000
   5.831965 [D3] send: I
   5.831978 [D3] asking for: 0D
   5.834793 [D3] read: #                           V3.8      
   5.834832 Using protocol: Megatec 0.07
   5.834875 [D1] upsdrv_initinfo...
   5.834891 [D3] send: Q1
   5.836325 [D3] read: (243.0 000.0 210.0 015 50.1 26.9 29.0 00101000
   5.836401 [D3] send: F
   5.836411 [D3] asking for: 0C
   5.839319 [D3] read: #   .   .  24.00   . 
   5.839460 [D3] send: I
   5.839481 [D3] asking for: 0D
   5.842307 [D3] read: #                           V3.8      
   5.842349 [D1] ups_infoval_set: non significant value [device.mfr]
   5.842367 [D1] ups_infoval_set: non significant value [device.model]
   5.842450 Autodetected 1 as number of battery packs [24/26.90]
   5.842461 Battery runtime will not be calculated (runtimecal not set)
   5.842488 [D1] upsdrv_updateinfo...
   5.842502 [D1] Quick update...
   5.842515 [D3] send: Q1
   5.843988 [D3] read: (243.0 000.0 210.0 015 50.1 26.9 29.0 00101000
   5.844168 [D2] dstate_init: sock /var/state/ups/nutdrv_qx-dexp open on fd 5
   5.844191 Running as foreground process, not saving a PID file
   5.844213 [D1] Driver initialization completed, beginning regular infinite loop
   5.844226 upsnotify: failed to notify about state 2: no notification tech defined, will not spam more about it
   5.844243 [D1] upsdrv_updateinfo...
   5.844252 [D1] Quick update...
   5.844261 [D3] send: Q1
   5.844270 [D3] asking for: 0C
   5.847132 [D3] read: (243.0 000.0 210.0 015 50.1 26.9 29.0 00101000
   7.849028 [D1] upsdrv_updateinfo...
   7.849065 [D1] Quick update...
   7.849116 [D3] send: Q1
   7.849156 [D3] asking for: 0D
   7.852012 [D3] read: (243.0 000.0 210.0 016 49.9 26.9 29.0 00101000
   9.849278 [D1] upsdrv_updateinfo...
   9.849336 [D1] Quick update...
   9.849353 [D3] send: Q1
   9.850815 [D3] read: (243.0 000.0 210.0 016 49.9 26.9 29.0 00101000
  11.851337 [D1] upsdrv_updateinfo...
  11.851400 [D1] Quick update...
  11.851463 [D3] send: Q1
  11.851502 [D3] asking for: 0C
  11.861267 [D3] read: (243.0 000.0 210.0 016 50.0 27.0 29.0 00101000
  13.853265 [D1] upsdrv_updateinfo...
  13.853306 [D1] Quick update...
  13.853327 [D3] send: Q1
  13.853340 [D3] asking for: 0D
  13.856175 [D3] read: (243.0 000.0 210.0 016 50.0 27.0 29.0 00101000
^C  15.774749   [D1] set_exit_flag: raising exit flag due to signal 2
  15.774815 Signal 2: exiting
  15.774864 [D1] upsdrv_cleanup...

After startup, it disappears again from /dev, but it can be called again and shows the value, how to make sure whether the value is correct and whether it is reading the values ​​​​from the laptop battery.

jimklimov commented 2 months ago

Not sure about the disappearing device, maybe their controller chip is confused by queries and restarts.

Does lsusb show any details like naming? This behavior is not too common:

4.001419    [D2] Checking device (0001/0000) (003/007) 
4.002754    [D1] nut_usb_get_string: Broken language identifier, assuming en_US 
4.004870    [D2] - VendorID: 0001 
4.004923    [D2] - ProductID: 0000 
4.004932    [D2] - Manufacturer: unknown 
4.004940    [D2] - Product: MEC0003 
4.004947    [D2] - Serial Number: unknown
...

how to make sure whether the value is correct and whether it is reading the values ​​​​from the laptop battery.

Not sure what the question is... was "laptop battery" a typo here?

The logged read: (<numbers> lines reveal a variant of Megatec protocol, so at least that bit is a hit, with data coming from the UPS.

big-vl commented 1 month ago

Not sure what the question is... was "laptop battery" a typo here?

Yes, this is not a true statement, I thought that the value was being read from the laptop battery, but now I think I’m sure that there is a connection, I’ll look into the setup further over the weekend.