Shut down C-7 Hub via NAS commanded from a UPS

I just added a Synology DS423 NAS to my Network.
Works great! All configured for it's function.

I also just added a APC UPS 1500VA UPS Battery Backup and Surge Protector, BX1500M Backup Battery Power Supply, AVR, Dataline Protection.

The UPS connects to the Synology NAS, via a USB cable.
The NAS is configured to do an orderly shutdown, in the event of a AC mains failure.
No problem there.

Now. What about the Hubitat C-7 hub?
How do I shut it down?
I've installed the app: "NUT upsmon driver", but what do I need to do now?
The NAS can issue webhooks, but I'm new to all this.
Can someone walk me thru this please? TIA.

There is so much simpler app in HPM called Power Outage Manager and all you need is one device that reports power as mains when power is on and battery when power is off like a Ring Range Extender. The app is super simple to configure and will shut your hub down based on your settings.

1 Like

You need to configure a NUT server on the NAS and then have the Hubitat driver you installed connect to that.

1 Like

Great! Thanks for the tip. Now to figure that out.

Or use the hub information driver and maker api to send the hub information driver the reboot comand.

1 Like

Pretty sure that Synology runs NUT server by default, know QNAP does.

1 Like

You don’t even need maker API. You can make a rule machine with a local endpoint trigger. Possibly a little easier for a novice.

2 Likes

Did you create a device and configure it? See information in this thread:

1 Like

See my description of how to do this with Rule Machine. Using NUT UPS (linux) to trigger Rule Machine: power outage/restoration actions

1 Like

I created it, yes.
Now i need to configure it to communicate with the Synology NAS NUT server.

1 Like

This specific post will help you:

UGH. I'm still pulling my hair out trying to get this APC UPS, connected to the Synology NAS to work w/ my C-7 hub.
Can't get the NUT UPS Monitor device to connect to the NAS.
I've read all the posts here I can, and here's a screen capture of the log.


Here's the device Preferances settings

and the device info screen

And the NAS screen

My Hubitat C-7 has a static IP address set, and it's in the DSM config page.

I've verified the NAS port address is the same as that in the UPS Monitor driver.

Any help is appreciated.
TIA.

DUH! I think the light bulb went off for this Synology/APC UPS setup

The "NUT server host" should be the IP address of the NAS, NOT the NAS name.....
UPS name field is fixed at "UPS" NOT the Synology name
NUT username field is fixed at "monuser"
NUT password field is fixed at "secret"

After changing all this, the logs change to:

I then changed the polling period from 5 sec to 60 sec, but the max goes to 30 sec.

There is a good reason for this. :slight_smile:

See the note on Polling Frequency in the UI. HOSTSYNC on the Synology is fixed at 15 seconds and the hub's polling interval needs to be less than that value. Polling is not an expensive operation.

Thank you. I'll change it to 10 sec then. I didnt want to overload anything.