[Nut-upsuser] Incorrect Values From usbhid-ups

Bill S kenwood0622 at gmail.com
Mon Mar 24 03:12:14 UTC 2014


I recently purchased a CyberPower CP1500PFCLCD UPS as a replacement
UPS for a headless server running Slackware 14.1 with the 3.10.7
kernel.     I then downloaded the NUT 2.7.1 tarball on the server and
following the directions installed the software.    The installation
went well and the UPS will shutdown the server using the forced down
test and then it powers back up as it should.   The installation of
the cgi software has been a real slog however and so far I only have
upsstats.cgi working which brings me to my problem.   When I first
looked at the upsstats.cgi screen I found the UPS output voltage to be
very high and it did not match the input voltage.  It should however
since the line power just passes through the UPS when it is not on
battery power.   After further investigation I determined that problem
was not with upsstats.cgi but apparently with the  usbhid-ups driver.
It appears the driver recognizes the CP1500 but it is not interpreting
the response from the CP1500 correctly when it interrogates the unit
for the current output voltage.   I now suspect that I wasted quite a
bit of time on this project since it will take programming skills that
I certainly do not have to fix the driver. I am writing however in the
hopes that I am wrong, that the fix is simple, and that it only only
seems complex as a result of my not understanding the real problem.

Is there anything I can do to obtain the correct values?

The output of the driver is below.   The incorrect voltage of 136 is
shown at 0.265256.  It should match input voltage of 119 as shown at
0.265219 but it doesn't.  The voltages displayed on the UPS LCD panel
information however are equal and match the input voltage provided by
the driver.  There might be other incorrect values in the usbhid-ups
output but that is the one that has caught my attention so far.


Network UPS Tools - Generic HID driver 0.38 (2.7.1)

USB communication driver 0.32

   0.000000     debug level is '2'

   0.000404     upsdrv_initups...

   0.259751     Checking device (0557/7000) (001/002)

   0.259799     Failed to open device, skipping. (Permission denied)

   0.259804     Checking device (0764/0501) (001/003)

   0.260607     - VendorID: 0764

   0.260622     - ProductID: 0501

   0.260626     - Manufacturer: CP1500PFCLCD

   0.260630     - Product: CRCA102*AF1

   0.260634     - Serial Number: CPS

   0.260638     - Bus: 001

   0.260642     Trying to match device

   0.260685     Device matches

   0.260697     failed to claim USB device: Device or resource busy

   0.260713     detached kernel driver from USB device...

   0.261109     HID descriptor length 430

   0.261807     Report Descriptor size = 430

   0.261958     Using subdriver: CyberPower HID 0.3

   0.262049     Path: UPS.PowerSummary.iProduct, Type: Feature,
ReportID: 0x01, Offset: 0, Size: 8, Value: 1

   0.262137     Path: UPS.PowerSummary.iSerialNumber, Type: Feature,
ReportID: 0x02, Offset: 0, Size: 8, Value: 2

   0.262220     Path: UPS.PowerSummary.iDeviceChemistry, Type:
Feature, ReportID: 0x03, Offset: 0, Size: 8, Value: 4

   0.262305     Path: UPS.PowerSummary.iOEMInformation, Type: Feature,
ReportID: 0x04, Offset: 0, Size: 8, Value: 3

   0.262412     Path: UPS.PowerSummary.Rechargeable, Type: Feature,
ReportID: 0x05, Offset: 0, Size: 8, Value: 1

   0.262519     Path: UPS.PowerSummary.CapacityMode, Type: Feature,
ReportID: 0x06, Offset: 0, Size: 8, Value: 2

   0.262607     Path: UPS.PowerSummary.DesignCapacity, Type: Feature,
ReportID: 0x07, Offset: 0, Size: 8, Value: 100

   0.262618     Path: UPS.PowerSummary.CapacityGranularity1, Type:
Feature, ReportID: 0x07, Offset: 8, Size: 8, Value: 5

   0.262627     Path: UPS.PowerSummary.CapacityGranularity2, Type:
Feature, ReportID: 0x07, Offset: 16, Size: 8, Value: 10

   0.262637     Path: UPS.PowerSummary.WarningCapacityLimit, Type:
Feature, ReportID: 0x07, Offset: 24, Size: 8, Value: 20

   0.262646     Path: UPS.PowerSummary.RemainingCapacityLimit, Type:
