[Nut-upsdev] bcmxcp: Patch for adding ups.load and battery.voltage.low

Kjell Claesson kjell.claesson at epost.tidanet.se
Tue Jul 2 21:16:11 UTC 2013


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 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.

Regards
Kjell Claesson




More information about the Nut-upsdev mailing list