DeviceKit-power: USB/HID UPS rules update

Arnaud Quette aquette.dev at gmail.com
Mon Jul 27 04:27:26 PDT 2009


Hi Richard,

2009/7/26 Richard Hughes <hughsient at gmail.com>

> 2009/7/24 Arnaud Quette <aquette.dev at gmail.com>:
> > you'll find attached a small patch for DeviceKit-power that update,
> complete
> > and sanitize the USB/HID UPS rules file.
>
> Ohh, could you prepare a patch against git master please.
>

ooops, sorry. I was off the path.
you'll find atttached a new one, on git master this time.


>  > note that I can automatically generate this file in the NUT tree, so
> that
> > you can easilly keep track of update from NUT. just tell me if you are
> > interested.
>
> Yes, that would be good, thanks.
>

the attached one is the result of this auto generation.
the root file (as mentioned in the header) is located here:
http://svn.debian.org/wsvn/nut/trunk/scripts/dkp/95-devkit-power-hid.rules

If you have some compat submission on your side, don't forget to cc me (just
in case I don't react, since I'm also monitoring this list...)

as a side note, the Kebo entry (0925:1234), which is also known as Sweex, is
not a HID compliant unit.
it exposes a HID interface, but talks Richcomm dry-contact.
thus, removed from the list.

 > btw, there is a typo error on "DKP_DEVICE_TECHNOLGY_*" defines.
>
> I think I've already fixed these up.
>

indeed, it's already fixed.

I'll soon get back with some features and improvements propositions.
I just need some more investigation on the NUT side to validate a few
things...

thanks for putting back on the right track ;-)

cheers,
Arnaud
-- 
Linux / Unix Expert R&D - Eaton - http://www.eaton.com/mgeops
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.free.fr/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/devkit-devel/attachments/20090727/f771ae10/attachment.html 
-------------- next part --------------
diff --git a/rules/95-devkit-power-hid.rules b/rules/95-devkit-power-hid.rules
index 464aefa..7d12ca7 100644
--- a/rules/95-devkit-power-hid.rules
+++ b/rules/95-devkit-power-hid.rules
@@ -1,6 +1,7 @@
 ##############################################################################################################
-# Uninterruptable Power Supplies with USB HID interfaces
+# Uninterruptible Power Supplies with USB HID interfaces
 #
+# to keep up to date, monitor: http://svn.debian.org/wsvn/nut/trunk/scripts/dkp/95-devkit-power-hid.rules
 
 # only support USB, else ignore
 SUBSYSTEM!="usb", GOTO="dkp_hid_end"
@@ -11,33 +12,22 @@ KERNEL!="hiddev*", GOTO="dkp_hid_end"
 # if an interface, ignore
 ENV{DEVTYPE}=="usb_interface", GOTO="dkp_hid_end"
 
-ATTRS{idVendor}=="0463", ENV{DKP_VENDOR}="MGE Systems"
-ATTRS{idVendor}=="051d", ENV{DKP_VENDOR}="APC"
-ATTRS{idVendor}=="0764", ENV{DKP_VENDOR}="CyberPower"
-ATTRS{idVendor}=="09ae", ENV{DKP_VENDOR}="Tripp Lite"
-ATTRS{idVendor}=="050d", ENV{DKP_VENDOR}="Belkin"
-ATTRS{idVendor}=="06da", ENV{DKP_VENDOR}="Liebert"
-ATTRS{idVendor}=="0925", ENV{DKP_VENDOR}="Kebo"
+ATTRS{idVendor}=="0x03f0", ENV{DKP_VENDOR}="Hewlett Packard"
+ATTRS{idVendor}=="0x0463", ENV{DKP_VENDOR}="Eaton"
+ATTRS{idVendor}=="0x050d", ENV{DKP_VENDOR}="Belkin"
+ATTRS{idVendor}=="0x051d", ENV{DKP_VENDOR}="APC"
+ATTRS{idVendor}=="0x06da", ENV{DKP_VENDOR}="Liebert"
+ATTRS{idVendor}=="0x0764", ENV{DKP_VENDOR}="Cyber Power Systems"
+ATTRS{idVendor}=="0x09ae", ENV{DKP_VENDOR}="TrippLite"
 
