[Nut-upsuser] nut with hal on Fedora 8
Arnaud Quette
aquette.dev at gmail.com
Wed Apr 2 14:10:50 UTC 2008
2008/3/31, Amadeus W. M. <amadeus84 at verizon.net>:
> I bought a new CyberPower CP850AVRLCD ups, connected it to a usb port
> and I'm trying to use it with hal. I installed
>
> [root at phoenix ~]# rpm -q nut nut-client
> nut-2.2.0-6.1.fc8
> nut-client-2.2.0-6.1.fc8
>
> lsusb sees it:
>
> [root at phoenix docs]# lsusb
> Bus 001 Device 001: ID 0000:0000
> Bus 005 Device 002: ID 0c45:1050 Microdia
> Bus 005 Device 001: ID 0000:0000
> Bus 004 Device 001: ID 0000:0000
> Bus 003 Device 003: ID 413c:3200 Dell Computer Corp. Mouse
> Bus 003 Device 002: ID 04f9:01a8 Brother Industries, Ltd
> Bus 003 Device 001: ID 0000:0000
> Bus 002 Device 003: ID 0764:0501 Cyber Power System, Inc. CP1500 AVR UPS
> Bus 002 Device 001: ID 0000:0000
>
> After reading the nut-hal.txt file I checked to see if I have the fdi
> file. I do have it and I did find the 0764:0501 ID in there:
>
> <!-- CyberPower -->
> <match key="usb_device.vendor_id" int="0x0764">
> <match key="usb_device.product_id" int="0x0005">
> <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>
> <match key="usb_device.product_id" int="0x0501">
> <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>
> </match>
>
>
> I also noticed I have a udev rules file:
>
> [root at phoenix docs]# grep -A 2 -i
> cyberpower /etc/udev/rules.d/52_nut-usbups.rules
> # CyberPower - usbhid-ups
> ATTR{idVendor}=="0764", ATTR{idProduct}=="0005", MODE="664",GROUP="uucp"
> ATTR{idVendor}=="0764", ATTR{idProduct}=="0501", MODE="664",GROUP="uucp"
>
>
> I stopped and restarted the hal daemon, then plugged in the usb cable,
> but nothing happened. As per nat-hal.txt, the gnome power manager should
> have popped up. Nothing happened. I exited the X-server and logged
> started it again (gnome), unplugged the cord then plugged it back in,
> again nothing happened. So:
>
> 1) How do I actually check that my setup is working?
when you plug your unit, you should see the hald-addon-usbhid-ups
loaded (using ps)
> 2) Can I use some other client to show info about the ups?
hal-device-manager and lshal
> 3) ps shows gnome-power-manager running. Why is it not doing anything?
from the Power Management menu entry (Gnome System-> Pref menu), it
might be configured to only show the tray if the battery is charging
or discharging. You might prefer to show always, or to show when a
battery is present.
> 4) For my curiosity, which of the fdi and the udev rules files is being
> used, and how can I tell? Which one should be used? Can there be any
> conflicts? My knowledge about udev and hal is too vague.
both are used. udev for applying the privs on the /dev/bus/usb/XXX/YYY
file, and the fdi for hal to load the right addon. Yep there can be
conflicts. so considering your above udev file, you will want to add
hal to uucp
Arnaud
--
Linux / Unix Expert R&D - MGE Office Protection Systems - http://www.mgeops.com
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://people.debian.org/~aquette/
Free Software Developer - http://arnaud.quette.free.fr/
More information about the Nut-upsuser
mailing list