[Nut-upsuser] Incorrect Values From usbhid-ups

Charles Lepple clepple at gmail.com
Fri Mar 28 13:39:33 UTC 2014


On Mar 28, 2014, at 9:08 AM, Bill S wrote:

> On Fri, Mar 28, 2014 at 8:12 AM, Charles Lepple <clepple at gmail.com> wrote:
> 
> <<Snip>>
>> 
>> I'll be honest, I haven't really done much with the CGI scripts lately. For debugging values, it is probably better to be closer to the driver. I'd recommend using "upsc" or the driver logs.
>> 
>> To that end, the .ac.txt and .bat.txt files both show 24.0 V:
>> 
>>   0.081935     Entering libusb_get_report
>>   0.082018     Report[get]: (2 bytes) => 09 f0
>>   0.082029     Path: UPS.PowerSummary.ConfigVoltage, Type: Feature, ReportID: 0x09, Offset: 0, Size: 8, Value: 24
>>   0.082035     Entering libusb_get_report
>>   0.082115     Report[get]: (2 bytes) => 0a f0
>>   0.082124     Path: UPS.PowerSummary.Voltage, Type: Feature, ReportID: 0x0a, Offset: 0, Size: 8, Value: 24
> 
> I know there are two 12V batteries in series that provide 24V which is
> what is being shown, but an actual 24V for new fully charged batteries
> seems low to me.  Between that and the fact that there are no tenths
> of a volt shown and the battery is shown as 24.0 both on AC and on
> battery makes me think we are not seeing the actual battery battery
> voltage but some nominal or default value.  I do not think the battery
> voltage is actually being tracked.  ???

"24.0" is slightly optimistic on my part ;-) but the value "f0" is hex for 240, so the UPS is capable of reporting increments of 0.1V. We used to print the floating point values with "%.6f" or similar, which is IMHO slightly more misleading since nobody is measuring with microvolt resolution. That's been on my list to fix for some time now.

ConfigVoltage (battery.voltage.nominal) is often an even multiple of 12V, but you're right, the actual voltage should be higher for fully-charged batteries. That voltage may be hiding somewhere else in the report.

If there is a battery test command, that (plus the -DDD logs) would be a good way to find where the actual battery voltage is hiding.

-- 
Charles Lepple
clepple at gmail






More information about the Nut-upsuser mailing list