-# MGE UPS SYSTEMS
+# Hewlett Packard
+ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="1f06", ENV{DKP_BATTERY_TYPE}="ups"
+ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="1f0a", ENV{DKP_BATTERY_TYPE}="ups"
+
+# Eaton
 ATTRS{idVendor}=="0463", ATTRS{idProduct}=="0001", ENV{DKP_BATTERY_TYPE}="ups"
 ATTRS{idVendor}=="0463", ATTRS{idProduct}=="ffff", ENV{DKP_BATTERY_TYPE}="ups"
 
-# APC
-ATTRS{idVendor}=="051d", ATTRS{idProduct}=="0002", ENV{DKP_BATTERY_TYPE}="ups"
-
-# CyberPower
-ATTRS{idVendor}=="0764", ATTRS{idProduct}=="0005", ENV{DKP_BATTERY_TYPE}="ups"
-ATTRS{idVendor}=="0764", ATTRS{idProduct}=="0501", ENV{DKP_BATTERY_TYPE}="ups"
-
-# Tripp Lite
-ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="1003", ENV{DKP_BATTERY_TYPE}="ups"
-ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="2005", ENV{DKP_BATTERY_TYPE}="ups"
-ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="2007", ENV{DKP_BATTERY_TYPE}="ups"
-ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="3012", ENV{DKP_BATTERY_TYPE}="ups"
-ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="4002", ENV{DKP_BATTERY_TYPE}="ups"
-ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="4003", ENV{DKP_BATTERY_TYPE}="ups"
-
 # Belkin
 ATTRS{idVendor}=="050d", ATTRS{idProduct}=="0375", ENV{DKP_BATTERY_TYPE}="ups"
 ATTRS{idVendor}=="050d", ATTRS{idProduct}=="0551", ENV{DKP_BATTERY_TYPE}="ups"
@@ -48,11 +38,25 @@ ATTRS{idVendor}=="050d", ATTRS{idProduct}=="0912", ENV{DKP_BATTERY_TYPE}="ups"
 ATTRS{idVendor}=="050d", ATTRS{idProduct}=="0980", ENV{DKP_BATTERY_TYPE}="ups"
 ATTRS{idVendor}=="050d", ATTRS{idProduct}=="1100", ENV{DKP_BATTERY_TYPE}="ups"
 
+# APC
+ATTRS{idVendor}=="051d", ATTRS{idProduct}=="0002", ENV{DKP_BATTERY_TYPE}="ups"
+
 # Liebert
 ATTRS{idVendor}=="06da", ATTRS{idProduct}=="ffff", ENV{DKP_BATTERY_TYPE}="ups"
 
-# Kebo
-ATTRS{idVendor}=="0925", ATTRS{idProduct}=="1234", ENV{DKP_BATTERY_TYPE}="ups"
+# Cyber Power Systems
+ATTRS{idVendor}=="0764", ATTRS{idProduct}=="0005", ENV{DKP_BATTERY_TYPE}="ups"
+ATTRS{idVendor}=="0764", ATTRS{idProduct}=="0501", ENV{DKP_BATTERY_TYPE}="ups"
 
-LABEL="dkp_hid_end"
+# TrippLite
+ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="1003", ENV{DKP_BATTERY_TYPE}="ups"
+ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="1007", ENV{DKP_BATTERY_TYPE}="ups"
+ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="2005", ENV{DKP_BATTERY_TYPE}="ups"
+ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="2007", ENV{DKP_BATTERY_TYPE}="ups"
+ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="3012", ENV{DKP_BATTERY_TYPE}="ups"
+ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="3014", ENV{DKP_BATTERY_TYPE}="ups"
+ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="4001", ENV{DKP_BATTERY_TYPE}="ups"
+ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="4002", ENV{DKP_BATTERY_TYPE}="ups"
+ATTRS{idVendor}=="09ae", ATTRS{idProduct}=="4003", ENV{DKP_BATTERY_TYPE}="ups"
 
+LABEL="dkp_hid_end"



More information about the devkit-devel mailing list