NOTE: As of DSM 6+, it is no longer possible to log in as a root user using the command line option, so the solution in this post no longer works. However, see my newer post, Shutdown Windows computer and Synology NAS using WinNut, for another way to accomplish the same thing!
After a recent thunderstorm that took out the power for several hours, I realized that my four year old 825VA UPS was a little long in the tooth and probably under powered for my computer, NAS and twin 26″ monitors. I also realized that I needed to plug my router and network hub into the UPS, if I wanted Internet to continue during a blackout. (The cable modem is in another room and will get it’s own UPS :-) After doing a bit of research, I decided on the CyberPower CP1500PCFLCD UPS. (I’m not really sure about the pure vs simulated sine wave discussion, but I feared it might matter someday, so I ponied up for the pure sine wave version.)
Another thing dawned on me: although the UPS application would shutdown my computer when the battery got low, nothing instructed my Synology NAS DS212j to do the same. I’ve got twin 4TB drives in there, so corrupting those drives would not be good. I messed around with NUT (Network UPS Tools), but just couldn’t get it to work on my Windows 10 machine. Eventually, I learned that CyberPower had posted actual instructions on how to do it with a Synology NAS! Unfortunately, it doesn’t tell you everything, but after several hours of searching and trial and error I was able to piece it all together and get my Windows computer and Synology NAS to shutdown when my UPS was running out of battery power. I’ve compiled everything here: