Skip to main content

APC Uninterruptible Power Supply (UPS) - Apcupsd Master / Slave Configuration

212 words·
APC UPS apcupsd

APC Uninterruptible Power Supply (UPS)
#

Link: https://help.ubuntu.com/community/apcupsd

Check if UPS is connected
#

# List USB devices
lsusb

# Shell output:
Bus ... American Power Conversion UPS

Master Installation
#

# Update package index
sudo apt update

# Instal package
sudo apt install apcupsd -y

Master Configuration
#

# Open config
sudo vi /etc/apcupsd/apcupsd.conf
# Configuration
UPSCABLE usb  # Use USB connection
UPSTYPE usb # USB device

DEVICE /dev/ttyS0 # Uncomment device

NISIP 0.0.0.0 # Use all interfaces for slave communication
NISPORT 3551 # Use standard port
# Restart service after installation
sudo systemctl restart apcupsd

# Start & enable
sudo systemctl start apcupsd && sudo systemctl enable apcupsd


# Check status
systemctl status apcupsd

# Shell output:
...
DRIVER   : USB UPS Driver
STATUS   : ONLINE

Slave Installation
#

# Update package index
sudo apt update

# Instal package
sudo apt install apcupsd -y

Slave Configuration
#

# Open config
sudo vi /etc/apcupsd/apcupsd.conf
# Configuration
upstype net
device 192.168.30.10:3551 # Define master IP


# Check status
apcaccess status

# Shell output:
...
DRIVER   : NETWORK UPS Driver
MASTER   : 192.168.30.10:3551
STATUS   : ONLINE SLAVE

Selftest Menu
#

# Stop service
sudo systemctl stop apcupsd

# Open selftest menu
sudo apctest

More Configuration Settings
#

# Define server shutdown
BATTERYLEVEL 10