Feature, ReportID: 0x07, Offset: 32, Size: 8, Value: 10

   0.262655     Path: UPS.PowerSummary.FullChargeCapacity, Type:
Feature, ReportID: 0x07, Offset: 40, Size: 8, Value: 100

   0.262740     Path: UPS.PowerSummary.RemainingCapacity, Type: Input,
ReportID: 0x08, Offset: 0, Size: 8, Value: 100

   0.262749     Path: UPS.PowerSummary.RemainingCapacity, Type:
Feature, ReportID: 0x08, Offset: 0, Size: 8, Value: 100

   0.262759     Path: UPS.PowerSummary.RunTimeToEmpty, Type: Input,
ReportID: 0x08, Offset: 8, Size: 16, Value: 3030

   0.262767     Path: UPS.PowerSummary.RunTimeToEmpty, Type: Feature,
ReportID: 0x08, Offset: 8, Size: 16, Value: 3030

   0.262776     Path: UPS.PowerSummary.RemainingTimeLimit, Type:
Input, ReportID: 0x08, Offset: 24, Size: 16, Value: 300

   0.262784     Path: UPS.PowerSummary.RemainingTimeLimit, Type:
Feature, ReportID: 0x08, Offset: 24, Size: 16, Value: 300

   0.262865     Path: UPS.PowerSummary.ConfigVoltage, Type: Feature,
ReportID: 0x09, Offset: 0, Size: 8, Value: 24

   0.262966     Path: UPS.PowerSummary.Voltage, Type: Feature,
ReportID: 0x0a, Offset: 0, Size: 8, Value: 24

   0.263050     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type:
Input, ReportID: 0x0b, Offset: 0, Size: 1, Value: 1

   0.263059     Path: UPS.PowerSummary.PresentStatus.Charging, Type:
Input, ReportID: 0x0b, Offset: 1, Size: 1, Value: 0

   0.263067     Path: UPS.PowerSummary.PresentStatus.Discharging,
Type: Input, ReportID: 0x0b, Offset: 2, Size: 1, Value: 0

   0.263075     Path:
UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type:
Input, ReportID: 0x0b, Offset: 3, Size: 1, Value: 0

   0.263082     Path: UPS.PowerSummary.PresentStatus.FullyCharged,
Type: Input, ReportID: 0x0b, Offset: 4, Size: 1, Value: 1

   0.263090     Path:
UPS.PowerSummary.PresentStatus.RemainingTimeLimitExpired, Type: Input,
ReportID: 0x0b, Offset: 5, Size: 1, Value: 0

   0.263098     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type:
Feature, ReportID: 0x0b, Offset: 0, Size: 1, Value: 1

   0.263105     Path: UPS.PowerSummary.PresentStatus.Charging, Type:
Feature, ReportID: 0x0b, Offset: 1, Size: 1, Value: 0

   0.263113     Path: UPS.PowerSummary.PresentStatus.Discharging,
Type: Feature, ReportID: 0x0b, Offset: 2, Size: 1, Value: 0

   0.263121     Path:
UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type:
Feature, ReportID: 0x0b, Offset: 3, Size: 1, Value: 0

   0.263129     Path: UPS.PowerSummary.PresentStatus.FullyCharged,
Type: Feature, ReportID: 0x0b, Offset: 4, Size: 1, Value: 1

   0.263137     Path:
UPS.PowerSummary.PresentStatus.RemainingTimeLimitExpired, Type:
Feature, ReportID: 0x0b, Offset: 5, Size: 1, Value: 0

   0.263218     Path: UPS.PowerSummary.AudibleAlarmControl, Type:
Feature, ReportID: 0x0c, Offset: 0, Size: 8, Value: 2

   0.263227     Path: UPS.PowerSummary.AudibleAlarmControl, Type:
Input, ReportID: 0x0c, Offset: 0, Size: 8, Value: 2

   0.263307     Path: UPS.PowerSummary.iManufacturer, Type: Feature,
ReportID: 0x0d, Offset: 0, Size: 8, Value: 3

   0.263390     Path: UPS.Input.ConfigVoltage, Type: Feature,
ReportID: 0x0e, Offset: 0, Size: 8, Value: 120

   0.263488     Path: UPS.Input.Voltage, Type: Feature, ReportID:
0x0f, Offset: 0, Size: 16, Value: 119

   0.263575     Path: UPS.Input.LowVoltageTransfer, Type: Feature,
ReportID: 0x10, Offset: 0, Size: 16, Value: 88

   0.263585     Path: UPS.Input.LowVoltageTransfer, Type: Input,
