[Nut-upsuser] Status OB (on battery) when polling a Liebert PSA
Pier Paolo Glave
pierpaolo.glave at gmail.com
Fri Feb 11 11:08:55 UTC 2011
>>> I'm ready now to go on with NUT configuration: I think I'm able now to
>>> have a controlled PC shutdown.
>>> I'll let you know how it goes.
>>
>> That's also something I would be interested in.
>
Hi Arjen and all,
I succeeded in having a controlled shutdown, when the UPS went in
low-battery status.
I'm happy with the result.
However, I've just realized that I had also done another change in the
drivers' source code: I changed the belkin-hid.c and liebert-hid.c
drivers, in order to select the liebert driver, instead of the belkin
one, when my vendor ID was found.
Without this change, I'm not able to correctly see the online/on
battery status (I always see "on battery"), even with the suggested
change in libhid.c.
In detail, my change is the following:
--- belkin-hid.c.orig 2011-02-04 11:09:00.000000000 +0100
+++ belkin-hid.c 2011-02-04 11:12:01.000000000 +0100
@@ -34,7 +34,7 @@
#define BELKIN_VENDORID 0x050d
/* Liebert */
-#define LIEBERT_VENDORID 0x10af
+//#define LIEBERT_VENDORID 0x10af
/* USB IDs device table */
static usb_device_id_t belkin_usb_device_table[] = {
@@ -58,7 +58,7 @@
{ USB_DEVICE(BELKIN_VENDORID, 0x1100), NULL },
/* Liebert PowerSure PSA UPS */
- { USB_DEVICE(LIEBERT_VENDORID, 0x0001), NULL },
+ //{ USB_DEVICE(LIEBERT_VENDORID, 0x0001), NULL },
/* Terminating entry */
{ -1, -1, NULL }
@@ -449,7 +449,7 @@
}
possibly_supported("Belkin", hd);
return 0;
-
+#if 0
case LIEBERT_VENDORID:
/* by default, reject, unless the productid
option is given */
if (getval("productid")) {
@@ -457,6 +457,7 @@
}
possibly_supported("Liebert", hd);
return 0;
+#endif
}
--- liebert-hid.c.orig 2011-02-04 11:09:11.000000000 +0100
+++ liebert-hid.c 2011-02-04 11:10:25.000000000 +0100
@@ -30,12 +30,15 @@
/* FIXME: experimental flag to be put in upsdrv_info */
/* Liebert */
-#define LIEBERT_VENDORID 0x06da
+//#define LIEBERT_VENDORID 0x06da
+#define LIEBERT_VENDORID 0x10af
/* USB IDs device table */
static usb_device_id_t liebert_usb_device_table[] = {
/* various models */
- { USB_DEVICE(LIEBERT_VENDORID, 0xffff), NULL },
+ //{ USB_DEVICE(LIEBERT_VENDORID, 0xffff), NULL },
+ /* Liebert PowerSure PSA UPS */
+ { USB_DEVICE(LIEBERT_VENDORID, 0x0001), NULL },
/* Terminating entry */
{ -1, -1, NULL }
Best regards,
Pier
More information about the Nut-upsuser
mailing list