So I have a Synology DS216se NAS on my LAN, which I have just bought a UPS for. I bought a CyberPower Value SOHO 800 based on the reported compatible UPS systems. As hoped the NAS recognised the UPS perfectly.
Next the tricky Part.
I will be running a Windows PC from the same UPS, so I want the PC to talk to the UPS and shut down accordingly.
To be brief:
- Get this program for Windows.
(The latest version WinNUT-18.104.22.168a-Installer.exe comes up clean on Virustotal – using a quick hash scan.)
- Click the edit button for the config file, and you will need to add the settings for your UPS master device (the Synology NAS). You can simply use:
MONITOR firstname.lastname@example.org 1 monuser secret slave
I put this line under the MONITOR examples (obviously not with a # in front of my version, commenting it out)
Go to part 3.
I spent a while trying to figure this out. Initially finding a graphical program that worked with windows was proving tricky, so I was trying to use the Windows build of NUT, which was all commandline and the instructions were for linux..
I was able to get the settings for connecting to the NAS over SSH as described here, I could read out the uspmon.conf file using vi only while logged into the SSH as root. Anyway the config line above is correct for connecting to a Synology NAS device. The highly configurable style of the Synology NAS and their use of NUT is really impressive.
- You will need to allow WinNUT to connect to the NAS using the UPS settings on the NAS, just allow your PCs IP address in those settings.
- From here I clicked Apply and Start WinNUT and the status changed to Running as Application. That was all. I checked the logs and nothing too interesting, so I went to powered off my UPS at the wall.. Success!!
Got a couple new lines on my WinNUT Log file.
Level NOTICE 03/18/2016 16:04:26 UPS email@example.com on battery
Level NOTICE 03/18/2016 16:05:27 UPS firstname.lastname@example.org on line power
- In order to get popup messages to work you need to modify the config. Under the NOTIFYCMD section, the directory needs to be set correctly:
NOTIFYCMD "\"C:\\Program Files (x86)\\WinNUT\\alertPopup.exe\"
- I set a forced shut down after 120 seconds, set the program to run as a service with Auto Startup, applied those settings then clicked OK. Now its running in the background. I reset my computer to test the auto start of the service and tested the shutdown.
- It Works!!