Kiss Gabor (Bitman)
2011-Nov-08 16:03 UTC
[Nut-upsdev] mge-xml.c voltage conversion problem
Dear Arjen, Arnaud et al, I've just organized an MGE UPS with Ref. 66074 SNMP/Web Transverse Card for testing purposes. Months ago I found a quite simple bug in the UPS-MIB implementation of this card and Schneider Electric guys seemed not to have intention and/or knowledge to fix it. Now local representative sent me an MGE "Pulsar Extreme 2000 VA" model in order to find an alternative way to poll our two "Galaxy 5000 UPS" units. I started the tests with netxml-ups driver. The very first thing I noticed that upsc reports 1/10th of input/output AC voltages. Raw HTTP stream: [...] <OBJECT name='UPS.PowerConverter.Output.Phase[1].ActivePower'>0</OBJECT> <OBJECT name='UPS.PowerConverter.Output.Phase[1].ApparentPower'>0</OBJECT> <OBJECT name='UPS.PowerConverter.Input[2].Phase[11].Voltage'>0</OBJECT> <OBJECT name='UPS.PowerConverter.Input[2].Phase[1].Current'>0</OBJECT> <OBJECT name='UPS.PowerConverter.Output.Phase[1].Current'>0</OBJECT> <OBJECT name='UPS.PowerConverter.Output.Phase[11].Voltage'>233</OBJECT> <OBJECT name='UPS.PowerConverter.Output.Phase[1].Voltage'>0</OBJECT> [...] <OBJECT name='UPS.PowerConverter.Input[1].Phase[11].Voltage'>220</OBJECT> <OBJECT name='UPS.PowerConverter.Input[1].Phase[1].Current'>10</OBJECT> <OBJECT name='UPS.PowerConverter.Input[1].Phase[22].Voltage'>50</OBJECT> <OBJECT name='UPS.PowerConverter.Input[1].Phase[2].Current'>2</OBJECT> <OBJECT name='UPS.PowerConverter.Input[1].Phase[33].Voltage'>50</OBJECT> <OBJECT name='UPS.PowerConverter.Input[1].Phase[3].Current'>2</OBJECT> <OBJECT name="UPS.PowerSummary.Voltage">94.0</OBJECT> <OBJECT name="UPS.PowerSummary.Current">0</OBJECT> [...] upsc output: [...] input.bypass.frequency: 0.0 input.bypass.L1-L2.voltage: 0 input.bypass.L1.current: 0 input.frequency: 50.0 input.L1-L2.voltage: 21.8 input.L1.current: 1.0 input.L2-L3.voltage: 5.0 input.L2.current: 0.2 input.L3-L1.voltage: 5.0 input.L3.current: 0.2 outlet.desc: Master outlet.switchable: yes output.frequency: 50.0" output.L1-L2.voltage: 23.1 output.L1-N.voltage: 0 output.L1.current: 0.0 [...] Checking mge-xml.c I found that several values read from network socket are divided by 10 by convert_deci() function: "UPS.PowerConverter.Input[1].Phase[11].Voltage" "UPS.PowerConverter.Input[1].Phase[22].Voltage" "UPS.PowerConverter.Input[1].Phase[33].Voltage" "UPS.PowerConverter.Input[1].Phase[1].Current" "UPS.PowerConverter.Input[1].Phase[2].Current" "UPS.PowerConverter.Input[1].Phase[3].Current" "UPS.PowerConverter.Output.Phase[1].Current" "UPS.PowerConverter.Output.Phase[2].Current" "UPS.PowerConverter.Output.Phase[3].Current" etc. I wonder if MGE hurts its own specifications or this card is generally incompatible with other products or this is a bug in the experimental driver? What kind of tests you want me to run? Do you need direct access to this test device? :-) Cheers Gabor -- Meg?lt?k Kenny-t. A szemetek!