Alf Høgemark
2013-Jul-02 18:24 UTC
[Nut-upsdev] bcmxcp: Patch for adding ups.load and battery.voltage.low
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
Kjell Claesson
2013-Jul-02 21:16 UTC
[Nut-upsdev] bcmxcp: Patch for adding ups.load and battery.voltage.low
tisdagen den 2 juli 2013 20.24.47 skrev Alf H?gemark:> Hi >Hi Alf,> 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 >Check:-)> 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. % >Check:-)> > 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 ? >Yes this is correct. One more point to scratch from the todo list :-)> 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 ? >Yes this is also 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. >Yes we did not have the complete meter map when we started out the driver. So this is an old remain. But it is the same. What is done is that the PhaseA VA is divided with the nominal VA * 100 so it gives the same as % load on PhaseA. But it would be fine to tidy up the code a bit. You noticed the ToDo list in the top :-)> I hope other people can also test this. > > Regards > Alf HogemarkDue to some crashes on the disks and lack of time I don't have the git on the pc now. But maybe some other can commit this. Regards Kjell Claesson
Charles Lepple
2013-Jul-03 14:51 UTC
[Nut-upsdev] bcmxcp: Patch for adding ups.load and battery.voltage.low
On Jul 2, 2013, at 5:16 PM, Kjell Claesson wrote:>> I hope other people can also test this. >> >> Regards >> Alf Hogemark > > Due to some crashes on the disks and lack of time I don't have the git on the > pc now. But maybe some other can commit this.I'd like to ask people to specifically try the bcmxcp branch on GitHub - it includes some changes that Prachi made a while ago. https://github.com/networkupstools/nut/tree/bcmxcp Kjell: if it's just Git that you need, you can download a snapshot from GitHub. If you need the full autotools as well, let me know, and I'll build a tarball. (I still haven't had time to debug why the Buildbot code doesn't publish the autoconf-generated tarball.) Alf: your patch didn't apply to this branch, but it was easy enough to add in the two NUT mappings. Overall diffs: https://github.com/networkupstools/nut/compare/bcmxcp Many of these changes simply remove some of the "magic numbers" but it would be good if someone with the BCM/XCP hardware could verify that nothing was broken in the process. -- Charles Lepple clepple at gmail