#httpspaste debian net1265741

1 messages · Page 1 of 1 (latest)

indigo phoenix
#

ok, so super-simple it looks like.

As the documentation is bad, how are you setting HA to shutdown based on battery/power state, if you dont mind me asking?

arctic light
#

I don't actually shut it down because it's on a Pi and could probably last a few days on battery. shutdown_host: "true" should shut it down though

indigo phoenix
#

does it do that based on a specific timer event?
The docs on the HA doc site are really bad on this, i think when i've worked out the specifics im gonna go do a PR on their Git Repo to get it updated.

arctic light
#
Option: shutdown_host

When this option is set to true on a UPS shutdown command, the host system will be shutdown. When set to false only the add-on will be stopped. This is to allow testing without impact to the system.

Sounds like NUT fires off its notification to the clients and then shuts down the host machine

indigo phoenix
#

ok, so im guessing then that something in the ups.conf is what sets when to fire off those notifications/events.

#

thanks btw!

arctic light
#

That reminds me I should probably test pulling the plug. The daemon is running and the clients have a connection, but I haven't actually tried a power failure yet

indigo phoenix
#

clients being remote systems?

#

I ask as thats my plan, RPi/HA being the control NUT, and a few proxmox hosts being clients...

arctic light
#

Yeah I have 2 machines running VMs in the same closet and they're connected as clients

indigo phoenix
#

Do you have to do much config on them other than point them at your RPi?
Or do they have the ability to have their own 'shutdown at X' settings?

arctic light
#

You have to set it to netclient in upsmon.conf and then point nut.conf to the NUT server, MONITOR myups@192.168.x.x 1 username password slave

#

According to nut.conf, the master shuts down all the clients, then shuts itself down last (presumably if you've set shutdown_host to true)

indigo phoenix
#

yup, right now i have. Im gonna change the config about to remove those extra bits i have, so it more closely matches yours i think

arctic light
#

If it's communicating properly, both sides should mention in their logs that they connected

indigo phoenix
#

Thanks for the input and replies. 🙂
for now, im going out for the afternoon. Later!

arctic light
#

No problem, glad to help