Summary
I have a Syndome Hercules HE-RT-2K UPS connected to a Dell PowerEdge R540 via the onboard RS-232 serial port.
With the same UPS, same host, same serial cable, same serial port, and same megatec protocol:
nutdrv_qx communicates with the UPS, but reports incorrect battery values.
blazer_ser reports sane battery values.
- Both drivers receive the same raw
Q1 battery field value, around 2.23.
blazer_ser later scales this to battery.voltage: 53.52 and battery.charge: 100.
nutdrv_qx exposes battery.voltage: 2.23 directly and calculates battery.charge: 0.
This looks like a nutdrv_qx battery-voltage scaling/parsing issue for this Megatec-compatible UPS model.
Environment
UPS model: Syndome Hercules HE-RT-2K
Connection: RS-232 serial
Host: Dell PowerEdge R540 onboard serial port
OS: Proxmox VE / Debian
NUT version: 2.8.1
Serial port: /dev/ttyS0
Protocol: megatec
nutdrv_qx configuration
[syndome]
driver = nutdrv_qx
port = /dev/ttyS0
protocol = megatec
pollinterval = 2
desc = "Syndome Hercules HE-RT-2K via RS-232"
nutdrv_qx output from upsc
root@pve:~# upsc syndome@localhost
Init SSL without certificate database
battery.charge: 0
battery.voltage: 2.23
battery.voltage.high: 52.00
battery.voltage.low: 41.60
battery.voltage.nominal: 48.0
device.model: 2000
device.type: ups
driver.debug: 0
driver.flag.allow_killpower: 0
driver.name: nutdrv_qx
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: /dev/ttyS0
driver.parameter.protocol: megatec
driver.parameter.synchronous: auto
driver.state: quiet
driver.version: 2.8.1
driver.version.data: Megatec 0.07
driver.version.internal: 0.36
driver.version.usb: libusb-1.0.28 (API: 0x100010a)
input.current.nominal: 9.0
input.frequency: 50.0
input.frequency.nominal: 50
input.voltage: 228.9
input.voltage.fault: 228.9
input.voltage.nominal: 220
output.voltage: 219.7
ups.beeper.status: enabled
ups.delay.shutdown: 30
ups.delay.start: 180
ups.firmware: PE02522.02
ups.load: 30
ups.status: OL
ups.temperature: 42.3
ups.type: online
nutdrv_qx debug output
Command:
timeout 60s /usr/lib/nut/nutdrv_qx -a syndome-qx -DDDDD 2>&1 | tee /root/nutdrv_qx-syndome.log
Relevant excerpts:
Network UPS Tools - Generic Q* USB/Serial driver 0.36 (2.8.1)
USB communication driver (libusb 1.0) 0.46
[D3] send: 'Q1'
[D3] read: '(228.2 228.2 219.6 030 50.0 2.23 42.3 00000001'
[D3] send: 'I'
[D3] read: '# 2000 PE02522.02'
Using protocol: Megatec 0.07
[D3] send: 'Q1'
[D3] read: '(228.2 228.2 219.6 030 50.0 2.23 42.3 00000001'
[D5] send_to_all: SETINFO input.voltage.fault "228.2"
[D5] send_to_all: SETINFO output.voltage "219.6"
[D5] send_to_all: SETINFO ups.load "30"
[D5] send_to_all: SETINFO input.frequency "50.0"
[D5] send_to_all: SETINFO battery.voltage "2.23"
[D5] send_to_all: SETINFO ups.temperature "42.3"
[D5] update_status: OL
[D5] update_status: !LB
[D5] send_to_all: SETINFO ups.type "online"
[D3] send: 'F'
[D3] read: '#220.0 009 048.0 50.0'
[D5] send_to_all: SETINFO input.voltage.nominal "220"
[D5] send_to_all: SETINFO input.current.nominal "9.0"
[D5] send_to_all: SETINFO battery.voltage.nominal "48.0"
[D5] send_to_all: SETINFO input.frequency.nominal "50"
No values for battery high/low voltages
[D5] send_to_all: SETINFO battery.voltage.low "41.60"
[D5] send_to_all: SETINFO battery.voltage.high "52.00"
Using 'guesstimation' (low: 41.600000, high: 52.000000)!
[D5] send_to_all: SETINFO battery.charge "0"
Autodetected 24 as number of battery packs [48/2.23]
Battery runtime will not be calculated (runtimecal not set)
[D3] send: 'Q1'
[D3] read: '(228.2 228.2 219.6 030 49.9 2.23 42.1 00000001'
[D5] update_status: OL
[D5] update_status: !LB
[D5] update_status: !CAL
[D5] update_status: !FSD
[D5] send_to_all: SETINFO ups.status "OL"
[D5] send_to_all: DATAOK
The full 60-second debug log repeatedly shows similar Q1 replies such as:
'(228.1 228.1 219.6 030 49.9 2.23 42.1 00000001'
'(228.1 228.1 219.7 030 50.0 2.23 42.3 00000001'
So nutdrv_qx consistently sees the same battery field value around 2.23, exposes it directly as battery.voltage: 2.23, and calculates battery.charge: 0.
Test with override options in nutdrv_qx
I also tested the following options with nutdrv_qx:
override.battery.packs = 22
battery_voltage_reports_one_pack
The options were recognized:
battery.packs: 22
driver.flag.battery_voltage_reports_one_pack: enabled
driver.parameter.override.battery.packs: 22
But the battery values did not improve:
battery.charge: 0
battery.voltage: 2.23
battery.voltage.high: 52.00
battery.voltage.low: 41.60
battery.voltage.nominal: 48.0
blazer_ser configuration
[syndome]
driver = blazer_ser
port = /dev/ttyS0
protocol = megatec
pollinterval = 2
desc = "Syndome Hercules HE-RT-2K via RS-232"
blazer_ser output from upsc
root@pve:~# upsc syndome@localhost
Init SSL without certificate database
battery.charge: 100
battery.voltage: 53.52
battery.voltage.high: 52.00
battery.voltage.low: 41.60
battery.voltage.nominal: 48.0
device.mfr:
device.model: 2000
device.type: ups
driver.debug: 0
driver.flag.allow_killpower: 0
driver.name: blazer_ser
driver.parameter.pollinterval: 2
driver.parameter.port: /dev/ttyS0
driver.parameter.protocol: megatec
driver.parameter.synchronous: auto
driver.state: quiet
driver.version: 2.8.1
driver.version.internal: 1.60
input.current.nominal: 9.0
input.frequency: 50.0
input.frequency.nominal: 50
input.voltage: 228.5
input.voltage.fault: 228.5
input.voltage.nominal: 220
output.voltage: 219.5
ups.beeper.status: enabled
ups.delay.shutdown: 30
ups.delay.start: 180
ups.firmware: PE02522.02
ups.load: 30
ups.mfr:
ups.model: 2000
ups.status: OL
ups.temperature: 42.1
ups.type: online
blazer_ser debug output
Command:
timeout 60s /usr/lib/nut/blazer_ser -a syndome -DDDDD 2>&1 | tee /root/blazer_ser-syndome.log
Relevant excerpts:
Network UPS Tools - Megatec/Q1 protocol serial driver 1.60 (2.8.1)
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!)
[D2] Trying megatec protocol...
[D3] send: 'Q1'
[D3] read: '(228.1 228.1 219.6 030 50.0 2.23 42.3 00000001'
[D5] send_to_all: SETINFO input.voltage "228.1"
[D5] send_to_all: SETINFO input.voltage.fault "228.1"
[D5] send_to_all: SETINFO output.voltage "219.6"
[D5] send_to_all: SETINFO ups.load "30"
[D5] send_to_all: SETINFO input.frequency "50.0"
[D5] send_to_all: SETINFO battery.voltage "2.23"
[D5] send_to_all: SETINFO ups.temperature "42.3"
[D5] send_to_all: SETINFO ups.beeper.status "enabled"
[D5] send_to_all: SETINFO ups.type "online"
[D5] send_to_all: SETINFO ups.status "OL"
[D2] Status read in 1 tries
Supported UPS detected with megatec protocol
[D3] send: 'F'
[D3] read: '#220.0 009 048.0 50.0'
[D5] send_to_all: SETINFO input.voltage.nominal "220"
[D5] send_to_all: SETINFO input.current.nominal "9.0"
[D5] send_to_all: SETINFO battery.voltage.nominal "48.0"
[D5] send_to_all: SETINFO input.frequency.nominal "50"
[D3] send: 'I'
[D3] read: '# 2000 PE02522.02'
[D5] send_to_all: SETINFO ups.mfr ""
[D5] send_to_all: SETINFO ups.model "2000"
[D5] send_to_all: SETINFO ups.firmware "PE02522.02"
No values provided for battery high/low voltages in ups.conf
[D5] send_to_all: SETINFO battery.voltage.low "41.60"
[D5] send_to_all: SETINFO battery.voltage.high "52.00"
Using 'guesstimation' (low: 41.600000, high: 52.000000)!
Battery runtime will not be calculated (runtimecal not set)
[D3] send: 'Q1'
[D3] read: '(228.1 228.1 219.5 030 50.0 2.23 42.3 00000001'
[D5] send_to_all: SETINFO output.voltage "219.5"
[D5] send_to_all: SETINFO battery.charge "100"
[D5] send_to_all: SETINFO battery.voltage "53.52"
[D5] send_to_all: DATAOK
The key observation is that both drivers initially receive the same raw Q1 battery field value around 2.23, but blazer_ser later scales it to 53.52 while nutdrv_qx keeps it as 2.23.
Comparison
The following fields are similar or identical between both drivers:
input.voltage: around 228.x
output.voltage: around 219.x
input.frequency: 50.0
ups.load: 30
ups.status: OL
ups.temperature: around 42.x
ups.firmware: PE02522.02
ups.delay.shutdown: 30
ups.delay.start: 180
ups.type: online
device.model / ups.model: 2000
battery.voltage.high: 52.00
battery.voltage.low: 41.60
battery.voltage.nominal: 48.0
The problematic fields are battery-related values from nutdrv_qx:
nutdrv_qx:
battery.charge: 0
battery.voltage: 2.23
blazer_ser:
battery.charge: 100
battery.voltage: 53.52
For a 48V nominal battery system, battery.voltage: 53.52 looks reasonable while the UPS is online and fully charged. battery.voltage: 2.23 from nutdrv_qx does not look like the full battery bank voltage.
Expected behavior
nutdrv_qx should report battery voltage and charge similarly to blazer_ser, or provide a documented option/workaround for this UPS/protocol variant.
Expected approximate values while online/fully charged:
battery.charge: around 100
battery.voltage: around 52-54V
battery.voltage.nominal: 48.0
ups.status: OL
Actual behavior
nutdrv_qx reports:
battery.charge: 0
battery.voltage: 2.23
battery.voltage.nominal: 48.0
ups.status: OL
Question
Is this a known Megatec/Q1 protocol variant where nutdrv_qx needs a different battery-voltage scaling/parsing rule?
Can nutdrv_qx be adjusted to parse/scale this UPS the same way blazer_ser does?
blazer_ser-syndome.log
nutdrv_qx-syndome.log
Summary
I have a Syndome Hercules HE-RT-2K UPS connected to a Dell PowerEdge R540 via the onboard RS-232 serial port.
With the same UPS, same host, same serial cable, same serial port, and same
megatecprotocol:nutdrv_qxcommunicates with the UPS, but reports incorrect battery values.blazer_serreports sane battery values.Q1battery field value, around2.23.blazer_serlater scales this tobattery.voltage: 53.52andbattery.charge: 100.nutdrv_qxexposesbattery.voltage: 2.23directly and calculatesbattery.charge: 0.This looks like a
nutdrv_qxbattery-voltage scaling/parsing issue for this Megatec-compatible UPS model.Environment
nutdrv_qx configuration
nutdrv_qx output from upsc
nutdrv_qx debug output
Command:
Relevant excerpts:
The full 60-second debug log repeatedly shows similar
Q1replies such as:So
nutdrv_qxconsistently sees the same battery field value around2.23, exposes it directly asbattery.voltage: 2.23, and calculatesbattery.charge: 0.Test with override options in nutdrv_qx
I also tested the following options with
nutdrv_qx:override.battery.packs = 22 battery_voltage_reports_one_packThe options were recognized:
But the battery values did not improve:
blazer_ser configuration
blazer_ser output from upsc
blazer_ser debug output
Command:
Relevant excerpts:
The key observation is that both drivers initially receive the same raw
Q1battery field value around2.23, butblazer_serlater scales it to53.52whilenutdrv_qxkeeps it as2.23.Comparison
The following fields are similar or identical between both drivers:
The problematic fields are battery-related values from
nutdrv_qx:For a 48V nominal battery system,
battery.voltage: 53.52looks reasonable while the UPS is online and fully charged.battery.voltage: 2.23fromnutdrv_qxdoes not look like the full battery bank voltage.Expected behavior
nutdrv_qxshould report battery voltage and charge similarly toblazer_ser, or provide a documented option/workaround for this UPS/protocol variant.Expected approximate values while online/fully charged:
Actual behavior
nutdrv_qxreports:Question
Is this a known Megatec/Q1 protocol variant where
nutdrv_qxneeds a different battery-voltage scaling/parsing rule?Can
nutdrv_qxbe adjusted to parse/scale this UPS the same wayblazer_serdoes?blazer_ser-syndome.log
nutdrv_qx-syndome.log