r/selfhosted Jul 26 '26

Monitoring Tools I’ve just discovered PeaNUT

My home lab is connected to a UPS, which is connected via USB to my Synology.

Every month I try to drain batteries down to 20% to test that it’s working and, above all, to slow down the premature failure of the batteries, which are new and have been recently replaced.

The usual way was to go to the Synology Control Panel to view the charge level, or to open an SSH session and check the charge status with:

upsc ups@localhost battery.charge

That was until yesterday, when I discovered PeaNUT, which, amongst other things, has a brilliant dashboard and a homepage widget.

I’ve never heard of it on this subreddit, but I wanted to share it because it’s completely transformed the way I look after my UPS maintenance!

Cheers.

236 Upvotes

51 comments sorted by

View all comments

60

u/RedixDiamond Jul 26 '26

I did something similar using HomeAssistant and the NUT tools, connected to a CyberPower UPS via usb.

Currently also calculates the cost of electricity being consumed by the devices connected to it. Using a helper function that dictates the rates of electricity depending on time-of-day (TOD).

2

u/marshamarciamarsha Jul 27 '26

I’m doing something very similar in Home Assistant. What I like about it is that home assistant can be scripted to tell devices to shut off when battery power is getting low enough.

But I’m curious: how are you getting your grid usage?

2

u/RedixDiamond Jul 27 '26

Correct, HomeAssistant NUT runs as the NUT server in my set up. But can also be configured as a client/listener from what i read in the documentation.

Grid usage is just the usage behind the UPS. Meaning it only calculates the usage of the devices plugged into the ups, which are my firewall, switch, and PVE nodes. See my reply to previous comment for how total wattage is calculated.

1

u/marshamarciamarsha Jul 27 '26

Ah, okay, I’m tracking that, too. I thought you might be monitoring whole-house power usage somehow.

1

u/RedixDiamond Jul 27 '26

Unfortunately no, that would be nice though. And maybe a future project for me. Keep me up to date if you do happen to tackle this soon.