ReportID: 0x10, Offset: 0, Size: 16, Value: 88

   0.263593     Path: UPS.Input.HighVoltageTransfer, Type: Feature,
ReportID: 0x10, Offset: 16, Size: 16, Value: 139

   0.263601     Path: UPS.Input.HighVoltageTransfer, Type: Input,
ReportID: 0x10, Offset: 16, Size: 16, Value: 139

   0.263718     Path: UPS.Output.Voltage, Type: Feature, ReportID:
0x12, Offset: 0, Size: 16, Value: 136

   0.263824     Path: UPS.Output.PercentLoad, Type: Feature, ReportID:
0x13, Offset: 0, Size: 8, Value: 16

   0.263906     Path: UPS.Output.Test, Type: Feature, ReportID: 0x14,
Offset: 0, Size: 8, Value: 6

   0.263914     Path: UPS.Output.Test, Type: Input, ReportID: 0x14,
Offset: 0, Size: 8, Value: 6

   0.263996     Path: UPS.Output.DelayBeforeShutdown, Type: Feature,
ReportID: 0x15, Offset: 0, Size: 16, Value: -60

   0.264105     Path: UPS.Output.DelayBeforeStartup, Type: Feature,
ReportID: 0x16, Offset: 0, Size: 16, Value: -60

   0.264214     Path: UPS.Output.Boost, Type: Feature, ReportID: 0x17,
Offset: 0, Size: 1, Value: 0

   0.264223     Path: UPS.Output.Overload, Type: Feature, ReportID:
0x17, Offset: 1, Size: 1, Value: 0

   0.264306     Path: UPS.Output.ConfigActivePower, Type: Feature,
ReportID: 0x18, Offset: 0, Size: 16, Value: 900

   0.264388     Path: UPS.Output.ff010043, Type: Feature, ReportID:
0x1a, Offset: 0, Size: 8, Value: 1

   0.264396     Path: UPS.Output.ff010043, Type: Input, ReportID:
0x1a, Offset: 0, Size: 8, Value: 1

   0.264417     Report descriptor retrieved (Reportlen = 430)

   0.264421     Found HID device

   0.264426     Detected a UPS: CP1500PFCLCD/CRCA102*AF1

   0.264455     Path: UPS.PowerSummary.iDeviceChemistry, Type:
Feature, ReportID: 0x03, Offset: 0, Size: 8, Value: 4

   0.264735     Path: UPS.PowerSummary.iOEMInformation, Type: Feature,
ReportID: 0x04, Offset: 0, Size: 8, Value: 3

   0.264960     Path: UPS.PowerSummary.WarningCapacityLimit, Type:
Feature, ReportID: 0x07, Offset: 24, Size: 8, Value: 20

   0.264973     Path: UPS.PowerSummary.RemainingCapacityLimit, Type:
Feature, ReportID: 0x07, Offset: 32, Size: 8, Value: 10

   0.264988     Path: UPS.PowerSummary.RemainingCapacity, Type:
Feature, ReportID: 0x08, Offset: 0, Size: 8, Value: 100

   0.265001     Path: UPS.PowerSummary.RunTimeToEmpty, Type: Feature,
ReportID: 0x08, Offset: 8, Size: 16, Value: 3030

   0.265013     Path: UPS.PowerSummary.RemainingTimeLimit, Type:
Feature, ReportID: 0x08, Offset: 24, Size: 16, Value: 300

   0.265025     Path: UPS.PowerSummary.ConfigVoltage, Type: Feature,
ReportID: 0x09, Offset: 0, Size: 8, Value: 24

   0.265035     Path: UPS.PowerSummary.Voltage, Type: Feature,
ReportID: 0x0a, Offset: 0, Size: 8, Value: 24

   0.265049     Path: UPS.Output.PercentLoad, Type: Feature, ReportID:
0x13, Offset: 0, Size: 8, Value: 16

   0.265059     Path: UPS.PowerSummary.AudibleAlarmControl, Type:
Feature, ReportID: 0x0c, Offset: 0, Size: 8, Value: 2

   0.265071     Path: UPS.Output.Test, Type: Feature, ReportID: 0x14,
Offset: 0, Size: 8, Value: 6

   0.265082     Path: UPS.Output.ConfigActivePower, Type: Feature,
ReportID: 0x18, Offset: 0, Size: 16, Value: 900

   0.265104     Path: UPS.Output.DelayBeforeStartup, Type: Feature,
