• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Aaron Weiss

  • Home
  • Blog
  • About
  • Contact
Multiple UPS on the same NUT-Server

Multiple UPS on the same NUT-Server

March 21, 2021 by Aaron Weiss

Previously, I’ve written about using a Raspberry Pi with Network UPS Tools (NUT) to manage multiple computers with one UPS device.

I recently decided to use a second UPS as I started building and configuring a separate Proxmox machine that has been repurposed from my former daily driver computer. My second UPS is a APC XS1300G that is about 5 years old. Originally, protected my entertainment equipment which used to be very elaborate, but now that has been mostly unused for the time being. I also wanted to learn how to manage multiple UPSs in NUT as well.

Adding the Second UPS

My original configuration in the /etc/nut/ups.conf is as follows:

[ups]
driver = usbhid-ups
port = auto
desc = "CyberPower CP825LCD"
pollinterval = 15

As you can see the port was set to auto. This would conflict if I wanted to add a second UPS.

After some frustration, it turns out you just need to specify the vendorid and the productid for all the UPS devices you want to manage. Here’s my original UPS with those codes:

[ups]
driver = usbhid-ups
port = auto
desc = "CyberPower CP825LCD"
vendorid = 0764
productid = 0501
pollinterval = 15

To add my second UPS, I’ve added the below configuration. I’ve also included the serial number (partially redacted to protect the innocent) for additional specificity for NUT. My original UPS device, the CP825, does not display the serial number.

[apcXS1300G]
driver = usbhid-ups
port = auto
desc = "APC Back-UPS 1300G"
serial = 3BXXXXXXXX54
vendorid = 051d
productid = 0002
pollinterval = 15

You’ll need to restart nut in order for the new UPS to appear. Run sudo systemctl restart nut-server. Give it a moment to rediscover all the UPSs.

Once that is done, when I run upsc apcXS1300G, I get the following result:

pi@worker11811-pi:/etc/nut $ upsc apcXS1300G
Init SSL without certificate database
battery.charge: 100
battery.charge.low: 10
battery.charge.warning: 50
battery.date: 2001/09/25
battery.mfr.date: 2016/04/21
battery.runtime: 12960
battery.runtime.low: 120
battery.type: PbAc
battery.voltage: 27.2
battery.voltage.nominal: 24.0
device.mfr: American Power Conversion
device.model: Back-UPS XS 1300G
device.serial: 3BXXXXXXXX54
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 15
driver.parameter.port: auto
driver.parameter.productid: 0002
driver.parameter.serial: 3BXXXXXXXX54
driver.parameter.synchronous: no
driver.parameter.vendorid: 051d
driver.version: 2.7.4
driver.version.data: APC HID 0.96
driver.version.internal: 0.41
input.sensitivity: high
input.transfer.high: 136
input.transfer.low: 88
input.voltage: 124.0
input.voltage.nominal: 120
ups.beeper.status: disabled
ups.delay.shutdown: 20
ups.firmware: 864.L8 .D
ups.firmware.aux: L8
ups.load: 0
ups.mfr: American Power Conversion
ups.mfr.date: 2016/04/21
ups.model: Back-UPS XS 1300G
ups.productid: 0002
ups.realpower.nominal: 780
ups.serial: 3B1616X11054
ups.status: OL
ups.test.result: No test initiated
ups.timer.reboot: 0
ups.timer.shutdown: -1
ups.vendorid: 051d

Monitoring the Second UPS

Next, we need to add the second UPS to be monitored by NUT in the /etc/nut/upsmon.conf file. Look for your original UPS monitor line which will look something like this:

MONITOR ups@localhost 1 username password master

Don’t forget that the username and password are set in the /etc/nut/upsd.users file.

Now you’ll add a second line, but change a few of the settings:
MONITOR ups@localhost 1 username password master
MONITOR apcXS1300G@localhost 2 username password slave

Here I’ve added the UPS name that was added to the ups.conf, “apcXS1300G”, sequentially increased the number to “2”, and then changed “master” to “slave”.

Unfortunately, NUT has yet to update their terminology to more modern naming of primary and secondary devices.

After adding that, you’ll want to restart the monitor server with sudo systemctl restart nut-monitor as well as the driver. This will again restart the connections to both UPS devices and should show they are now established.
sudo systemctl restart nut-monitor
sudo upsdrvctl stop
sudo upsdrvctl start

Head on over to your browser and type in your upsstates.cgi path. For me, it is http://192.168.1.3:8080/cgi-bin/nut/upsstats.cgi becuase my PiHole installation uses Litehttp, so I had to configure Apache to use the 8080 port. If you are using default NUT configuration, no need to enter a port. And you’ll see the following:

2 UPS devices in NUT UPSSTATS
Click to enlarge.

Now you can connect any of your devices to be monitored by the NUT to utilize the new UPS.

Overtime, I expect to switch all my homelab devices to the APC XS 1300G as it handles more load and capacity. So if you do get to a point where your homelab requires more than one UPS device, this is the way to add a second UPS to NUT.

Filed Under: Uncategorized Tagged With: network ups tools, nut, ups

About Aaron Weiss

Aaron Weiss has been working with search engine optimization since 2008, and has been certified twice in the field. He enjoys Google Analytics, website administration and management, and looking for ways to improve his skillset. He has a Masters degree in Cinema Studies from the Savannah College of Art and Design, and learned the film criticism and website administration ropes with his movie review website, CinemaFunk. When not nerding out about websites, he's nerding out about guitar, other tech, and spending time with his girlfriend and dog.

Disclosure

This blog post is the opinion of the author and no other person or organization, except where indicated in quotations and citations. This article may include affiliate links and I may recieve compensation for the purchase of goods or services found at those links. For more information, please see this site's affiliate disclosure and privacy policy.

No Comments?

The time it takes to moderate and fight spam is too great. Therefore, the decision disable comments was made. If you have a question or have a comment about this blog or any other article on this website, please contact me.

Primary Sidebar

Recent Posts

  • TrueNAS Virtual Machine with Ubuntu 18.04 Halting with Signal 11
  • Proxmox ZFS Disk Replacement and Drive Expansion
  • How To Create ZFS Backups in Proxmox
  • Multiple UPS on the same NUT-Server
  • Learning Graylog for Fun and Profit

Categories

  • Film & Television
  • Google Analytics
  • Guitar
  • Lifestyle
  • Projects
  • Proxmox
  • Search Engine Optimization
  • Technology
  • TrueNAS
  • Uncategorized
  • Website Administration
  • WordPress
  • Home
  • Blog
  • About Aaron Weiss
  • Contact
  • Privacy Policy
  • Affiliate Disclosure

© Aaron Weiss. Built with WordPress using the Genesis Framework. Hosted on a2 Hosting and DigitalOcean. Aaron Weiss's LinkedIn Profile