I bought a Tripp-Lite OMNI900LCD, but it has a productid of 2009 instead of
2007.  The attached patch works with the ups.
diff -Naur nut-2.4.3/drivers/tripplite-hid.c nut-2.4.3.patched/drivers/tripplite-hid.c
--- nut-2.4.3/drivers/tripplite-hid.c	2010-02-11 16:52:47.000000000 -0500
+++ nut-2.4.3.patched/drivers/tripplite-hid.c	2010-10-16 17:04:13.318920769 -0400
@@ -71,6 +71,7 @@
 	{ USB_DEVICE(TRIPPLITE_VENDORID, 0x2005), battery_scale_0dot1 },
 	/* e.g. TrippLite OMNI900LCD */
 	{ USB_DEVICE(TRIPPLITE_VENDORID, 0x2007), battery_scale_0dot1 },
+	{ USB_DEVICE(TRIPPLITE_VENDORID, 0x2009), battery_scale_0dot1 },
 	/* e.g. TrippLite smart2200RMXL2U */
 	{ USB_DEVICE(TRIPPLITE_VENDORID, 0x3012), battery_scale_1dot0 },
 	/* e.g. ? */
diff -Naur nut-2.4.3/scripts/hal/ups-nut-device.fdi.in nut-2.4.3.patched/scripts/hal/ups-nut-device.fdi.in
--- nut-2.4.3/scripts/hal/ups-nut-device.fdi.in	2010-02-23 05:12:20.000000000 -0500
+++ nut-2.4.3.patched/scripts/hal/ups-nut-device.fdi.in	2010-10-16 17:04:57.496914108 -0400
@@ -283,6 +283,12 @@
           <merge key="info.addons" type="strlist">hald-addon-usbhid-ups</merge>
           <merge key="battery.type" type="string">ups</merge>
         </match>
+        <match key="usb_device.product_id" int="0x2009">
+          <append key="info.category" type="string">battery</append>
+          <merge key="info.capabilities" type="strlist">battery</merge>
+          <merge key="info.addons" type="strlist">hald-addon-usbhid-ups</merge>
+          <merge key="battery.type" type="string">ups</merge>
+        </match>
         <!--  e.g. TrippLite smart2200RMXL2U  -->
         <match key="usb_device.product_id" int="0x3012">
           <append key="info.category" type="string">battery</append>
diff -Naur nut-2.4.3/scripts/hotplug/libhid.usermap nut-2.4.3.patched/scripts/hotplug/libhid.usermap
--- nut-2.4.3/scripts/hotplug/libhid.usermap	2010-02-23 05:12:20.000000000 -0500
+++ nut-2.4.3.patched/scripts/hotplug/libhid.usermap	2010-10-16 17:05:28.108926882 -0400
@@ -90,6 +90,7 @@
 libhidups      0x0003      0x09ae   0x2005    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
 #  e.g. TrippLite OMNI900LCD 
 libhidups      0x0003      0x09ae   0x2007    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
+libhidups      0x0003      0x09ae   0x2009    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
 #  e.g. TrippLite smart2200RMXL2U 
 libhidups      0x0003      0x09ae   0x3012    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
 #  e.g. ? 
diff -Naur nut-2.4.3/scripts/udev/nut-usbups.rules.in nut-2.4.3.patched/scripts/udev/nut-usbups.rules.in
--- nut-2.4.3/scripts/udev/nut-usbups.rules.in	2010-02-23 05:12:20.000000000 -0500
+++ nut-2.4.3.patched/scripts/udev/nut-usbups.rules.in	2010-10-16 17:05:59.419915778 -0400
@@ -92,6 +92,7 @@
 ATTR{idVendor}=="09ae", ATTR{idProduct}=="2005", MODE="664", GROUP="@RUN_AS_GROUP@"
 #  e.g. TrippLite OMNI900LCD  - usbhid-ups
 ATTR{idVendor}=="09ae", ATTR{idProduct}=="2007", MODE="664", GROUP="@RUN_AS_GROUP@"
+ATTR{idVendor}=="09ae", ATTR{idProduct}=="2009", MODE="664", GROUP="@RUN_AS_GROUP@"
 #  e.g. TrippLite smart2200RMXL2U  - usbhid-ups
 ATTR{idVendor}=="09ae", ATTR{idProduct}=="3012", MODE="664", GROUP="@RUN_AS_GROUP@"
 #  e.g. ?  - usbhid-ups
_______________________________________________
Nut-upsdev mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev

Reply via email to