[Nut-upsdev] [Nut-upsuser] PR to test for users of Qx devices (blazer and nutdrv_qx)

Jim Klimov jimklimov+nut at gmail.com
Wed Jan 18 12:39:58 GMT 2023


Thanks! Now trying to make sense of this :) Partially notes to myself,
partially to whoever might want to peek deeper into the driver... If only
we had some active Qx experts (or wanna-be's)!..

@tbsky:
Can you please check if 2.7.4 also reports the huge voltages for the 3kW
and 10kW units, or something around 13.5V? Does it set "battery.packs" to
20 or 6?
Namely, I wonder if the new "battery_voltage_reports_one_pack" handling
(and with no such option in your configs) misfires here somehow?..

Also, can you please re-run the tests with the PR-ed branch build and
higher verbosity (e.g. `./nutdrv_qx -a ftups -DDDDDD -d1`) to help trace
whether values optionally guessed by qx_initbattery() are in fact guessed
or directly provided by respective devices (and subdrivers)?..

Findings and ramblings:

* the 2kV model is handled by a different subdriver than the other two.
* A "battery_number" ("number of batteries that make a pack") is unique to
drivers/nutdrv_qx_voltronic.c and seems to be in 0..9 range yet the driver
gets a "20" value somewhere (setting? protocol?) It is not further reported
as a dstate value, it seems.
* There are separately "battery_packs" which are 0.99 per comments in the
same subdriver.
* Reported battery voltages seem huge, and maybe scale with the amount of
batteries (comments seem to imply that). I wonder if in fact the driver
should report single-battery (pack) voltages, e.g. (272.9/20)=13,645 and
(82.0/6)=13.67 respectively?..
* Note: To complicate matters more, and as was among inputs for the PR,
some terminology (and devices) deal with "cells" which can make up a single
battery, down to reporting their individual voltages in the 2V range...

So far it seems that for the bigger devices (and their driver) the
"battery.packs" is reported and "known" so there is less guesswork
involved. For the 2kV device it does log some progress through guesswork:

No values for battery high/low voltages
Using 'guesstimation' (low: 10.400000, high: 15.000000)!

Autodetected 1 as number of battery packs [12/13.50]
Battery runtime will not be calculated (runtimecal not set)

and ends up with some possibly measured and some guessed voltages:

battery.charge: 67
battery.voltage: 13.5
battery.voltage.high: 15.00
battery.voltage.low: 10.40
battery.voltage.nominal: 12.0

and probably ends up guessing the charge in qx_battery() if such dstate
value is not yet available (e.g. from device protocol... or if the PR
botched something, e.g. order of reading/guessing somehow):
    batt.chrg.act = 100 * (batt.volt.act - batt.volt.low) / (batt.volt.high
- batt.volt.low);
would be ( 100 * (13.5 - 10.4) / (15.0 - 10.4) ) = 67.39...

Close enough to explain the value seen, at least.

Jim

On Tue, Jan 17, 2023 at 10:04 AM d tbsky <tbskyd at gmail.com> wrote:

> Jim Klimov via Nut-upsuser <nut-upsuser at alioth-lists.debian.net>
> >
> > Cheers,
> >
> >   One PR waiting to get into 2.8.1 release timeframe is
> https://github.com/networkupstools/nut/pull/1652 stemming from issue
> https://github.com/networkupstools/nut/issues/1279
> >
> >   The gist of it is that "battery.voltage" and "battery.charge" were not
> always reported correctly with nutdrv-qx driver (might be handled better by
> blazer drivers though), and the overrides tried by issue posters did not
> help them with original state of NUT codebase.
>
> I tried it on three ups: 10kv online, 3kv online, 2kv offline.
> all the battery.voltage are fine and the same value as 2.7.4.
> the battery.charge report of 10kv and 3kv are fine. but 2kv is wrong.
> with 2.7.4 the 2kv battery.charge is reporting 100. but the new code
> is reporting 67. details below:
>
> 10KV:
> ./nutdrv_qx -a ftups -d1
> Network UPS Tools - Generic Q* USB/Serial driver 0.33
> (Windows-v2.8.0-alpha3-1252-g757813e)
> USB communication driver (libusb 0.1) 0.44
> Using protocol: Voltronic 0.07
> battery_number: 20
> battery_number, settable range: 1..9
> bypass_alarm: enabled
> battery_alarm: enabled
> bypass_when_off: disabled
> alarm_control: enabled
> converter_mode: disabled
> eco_mode: disabled
> battery_open_status_check: enabled
> bypass_forbidding: disabled
> setvar(bypass_when_off, disabled)
> bypass_when_off is already disabled
> setvar: FAILED
> max_bypass_volt: 264
> max_bypass_volt, settable range: 231..276
> min_bypass_volt: 110
> min_bypass_volt, settable range: 110..209
> max_bypass_freq: 64.0
> max_bypass_freq, settable range: 61.0..64.0
> min_bypass_freq: 56.0
> min_bypass_freq, settable range: 56.0..59.0
> No values for battery high/low voltages
> Using 'guesstimation' (low: 208.000000, high: 300.000000)!
> setvar(ups.delay.start, 60)
> setvar: SUCCEED
> setvar(ups.delay.shutdown, 12)
> setvar: SUCCEED
> battery.charge: 100
> battery.packs: 1
> battery.protection: yes
> battery.runtime: 600
> battery.voltage: 272.9
> battery.voltage.high: 300.00
> battery.voltage.low: 208.00
> battery.voltage.nominal: 240.0
> device.model: G10K
> device.type: ups
> driver.name: nutdrv_qx
> driver.parameter.bypass_when_off: disabled
> driver.parameter.offdelay: 12
> driver.parameter.ondelay: 60
> driver.parameter.pollfreq: 30
> driver.parameter.pollinterval: 10
> driver.parameter.port: auto
> driver.parameter.synchronous: yes
> driver.state: dumping
> driver.version: Windows-v2.8.0-alpha3-1252-g757813e
> driver.version.data: Voltronic 0.07
> driver.version.internal: 0.33
> driver.version.usb: libusb-0.1 (or compat)
> input.current.nominal: 45.0
> input.frequency: 59.9
> input.frequency.nominal: 60.0
> input.phases: 1
> input.transfer.high: 231
> input.transfer.high.max: 244
> input.transfer.high.min: 231
> input.transfer.low: 209
> input.transfer.low.max: 209
> input.transfer.low.min: 196
> input.voltage: 218.7
> input.voltage.nominal: 230.0
> outlet.0.switchable: no
> output.current: 2.8
> output.current.nominal: 45
> output.frequency: 59.9
> output.frequency.nominal: 60.0
> output.phases: 1
> output.powerfactor: 0.8
> output.voltage: 218.7
> output.voltage.nominal: 220.0
> ups.beeper.status: enabled
> ups.delay.shutdown: 12
> ups.delay.start: 60
> ups.firmware: 00077.13
> ups.firmware.aux: P02
> ups.load: 7
> ups.power.nominal: 10000
> ups.productid: 5161
> ups.start.auto: yes
> ups.status: OL
> ups.temperature: 25.4
> ups.type: online
> ups.vendorid: 0665
>
> 3KV:
> ./nutdrv_qx -a ftups -d1
> Network UPS Tools - Generic Q* USB/Serial driver 0.33
> (Windows-v2.8.0-alpha3-1252-g757813e)
> USB communication driver (libusb 0.1) 0.44
> Using protocol: Voltronic 0.07
> device.serial: UPS reported a non-significant serial [00000000000000]
> battery_number: 6
> battery_number, settable range: 1..9
> bypass_alarm: enabled
> battery_alarm: enabled
> bypass_when_off: disabled
> alarm_control: enabled
> converter_mode: disabled
> eco_mode: disabled
> bypass_forbidding: disabled
> site_fault_detection: disabled
> setvar(bypass_when_off, disabled)
> bypass_when_off is already disabled
> setvar: FAILED
> max_bypass_volt: 132
> max_bypass_volt, settable range: 120..140
> min_bypass_volt: 85
> min_bypass_volt, settable range: 85..115
> max_bypass_freq: 63.0
> max_bypass_freq, settable range: 61.0..70.0
> min_bypass_freq: 57.0
> min_bypass_freq, settable range: 50.0..59.0
> No values for battery high/low voltages
> Using 'guesstimation' (low: 62.400000, high: 90.000000)!
> setvar(ups.delay.start, 60)
> setvar: SUCCEED
> setvar(ups.delay.shutdown, 30)
> setvar: nothing to do... [ups.delay.shutdown]
> battery.charge: 100
> battery.energysave: no
> battery.packs: 1
> battery.protection: yes
> battery.runtime: 2820
> battery.voltage: 082.0
> battery.voltage.high: 90.00
> battery.voltage.low: 62.40
> battery.voltage.nominal: 72.0
> device.model: 3K
> device.type: ups
> driver.name: nutdrv_qx
> driver.parameter.bypass_when_off: disabled
> driver.parameter.offdelay: 30
> driver.parameter.ondelay: 60
> driver.parameter.pollfreq: 30
> driver.parameter.pollinterval: 10
> driver.parameter.port: auto
> driver.parameter.synchronous: yes
> driver.state: dumping
> driver.version: Windows-v2.8.0-alpha3-1252-g757813e
> driver.version.data: Voltronic 0.07
> driver.version.internal: 0.33
> driver.version.usb: libusb-0.1 (or compat)
> input.current.nominal: 27.0
> input.frequency: 59.9
> input.frequency.nominal: 60.0
> input.phases: 1
> input.transfer.high: 116
> input.transfer.high.max: 122
> input.transfer.high.min: 113
> input.transfer.low: 104
> input.transfer.low.max: 107
> input.transfer.low.min: 98
> input.voltage: 112.2
> input.voltage.nominal: 110.0
> outlet.0.switchable: no
> output.current: 5.4
> output.current.nominal: 27
> output.frequency: 59.9
> output.frequency.nominal: 60.0
> output.phases: 1
> output.power.maximum.percent: 19
> output.power.minimum.percent: 18
> output.powerfactor: 0.8
> output.voltage: 109.8
> output.voltage.nominal: 110.0
> ups.beeper.status: enabled
> ups.delay.shutdown: 30
> ups.delay.start: 60
> ups.firmware: 00204.06
> ups.firmware.aux: P01
> ups.load: 18
> ups.power.nominal: 3000
> ups.productid: 5161
> ups.start.auto: yes
> ups.start.battery: yes
> ups.status: OL
> ups.temperature: 17.2
> ups.type: online
> ups.vendorid: 0665
>
> 2KV:
> ./nutdrv_qx -a ftups -d1
> Network UPS Tools - Generic Q* USB/Serial driver 0.33
> (Windows-v2.8.0-alpha3-1252-g757813e)
> USB communication driver (libusb 0.1) 0.44
> Using protocol: Voltronic-QS 0.09
> No values for battery high/low voltages
> Using 'guesstimation' (low: 10.400000, high: 15.000000)!
> Autodetected 1 as number of battery packs [12/13.50]
> Battery runtime will not be calculated (runtimecal not set)
> setvar(ups.delay.start, 60)
> setvar: SUCCEED
> setvar(ups.delay.shutdown, 30)
> setvar: nothing to do... [ups.delay.shutdown]
> battery.charge: 67
> battery.voltage: 13.5
> battery.voltage.high: 15.00
> battery.voltage.low: 10.40
> battery.voltage.nominal: 12.0
> device.type: ups
> driver.name: nutdrv_qx
> driver.parameter.bypass_when_off: disabled
> driver.parameter.offdelay: 30
> driver.parameter.ondelay: 60
> driver.parameter.pollfreq: 30
> driver.parameter.pollinterval: 10
> driver.parameter.port: auto
> driver.parameter.synchronous: yes
> driver.state: dumping
> driver.version: Windows-v2.8.0-alpha3-1252-g757813e
> driver.version.data: Voltronic-QS 0.09
> driver.version.internal: 0.33
> driver.version.usb: libusb-0.1 (or compat)
> input.voltage: 119.5
> input.voltage.fault: 119.5
> output.current.nominal: 6.0
> output.frequency: 60.1
> output.frequency.nominal: 60
> output.voltage: 119.5
> output.voltage.nominal: 110
> ups.beeper.status: enabled
> ups.delay.shutdown: 30
> ups.delay.start: 60
> ups.firmware.aux: PM-V
> ups.load: 32
> ups.productid: 5161
> ups.status: OL
> ups.type: offline / line interactive
> ups.vendorid: 0665
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/nut-upsdev/attachments/20230118/1366c270/attachment.htm>


More information about the Nut-upsdev mailing list