[Nut-upsuser] Incorrect values returned from usbhid-ups

Charles Lepple clepple at gmail.com
Wed Sep 30 02:39:10 UTC 2015


On Sep 25, 2015, at 9:09 PM, Alan White <retirw42 at gmail.com> wrote:
> 
> I have the same issue of incorrect output voltage being reported by usbhid-ups, as run on NAS4Free (FreeBSD). UPS is as shown below. There is a thread on this list from 2014 that has these same issues, apparently never addressed by any of the later usbhid-ups releases. I’m using 2.7.3.

I apologize if I gave the impression that this was going to get fixed quickly. The HID Descriptor in this particular UPS is hosed beyond belief.

The fix basically involves swapping out the contents of the HID Descriptor entirely. So far, we have been able to get away with scale factors (being careful not to break other models that do work), but this one needs more help than that. Aside from adding a mechanism to NUT to replace the descriptor, we would also need to write tools to generate the replacement descriptor. As you can imagine, it would be a lot easier for the manufacturer to do that.

> The value I am especially concerned with is the output voltage; if ANY thing should be right on the report, it’s that one! I would hate to have servers running at 137V if they are supposed to be running on 120V.

Well... the easiest values to get right are actually the binary values (on line, on battery), since zero times any scale factor is still zero.

The good news is that the incorrect values will most likely have a linear relation to the correct measurements - that is, if the driver reads 125V, the UPS is probably sending out 110V.

> The output.voltage value of 137 reported is suspiciously near the input.transfer.high value. It has often been EQUAL to that. The good news is that the ACTUAL output volts as measured by a voltmeter is 120VAC.
> 
> In addition...
> The device.serial and ups.serial are both all zeroes…

There is a "usbconfig" command in FreeBSD that will let you try retrieving other string descriptors to see if they simply misnomered them.

> battery.mfr.date is “CPS” rather than a date string…
> battery.voltage should indeed be higher than the nominal of 24.0 if they are being charged…

See previous rant about the HID Descriptor.

> It appears that incorrect data structure elements as returned by the UPS are being used in this usbhid-upsdriver. Of course, it’s possible that CyberPower is providing incorrect values to your driver. They sicced me onto you folks as a driver issue, not a UPS issue. Aren’t we lucky...
> 
> THANKS for all your work! We out here in userland appreciate it!
> 
> battery.charge: 100
> battery.charge.low: 10
> battery.charge.warning: 20
> battery.mfr.date: CPS
> battery.runtime: 1890
> battery.runtime.low: 300
> battery.type: PbAcid
> battery.voltage: 24.0
> battery.voltage.nominal: 24
> device.mfr: CPS
> device.model: CP1000PFCLCD
> device.serial: 000000000000
> device.type: ups
> driver.name: usbhid-ups
> driver.parameter.pollfreq: 30
> driver.parameter.pollinterval: 2
> driver.parameter.port: auto
> driver.parameter.synchronous: no
> driver.version: 2.7.3
> driver.version.data: CyberPower HID 0.4
> driver.version.internal: 0.39
> input.transfer.high: 136
> input.transfer.low: 88
> input.voltage: 121.0
> input.voltage.nominal: 120
> output.voltage: 137.0
> ups.beeper.status: enabled
> ups.delay.shutdown: 20
> ups.delay.start: 30
> ups.load: 19
> ups.mfr: CPS
> ups.model: CP1000PFCLCD
> ups.productid: 0501
> ups.realpower.nominal: 600
> ups.serial: 000000000000
> ups.status: OL
> ups.test.result: Done and passed
> ups.timer.shutdown: -60
> ups.timer.start: -60
> ups.vendorid: 0764
> 
> _______________________________________________
> Nut-upsuser mailing list
> Nut-upsuser at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

-- 
Charles Lepple
clepple at gmail






More information about the Nut-upsuser mailing list