2.8.2_1 blazer_usb, nutdrv_qx
-
@LanterIT said in NUT Package (2.8.1 and above):
2.490438 [D3] send: FW?
2.572673 [D3] read: 05732-0300This eliminates hunnox and zinto.
@LanterIT said in NUT Package (2.8.1 and above):
2.489697 [D3] send: Q1
2.723945 [D3] read: (226.7 226.7 230.4 049 49.9 2.17 28.0 00000001
3.798980 [D3] flush: Timeout (-7)
3.805445 [D3] send: F
3.915503 [D3] read: #230.0 004 036.0 50.0
3.915997 No values for battery high/low voltages
3.916095 Using 'guesstimation' (low: 31.200000, high: 39.000000)!
3.916132 Autodetected 18 as number of battery packs [36/2.17]Excellent. This is working correctly. Vendor info is being suppressed, and it's even detecting the correct number of packs. Now, let's add the one pack voltage reporting back in:
vendorid=06da productid=0005 subdriver = "phoenix" protocol = "megatec" novendor battery_voltage_reports_one_pack
Edit: See BATTERY CHARGE GUESSTIMATION for information on setting up battery charge percentage.
-
Already tried, see post 242
-
@LanterIT said in NUT Package (2.8.1 and above):
Already tried, see post 242
I saw the setting of battery_voltage_reports_one_pack, but I didn't see a setting of default.battery.voltage.low and default.battery.voltage.high. I see override.battery.packs being set in the config, but I didn't see the driver saying number of packs in the debug output until the last run where it was auto-detected.
-
OK, next try...
current argument:
vendorid=06da productid=0005 subdriver = "phoenix" protocol = "megatec" novendor battery_voltage_reports_one_pack
output:
/usr/local/libexec/nut/nutdrv_qx -DDD -a ABB Network UPS Tools - Generic Q* USB/Serial driver 0.36 (2.8.1.1) USB communication driver (libusb 1.0) 0.46 0.000001 [D3] do_global_args: var='user' val='root' 0.000089 [D1] testval_reloadable: setting 'user' exists and differs: new value 'root' vs. 'nut' 0.000120 [D1] Overriding previously specified user 'nut' with 'root' specified in global section 0.000177 [D3] main_arg: var='driver' val='nutdrv_qx' 0.000216 [D3] main_arg: var='port' val='auto' 0.000272 [D3] main_arg: var='vendorid' val='06da' 0.000378 [D3] main_arg: var='productid' val='0005' 0.000445 [D3] main_arg: var='subdriver' val='phoenix' 0.000504 [D3] main_arg: var='protocol' val='megatec' 0.000558 [D3] main_arg: var='novendor' val='<null>' 0.000646 [D3] main_arg: var='battery_voltage_reports_one_pack' val='<null>' 0.000763 [D1] Network UPS Tools version 2.8.1.1 (release/snapshot of 2.8.1.1) built with FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152); Target: x86_64-unknown-freebsd14.0; Thread model: posix and configured with flags: --sysconfdir=/usr/local/etc/nut --program-transform-name= --localstatedir=/var/db/nut --datadir=/usr/local/etc/nut --with-devd-dir=/usr/local/etc/devd --with-drvpath=/usr/local/libexec/nut --with-statepath=/var/db/nut --with-altpidpath=/var/db/nut --with-pidpath=/var/db/nut --with-pkgconfig-dir=/usr/local/libdata/pkgconfig --with-user=nut --with-group=nut --with-python=/usr/local/bin/python3.11 --without-python2 --with-python3=/usr/local/bin/python3.11 --without-nut_monitor --with-ltdl --with-nut-scanner --with-avahi --with-cgi --with-cgipath=/usr/local/www/cgi-bin/nut --with-htmlpath=/usr/local/www/nut --with-gd-includes=-I/usr/local/include --with-gd-libs='-L/usr/local/lib -lgd' --without-dev --with-freeipmi --without-ipmi --with-doc=no --with-modbus --with-neon --without-nss --with-openssl --with-powerman --with-serial --with-snmp --with-usb=auto --prefix=/usr/local --mandir=/usr/local/man --disable-silent-rules --infodir=/usr/local/share/info/ --build=amd64-portbld-freebsd14.0 0.000823 [D1] debug level is '3' 0.002574 [D1] Succeeded to become_user(root): now UID=0 GID=0 0.002732 [D1] upsdrv_initups... 0.003977 [D2] Checking device 1 of 6 (0000/0000) 0.004591 [D1] nut_libusb_open: invalid libusb bus number 0 0.004723 [D2] - VendorID: 0000 0.004751 [D2] - ProductID: 0000 0.004775 [D2] - Manufacturer: AMD 0.004799 [D2] - Product: XHCI root HUB 0.004823 [D2] - Serial Number: unknown 0.004846 [D2] - Bus: 000 0.004869 [D2] - Bus Port: unknown 0.004892 [D2] - Device: 001 0.004916 [D2] - Device release number: 0100 0.004940 [D2] Trying to match device 0.004966 [D3] match_function_regex: matching a device... 0.005012 [D2] match_function_regex: failed match of VendorID: 0 0.005039 [D2] Device does not match - skipping 0.005137 [D2] Checking device 2 of 6 (0000/0000) 0.005281 [D1] nut_libusb_open: invalid libusb bus number 0 0.005367 [D2] - VendorID: 0000 0.005393 [D2] - ProductID: 0000 0.005416 [D2] - Manufacturer: AMD 0.005439 [D2] - Product: EHCI root HUB 0.005462 [D2] - Serial Number: unknown 0.005485 [D2] - Bus: 001 0.005510 [D2] - Bus Port: unknown 0.005533 [D2] - Device: 001 0.005556 [D2] - Device release number: 0100 0.005579 [D2] Trying to match device 0.005602 [D3] match_function_regex: matching a device... 0.005635 [D2] match_function_regex: failed match of VendorID: 0 0.005659 [D2] Device does not match - skipping 0.005738 [D2] Checking device 3 of 6 (0000/0000) 0.005879 [D1] nut_libusb_open: invalid libusb bus number 0 0.005961 [D2] - VendorID: 0000 0.005986 [D2] - ProductID: 0000 0.006012 [D2] - Manufacturer: AMD 0.006035 [D2] - Product: EHCI root HUB 0.006058 [D2] - Serial Number: unknown 0.006091 [D2] - Bus: 002 0.006114 [D2] - Bus Port: unknown 0.006137 [D2] - Device: 001 0.006160 [D2] - Device release number: 0100 0.006183 [D2] Trying to match device 0.006209 [D3] match_function_regex: matching a device... 0.006242 [D2] match_function_regex: failed match of VendorID: 0 0.006266 [D2] Device does not match - skipping 0.006343 [D2] Checking device 4 of 6 (0438/7900) 0.006491 [D2] - VendorID: 0438 0.006522 [D2] - ProductID: 7900 0.006545 [D2] - Manufacturer: unknown 0.006571 [D2] - Product: unknown 0.006594 [D2] - Serial Number: unknown 0.006617 [D2] - Bus: 001 0.006641 [D2] - Bus Port: 001 0.006663 [D2] - Device: 002 0.006687 [D2] - Device release number: 0018 0.006710 [D2] Trying to match device 0.006733 [D3] match_function_regex: matching a device... 0.006768 [D2] match_function_regex: failed match of VendorID: 438 0.006792 [D2] Device does not match - skipping 0.006866 [D2] Checking device 5 of 6 (0438/7900) 0.007016 [D2] - VendorID: 0438 0.007049 [D2] - ProductID: 7900 0.007079 [D2] - Manufacturer: unknown 0.007103 [D2] - Product: unknown 0.007126 [D2] - Serial Number: unknown 0.007149 [D2] - Bus: 002 0.007176 [D2] - Bus Port: 001 0.007199 [D2] - Device: 002 0.007224 [D2] - Device release number: 0018 0.007247 [D2] Trying to match device 0.007270 [D3] match_function_regex: matching a device... 0.007302 [D2] match_function_regex: failed match of VendorID: 438 0.007326 [D2] Device does not match - skipping 0.007404 [D2] Checking device 6 of 6 (06DA/0005) 0.094984 [D1] nut_libusb_open get iSerialNumber failed, retrying... 0.124015 [D1] nut_libusb_open get iSerialNumber failed, retrying... 0.152963 [D1] nut_libusb_open get iSerialNumber failed, retrying... 0.153061 [D2] - VendorID: 06da 0.153100 [D2] - ProductID: 0005 0.153123 [D2] - Manufacturer: PPC 0.153147 [D2] - Product: USB UPS 0.153172 [D2] - Serial Number: unknown 0.153195 [D2] - Bus: 000 0.153217 [D2] - Bus Port: 003 0.153239 [D2] - Device: 002 0.153262 [D2] - Device release number: 0001 0.153285 [D2] Trying to match device 0.153309 [D3] match_function_regex: matching a device... 0.153383 [D2] Device matches 0.153408 [D2] Reading configuration descriptor 1 of 1 0.153725 [D3] libusb_kernel_driver_active() returned 0: Success 0.153770 [D2] Claimed interface 0 successfully 0.153807 [D3] nut_usb_set_altinterface: skipped libusb_set_interface_alt_setting(udev, 0, 0) 0.153939 [D2] Skipping protocol Voltronic 0.08 0.153970 [D2] Skipping protocol Voltronic-QS 0.09 0.153997 [D2] Skipping protocol Voltronic-QS-Hex 0.10 0.154024 [D2] Skipping protocol Mustek 0.08 0.154050 [D2] Skipping protocol Megatec/old 0.08 0.154082 [D2] Skipping protocol BestUPS 0.07 0.154109 [D2] Skipping protocol Mecer 0.08 1.280574 [D3] flush: Timeout (-7) 1.287960 [D3] send: Q1 1.523148 [D3] read: (226.7 226.7 229.7 045 50.0 2.17 28.1 00000001 1.523434 Using protocol: Megatec 0.07 1.523506 [D2] blazer_initups: skipping device.mfr 1.523564 [D2] blazer_initups: skipping device.model 1.523596 [D2] blazer_initups: skipping ups.firmware 1.523739 [D1] upsdrv_initinfo... 2.650528 [D3] flush: Timeout (-7) 2.657912 [D3] send: Q1 2.891219 [D3] read: (226.5 226.5 229.7 045 50.0 2.17 28.2 00000001 3.981495 [D3] flush: Timeout (-7) 3.988995 [D3] send: F 4.099234 [D3] read: #230.0 004 036.0 50.0 4.099812 No values for battery high/low voltages 4.099893 Using 'guesstimation' (low: 31.200000, high: 39.000000)! 4.099955 Autodetected 18 as number of battery packs [36/2.17] 4.099985 Battery runtime will not be calculated (runtimecal not set) 4.100099 [D1] upsdrv_updateinfo... 4.100133 [D1] Quick update... 5.247277 [D3] flush: Timeout (-7) 5.253738 [D3] send: Q1 5.490769 [D3] read: (226.1 226.1 230.1 045 50.0 2.17 28.1 00000001 5.491951 [D2] dstate_init: sock /var/db/nut/nutdrv_qx-ABB open on fd 8 5.492211 [D1] Group and/or user account for this driver was customized ('root:nut') compared to built-in defaults. Fixing socket '/var/db/nut/nutdrv_qx-ABB' ownership/access. 5.492298 [D1] WARNING: opening socket file for stat/chown failed (45), which is rather typical for Unix socket handling: Operation not supported 5.492486 [D1] Group access for this driver successfully fixed (using file name based methods) 5.492565 Running as foreground process, not saving a PID file 5.492659 [D1] Driver initialization completed, beginning regular infinite loop 5.492689 upsnotify: failed to notify about state 2: no notification tech defined, will not spam more about it 5.492726 [D1] upsdrv_updateinfo... 5.492760 [D1] Quick update... 6.566275 [D3] flush: Timeout (-7) 6.572766 [D3] send: Q1 6.802791 [D3] read: (226.1 226.1 230.6 046 50.0 2.17 28.1 00000001 6.803012 sock_connect: enabling asynchronous mode (auto) 6.803220 [D3] new connection on fd 9 6.803311 [D2] send_to_one: sending SETINFO battery.charge "0" 6.803370 [D2] send_to_one: sending SETINFO battery.voltage "2.17" 6.803416 [D2] send_to_one: sending SETINFO battery.voltage.high "39.00" 6.803468 [D2] send_to_one: sending SETINFO battery.voltage.low "31.20" 6.803508 [D2] send_to_one: sending SETINFO battery.voltage.nominal "36.0" 6.803551 [D2] send_to_one: sending SETINFO device.type "ups" 6.803591 [D2] send_to_one: sending SETINFO driver.debug "3" 6.803635 [D2] send_to_one: sending SETFLAGS driver.debug RW NUMBER 6.803674 [D2] send_to_one: sending SETINFO driver.flag.allow_killpower "0" 6.803717 [D2] send_to_one: sending SETFLAGS driver.flag.allow_killpower RW NUMBER 6.803758 [D2] send_to_one: sending SETINFO driver.flag.battery_voltage_reports_one_pack "enabled" 6.803799 [D2] send_to_one: sending SETINFO driver.flag.novendor "enabled" 6.803844 [D2] send_to_one: sending SETINFO driver.name "nutdrv_qx" 6.803883 [D2] send_to_one: sending SETINFO driver.parameter.pollfreq "30" 6.803923 [D2] send_to_one: sending SETINFO driver.parameter.pollinterval "2" 6.803967 [D2] send_to_one: sending SETINFO driver.parameter.port "auto" 6.804010 [D2] send_to_one: sending SETINFO driver.parameter.productid "0005" 6.804053 [D2] send_to_one: sending SETINFO driver.parameter.protocol "megatec" 6.804105 [D2] send_to_one: sending SETINFO driver.parameter.subdriver "phoenix" 6.804155 [D2] send_to_one: sending SETINFO driver.parameter.synchronous "auto" 6.804198 [D2] send_to_one: sending SETINFO driver.parameter.vendorid "06da" 6.804238 [D2] send_to_one: sending SETINFO driver.state "quiet" 6.804278 [D2] send_to_one: sending SETINFO driver.version "2.8.1.1" 6.804319 [D2] send_to_one: sending SETINFO driver.version.data "Megatec 0.07" 6.804360 [D2] send_to_one: sending SETINFO driver.version.internal "0.36" 6.804403 [D2] send_to_one: sending SETINFO driver.version.usb "libusb-1.0.0 (API: 0x1000102)" 6.804447 [D2] send_to_one: sending SETINFO input.current.nominal "4.0" 6.804488 [D2] send_to_one: sending SETINFO input.frequency "50.0" 6.804526 [D2] send_to_one: sending SETINFO input.frequency.nominal "50" 6.804569 [D2] send_to_one: sending SETINFO input.voltage "226.7" 6.804609 [D2] send_to_one: sending SETINFO input.voltage.fault "226.5" 6.804648 [D2] send_to_one: sending SETINFO input.voltage.nominal "230" 6.804689 [D2] send_to_one: sending SETINFO output.voltage "229.7" 6.804731 [D2] send_to_one: sending SETINFO ups.beeper.status "enabled" 6.804769 [D2] send_to_one: sending SETINFO ups.delay.shutdown "30" 6.804809 [D2] send_to_one: sending ADDRANGE ups.delay.shutdown 12 600 6.804852 [D2] send_to_one: sending SETFLAGS ups.delay.shutdown RW NUMBER 6.804891 [D2] send_to_one: sending SETINFO ups.delay.start "180" 6.804932 [D2] send_to_one: sending ADDRANGE ups.delay.start 0 599940 6.804973 [D2] send_to_one: sending SETFLAGS ups.delay.start RW NUMBER 6.805010 [D2] send_to_one: sending SETINFO ups.load "45" 6.805053 [D2] send_to_one: sending SETINFO ups.productid "0005" 6.805099 [D2] send_to_one: sending SETINFO ups.status "OL" 6.805139 [D2] send_to_one: sending SETINFO ups.temperature "28.2" 6.805181 [D2] send_to_one: sending SETINFO ups.type "online" 6.805221 [D2] send_to_one: sending SETINFO ups.vendorid "06da" 6.805261 [D2] send_to_one: sending ADDCMD beeper.toggle 6.805302 [D2] send_to_one: sending ADDCMD driver.killpower 6.805339 [D2] send_to_one: sending ADDCMD driver.reload 6.805378 [D2] send_to_one: sending ADDCMD driver.reload-or-error 6.805417 [D2] send_to_one: sending ADDCMD driver.reload-or-exit 6.805455 [D2] send_to_one: sending ADDCMD load.off 6.805494 [D2] send_to_one: sending ADDCMD load.on 6.805532 [D2] send_to_one: sending ADDCMD shutdown.return 6.805573 [D2] send_to_one: sending ADDCMD shutdown.stayoff 6.805614 [D2] send_to_one: sending ADDCMD shutdown.stop 6.805655 [D2] send_to_one: sending ADDCMD test.battery.start 6.805692 [D2] send_to_one: sending ADDCMD test.battery.start.deep 6.805730 [D2] send_to_one: sending ADDCMD test.battery.start.quick 6.805771 [D2] send_to_one: sending ADDCMD test.battery.stop 6.805810 [D2] send_to_one: sending DATAOK 6.805851 [D2] send_to_one: sending DUMPDONE 7.493162 [D1] upsdrv_updateinfo... 7.493228 [D1] Quick update... 8.566325 [D3] flush: Timeout (-7) 8.572805 [D3] send: Q1 8.802829 [D3] read: (226.3 226.3 229.7 045 50.0 2.17 28.2 00000001 9.494163 [D1] upsdrv_updateinfo... 9.494231 [D1] Quick update... 10.575796 [D3] flush: Timeout (-7) 10.583210 [D3] send: Q1 10.819367 [D3] read: (226.5 226.5 230.1 045 50.0 2.17 28.2 00000001 11.537177 [D1] upsdrv_updateinfo... 11.537275 [D1] Quick update... 12.607897 [D3] flush: Timeout (-7) 12.615235 [D3] send: Q1 12.851361 [D3] read: (226.1 226.1 231.0 045 50.0 2.17 28.1 00000001 13.564983 [D1] upsdrv_updateinfo... 13.565080 [D1] Quick update... 14.659887 [D3] flush: Timeout (-7) 14.667294 [D3] send: Q1 14.899460 [D3] read: (226.3 226.3 230.4 046 50.0 2.17 28.1 00000001 15.566213 [D1] upsdrv_updateinfo... 15.566313 [D1] Quick update... 16.638475 [D3] flush: Timeout (-7) 16.644960 [D3] send: Q1 16.874991 [D3] read: (226.3 226.3 229.7 045 50.0 2.17 28.1 00000001 17.567157 [D1] upsdrv_updateinfo... 17.567232 [D1] Quick update... 18.638539 [D3] flush: Timeout (-7) 18.644995 [D3] send: Q1 18.883030 [D3] read: (226.3 226.3 229.9 046 50.0 2.17 28.2 00000001 19.568153 [D1] upsdrv_updateinfo... 19.568218 [D1] Quick update...
-
From my point of view, it is not possible for the UPS to measure just a single battery cell. There are three 12V 9.6Ah batteries in series in it, with two cables, plus/minus and no additional measuring lines.
From this I conclude that this value is somehow already calculated. Could this be the case?
-
@LanterIT said in NUT Package (2.8.1 and above):
From my point of view, it is not possible for the UPS to measure just a single battery cell. There are three 12V 9.6Ah batteries in series in it, with two cables, plus/minus and no additional measuring lines.
Fair point. Nominal voltage should be 36 volts.
The blazer_usb driver run shows this:
1.259834 [D3] send: Q1 1.494125 [D3] read: (225.7 225.7 230.1 047 50.0 2.18 28.0 00000001 1.494469 [D2] Status read in 1 tries 1.494497 Supported UPS detected with megatec protocol 2.631643 [D3] flush: Timeout 2.639009 [D3] send: F 2.749987 [D3] read: #230.0 004 036.0 50.0 2.750183 [D2] Ratings read in 1 tries
And the nutdrv_qx megatec driver run shows this:
2.489697 [D3] send: Q1 2.723945 [D3] read: (226.7 226.7 230.4 049 49.9 2.17 28.0 00000001 3.798980 [D3] flush: Timeout (-7) 3.805445 [D3] send: F 3.915503 [D3] read: #230.0 004 036.0 50.0
Looking at the strings being sent by the UPS, the different runs match well and are within a normal expected variance for the values:
Q1:
input.voltage: 225.7 / 226.7 input.voltage.fault: 225.7 / 226.7 output.voltage: 230.1 / 230.4 ups.load: 47 / 49 input.frequency: 50.0 / 49.9 battery.voltage: 2.18 / 2.17 ups.temperature: 28.0 ups.beeper.status: on
F:
input.voltage.nominal: 230.0 input.current.nominal: 4 battery.voltage.nominal: 36.0 input.frequency.nominal: 50.0
The nominal voltage of 36 matches the physical description of the batteries. The actual reported battery.voltage (2.18/2.17) appears completely fictional. But apparently this is a known/expected behavior with these types of UPSs. See here and here for discussion by one of the NUT team leaders.
FWIW, I am still looking at the code to see what actually ended up in the various releases.
-
@LanterIT Can you confirm which version of nut-devel you used in the later debug tests? If I understand correctly, it was 2024.01.03, but I just want to double check.
The tests I am asking about are:
- blazer_usb (post 249)
- nutdrv_qx (post 251 & 256)
Thanks
-
correct, all posts since 241 are with APU2 and fully updated packages
-
@LanterIT said in NUT Package (2.8.1 and above):
all posts since 241 are with APU2 and fully updated packages
Thank you
-
@LanterIT If you have time, would you mind re-running those two tests with a higher debug level (-DDDDDD) please?
-
Extra Argument:
vendorid=06da
productid=0005
subdriver = "phoenix"
protocol = "megatec"
novendor -
@LanterIT Sorry, can you put the "battery_voltage_reports_one_pack" back in the config please?
-
@dennypage
only nutdrv_qx output, because blazer_usb does not support the parameter:
nutdrv_qx_202402232234.txt -
@LanterIT Attached is a nutdrv_qx executable with additional debug information added. Please run let it run for at least 100 seconds before killing it.
Note that I don't have a compatible UPS, so I am not actually able to test the executable. Please do excuse me if I've messed something up.
Thanks
-
I am happy when someone takes care of the problem and I can do my part.
nutdrv_qx_denny_dbg_202402252046.txt -
@LanterIT LOL. I love it when people are willing to help me solve problems.
One more time please...
-
Here you go:
nutdrv_qx_denny_dbg2_202402252237.txt -
@LanterIT said in NUT Package (2.8.1 and above):
nutdrv_qx_denny_dbg2_202402252237.txt
Did you notice the reported voltage and charge?
-
It was a bit late last night, so I only dumped the output to the log file.
After a little more than 30 seconds, the battery voltage and battery charge display will change to the correct values.
Does this have an influence on the behavior as long as the status is OL?
EDIT: It also runs on the productive device!
-
@LanterIT said in NUT Package (2.8.1 and above):
Does this have an influence on the behavior as long as the status is OL?
By default, NUT doesn't take action until the UPS declares a low battery, and battery voltage is reported as informational only. This is probably one reason why no-one has noticed the bug. Runtime is the same, although for most of the nutdrv_qx protocols, runtime isn't reported at all.
I'll put up a bug report and PR for the NUT folk later today or tomorrow. I don't know how long it will take for this to flow though to an a release on pfSense. In the interim you can use the last executable--the extra debug statements won't hurt anything.
Thank you for your patience and perseverance.