[Nut-upsdev] bcmxcp: Patch for adding ups.load and battery.voltage.low
Alf Høgemark
alf at i100.no
Tue Jul 2 18:24:47 UTC 2013
Hi
I have the following UPS :
ups.mfr: Eaton
ups.model: POWERWARE UPS 500i
ups.power.nominal: 500
It is using the bcmxcp_usb driver.
I started the driver with debug options, and noticed the following for
the meter map :
0.475625 0027 0000 51 output.frequency
0.475634 0028 0004 51 input.frequency
0.475641 0033 0008 51 battery.voltage
0.475650 0041 0012 f0 None
0.475658 0043 0016 f0 battery.charge.low
0.475666 0047 0020 f0 None
0.475675 0056 0024 f0 input.voltage
0.475683 0065 0028 51 output.current
0.475691 0068 0032 51 output.current.nominal
0.475699 0078 0036 f0 output.voltage
So I went to
http://old.networkupstools.org/protocols/eaton/XCP_Meter_Map_021309.pdf,
and found the table for meter map:
It starts with "index 1", so I have to look for 42 and 48 to find the to
meters that my UPS have which is not mapped in the driver currently.
Here it is
42
BATTERY DCUV BAR CHART
Battery voltage lower limit at which inverter must shut down; may vary
dynamically with load. V dc
48 % LOAD PHASE A
Output Load on Phase A, in per cent. Normally the greater of VA and
Watts. For a single phase UPS, the % Load for the whole UPS is
reported in this Phase A meter. %
Looking at :
http://www.networkupstools.org/docs/developer-guide.chunked/apas01.html
I draw the conclusions that the BATTERY DCUV BAR CHART bcmxcp meter
should be mapped to NUT variable battery.voltage.low
Do you agree that this is correct ?
I draw the conclusions that the LOAD PHASE A bcmxcp meter should be
mapped to NUT variable ups.load
Do you agree that this is correct ?
I have made the corresponding code changes, and when I test, here is the
output I get from upsc :
ambient.temperature.high: 29
ambient.temperature.low: 206
battery.charge.low: 11
battery.voltage: 13.5
battery.voltage.low: 10
device.mfr: Eaton
device.model: POWERWARE UPS 500i
device.serial:
device.type: ups
driver.name: bcmxcp_usb
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.shutdown_delay: 50
driver.version: 2.6.5-161-g1e76ba8
driver.version.internal: 0.26
input.frequency: 49.9
input.frequency.high: 55
input.frequency.low: 45
input.frequency.nominal: 50
input.transfer.boost.high: 207
input.transfer.high: 275
input.transfer.low: 178
input.transfer.trim.low: 250
input.voltage: 240
input.voltage.nominal: 230
output.current: 0.2
output.current.nominal: 1.3
output.frequency: 49.9
output.phases: 1
output.voltage: 240
output.voltage.nominal: 230
ups.beeper.status: enabled
ups.firmware: Cont:00.50 Inve:01.50
ups.load: 15.4
ups.mfr: Eaton
ups.model: POWERWARE UPS 500i
ups.power.nominal: 500
ups.serial:
ups.status: OL
ups.test.result: Done and passed
The ups.load matches the value of output.current / ouput.current.nominal.
The battery.voltage.low seems correct to me, but I have not tested when
the UPS shuts down.
Below is a patch to add this functionality to the bcmxcp driver.
I was a bit unsure what to do with the ups.load, because I see that
there is also code to try to calculate it based on other meter values.
I hope other people can also test this.
Regards
Alf Hogemark
From 57a578ad6c4db5c46a41c578b8e8acf098c8ebd2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alf=20H=C3=B8gemark?= <alf at i100.no>
Date: Tue, 2 Jul 2013 20:10:37 +0200
Subject: [PATCH] bcmxcp: Add battery.voltage.low and ups.load to meter map,
based on info in
http://old.networkupstools.org/protocols/eaton/XCP_Meter_Map_021309.pdf
---
drivers/bcmxcp.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/bcmxcp.c b/drivers/bcmxcp.c
index 480258c..d84adc1 100644
--- a/drivers/bcmxcp.c
+++ b/drivers/bcmxcp.c
@@ -351,7 +351,9 @@ if (nphases == 1) {
bcmxcp_meter_map[33].nut_entity = "battery.voltage";
bcmxcp_meter_map[34].nut_entity = "battery.charge";
bcmxcp_meter_map[35].nut_entity = "battery.runtime";
+ bcmxcp_meter_map[41].nut_entity = "battery.voltage.low";
bcmxcp_meter_map[43].nut_entity = "battery.charge.low";
+ bcmxcp_meter_map[47].nut_entity = "ups.load";
bcmxcp_meter_map[57].nut_entity = "input.L2-N.voltage";
bcmxcp_meter_map[58].nut_entity = "input.L3-N.voltage";
bcmxcp_meter_map[62].nut_entity = "ambient.temperature";
--
1.8.1.2
More information about the Nut-upsdev
mailing list