1.2.10. fejezet, APC Back-UPS 350

dmesg

[    5.088070] usb 2-1: New USB device found, idVendor=051d, idProduct=0002
[    5.088102] usb 2-1: New USB device strings: Mfr=3, Product=1, SerialNumber=2
[    5.088130] usb 2-1: Product: Back-UPS 350 FW: 5.2.I USB FW: c1 
[    5.088154] usb 2-1: Manufacturer: American Power Conversion
[    5.088178] usb 2-1: SerialNumber: AB0123456789

apcupsd telepítés

sudo apt-get install apcupsd
sudo nano /etc/apcupsd/apcupsd.conf
sudo nano /etc/default/apcupsd
ISCONFIGURED=yes

apcupsd.conf

UPSCABLE smart
UPSTYPE usb
DEVICE /dev/usb/hiddev[0-15]
LOCKFILE /var/lock
ONBATTERYDELAY 6
BATTERYLEVEL 5
MINUTES 3
TIMEOUT 0
ANNOY 300
ANNOYDELAY 60
NOLOGON disable
KILLDELAY 0
NETSERVER on
NISIP 0.0.0.0
NISPORT 3551
EVENTSFILE /var/log/apcupsd.events
EVENTSFILEMAX 10
UPSCLASS standalone
UPSMODE disable
STATTIME 0
STATFILE /var/log/apcupsd.status
LOGSTATS off
DATATIME 0

teszt

sudo service apcupsd restart
sudo apcaccess

válasz

APC      : 001,023,0595
DATE     : 2016-05-05 16:00:01 +0200  
HOSTNAME : debian
VERSION  : 3.14.10 (13 September 2011) debian
UPSNAME  : debian
CABLE    : USB Cable
DRIVER   : USB UPS Driver
UPSMODE  : Stand Alone
STARTTIME: 2016-05-05 15:59:59 +0200  
MODEL    : Back-UPS 350 
STATUS   : ONLINE 
BCHARGE  : 100.0 Percent
TIMELEFT :  43.0 Minutes
MBATTCHG : 5 Percent
MINTIMEL : 3 Minutes
MAXTIME  : 0 Seconds
NUMXFERS : 0
TONBATT  : 0 seconds
CUMONBATT: 0 seconds
XOFFBATT : N/A
STATFLAG : 0x07000008 Status Flag
SERIALNO : AB0123456789
FIRMWARE : 5.2.I USB FW: c1 
END APC  : 2016-05-05 16:00:05 +0200  

CGI

sudo apt-get install apcupsd-cgi
http://server-ip/cgi-bin/apcupsd/multimon.cgi