USV

Aus brainelectronics Wiki
Wechseln zu: Navigation, Suche

Installtion

Control Software

   $ sudo apt-get install apcupsd

Web Service

   $ sudo apt-get install apcupsd-cgi

Konfiguration

   $ sudo cp /etc/apcupsd/apcupsd.conf /etc/apcupsd/apcupsd.conf.bak
   $ sudo nano /etc/apcupsd/apcupsd.conf

Nachfolgende Einstellungen beziehen sich auf eine USB USV mit dem Namen "testUSV" für das Log File, einem Shutdown des Systems nach 5 Minuten oder falls der Batterielevel unter 20% fällt.

UPSNAME testUSV
UPSCABLE usb
UPSTYPE usb     
DEVICE ---------- keep blank in usb mode
BATTERYLEVEL 20
MINUTES 5
 
   $ sudo nano /etc/default/apcupsd

Konfiguration des config files bestätigen

ISCONFIGURED=yes
 

Daemon neu starten

   $ sudo systemctl restart apcupsd.service

Statusabfrage

Terminal

   $ apcaccess
APC      : 001,018,0440
DATE     : 2017-08-29 21:25:48 +0200  
HOSTNAME : Jessy
VERSION  : 3.14.12 (29 March 2014) debian
UPSNAME  : piUSV
CABLE    : USB Cable
DRIVER   : USB UPS Driver
UPSMODE  : Stand Alone
STARTTIME: 2017-08-29 21:25:38 +0200
MODEL    : Back-UPS RS 1500G
STATUS   : ONLINE
LINEV    : 224.0 Volts
LOADPCT  : 10.0 Percent
BCHARGE  : 100.0 Percent
TIMELEFT : 66.7 Minutes
MBATTCHG : 20 Percent
MINTIMEL : 5 Minutes
MAXTIME  : 0 Seconds
SENSE    : Medium
LOTRANS  : 176.0 Volts
HITRANS  : 294.0 Volts
ALARMDEL : No alarm
BATTV    : 27.2 Volts
LASTXFER : Unacceptable line voltage changes
NUMXFERS : 0
TONBATT  : 0 Seconds
CUMONBATT: 0 Seconds
XOFFBATT : N/A
SELFTEST : NO
STATFLAG : 0x05000100
SERIALNO : 3Q1106X37131
BATTDATE : 2012-07-05
NOMINV   : 230 Volts
NOMBATTV : 24.0 Volts
NOMPOWER : 865 Watts
FIRMWARE : 878.L4 .I USB FW:L4
END APC  : 2017-08-29 21:25:48 +0200 
 

Browser

Dafür muss der Web Service installiert sein.
http://localhost/cgi-bin/apcupsd/multimon.cgi zeigt die basis Informationen an, mit einem klick auf "Local Host" werden detailiertere Informationen angezeigt.
USV Webinterface

Tests

Zum Testen der USV in regelmäßigen Abständen. Dafür muss der Service temporär deaktiviert werden.

   $ systemctl stop apcupsd
   $ apctest
2017-10-30 19:26:35 apctest 3.14.12 (29 March 2014) debian
Checking configuration ...
sharenet.type = Network & ShareUPS Disabled
cable.type = USB Cable
mode.type = USB UPS Driver
Setting up the port ...
Doing prep_device() ...

You are using a USB cable type, so I'm entering USB test mode
Hello, this is the apcupsd Cable Test program.
This part of apctest is for testing USB UPSes.

Getting UPS capabilities...SUCCESS

Please select the function you want to perform.

1)  Test kill UPS power
2)  Perform self-test
3)  Read last self-test result
4)  View/Change battery date
5)  View manufacturing date
6)  View/Change alarm behavior
7)  View/Change sensitivity
8)  View/Change low transfer voltage
9)  View/Change high transfer voltage
10) Perform battery calibration
11) Test alarm
12) View/Change self-test interval
 Q) Quit

Select function number:
 

Self Test

1)  Test kill UPS power
2)  Perform self-test
3)  Read last self-test result
4)  View/Change battery date
5)  View manufacturing date
6)  View/Change alarm behavior
7)  View/Change sensitivity
8)  View/Change low transfer voltage
9)  View/Change high transfer voltage
10) Perform battery calibration
11) Test alarm
12) View/Change self-test interval
 Q) Quit

Select function number: 2

This test instructs the UPS to perform a self-test
operation and reports the result when the test completes.

Clearing previous self test result...CLEARED
Initiating self test...INITIATED
Waiting for test to complete...COMPLETED
Result of last self test: PASSED
 

Battery calibration

1)  Test kill UPS power
2)  Perform self-test
3)  Read last self-test result
4)  View/Change battery date
5)  View manufacturing date
6)  View/Change alarm behavior
7)  View/Change sensitivity
8)  View/Change low transfer voltage
9)  View/Change high transfer voltage
10) Perform battery calibration
11) Test alarm
12) View/Change self-test interval
 Q) Quit

Select function number: 10

This test instructs the UPS to perform a battery calibration
operation and reports the result when the process completes.
The battery level must be at 100% and the load must be at least
10% to begin this test.

Battery level is 100% -- OK
Load level is 12% -- OK
Clearing previous self test result...CLEARED

The battery calibration should automatically end
when the battery level drops below about 25%.
This process can take minutes or hours, depending on
the size of your UPS and the load attached.

Initiating battery calibration...INITIATED

Waiting for calibration to complete...
To abort the calibration, press ENTER.
Battery level: 100%
Battery level: 84%
Battery level: 71%
Battery level: 70%........
Battery level: 69%...........
Battery level: 68%........
Battery level: 67%.......
Battery level: 66%.......
Battery level: 65%........
Battery level: 64%.......
Battery level: 63%............
Battery level: 62%.......
Battery level: 61%........
Battery level: 60%.......
Battery level: 59%.
Battery level: 54%......
Battery level: 53%.......
Battery level: 52%............
Battery level: 51%.
Battery level: 48%
Battery level: 47%
Battery level: 46%............
Battery level: 45%........
Battery level: 44%..
Battery level: 41%
Battery level: 39%...........
Battery level: 38%..........
Battery level: 35%
Battery level: 34%....
Battery level: 33%..............
Battery level: 27%.............
Battery level: 26%....
CALIBRATION COMPLETED
Result of last self test: PASSED
 

Credits

APC UPS on Ubuntu
ubuntuusers Wiki Apcupsd
Ubuntu Help Apcupsd
Apctest Man Page