NUT on OpenWrt
Here are the steps I took to set up NUT at home between a NAS (server) and an Openwrt router (client).
First, on the NUT server, make sure it is set with
Next, add the folowing directive for the client:
/etc/nut/upsd.conf you should add
LISTEN 192.168.1.2 #IP of the client
Next, on the client:
Make sure you have installed
nut-client which is the useful package for this use case.
/etc/nut/nut/nut.conf, make sure there is
$HOMEBREW/nut/config/nut-monitor (or something similar) you should have the following rules:
config slave option upsname ups option hostname 192.168.1.1 option username upsmon option password secret
password with the settings on the NUT server (thoses should be in
upsmon -D in the terminal of the client and check for errors (may need to stop it first as it can’t start more than one time).
This should generate the
Some docs says to use
upsdrvctl -t shutdown. It didn’t work on my system but good to know to try to simulate a shutdown (without actually powering off).
If everything work so far, try the next command (make sure to save all works as this will power off the client):
upsmon -c fsd
NUT should be set up now.