On Wed, 28 Dec 2011, Charles Lepple wrote:
On Dec 28, 2011, at 3:48 AM, Ariel wrote:
Bus 002 Device 007: ID 0764:0501 Cyber Power System, Inc. CP1500 AVR UPS
We need the rest of the USB info from the device to be able to have the
driver automatically select a correction factor. (The above line only
uses the Vendor/Product IDs as lookup keys into the usb.ids file - it
does not actively read any USB string descriptors from the device.)
$ lsusb -vvv -d 0764:0501
Placed at the end of the email.
A real Lead Acid battery has a voltage of 13.8 not 12, so it shouldn't be
reporting 24 volts for the reading, but 16 volts is certainly wrong.
0.022302 Path: UPS.PowerSummary.ConfigVoltage, Type: Feature, ReportID:
0x09, Offset: 0, Size: 8, Value: 24.000000
0.022332 Path: UPS.PowerSummary.Voltage, Type: Feature, ReportID: 0x0a,
Offset: 0, Size: 8, Value: 24.000000
Is it possible that UPS.PowerSummary.Voltage is really an output voltage
divided by 10? (This has happened on other devices.)
Well, I have two 12 volt batteries, so 24 volts makes sense, 240 doesn't.
What might be useful (and this applies to your other feature requests as
well) is to verify that the values change as expected during a deep
discharge cycle.
Yes, I intend to do that, once I get everything installed fully so I can
test everything end to end. (Although I won't be able to test the
buck/boost till the summer when my voltage drops a lot.)
I have a feeling that we may need to develop a more generic scaling
capability in some of these drivers. On the other hand, we probably
should make it obvious that certain values are being modified before
being reported.
I agree - I think the scaling should be configured in ups.conf, and be
general for any field. To make it very easy support +-*/ without
precedence - operations are done strictly left to right. Perhaps 3 fields:
operation, min, max (min/max are applied after scaling, not before).
Also, what version of NUT are you using? I seem to remember that we
fixed the debug output so that it didn't always print values in
fixed-point notation.
I'm using 2.4.3 (debian stable - you'll be getting a lot of reports for
that version for the next year or two). I was thinking of installing 2.6.2
if it had any features I needed.
lsusb -vvv -d 0764:0501 (I find it interesting that this appears to
include all the values the UPS sends, I didn't know the kernel tracks
that.)
Bus 002 Device 007: ID 0764:0501 Cyber Power System, Inc. CP1500 AVR UPS
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0764 Cyber Power System, Inc.
idProduct 0x0501 CP1500 AVR UPS
bcdDevice 0.01
iManufacturer 1 CP1350PFCLCD
iProduct 2 CRCA102-3I1
iSerial 3 CPS
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 34
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 2mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0 No Subclass
bInterfaceProtocol 0 None
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.10
bCountryCode 33 US
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 430
Report Descriptor: (length is 430)
Item(Global): Usage Page, data= [ 0x84 ] 132
Power Device Page
Item(Local ): Usage, data= [ 0x04 ] 4
UPS
Item(Main ): Collection, data= [ 0x01 ] 1
Application
Item(Local ): Usage, data= [ 0x24 ] 36
Power Summary
Item(Main ): Collection, data= [ 0x00 ] 0
Physical
Item(Global): Report ID, data= [ 0x01 ] 1
Item(Local ): Usage, data= [ 0xfe ] 254
iProduct
Item(Global): Report Size, data= [ 0x08 ] 8
Item(Global): Report Count, data= [ 0x01 ] 1
Item(Global): Logical Minimum, data= [ 0x00 ] 0
Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
Item(Main ): Feature, data= [ 0x23 ] 35
Constant Variable Absolute No_Wrap Linear
No_Preferred_State No_Null_Position Non_Volatile
Bitfield
Item(Global): Report ID, data= [ 0x02 ] 2
Item(Local ): Usage, data= [ 0xff ] 255
iSerialNumber
Item(Main ): Feature, data= [ 0x23 ] 35
Constant Variable Absolute No_Wrap Linear
No_Preferred_State No_Null_Position Non_Volatile
Bitfield
Item(Global): Report ID, data= [ 0x03 ] 3
Item(Global): Usage Page, data= [ 0x85 ] 133
Battery System Page
Item(Local ): Usage, data= [ 0x89 ] 137
iDeviceChemistry
Item(Main ): Feature, data= [ 0x23 ] 35
Constant Variable Absolute No_Wrap Linear
No_Preferred_State No_Null_Position Non_Volatile
Bitfield
Item(Global): Report ID, data= [ 0x04 ] 4
Item(Local ): Usage, data= [ 0x8f ] 143
iOEMInformation
Item(Main ): Feature, data= [ 0x23 ] 35
Constant Variable Absolute No_Wrap Linear
No_Preferred_State No_Null_Position Non_Volatile
Bitfield
Item(Global): Report ID, data= [ 0x05 ] 5
Item(Local ): Usage, data= [ 0x8b ] 139
Rechargeable
Item(Main ): Feature, data= [ 0x23 ] 35
Constant Variable Absolute No_Wrap Linear
No_Preferred_State No_Null_Position Non_Volatile
Bitfield
Item(Global): Report ID, data= [ 0x06 ] 6
Item(Local ): Usage, data= [ 0x2c ] 44
Capacity Mode
Item(Main ): Feature, data= [ 0x23 ] 35
Constant Variable Absolute No_Wrap Linear
No_Preferred_State No_Null_Position Non_Volatile
Bitfield
Item(Global): Report ID, data= [ 0x07 ] 7
Item(Global): Report Size, data= [ 0x08 ] 8
Item(Global): Report Count, data= [ 0x06 ] 6
Item(Global): Logical Maximum, data= [ 0x64 ] 100
Item(Local ): Usage, data= [ 0x83 ] 131
Design Capacity
Item(Local ): Usage, data= [ 0x8d ] 141
Capacity Granularity 1
Item(Local ): Usage, data= [ 0x8e ] 142
Capacity Granularity 2
Item(Local ): Usage, data= [ 0x8c ] 140
Warning Capacity Limit
Item(Local ): Usage, data= [ 0x29 ] 41
Remaining Capacity Limit
Item(Local ): Usage, data= [ 0x67 ] 103
Full Charge Capacity
Item(Main ): Feature, data= [ 0x23 ] 35
Constant Variable Absolute No_Wrap Linear
No_Preferred_State No_Null_Position Non_Volatile
Bitfield
Item(Global): Report ID, data= [ 0x08 ] 8
Item(Global): Report Size, data= [ 0x08 ] 8
Item(Global): Report Count, data= [ 0x01 ] 1
Item(Global): Unit, data= [ 0x00 ] 0
System: None, Unit: (None)
Item(Local ): Usage, data= [ 0x66 ] 102
Remaining Capacity
Item(Main ): Input, data= [ 0x23 ] 35
Constant Variable Absolute No_Wrap Linear
No_Preferred_State No_Null_Position Non_Volatile
Bitfield
Item(Local ): Usage, data= [ 0x66 ] 102
Remaining Capacity
Item(Main ): Feature, data= [ 0xa3 ] 163
Constant Variable Absolute No_Wrap Linear
No_Preferred_State No_Null_Position Volatile
Bitfield
Item(Local ): Usage, data= [ 0x68 ] 104
Run Time To Empty
Item(Global): Report Size, data= [ 0x10 ] 16
Item(Global): Logical Maximum, data= [ 0xff 0xff 0x00 0x00 ] 65535
Item(Global): Unit, data= [ 0x01 0x10 ] 4097
System: SI Linear, Unit: Seconds
Item(Main ): Input, data= [ 0x23 ] 35
Constant Variable Absolute No_Wrap Linear
No_Preferred_State No_Null_Position Non_Volatile
Bitfield
Item(Local ): Usage, data= [ 0x68 ] 104
Run Time To Empty
Item(Main ): Feature, data= [ 0xa3 ] 163
Constant Variable Absolute No_Wrap Linear
No_Preferred_State No_Null_Position Volatile
Bitfield
Item(Local ): Usage, data= [ 0x2a ] 42
Remaining Time Limit
Item(Global): Logical Maximum, data= [ 0x58 0x02 ] 600
Item(Main ): Input, data= [ 0x23 ] 35
Constant Variable Absolute No_Wrap Linear
No_Preferred_State No_Null_Position Non_Volatile
Bitfield
Item(Local ): Usage, data= [ 0x2a ] 42
Remaining Time Limit
Item(Main ): Feature, data= [ 0xa2 ] 162
Data Variable Absolute No_Wrap Linear
No_Preferred_State No_Null_Position Volatile
Bitfield
Item(Global): Report ID, data= [ 0x09 ] 9
Item(Global): Report Size, data= [ 0x08 ] 8
Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
Item(Global): Usage Page, data= [ 0x84 ] 132
Power Device Page
Item(Local ): Usage, data= [ 0x40 ] 64
Config Voltage
Item(Global): Unit, data= [ 0x21 0xd1 0xf0 0x00 ] 15782177
System: SI Linear, Unit:
Centimeter^2*Gram*Seconds^-3*Ampere^-1
Item(Global): Unit Exponent, data= [ 0x06 ] 6
Unit Exponent: 6
Item(Main ): Feature, data= [ 0x23 ] 35
Constant Variable Absolute No_Wrap Linear
No_Preferred_State No_Null_Position Non_Volatile
Bitfield
Item(Global): Report ID, data= [ 0x0a ] 10
Item(Local ): Usage, data= [ 0x30 ] 48
Voltage
Item(Main ): Feature, data= [ 0xa3 ] 163
Constant Variable Absolute No_Wrap Linear
No_Preferred_State No_Null_Position Volatile
Bitfield
Item(Local ): Usage, data= [ 0x02 ] 2
Present Status
Item(Main ): Collection, data= [ 0x02 ] 2
Logical
Item(Global): Unit, data= [ 0x00 ] 0
System: None, Unit: (None)
Item(Global): Unit Exponent, data= [ 0x00 ] 0
Unit Exponent: 0
Item(Global): Report ID, data= [ 0x0b ] 11
Item(Global): Report Size, data= [ 0x01 ] 1
Item(Global): Report Count, data= [ 0x06 ] 6
Item(Global): Logical Maximum, data= [ 0x01 ] 1
Item(Global): Usage Page, data= [ 0x85 ] 133
Battery System Page
Item(Local ): Usage, data= [ 0xd0 ] 208
AC Present
Item(Local ): Usage, data= [ 0x44 ] 68
Charging
Item(Local ): Usage, data= [ 0x45 ] 69
Discharging
Item(Local ): Usage, data= [ 0x42 ] 66
Below Remaining Capacity Limit
Item(Local ): Usage, data= [ 0x46 ] 70
Fully Charged
Item(Local ): Usage, data= [ 0x43 ] 67
Remaining Time Limit Expired
Item(Main ): Input, data= [ 0x23 ] 35
Constant Variable Absolute No_Wrap Linear
No_Preferred_State No_Null_Position Non_Volatile
Bitfield
Item(Local ): Usage, data= [ 0xd0 ] 208
AC Present
Item(Local ): Usage, data= [ 0x44 ] 68
Charging
Item(Local ): Usage, data= [ 0x45 ] 69
Discharging
Item(Local ): Usage, data= [ 0x42 ] 66
Below Remaining Capacity Limit
Item(Local ): Usage, data= [ 0x46 ] 70
Fully Charged
Item(Local ): Usage, data= [ 0x43 ] 67
Remaining Time Limit Expired
Item(Main ): Feature, data= [ 0xa3 ] 163
Constant Variable Absolute No_Wrap Linear
No_Preferred_State No_Null_Position Volatile
Bitfield
Item(Global): Report Size, data= [ 0x02 ] 2
Item(Global): Report Count, data= [ 0x01 ] 1
Item(Main ): Input, data= [ 0x01 ] 1
Constant Array Absolute No_Wrap Linear
Preferred_State No_Null_Position Non_Volatile
Bitfield
Item(Main ): Feature, data= [ 0x01 ] 1
Constant Array Absolute No_Wrap Linear
Preferred_State No_Null_Position Non_Volatile
Bitfield
Item(Main ): End Collection, data=none
Item(Global): Report ID, data= [ 0x0c ] 12
Item(Global): Usage Page, data= [ 0x84 ] 132
Power Device Page
Item(Local ): Usage, data= [ 0x5a ] 90
Audible Alarm Control
Item(Global): Report Size, data= [ 0x08 ] 8
Item(Global): Logical Minimum, data= [ 0x01 ] 1
Item(Global): Logical Maximum, data= [ 0x03 ] 3
Item(Main ): Feature, data= [ 0xa2 ] 162
Data Variable Absolute No_Wrap Linear
No_Preferred_State No_Null_Position Volatile
Bitfield
Item(Local ): Usage, data= [ 0x5a ] 90
Audible Alarm Control
Item(Main ): Input, data= [ 0x22 ] 34
Data Variable Absolute No_Wrap Linear
No_Preferred_State No_Null_Position Non_Volatile
Bitfield
Item(Global): Report ID, data= [ 0x0d ] 13
Item(Local ): Usage, data= [ 0xfd ] 253
iManufacturer
Item(Global): Logical Minimum, data= [ 0x00 ] 0
Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
Item(Main ): Feature, data= [ 0x23 ] 35
Constant Variable Absolute No_Wrap Linear
No_Preferred_State No_Null_Position Non_Volatile
Bitfield
Item(Main ): End Collection, data=none
Item(Global): Usage Page, data= [ 0x84 ] 132
Power Device Page
Item(Local ): Usage, data= [ 0x1a ] 26
Input
Item(Main ): Collection, data= [ 0x00 ] 0
Physical
Item(Global): Report ID, data= [ 0x0e ] 14
Item(Global): Usage Page, data= [ 0x84 ] 132
Power Device Page
Item(Local ): Usage, data= [ 0x40 ] 64
Config Voltage
Item(Global): Report Size, data= [ 0x08 ] 8
Item(Global): Unit, data= [ 0x21 0xd1 0xf0 0x00 ] 15782177
System: SI Linear, Unit:
Centimeter^2*Gram*Seconds^-3*Ampere^-1
Item(Global): Unit Exponent, data= [ 0x07 ] 7
Unit Exponent: 7
Item(Main ): Feature, data= [ 0x23 ] 35
Constant Variable Absolute No_Wrap Linear
No_Preferred_State No_Null_Position Non_Volatile
Bitfield
Item(Global): Report ID, data= [ 0x0f ] 15
Item(Global): Report Size, data= [ 0x10 ] 16
Item(Local ): Usage, data= [ 0x30 ] 48
Voltage
Item(Main ): Feature, data= [ 0xa3 ] 163
Constant Variable Absolute No_Wrap Linear
No_Preferred_State No_Null_Position Volatile
Bitfield
Item(Global): Report ID, data= [ 0x10 ] 16
Item(Local ): Usage, data= [ 0x53 ] 83
Low Voltage Transfer
Item(Global): Logical Minimum, data= [ 0x4e ] 78
Item(Global): Logical Maximum, data= [ 0x58 ] 88
Item(Main ): Feature, data= [ 0xa2 ] 162
Data Variable Absolute No_Wrap Linear
No_Preferred_State No_Null_Position Volatile
Bitfield
Item(Local ): Usage, data= [ 0x53 ] 83
Low Voltage Transfer
Item(Main ): Input, data= [ 0x23 ] 35
Constant Variable Absolute No_Wrap Linear
No_Preferred_State No_Null_Position Non_Volatile
Bitfield
Item(Local ): Usage, data= [ 0x54 ] 84
High Voltage Transfer
Item(Global): Logical Minimum, data= [ 0x88 0x00 ] 136
Item(Global): Logical Maximum, data= [ 0x8e 0x00 ] 142
Item(Main ): Feature, data= [ 0xa2 ] 162
Data Variable Absolute No_Wrap Linear
No_Preferred_State No_Null_Position Volatile
Bitfield
Item(Local ): Usage, data= [ 0x54 ] 84
High Voltage Transfer
Item(Main ): Input, data= [ 0x23 ] 35
Constant Variable Absolute No_Wrap Linear
No_Preferred_State No_Null_Position Non_Volatile
Bitfield
Item(Main ): End Collection, data=none
Item(Local ): Usage, data= [ 0x1c ] 28
Output
Item(Main ): Collection, data= [ 0x00 ] 0
Physical
Item(Global): Report ID, data= [ 0x12 ] 18
Item(Local ): Usage, data= [ 0x30 ] 48
Voltage
Item(Main ): Feature, data= [ 0xa3 ] 163
Constant Variable Absolute No_Wrap Linear
No_Preferred_State No_Null_Position Volatile
Bitfield
Item(Global): Report Size, data= [ 0x08 ] 8
Item(Global): Logical Minimum, data= [ 0x00 ] 0
Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
Item(Global): Unit, data= [ 0x00 ] 0
System: None, Unit: (None)
Item(Global): Unit Exponent, data= [ 0x00 ] 0
Unit Exponent: 0
Item(Global): Report ID, data= [ 0x13 ] 19
Item(Local ): Usage, data= [ 0x35 ] 53
Percent Load
Item(Main ): Feature, data= [ 0xa3 ] 163
Constant Variable Absolute No_Wrap Linear
No_Preferred_State No_Null_Position Volatile
Bitfield
Item(Global): Report ID, data= [ 0x14 ] 20
Item(Local ): Usage, data= [ 0x58 ] 88
Test
Item(Global): Logical Maximum, data= [ 0x06 ] 6
Item(Main ): Feature, data= [ 0xa2 ] 162
Data Variable Absolute No_Wrap Linear
No_Preferred_State No_Null_Position Volatile
Bitfield
Item(Local ): Usage, data= [ 0x58 ] 88
Test
Item(Main ): Input, data= [ 0x22 ] 34
Data Variable Absolute No_Wrap Linear
No_Preferred_State No_Null_Position Non_Volatile
Bitfield
Item(Global): Report ID, data= [ 0x15 ] 21
Item(Local ): Usage, data= [ 0x57 ] 87
Delay Before Shutdown
Item(Global): Report Size, data= [ 0x10 ] 16
Item(Global): Logical Minimum, data= [ 0xff ] 255
Item(Global): Logical Maximum, data= [ 0xff 0x7f ] 32767
Item(Global): Physical Minimum, data= [ 0xc4 ] 196
Item(Global): Physical Maximum, data= [ 0xc4 0xff 0x1d 0x00 ]
1966020
Item(Global): Unit, data= [ 0x01 0x10 ] 4097
System: SI Linear, Unit: Seconds
Item(Main ): Feature, data= [ 0xa2 ] 162
Data Variable Absolute No_Wrap Linear
No_Preferred_State No_Null_Position Volatile
Bitfield
Item(Global): Report ID, data= [ 0x16 ] 22
Item(Local ): Usage, data= [ 0x56 ] 86
Delay Before Startup
Item(Main ): Feature, data= [ 0xa2 ] 162
Data Variable Absolute No_Wrap Linear
No_Preferred_State No_Null_Position Volatile
Bitfield
Item(Global): Report ID, data= [ 0x17 ] 23
Item(Local ): Usage, data= [ 0x6e ] 110
Boost
Item(Global): Report Size, data= [ 0x01 ] 1
Item(Global): Logical Minimum, data= [ 0x00 ] 0
Item(Global): Logical Maximum, data= [ 0x01 ] 1
Item(Global): Physical Minimum, data= [ 0x00 ] 0
Item(Global): Physical Maximum, data= [ 0x00 ] 0
Item(Global): Unit, data= [ 0x00 ] 0
System: None, Unit: (None)
Item(Main ): Feature, data= [ 0xa3 ] 163
Constant Variable Absolute No_Wrap Linear
No_Preferred_State No_Null_Position Volatile
Bitfield
Item(Local ): Usage, data= [ 0x65 ] 101
Overload
Item(Main ): Feature, data= [ 0xa3 ] 163
Constant Variable Absolute No_Wrap Linear
No_Preferred_State No_Null_Position Volatile
Bitfield
Item(Global): Report Size, data= [ 0x06 ] 6
Item(Main ): Feature, data= [ 0x01 ] 1
Constant Array Absolute No_Wrap Linear
Preferred_State No_Null_Position Non_Volatile
Bitfield
Item(Global): Report ID, data= [ 0x18 ] 24
Item(Global): Report Size, data= [ 0x10 ] 16
Item(Local ): Usage, data= [ 0x44 ] 68
Config Active Power
Item(Global): Logical Maximum, data= [ 0x84 0x03 ] 900
Item(Global): Unit, data= [ 0x21 0xd1 ] 53537
System: SI Linear, Unit:
Centimeter^2*Gram*Seconds^-3
Item(Global): Unit Exponent, data= [ 0x07 ] 7
Unit Exponent: 7
Item(Main ): Feature, data= [ 0xa3 ] 163
Constant Variable Absolute No_Wrap Linear
No_Preferred_State No_Null_Position Volatile
Bitfield
Item(Global): Report ID, data= [ 0x1a ] 26
Item(Global): Usage Page, data= [ 0x01 0xff ] 65281
(null)
Item(Global): Unit, data= [ 0x00 ] 0
System: None, Unit: (None)
Item(Global): Unit Exponent, data= [ 0x00 ] 0
Unit Exponent: 0
Item(Global): Report Size, data= [ 0x08 ] 8
Item(Global): Logical Minimum, data= [ 0x00 ] 0
Item(Global): Logical Maximum, data= [ 0x02 ] 2
Item(Local ): Usage, data= [ 0x43 ] 67
(null)
Item(Main ): Feature, data= [ 0xa2 ] 162
Data Variable Absolute No_Wrap Linear
No_Preferred_State No_Null_Position Volatile
Bitfield
Item(Local ): Usage, data= [ 0x43 ] 67
(null)
Item(Main ): Input, data= [ 0x23 ] 35
Constant Variable Absolute No_Wrap Linear
No_Preferred_State No_Null_Position Non_Volatile
Bitfield
Item(Main ): End Collection, data=none
Item(Main ): End Collection, data=none
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 10
Device Status: 0x0000
(Bus Powered)
-Ariel
_______________________________________________
Nut-upsdev mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsdev