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? 2) Can I use some other client to show info about the ups? 3) ps shows gnome-power-manager running. Why is it not doing anything? 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. Thanks!
Amadeus W. M. wrote:> 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? > 2) Can I use some other client to show info about the ups? > 3) ps shows gnome-power-manager running. Why is it not doing anything? > 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. > > Thanks! > > > > > _______________________________________________ > Nut-upsuser mailing list > Nut-upsuser at lists.alioth.debian.org > http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser > >First thing I can think of, and this isn't directly due to experience on the USB side, but if you do a 'lsusb -vv' it will supply more information on if the system has seen and loaded a driver for the UPS it is seeing, otherwise it could just be pulling the vendor information from the USB IC on the UPS. I think you can find the answers to #4 with that verbose lsusb, which shows you a lot of the information that matches the udev information. I will try to help as much as possible, but my UPS is on a Fedora 7 box right now, and I use RS232 for mine (it is a rack system and I didn't feel like losing the UPS monitoring just because I pulled the chassis out a bit, heh) Regards, Seann
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/
Hi, please keep the list cc'ed for info... 2008/4/3, Amadeus W. M. <amadeus84 at verizon.net>:> Thanks for the very informative answers. Please see below though. > > > > > 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) > > > > > I don't see hald-addon-usbhid-ups, but > > [root at phoenix ~]# ps auxfwww | grep hid > root 6733 0.0 0.6 12768 10500 ? S Mar30 0:01 \_ > hald-addon-hid-ups: listening on /dev/hiddev0 > > Is this what you mean?no, this is the "old" driver, provided by HAL. this should be removed, and you might want to (re)move it in order not to conflict with the nut one.> > > 2) Can I use some other client to show info about the ups? > > > > hal-device-manager and lshal > > > > > Again, I assume you mean hal-device (no manager). Both hal-device and > lshal show CyberPower. Things like > > info.product = 'CP1500 AVR UPS' (string) > > info.vendor = 'Cyber Power System, Inc.' (string) > > usb_device.product = 'CP1500 AVR UPS' (string) (this is wrong, it's > actually CP825). > > info.linux.driver = 'usbhid' (string) > > usb.vendor = 'Cyber Power System, Inc.' (string) > > > etc. and a bunch of info which I assume describes the actual status of > the unit: > > > battery.charge_level.current = 100 (0x64) (int) > battery.remaining_time = 1170 (0x492) (int) > etc. > > So I guess it's working then. Just hope it will actually shut down the > pc when the time comes.there seems to be a regression, at least in the latest GPM (2.20/2.22) http://bugzilla.gnome.org/show_bug.cgi?id=467967 so you might have a bad surprise here.> Excellent job! Thanks!thanks 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/