Skip to content

UPS (NUT)

This page gets Collimo reading a UPS that's plugged into a NAS or server by USB, and shared over Network UPS Tools (NUT).

Most small UPSes have no network card. They plug into one machine by USB, and that machine shares them over NUT so others can see the battery. Synology, QNAP, TrueNAS and Proxmox can all do that, and Collimo can read it.

What Collimo reads: every UPS the NUT server shares: its maker and model; whether it's on mains or on battery; the battery's charge, voltage and temperature; how long the battery would last now; the load; the input and output voltage; and what the UPS flags, such as a battery that needs replacing. A UPS on USB often reports only some of these. What it doesn't report is left blank, never shown as zero. What it can't: it changes nothing. It can't shut anything down, and it never signs in to the NUT server.

No password needed

Reading a UPS over NUT needs no account, so this source has no secret. Collimo never signs in: in NUT, signing in tells the server to wait for that machine before it shuts down, and Collimo must never hold up a shutdown.

Turn on the NUT server, and allow Collimo

On the machine the UPS is plugged into, turn on sharing, then add the address of the Docker host that runs Collimo to the list of machines it answers. Without that, the server refuses Collimo's address.

Synology DSM

Control Panel → Hardware & Power → UPS. Tick Enable network UPS server, click Permitted DiskStation Devices, add the Docker host's IP address, and click Apply.

QNAP QTS

Control Panel → System → External Device → UPS. Tick Enable network UPS master, add the Docker host's IP address to the list of addresses it notifies, and click Apply.

TrueNAS

System → Services → UPS, then edit it. Set the mode to Master, turn on Remote Monitor so the server listens on the network, and save. Start the service if it isn't running.

Proxmox VE, or any Linux host

With NUT installed and the UPS working on the host (upsc <ups> shows its readings):

  1. In /etc/nut/nut.conf, set MODE=netserver.
  2. In /etc/nut/upsd.conf, add LISTEN 0.0.0.0 3493.
  3. Restart NUT: systemctl restart nut-server.
  4. Allow TCP 3493 from the Docker host in the host's firewall.

No user is needed in upsd.users for Collimo.

Enter it in the setup wizard

On the wizard's What you have page, set UPS (NUT) to the number of entries you want. On its page:

  1. Name: what you call it, such as nas-ups.
  2. Addresses: the NUT server's name or IP address, without https://, such as 192.168.1.240. Add :port only if it isn't
  3. Separate several servers with commas.
  4. Click Test.

When it works you see ✓ Connected: and what it found, such as 1 UPS, on mains. One entry reads every UPS each server shares.

Editing the stack by hand

No secret line is needed:

SOURCE_6=nut 192.168.1.240 name=nas-ups

Settings → Add a source writes the line for you. See Every variable.

Where it shows up

Each UPS gets a panel on the Power and servers tab, the same as a UPS read through a network card: where its power comes from, the runtime left, the battery, the load, the input, and what the UPS is reporting. Its alerts are the same too: see UPS.

Settings → Sources shows the entry as no account needed.

If something's wrong

The Docker host must reach the NUT server on TCP port 3493.

What you see What to do
upsd refused this address; add Collimo's to the server's allowed list Add the Docker host's IP address, as above.
connection refused, or timed out The NUT server isn't sharing yet, or a firewall blocks TCP 3493.
upsd's driver has stopped getting fresh data from the UPS (DATA-STALE) The server lost the UPS: check its USB cable, and that the UPS shows on the server's own UPS page.
upsd's driver for this UPS isn't running Restart the UPS service on the server.
upsd answers, but lists no UPS Sharing is on, but no UPS is set up on the server.

See Troubleshooting for more.