ReportID: 0x16, Offset: 0, Size: 16, Value: -60

   0.265116     Path: UPS.Output.DelayBeforeShutdown, Type: Feature,
ReportID: 0x15, Offset: 0, Size: 16, Value: -60

   0.265130     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type:
Feature, ReportID: 0x0b, Offset: 0, Size: 1, Value: 1

   0.265141     Path: UPS.PowerSummary.PresentStatus.Charging, Type:
Feature, ReportID: 0x0b, Offset: 1, Size: 1, Value: 0

   0.265151     Path: UPS.PowerSummary.PresentStatus.Discharging,
Type: Feature, ReportID: 0x0b, Offset: 2, Size: 1, Value: 0

   0.265160     Path:
UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type:
Feature, ReportID: 0x0b, Offset: 3, Size: 1, Value: 0

   0.265170     Path: UPS.PowerSummary.PresentStatus.FullyCharged,
Type: Feature, ReportID: 0x0b, Offset: 4, Size: 1, Value: 1

   0.265179     Path:
UPS.PowerSummary.PresentStatus.RemainingTimeLimitExpired, Type:
Feature, ReportID: 0x0b, Offset: 5, Size: 1, Value: 0

   0.265189     Path: UPS.Output.Boost, Type: Feature, ReportID: 0x17,
Offset: 0, Size: 1, Value: 0

   0.265199     Path: UPS.Output.Overload, Type: Feature, ReportID:
0x17, Offset: 1, Size: 1, Value: 0

   0.265208     Path: UPS.Input.ConfigVoltage, Type: Feature,
ReportID: 0x0e, Offset: 0, Size: 8, Value: 120

   0.265219     Path: UPS.Input.Voltage, Type: Feature, ReportID:
0x0f, Offset: 0, Size: 16, Value: 119

   0.265231     Path: UPS.Input.LowVoltageTransfer, Type: Feature,
ReportID: 0x10, Offset: 0, Size: 16, Value: 88

   0.265243     Path: UPS.Input.HighVoltageTransfer, Type: Feature,
ReportID: 0x10, Offset: 16, Size: 16, Value: 139

   0.265256     Path: UPS.Output.Voltage, Type: Feature, ReportID:
0x12, Offset: 0, Size: 16, Value: 136

   0.265270     Path: UPS.Output.Test, Type: Feature, ReportID: 0x14,
Offset: 0, Size: 8, Value: 6

   0.265280     Path: UPS.Output.Test, Type: Feature, ReportID: 0x14,
Offset: 0, Size: 8, Value: 6

   0.265290     Path: UPS.Output.Test, Type: Feature, ReportID: 0x14,
Offset: 0, Size: 8, Value: 6

   0.265300     Path: UPS.Output.DelayBeforeShutdown, Type: Feature,
ReportID: 0x15, Offset: 0, Size: 16, Value: -60

   0.265310     Path: UPS.Output.DelayBeforeStartup, Type: Feature,
ReportID: 0x16, Offset: 0, Size: 16, Value: -60

   0.265321     Path: UPS.Output.DelayBeforeShutdown, Type: Feature,
ReportID: 0x15, Offset: 0, Size: 16, Value: -60

   0.265334     Path: UPS.PowerSummary.AudibleAlarmControl, Type:
Feature, ReportID: 0x0c, Offset: 0, Size: 8, Value: 2

   0.265344     Path: UPS.PowerSummary.AudibleAlarmControl, Type:
Feature, ReportID: 0x0c, Offset: 0, Size: 8, Value: 2

   0.265353     Path: UPS.PowerSummary.AudibleAlarmControl, Type:
Feature, ReportID: 0x0c, Offset: 0, Size: 8, Value: 2

   0.265363     Path: UPS.PowerSummary.AudibleAlarmControl, Type:
Feature, ReportID: 0x0c, Offset: 0, Size: 8, Value: 2

   0.265373     Path: UPS.PowerSummary.AudibleAlarmControl, Type:
Feature, ReportID: 0x0c, Offset: 0, Size: 8, Value: 2

   0.265391     upsdrv_initinfo...

   0.265399     upsdrv_updateinfo...

   0.515466     libusb_get_interrupt: Connection timed out

   0.515484     Got 0 HID objects...

   0.515490     Quick update...

   0.515500     Path: UPS.Output.DelayBeforeStartup, Type: Feature,
