UPS Slave Config with Timed Shutdown

gwaitsi

Patron
Joined
May 18, 2020
Messages
243
I have an APC UPS master connected on my TrueNAS box
I have a dumb UPS connected to my pfsense and need to shutdown pfsense based on a timer triggered by the master.

I have looked at the NUT documentation and examples below but i can't figure out if i need to use the heartbeat config or not.
http://rogerprice.org/NUT/ConfigExamples.A5.pdf
https://wiki.ipfire.org/addons/nut/detailed

i simply want to shutdown the slave 20min after power loss, but obviously cancel the timer if the power comes back to the master.
it is not clear to me if i actually need the heartbeat config for this setup.

grateful is someone can help with the correct upsmon.conf, upssched.conf and upsched-cmd configs please.

is there a way to simulate a power failure on the master to test the slave without actually cutting power to the master?
 

JaimieV

Guru
Joined
Oct 12, 2012
Messages
742
Does the TrueNAS box also shutdown? If it does I'd be tempted to use the Tasks, Init/Shutdown Scripts facility on the TrueNAS to send a "shutdown" over ssh to the pfsense at the same time, skipping all the fun of dealing with nut.
 

gwaitsi

Patron
Joined
May 18, 2020
Messages
243
Does the TrueNAS box also shutdown? If it does I'd be tempted to use the Tasks, Init/Shutdown Scripts facility on the TrueNAS to send a "shutdown" over ssh to the pfsense at the same time, skipping all the fun of dealing with nut.
truenas shutdowns because it is APC UPS working fine with NUT master. Battery time is about 1hr.
pfsense UPS has battery that lasts about 2-3hrs but no intelligence.
 

JaimieV

Guru
Joined
Oct 12, 2012
Messages
742
Nut is fine when it Just Works, but I don't think I've ever persuaded it to do anything it didn't want to do, thus my cheating workaround :)
 

Dan Tudora

Patron
Joined
Jul 6, 2017
Messages
276
hello
I think I have "invert"solution
I use apcupsd an APC/with usb connection on pFSense with signaling to NUT FreeNAS with NUT drivers/various apcupsd etc. with IP of pfsense
and to another PC (apcupsd on windows)
and working
cheers
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925
I use apcupsd an APC/with usb connection on pFSense with signaling to NUT FreeNAS with NUT drivers/various apcupsd etc. with IP of pfsense
and to another PC (apcupsd on windows)
I have pfSense box as master, 2 FreeNAS boxes as slaves - works fine. I do restart the UPS Service on pfSene anytime I reboot either NAS and check the console message to see the reconnect.
 

Dan Tudora

Patron
Joined
Jul 6, 2017
Messages
276
I have pfSense box as master, 2 FreeNAS boxes as slaves - works fine. I do restart the UPS Service on pfSene anytime I reboot either NAS and check the console message to see the reconnect.
hello
at mine NUT FreeNAS make a lot of "noise" (log, console, email alert) when can't connect to pfsense apcupsd
but working
and do shatdown at FreeNas corectly
cherrs
 

gwaitsi

Patron
Joined
May 18, 2020
Messages
243
hello
I think I have "invert"solution
I use apcupsd an APC/with usb connection on pFSense with signaling to NUT FreeNAS with NUT drivers/various apcupsd etc. with IP of pfsense
and to another PC (apcupsd on windows)
and working
cheers

can you share your config files for me please. I can just reverse them for my situation. appreciate it
 

Dan Tudora

Patron
Joined
Jul 6, 2017
Messages
276
can you share your config files for me please. I can just reverse them for my situation. appreciate it
hello
no config file to share but 1 pictures make more like 1000 words
and have 2 :wink:
cheers
 

Attachments

  • apcupsd-on-pfsense.pdf
    931.4 KB · Views: 478
  • NUT-on-NAS.pdf
    401 KB · Views: 469

gwaitsi

Patron
Joined
May 18, 2020
Messages
243
hello
no config file to share but 1 pictures make more like 1000 words
and have 2 :wink:
cheers
thanks, but i am looking more for the upsmon.conf and upssched.conf settings on the slave
 
Top