Difference between revisions of "CyberPower UPS"

From ArchWiki
Jump to: navigation, search
(Created page with "Category:Power management This document describes how to install the CyberPower UPS daemon. The main advantage of using a CyberPower UPS is that it is cheap and it can com...")
 
(Install Procedure)
Line 14: Line 14:
  
 
In the following example, the lines of text are changed to support a USB style cable:
 
In the following example, the lines of text are changed to support a USB style cable:
{{bc|
+
{{bc| vim install.sh|2=
vim install.sh
+
 
#!/bin/sh
 
#!/bin/sh
  
Line 112: Line 111:
 
/bin/chmod 644 /usr/share/man/man8/pwrstatd.8.gz
 
/bin/chmod 644 /usr/share/man/man8/pwrstatd.8.gz
  
 
+
}}
  
 
if you try and run /usr/bin/pwrstat you should get "Daemon service is not found." So you need to create a custom service as below
 
if you try and run /usr/bin/pwrstat you should get "Daemon service is not found." So you need to create a custom service as below
{{
+
{{hc|
#vim /etc/systemd/system/pwrstatd.service
+
# vim /etc/systemd/system/pwrstatd.service|2=
 
[Unit]
 
[Unit]
Description=The PowerPanel Service for Linux to monitor CyberPower UPS
+
Description&#61The PowerPanel Service for Linux to monitor CyberPower UPS
  
 
[Service]
 
[Service]
Type=simple
+
Type&#61simple
ExecStart=/usr/sbin/pwrstatd
+
ExecStart&#61/usr/sbin/pwrstatd
  
 
[Install]
 
[Install]
WantedBy=multi-user.target
+
WantedBy&#61multi-user.target
 
}}
 
}}
  
run the service
+
Run the service
{{
+
{{bc|
 
#systemctl start pwrstatd
 
#systemctl start pwrstatd
 
#systemctl enable pwrstatd
 
#systemctl enable pwrstatd
Line 135: Line 134:
  
 
Then run  
 
Then run  
{{
+
{{ic|#pwrstat -status}}
#pwrstat -status
+
}}
+
  
 
You should get something like this
 
You should get something like this

Revision as of 10:01, 14 August 2013

This document describes how to install the CyberPower UPS daemon. The main advantage of using a CyberPower UPS is that it is cheap and it can communicate with your Linux box through either a RS-232 or USB serial connection. In the event of a prolonged power outage, should the CyberPower UPS lose most of its battery capacity, it can tell the Linux box to perform a safe shutdown.

Download and Extract the package

Download the PowerPanel tar.gz package from here: http://www.cpsww.com.au/products/ups_systems/Value_soho/value600ei.htm

tar -zxvf package

Install Procedure

The latest PowerPanel version 1.2.3-0, only include support for rc.d, as such some manual intervention is needed. Using the included install.sh file as template, it needs to be modified for systemd so it should look like this:

In the following example, the lines of text are changed to support a USB style cable:

 vim install.sh

if you try and run /usr/bin/pwrstat you should get "Daemon service is not found." So you need to create a custom service as below

# vim /etc/systemd/system/pwrstatd.service
[Unit]
Description&#61The PowerPanel Service for Linux to monitor CyberPower UPS

[Service]
Type&#61simple
ExecStart&#61/usr/sbin/pwrstatd

[Install]
WantedBy&#61multi-user.target

Run the service

#systemctl start pwrstatd
#systemctl enable pwrstatd

Then run #pwrstat -status

You should get something like this


The UPS information shows as following:

        Properties:
                Model Name...................  Value 1500E
                Firmware Number.............. BFF7104#7N5
                Rating Voltage............... 230 V
                Rating Power................. 900 Watt
 
        Current UPS status:
                State........................ Normal
                Power Supply by.............. Utility Power
                Utility Voltage.............. 230 V
                Output Voltage............... 230 V
                Battery Capacity............. 100 %
                Remaining Runtime............ 61 min.
                Load......................... 126 Watt(14 %)
                Line Interaction............. None
                Test Result.................. Unknown
                Last Power Event............. None