APC UPS under Linux/Ubuntu (hardy 8.04/8.10)

  1. connect the UPS to your computer via the provided usb-cable
  2. install apcupsd and apcupsd-doc
  3. do everything to can to make your UPS visible via lsusb. Thats the hard one. You can try:
    1. modprobe usbhid
    2. run the make-hiddev - script coming with the apcups-doc - packages (/usr/share/doc/apcupsd/examples/make-hiddev)
    3. 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
    4. disconnect and reconnect your UPS
    5. check out apcupsd-usbmanual, especially the section about which drivers should be listed in /sys/bus/usb/drivers
    6. finally find the following line in the output of lsusb BoldBus 002 Device 002: ID 051d:0002 American Power Conversion Uninterruptible Power Supply Text
  4. edit /etc/apcupsd/apcupsd.conf and set the UPSCABLE and UPSTYPE to usb and DEVICE to empty. (full config below)
  5. edit /etc/defaults/apcupsd and set ISCONFIGURED to yes
  6. start the daemon with /etc/init.d/apcupsd start
  7. run apcaccess to check the status of your ups
  8. 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