[Nut-upsdev] [PATCH] Add support for Liebert PowerSure PSA to liebert-hid.c
Mike
pf-nut-upsdev at mirkwood.net
Tue Nov 10 18:18:21 UTC 2009
See attached for output.
On Tue, Nov 10, 2009 at 08:22:28AM +0100, Arjen de Korte babbled thus:
> Citeren Mike <pf-nut-upsdev at mirkwood.net>:
>
> >This patch adds support for the following ups to liebert-hid.c:
> >
> >$ lsusb | grep Liebert
> >Bus 007 Device 005: ID 10af:0001 Liebert Corp. PowerSure PSA UPS
> >
> >Using this patch, I'm able to obtain information about the ups via
> >upsc:
> >
> >$ upsc upsname
> >battery.charge: 100
> >battery.runtime: 1012
> >battery.type: PbAc
> >battery.voltage: 1172
>
> This probably requires some conversion.
>
> >battery.voltage.nominal: 12
> >driver.name: usbhid-ups
> >driver.parameter.pollfreq: 30
> >driver.parameter.pollinterval: 2
> >driver.parameter.port: auto
> >driver.version: 2.4.1
> >driver.version.data: Liebert HID 0.3
> >driver.version.internal: 0.34
> >ups.mfr: Liebert
> >ups.model: Liebert PSA 650 FW:09
> >ups.productid: 0001
> >ups.serial: XXXXXXXXXXXXXXX #(my censorship, the driver appears to
> >report the correct serial #)
>
> This is a good thing, since if this is unique, people will be able to
> monitor multiple devices from the same host.
>
> >ups.status: OB
> >ups.vendorid: 10af
> >
> >I noticed upsmon is still claiming that the ups is on battery when it's
> >definitely receiving power via mains, but this may be a
> >misconfiguration on my part and not necessarily driver related.
>
> Most likely, the UPS reports this via a different variable and the
> driver defaults to on battery. Please post the output of
>
> /path/to/usbhid-ups -DD -a upsname
>
> and we can have a look what needs to be done to add full support.
>
> >I set
> >this up in a hurry today, with the goal of convincing NUT to recognize
> >this ups.
>
> Thanks for that. Please not that as it is, the UPS devices that are
> already recognized by the liebert-hid subdriver have very limited
> support (they are lacking quite a number of essential features).
> Hopefully we will be able to add better support for this one.
>
> >Note that the original vendorid in liebert-hid.c, 0d6a, is listed as
> >belonging to Megapower International Corp. Liebert's officially
> >registered vendorid is 10af. See http://www.linux-usb.org/usb.ids for
> >more information.
>
> We should probably make 0x10af the LIEBERT_VENDORID and add 0x0d6a as
> MEGAPOWER_VENDORID.
>
> Best regards, Arjen
> --
> Please keep list traffic on the list
>
>
> _______________________________________________
> Nut-upsdev mailing list
> Nut-upsdev at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev
--
Mike Edwards | If this email address disappears,
Unsolicited advertisments to | assume it was spammed to death. To
this address are not welcome. | reach me in that case, s/-.*@/@/
"Our progress as a nation can be no swifter than our progress in education.
The human mind is our fundamental resource."
-- John F. Kennedy
-------------- next part --------------
debug level is '2'
upsdrv_initups...
Checking device (10AF/0001) (007/005)
- VendorID: 10af
- ProductID: 0001
- Manufacturer: Liebert
- Product: Liebert PSA 650 FW:09
- Serial Number: XXXXXXXXXXXXXXX
- Bus: 007
Trying to match device
Device matches
HID descriptor length 602
Report Descriptor size = 602
Using subdriver: Liebert HID 0.3
Path: UPS.00860026.00860040, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8, Value: 120.000000
Path: UPS.00860026.00860042, Type: Feature, ReportID: 0x02, Offset: 0, Size: 8, Value: 60.000000
Path: UPS.00860026.00860043, Type: Feature, ReportID: 0x03, Offset: 0, Size: 16, Value: 650.000000
Path: UPS.00860026.00860044, Type: Feature, ReportID: 0x04, Offset: 0, Size: 16, Value: 12.000000
Path: UPS.00860029.00860075, Type: Feature, ReportID: 0x0d, Offset: 0, Size: 8, Value: 24.000000
Path: UPS.00860029.00860076, Type: Feature, ReportID: 0x0e, Offset: 0, Size: 8, Value: 0.000000
Path: UPS.00860029.0086007c, Type: Feature, ReportID: 0x0f, Offset: 0, Size: 8, Value: 146.000000
Path: UPS.00860027.00860058, Type: Feature, ReportID: 0x10, Offset: 0, Size: 8, Value: 1.000000
Path: UPS.00860027.0086005a, Type: Feature, ReportID: 0x11, Offset: 0, Size: 8, Value: 2.000000
Path: UPS.00860027.00860057, Type: Feature, ReportID: 0x15, Offset: 0, Size: 16, Value: 0.000000
Path: UPS.00860027.00860056, Type: Feature, ReportID: 0x16, Offset: 0, Size: 16, Value: 0.000000
Path: UPS.00860027.00860080, Type: Feature, ReportID: 0x40, Offset: 0, Size: 8, Value: 2.000000
Path: UPS.00860027.00860081, Type: Feature, ReportID: 0x41, Offset: 0, Size: 8, Value: 0.000000
Path: UPS.00860027.00860082, Type: Feature, ReportID: 0x42, Offset: 0, Size: 8, Value: 2.000000
Path: UPS.00860027.00860083, Type: Feature, ReportID: 0x43, Offset: 0, Size: 8, Value: 2.000000
Path: UPS.00860027.00860084, Type: Feature, ReportID: 0x44, Offset: 0, Size: 8, Value: 2.000000
Path: UPS.0086002a.0086001a.00860030, Type: Feature, ReportID: 0x18, Offset: 0, Size: 16, Value: 1158.000000
Path: UPS.0086002a.0086001a.00860032, Type: Feature, ReportID: 0x19, Offset: 0, Size: 16, Value: 599.000000
Path: UPS.0086002a.0086001a.00860036, Type: Feature, ReportID: 0x1a, Offset: 0, Size: 8, Value: 31.000000
Path: UPS.0086002a.0086001c.00860030, Type: Feature, ReportID: 0x1b, Offset: 0, Size: 16, Value: 1149.000000
Path: UPS.0086002a.0086001c.00860032, Type: Feature, ReportID: 0x1c, Offset: 0, Size: 16, Value: 599.000000
Path: UPS.0086002a.0086001c.00860035, Type: Feature, ReportID: 0x1e, Offset: 0, Size: 8, Value: 28.000000
Path: UPS.00860010.00860030, Type: Feature, ReportID: 0x20, Offset: 0, Size: 16, Value: 139.000000
Path: UPS.00860010.00860039, Type: Feature, ReportID: 0x21, Offset: 0, Size: 8, Value: 100.000000
Path: UPS.00860028.00860021, Type: Feature, ReportID: 0x22, Offset: 0, Size: 16, Value: 0.000000
Path: UPS.00860028.00860022, Type: Feature, ReportID: 0x23, Offset: 0, Size: 8, Value: 16.000000
Path: UPS.PowerSummary.iProduct, Type: Feature, ReportID: 0x28, Offset: 0, Size: 8, Value: 20.000000
Path: UPS.PowerSummary.iSerialNumber, Type: Feature, ReportID: 0x29, Offset: 0, Size: 8, Value: 22.000000
Path: UPS.PowerSummary.iDeviceChemistry, Type: Feature, ReportID: 0x2a, Offset: 0, Size: 8, Value: 26.000000
Path: UPS.PowerSummary.iOEMInformation, Type: Feature, ReportID: 0x2b, Offset: 0, Size: 8, Value: 4.000000
Path: UPS.PowerSummary.Rechargeable, Type: Feature, ReportID: 0x2c, Offset: 0, Size: 8, Value: 1.000000
Path: UPS.PowerSummary.Charging, Type: Input, ReportID: 0x2d, Offset: 0, Size: 8, Value: 1.000000
Path: UPS.PowerSummary.Charging, Type: Feature, ReportID: 0x2d, Offset: 0, Size: 8, Value: 1.000000
Path: UPS.PowerSummary.Discharging, Type: Input, ReportID: 0x2e, Offset: 0, Size: 8, Value: 0.000000
Path: UPS.PowerSummary.Discharging, Type: Feature, ReportID: 0x2e, Offset: 0, Size: 8, Value: 0.000000
Path: UPS.PowerSummary.ConfigVoltage, Type: Feature, ReportID: 0x30, Offset: 0, Size: 16, Value: 12.000000
Path: UPS.PowerSummary.Voltage, Type: Feature, ReportID: 0x31, Offset: 0, Size: 16, Value: 1149.000000
Path: UPS.PowerSummary.Current, Type: Feature, ReportID: 0x32, Offset: 0, Size: 8, Value: 0.000000
Path: UPS.PowerSummary.CapacityMode, Type: Feature, ReportID: 0x33, Offset: 0, Size: 8, Value: 2.000000
Path: UPS.PowerSummary.RemainingCapacity, Type: Input, ReportID: 0x34, Offset: 0, Size: 8, Value: 100.000000
Path: UPS.PowerSummary.RemainingCapacity, Type: Feature, ReportID: 0x34, Offset: 0, Size: 8, Value: 100.000000
Path: UPS.PowerSummary.RunTimeToEmpty, Type: Input, ReportID: 0x35, Offset: 0, Size: 16, Value: 1524.000000
Path: UPS.PowerSummary.RunTimeToEmpty, Type: Feature, ReportID: 0x35, Offset: 0, Size: 16, Value: 1524.000000
Path: UPS.PowerSummary.DesignCapacity, Type: Feature, ReportID: 0x36, Offset: 0, Size: 8, Value: 100.000000
Path: UPS.PowerSummary.FullChargeCapacity, Type: Feature, ReportID: 0x37, Offset: 0, Size: 8, Value: 100.000000
Path: UPS.PowerSummary.WarningCapacityLimit, Type: Feature, ReportID: 0x38, Offset: 0, Size: 8, Value: 20.000000
Path: UPS.PowerSummary.CapacityGranularity2, Type: Feature, ReportID: 0x39, Offset: 0, Size: 8, Value: 1.000000
Path: UPS.PowerSummary.RemainingCapacityLimit, Type: Feature, ReportID: 0x3a, Offset: 0, Size: 8, Value: 20.000000
Path: UPS.PowerSummary.CapacityGranularity1, Type: Feature, ReportID: 0x3b, Offset: 0, Size: 8, Value: 1.000000
Path: UPS.PowerSummary.ACPresent, Type: Feature, ReportID: 0x3c, Offset: 0, Size: 8, Value: 1.000000
Path: UPS.PowerSummary.ACPresent, Type: Input, ReportID: 0x3c, Offset: 0, Size: 8, Value: 1.000000
Path: UPS.PowerSummary.BelowRemainingCapacityLimit, Type: Input, ReportID: 0x3d, Offset: 0, Size: 8, Value: 1.000000
Path: UPS.PowerSummary.BelowRemainingCapacityLimit, Type: Feature, ReportID: 0x3d, Offset: 0, Size: 8, Value: 1.000000
Path: UPS.PowerSummary.ShutdownImminent, Type: Input, ReportID: 0x3e, Offset: 0, Size: 8, Value: 0.000000
Path: UPS.PowerSummary.ShutdownImminent, Type: Feature, ReportID: 0x3e, Offset: 0, Size: 8, Value: 0.000000
Path: UPS.PowerSummary.0085006c, Type: Feature, ReportID: 0x3f, Offset: 0, Size: 16, Value: 25.000000
Network UPS Tools - Generic HID driver 0.34 (2.4.1)
USB communication driver 0.31
Report descriptor retrieved (Reportlen = 602)
Found HID device
Detected a UPS: Liebert/Liebert PSA 650 FW:09
Path: UPS.PowerSummary.Voltage, Type: Feature, ReportID: 0x31, Offset: 0, Size: 16, Value: 1149.000000
Path: UPS.PowerSummary.ConfigVoltage, Type: Feature, ReportID: 0x30, Offset: 0, Size: 16, Value: 12.000000
Path: UPS.PowerSummary.RemainingCapacity, Type: Feature, ReportID: 0x34, Offset: 0, Size: 8, Value: 100.000000
Path: UPS.PowerSummary.RunTimeToEmpty, Type: Feature, ReportID: 0x35, Offset: 0, Size: 16, Value: 1524.000000
Path: UPS.PowerSummary.iDeviceChemistry, Type: Feature, ReportID: 0x2a, Offset: 0, Size: 8, Value: 26.000000
upsdrv_initinfo...
upsdrv_updateinfo...
Got -110 HID objects...
Quick update...
dstate_init: sock /var/run/nut/usbhid-ups-upsname open on fd 5
upsdrv_updateinfo...
Got -110 HID objects...
Quick update...
upsdrv_updateinfo...
Got 1 HID objects...
Path: UPS.PowerSummary.RunTimeToEmpty, Type: Input, ReportID: 0x35, Offset: 0, Size: 16, Value: 1566.000000
Quick update...
upsdrv_updateinfo...
Got 1 HID objects...
Path: UPS.PowerSummary.ACPresent, Type: Input, ReportID: 0x3c, Offset: 0, Size: 8, Value: 1.000000
Quick update...
upsdrv_updateinfo...
Got -110 HID objects...
Quick update...
upsdrv_updateinfo...
Got 1 HID objects...
Path: UPS.PowerSummary.BelowRemainingCapacityLimit, Type: Input, ReportID: 0x3d, Offset: 0, Size: 8, Value: 1.000000
Quick update...
upsdrv_updateinfo...
Got 1 HID objects...
Path: UPS.PowerSummary.ShutdownImminent, Type: Input, ReportID: 0x3e, Offset: 0, Size: 8, Value: 0.000000
Quick update...
upsdrv_updateinfo...
Got -110 HID objects...
Quick update...
upsdrv_updateinfo...
Got -110 HID objects...
Quick update...
upsdrv_updateinfo...
Got 1 HID objects...
Path: UPS.PowerSummary.Charging, Type: Input, ReportID: 0x2d, Offset: 0, Size: 8, Value: 1.000000
Quick update...
upsdrv_updateinfo...
Got -110 HID objects...
Quick update...
upsdrv_updateinfo...
Got 1 HID objects...
Path: UPS.PowerSummary.Discharging, Type: Input, ReportID: 0x2e, Offset: 0, Size: 8, Value: 0.000000
Quick update...
upsdrv_updateinfo...
Got 1 HID objects...
Path: UPS.PowerSummary.RemainingCapacity, Type: Input, ReportID: 0x34, Offset: 0, Size: 8, Value: 100.000000
Quick update...
upsdrv_updateinfo...
Got -110 HID objects...
Quick update...
upsdrv_updateinfo...
Got 1 HID objects...
Path: UPS.PowerSummary.RunTimeToEmpty, Type: Input, ReportID: 0x35, Offset: 0, Size: 16, Value: 1552.000000
Quick update...
upsdrv_updateinfo...
Got 1 HID objects...
Path: UPS.PowerSummary.ACPresent, Type: Input, ReportID: 0x3c, Offset: 0, Size: 8, Value: 1.000000
Quick update...
upsdrv_updateinfo...
Got -110 HID objects...
Quick update...
upsdrv_updateinfo...
Got 1 HID objects...
Path: UPS.PowerSummary.BelowRemainingCapacityLimit, Type: Input, ReportID: 0x3d, Offset: 0, Size: 8, Value: 1.000000
Full update...
Path: UPS.PowerSummary.Voltage, Type: Feature, ReportID: 0x31, Offset: 0, Size: 16, Value: 1146.000000
Path: UPS.PowerSummary.ConfigVoltage, Type: Feature, ReportID: 0x30, Offset: 0, Size: 16, Value: 12.000000
Path: UPS.PowerSummary.RemainingCapacity, Type: Feature, ReportID: 0x34, Offset: 0, Size: 8, Value: 100.000000
Path: UPS.PowerSummary.RunTimeToEmpty, Type: Feature, ReportID: 0x35, Offset: 0, Size: 16, Value: 1552.000000
Path: UPS.PowerSummary.iDeviceChemistry, Type: Feature, ReportID: 0x2a, Offset: 0, Size: 8, Value: 26.000000
upsdrv_updateinfo...
Got 1 HID objects...
Path: UPS.PowerSummary.ShutdownImminent, Type: Input, ReportID: 0x3e, Offset: 0, Size: 8, Value: 0.000000
Quick update...
upsdrv_updateinfo...
Got -110 HID objects...
Quick update...
upsdrv_updateinfo...
Got -110 HID objects...
Quick update...
upsdrv_updateinfo...
Got 1 HID objects...
Path: UPS.PowerSummary.Charging, Type: Input, ReportID: 0x2d, Offset: 0, Size: 8, Value: 1.000000
Quick update...
upsdrv_updateinfo...
Got -110 HID objects...
Quick update...
upsdrv_updateinfo...
Got 1 HID objects...
Path: UPS.PowerSummary.Discharging, Type: Input, ReportID: 0x2e, Offset: 0, Size: 8, Value: 0.000000
Quick update...
upsdrv_updateinfo...
Got 1 HID objects...
Path: UPS.PowerSummary.RemainingCapacity, Type: Input, ReportID: 0x34, Offset: 0, Size: 8, Value: 100.000000
Quick update...
upsdrv_updateinfo...
Got -110 HID objects...
Quick update...
upsdrv_updateinfo...
Got 1 HID objects...
Path: UPS.PowerSummary.RunTimeToEmpty, Type: Input, ReportID: 0x35, Offset: 0, Size: 16, Value: 1581.000000
Quick update...
upsdrv_updateinfo...
Got 1 HID objects...
Path: UPS.PowerSummary.ACPresent, Type: Input, ReportID: 0x3c, Offset: 0, Size: 8, Value: 1.000000
Quick update...
upsdrv_updateinfo...
Got -110 HID objects...
Quick update...
upsdrv_updateinfo...
Got 1 HID objects...
Path: UPS.PowerSummary.BelowRemainingCapacityLimit, Type: Input, ReportID: 0x3d, Offset: 0, Size: 8, Value: 1.000000
Quick update...
upsdrv_updateinfo...
Got 1 HID objects...
Path: UPS.PowerSummary.ShutdownImminent, Type: Input, ReportID: 0x3e, Offset: 0, Size: 8, Value: 0.000000
Quick update...
upsdrv_updateinfo...
Got -110 HID objects...
Quick update...
upsdrv_updateinfo...
Got -110 HID objects...
Full update...
Path: UPS.PowerSummary.Voltage, Type: Feature, ReportID: 0x31, Offset: 0, Size: 16, Value: 1149.000000
Path: UPS.PowerSummary.ConfigVoltage, Type: Feature, ReportID: 0x30, Offset: 0, Size: 16, Value: 12.000000
Path: UPS.PowerSummary.RemainingCapacity, Type: Feature, ReportID: 0x34, Offset: 0, Size: 8, Value: 100.000000
Path: UPS.PowerSummary.RunTimeToEmpty, Type: Feature, ReportID: 0x35, Offset: 0, Size: 16, Value: 1566.000000
Path: UPS.PowerSummary.iDeviceChemistry, Type: Feature, ReportID: 0x2a, Offset: 0, Size: 8, Value: 26.000000
upsdrv_updateinfo...
Got 1 HID objects...
Path: UPS.PowerSummary.Charging, Type: Input, ReportID: 0x2d, Offset: 0, Size: 8, Value: 1.000000
Quick update...
upsdrv_updateinfo...
Got -110 HID objects...
Quick update...
upsdrv_updateinfo...
Got 1 HID objects...
Path: UPS.PowerSummary.Discharging, Type: Input, ReportID: 0x2e, Offset: 0, Size: 8, Value: 0.000000
Quick update...
upsdrv_updateinfo...
Got 1 HID objects...
Path: UPS.PowerSummary.RemainingCapacity, Type: Input, ReportID: 0x34, Offset: 0, Size: 8, Value: 100.000000
Quick update...
upsdrv_updateinfo...
Got -110 HID objects...
Quick update...
upsdrv_updateinfo...
Got 1 HID objects...
Path: UPS.PowerSummary.RunTimeToEmpty, Type: Input, ReportID: 0x35, Offset: 0, Size: 16, Value: 1552.000000
Quick update...
upsdrv_updateinfo...
Got 1 HID objects...
Path: UPS.PowerSummary.ACPresent, Type: Input, ReportID: 0x3c, Offset: 0, Size: 8, Value: 1.000000
Quick update...
upsdrv_updateinfo...
Got -110 HID objects...
Quick update...
upsdrv_updateinfo...
Got 1 HID objects...
Path: UPS.PowerSummary.BelowRemainingCapacityLimit, Type: Input, ReportID: 0x3d, Offset: 0, Size: 8, Value: 1.000000
Quick update...
upsdrv_updateinfo...
Got 1 HID objects...
Path: UPS.PowerSummary.ShutdownImminent, Type: Input, ReportID: 0x3e, Offset: 0, Size: 8, Value: 0.000000
Quick update...
More information about the Nut-upsdev
mailing list