ReportID: 0x16, Offset: 0, Size: 16, Value: -60

   0.515509     Path: UPS.Output.DelayBeforeShutdown, Type: Feature,
ReportID: 0x15, Offset: 0, Size: 16, Value: -60

   0.515517     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type:
Feature, ReportID: 0x0b, Offset: 0, Size: 1, Value: 1

   0.515524     Path: UPS.PowerSummary.PresentStatus.Charging, Type:
Feature, ReportID: 0x0b, Offset: 1, Size: 1, Value: 0

   0.515530     Path: UPS.PowerSummary.PresentStatus.Discharging,
Type: Feature, ReportID: 0x0b, Offset: 2, Size: 1, Value: 0

   0.515536     Path:
UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type:
Feature, ReportID: 0x0b, Offset: 3, Size: 1, Value: 0

   0.515620     dstate_init: sock /var/state/ups/usbhid-ups-CyberPower
open on fd 8

   0.515633     upsdrv_updateinfo...

   0.765694     libusb_get_interrupt: Connection timed out

   0.765712     Got 0 HID objects...

   0.765718     Quick update...

   0.765727     Path: UPS.Output.DelayBeforeStartup, Type: Feature,
ReportID: 0x16, Offset: 0, Size: 16, Value: -60

   0.765736     Path: UPS.Output.DelayBeforeShutdown, Type: Feature,
ReportID: 0x15, Offset: 0, Size: 16, Value: -60

   0.765744     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type:
Feature, ReportID: 0x0b, Offset: 0, Size: 1, Value: 1

   0.765750     Path: UPS.PowerSummary.PresentStatus.Charging, Type:
Feature, ReportID: 0x0b, Offset: 1, Size: 1, Value: 0

   0.765757     Path: UPS.PowerSummary.PresentStatus.Discharging,
Type: Feature, ReportID: 0x0b, Offset: 2, Size: 1, Value: 0

   0.765763     Path:
UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type:
Feature, ReportID: 0x0b, Offset: 3, Size: 1, Value: 0

   2.516475     upsdrv_updateinfo...

   2.517702     Got 6 HID objects...

   2.517722     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type:
Input, ReportID: 0x0b, Offset: 0, Size: 1, Value: 1

   2.517733     Path: UPS.PowerSummary.PresentStatus.Charging, Type:
Input, ReportID: 0x0b, Offset: 1, Size: 1, Value: 0

   2.517742     Path: UPS.PowerSummary.PresentStatus.Discharging,
Type: Input, ReportID: 0x0b, Offset: 2, Size: 1, Value: 0

   2.517751     Path:
UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type:
Input, ReportID: 0x0b, Offset: 3, Size: 1, Value: 0

   2.517760     Path: UPS.PowerSummary.PresentStatus.FullyCharged,
Type: Input, ReportID: 0x0b, Offset: 4, Size: 1, Value: 1

   2.517769     Path:
UPS.PowerSummary.PresentStatus.RemainingTimeLimitExpired, Type: Input,
ReportID: 0x0b, Offset: 5, Size: 1, Value: 0

   2.517777     Quick update...

   2.517896     Path: UPS.Output.DelayBeforeStartup, Type: Feature,
ReportID: 0x16, Offset: 0, Size: 16, Value: -60

   2.518007     Path: UPS.Output.DelayBeforeShutdown, Type: Feature,
ReportID: 0x15, Offset: 0, Size: 16, Value: -60

   2.518016     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type:
Feature, ReportID: 0x0b, Offset: 0, Size: 1, Value: 1

   2.518023     Path: UPS.PowerSummary.PresentStatus.Charging, Type:
Feature, ReportID: 0x0b, Offset: 1, Size: 1, Value: 0

   2.518029     Path: UPS.PowerSummary.PresentStatus.Discharging,
Type: Feature, ReportID: 0x0b, Offset: 2, Size: 1, Value: 0

   2.518035     Path:
UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type:
Feature, ReportID: 0x0b, Offset: 3, Size: 1, Value: 0

   4.518470     upsdrv_updateinfo...

   4.518515     libusb_get_interrupt: Input/output error

   4.518521     Got 0 HID objects...

   4.518526     Quick update...

   4.518538     libusb_get_report: Input/output error

   4.518549     Can't retrieve Report 16: Input/output error

   6.520478     upsdrv_updateinfo...

   6.520513     Got to reconnect!



More information about the Nut-upsuser mailing list