Hi,
I am trying to get NUT working correctly on a setup I am attempting to…setup.
The issue I am having is that none of the devices connected to the NUT server are doing what they are told.
For example, I have set (on a test system), that particular system to shutdown when the battery gets to 99%, and a second test system set to shutdown at 90%.
If I remove the power (other than this brand new UPS immediately dropping to 80%!!!) neither system shuts down, but does immediately receive a syslog message about the UPS being on battery.
Now, I am not confident i have my configs setup correctly.
Config wise -
Server Config (this is on a RaspberryPi/Home Assistant OS/NUT Addon, so its all YAML) -
devices:
- name: CyberPower-750VA-SL750U
driver: usbhid-ups
port: auto
config:
- vendorid = 0764
mode: netserver
shutdown_host: "false"
users:
- username: username
password: password
instcmds:
- all
actions:
- set
upsd_maxage: 25
upsd_pollinterval: 15
upsmon_deadtime: 60
upsmon_pollfreq: 5
upsmon_finaldelay: 60
upsmon_notifyflag: 50
upsmon_notifycmd: echo 'UPS has reached 50% remaining power' | wall
log_level: debug
From what I can tell with the YAML here, the preceding upsd_ & upsmon_'s are just passing through whatever is after that into the relevant files in the NUT container it spins up in the background.
I have the notifycmd set to ‘WALL’ as I dont want the server to control the shutdown of the devices, as I want each to shutdown at different percentages, not have everything shutdown based on whatever variable its working off by default (also an unknown…).
Client Config
nut.conf
MODE=netclient
upsmon.conf
MINSUPPLIES 1
SHUTDOWNCMD "/sbin/shutdown -h +0"
POLLFREQ 15
POLLFREQALERT 5
DEADTIME 45
MONITOR [email protected] 1 username password slave
NOTIFYFLAG 99 SYSLOG+EXEC
FINALDELAY 120
# Other Options - defaults from example config
HOSTSYNC 15
POWERDOWNFLAG /etc/killpower
RBWARNTIME 43200
NOCOMMWARNTIME 300
The logic in this example client config is that when the power gets to 99%, the shutdown will begin.
Instead, what seems to happen is that the client seem to generate the [email protected] on battery
in their service log, then nothing else happens. So they are clearly communicating with the server.
Is anyone able to help advise what I’m doing wrong here?
If i can get this explained, working, I plan to submit a PR to the doc page for this addon to add sorely missing content, as right now its…not great.
Thanks!