NUT and Eaton 9130 Powerware UPS with MS NMC

By

Network UPS Tools (NUT) is a valuable suite of software for anyone who wants to monitor and manage their power infrastructure. It is easy to use and configure, and it supports a wide range of UPS devices, including the Eaton Powerware 9130 UPS.

Most guides I’ve found online will explain how to set up a typical configuration where the UPS uses a USB connection to the machine running the NUT server (upsd). This guide will explain how to install and configure NUT with an Eaton 9130 UPS using a Network Management Card (NMC), including how to install and configure the netxml-ups driver for NUT.

Background

NUT has three daemons associated with it:

  • The driver which communicates with the UPS.
  • A server (upsd) which uses the driver to report the status of the UPS.
  • A monitoring daemon (upsmon) which monitors the upsd server and takes certain action based on information it receives.

A lot of users have reported issues with NUT and the Eaton 9130 (and other Eaton UPS models) timing out, disconnecting, or no longer updating the status of the UPS. The issues occur regardless whether upsd is running on a baremetal installation, ProxMox host or container, pfSense system, or Home Assistant OS.

The best solution I’ve found is to use a NMC instead of a USB connection. I was able to purchase the Eaton Network Card-MS from eBay for less than $25 and easily install the NMC in the hot-swappable mini-slot in the back of the UPS within a few minutes. By using the NMC, all machines on the network running upsmon now have a reliable connection to the upsd machine and they receive updates about the status of the UPS without any issues.

Installation

Installing NUT package

To install the NUT software suite, run the following command:

apt install nut

Installing NUT driver

The NUT website has a Hardware Compatibility List with information about which drivers have been reported to work with certain Eaton devices. The Eaton 9130 is reported to be compatible with the usbhid-ups driver for systems using a USB connection, and the bcmxcp driver for systems using a serial connection. Eaton NMCs are reported to be compatible with either the netxml-ups driver or the snmp-ups driver.

The xml protocol is supposedly better than the snmp protocol, with the xml protocol being faster than the snmp protocol at updating the status of the UPS, and having the capability to report more information than the snmp protocol. For those reasons, we will be using the netxml-ups driver for our configuration with the Eaton Network Card-MS.

Unlike the usbhid-ups driver that is included in the nut package, the netxml-ups driver needs to be installed separately in addition to the nut package. To install the nut-xml package with the netxml-ups driver for NUT, run the following command:

sudo apt install nut-xml

Configuration

Configuring NUT driver

Open the ups.conf file with a text editor:

nano /etc/nut/ups.conf

Add the following lines to the bottom of the file:

[Eaton9130]
# desc = "Eaton PowerWare PW9130L1500T-XL 120V 1500VA"
  driver = netxml-ups
  port = http://192.168.1.2:80
  login = LOGIN_NAME
  password = SECRET_PASSWORD
  subscribe
# vendorid = 0463
# productid = FFFF

In the above example, replace “Eaton9130” with the name that you want NUT to use for your UPS.

The line for the desc setting is optional.

The value for the port setting should correspond to the IP address of your Eaton network addon card. Use http or https, and 80 or 443 as applicable.

Provide the login and password settings for the user account with access to the management interface of your NMC.

Include the subscribe setting to connect the NMC in subscribed mode instead of using the standard polling requests, allowing the NMC to receive notifications and alarms more quickly.

You’ll notice a lot of other guides will recommend that you include the vendorid and productid, which might be required for a UPS connected through USB. For a connection with an NMC using the netxml-ups driver, the vendorid and productid are not required.

After you’ve saved and closed the ups.conf file, start the driver by executing the upsdrvctl start command and see if there are any errors:

upsdrvctl start 

Configuring NUT server

You can configure upsd by editing the /etc/nut/upsd.conf file:

nano /etc/nut/upsd.conf

By default, upsd listens only on localhost. You can use the LISTEN setting to add additional addresses and ports for upsd to listen. Let’s add the loopback address and the IP address of another machine on the network that will run the monitoring daemon upsmon and connect to the NUT server:

LISTEN 127.0.0.1 3493
LISTEN 192.168.1.100 3493

To add users with access to the NUT server, edit the /etc/nut/upsd.users file:

nano /etc/nut/upsd.users

Let’s add a local user and a remote user that will connect to the server, monitor the UPS status, and issue commands based on the information it receives:

[upsmon_local]
  password = SOME_PASSWORD
  upsmon master

[upsmon_remote]
  password = SOME_OTHER_PASSWORD
  upsmon slave

Replace “upsmon_local” with the username of the local user, and “upsmon_remote” with the username of the remote user.

Configuring NUT monitor

On the machine running the NUT server, configure its upsmon daemon by editing the /etc/nut/upsmon.conf file:

nano /etc/nut/upsmon.conf

Add the following line for the localhost to listen to upsd:

MONITOR Eaton9130@localhost 1 upsmon_local SOME_PASSWORD master

On the remote machine, add a similar line in the /etc/nut/upsmon.conf file for it to connect to the NUT server:

MONITOR Eaton9130@192.168.1.1 1 upsmon_remote ANOTHER_PASSWORD slave

In the above example, replace 192.168.1.1 with the IP address of the computer running the NUT server.

Usage

After installing and configuring NUT, you can now use it to monitor and manage your UPS.

At this point you should be able to start/enable nut-server.service:

sudo systemctl enable nut-server.service
sudo systemctl start nut-server.service

If it has started successfully, you can run upsc upsname to get information about the UPS:

upsc Eaton9130

To monitor your UPS, run the following command:

upsmon

This will display the status of your UPS, including the input voltage, output voltage, battery charge level, and runtime remaining.

You can also use NUT to integrate with other software, such as syslog and Homeassistant. This will allow you to be alerted to UPS events, such as power outages or low battery levels, or perform automations.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.