Mike
2009-Nov-10 05:46 UTC
[Nut-upsdev] [PATCH] Add support for Liebert PowerSure PSA to liebert-hid.c
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
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 #)
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. I set
this up in a hurry today, with the goal of convincing NUT to recognize
this ups.
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.
--
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 --------------
A non-text attachment was scrubbed...
Name: liebert-hid-PowerSure_PSA.diff
Type: text/x-diff
Size: 490 bytes
Desc: not available
URL:
<http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20091110/a67572ec/attachment.diff>
Arjen de Korte
2009-Nov-10 07:22 UTC
[Nut-upsdev] [PATCH] Add support for Liebert PowerSure PSA to liebert-hid.c
Citeren Mike <pf-nut-upsdev op 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: 1172This 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