APC UPS under Linux/Ubuntu (hardy 8.04/8.10)
- connect the UPS to your computer via the provided usb-cable
- install apcupsd and apcupsd-doc
- do everything to can to make your UPS visible via lsusb. Thats the hard one. You can try:
- modprobe usbhid
- run the make-hiddev - script coming with the apcups-doc - packages (/usr/share/doc/apcupsd/examples/make-hiddev)
- add the following rule to /etc/udev/rules.d/50-udev.rules : KERNEL=”hiddev*”, NAME=”usb/hiddev%n” Bold Text and restart udev with /etc/init.d/udev stop/start
- disconnect and reconnect your UPS
- check out apcupsd-usbmanual, especially the section about which drivers should be listed in /sys/bus/usb/drivers
- finally find the following line in the output of lsusb BoldBus 002 Device 002: ID 051d:0002 American Power Conversion Uninterruptible Power Supply Text
- edit /etc/apcupsd/apcupsd.conf and set the UPSCABLE and UPSTYPE to usb and DEVICE to empty. (full config below)
- edit /etc/defaults/apcupsd and set ISCONFIGURED to yes
- start the daemon with /etc/init.d/apcupsd start
- run apcaccess to check the status of your ups
- disconnect power to your UPS and watch changes in apcaccess and /var/log/apcups.events and - if you are logged in via gnome - note the battery-symbol in the taskbar telling you the status of your battery
Note that I didnt try a reboot yet, maybe some steps like loading the usbhid-module and creating the hiddev-nodes needs to be done at every server-startup. If so, do so :)
Finally my apcupsd.conf (without comments)
UPSCABLE usb UPSTYPE usb DEVICE LOCKFILE /var/lock SCRIPTDIR /etc/apcupsd PWRFAILDIR /etc/apcupsd NOLOGINDIR /etc ONBATTERYDELAY 6 BATTERYLEVEL 5 MINUTES 3 TIMEOUT 0 ANNOY 300 ANNOYDELAY 60 NOLOGON disable KILLDELAY 0 NETSERVER on NISIP 127.0.0.1 NISPORT 3551 EVENTSFILE /var/log/apcupsd.events EVENTSFILEMAX 10 UPSCLASS standalone UPSMODE disable STATTIME 0 STATFILE /var/log/apcupsd.status LOGSTATS off DATATIME 0
knowwiki/hardware/apc_ups.txt · Last modified: 2008/08/28 15:43 by peter



