Network UPS

Installation

sudo apt update
sudo apt upgrade
sudo apt install nut

Configuration

  • Checking connected APC via USB port: lsusb

Bus 001 Device 004: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
In above screenshot, 051d is vendorID and 0002 is productID
  • Add UPS to /etc/nut/ups.conf:

[ups]
driver = usbhid-ups
desc = "APC UPS"
port = auto
vendorid = 051d
productid = 0002 
  • Change listening address in /etc/nut/upsd.conf: by default it listens on localhost only

LISTEN 0.0.0.0 3493
  • Add UPS Users to /etc/nut/upsd.users

  • Configure upsmon system:

  • Configure NUT Server /etc/nut/nut.conf

  • Restarting server after configuring

Testing

  • upsc -l: list UPS

  • upsc ups: check status of UPS ups

Installing and configuring NUT-GUI Server

  • Installing: sudo apt install apache2 nut-cgi

  • Configure /etc/nut/hosts.conf:

  • Enable CGI Apache module: sudo a2enmod cgi

  • Restart Apache server: sudo systemctl restart apache2

  • Accessing Nut's Web interface: http://$ipaddress/cgi-bin/nut/upsstats.cgi

Reference

Last updated