Home Server or PC control (remote on/off) via Smartthings


#1

Thought I would share a quick dirty project I put together last night via ST to allow for remote (and automated) control over my server.

I bought one of the Aeon Labs smart energy switches which handles up to 1800 watts of power. My server is connected to a UPS (which is plugged into the PC via USB and monitored via the UPS monitoring software). The UPS is plugged into the Aeon switch which is plugged into the wall.

When I want to turn off the server or turn it on I simply toggle the Aeon switch via smart things. I do this manually now but I could certainly set it up via various rules such as schedule, power consumption, home/away, etc.

I set the BIOS to start the computer on power restore.

I set the UPS configuration to shut down the PC after 1 minute of no power.

Shutdown event:
So when I turn OFF the switch the UPS monitoring software will execute a “graceful” shutdown of the server after 1 minute. After about another 2 minutes the UPS itself shuts down (which powers down my external drive enclosures as well).

Turn on event:
When I turn the switch ON the UPS starts and then power is restored to the server which powers up and I am back in business.

So far this has worked very well and allows me to reduce power consumption in the home by quite a bit since my server and drive arrays consume about 1000 watts of power. I can turn the server off when I’m not watching shows via plex or any other reason. Generally I turn it off at night.

This should work with any UPS from Cyberpower or APC.

I highly recommend the Aeon Smart Energy Switch as well. It lets me see power consumption as well as remotely turn on and off. Keep in mind that you should use a UPS with monitoring capability for this so that you can be sure you are getting a graceful shutdown to avoid loss of data or data corruption.


(Joshua Lyon (SharpTools.io Dashboard)) #2

Interesting approach - thanks for sharing. I originally expected to see something with Event Ghost for the PC control and WOL packets for remote starting. It’s always interesting to see how other people approach things!


#3

Thanks. I looked into the WoL approach but since I wanted this to work from anywhere and I didn’t want to have to run another pc/system to send the local magic packet broadcast I decided to see what else I could do.

The other issue is that I have 3 8 bay external enclosures to control as well and I needed a graceful shutdown solution (and one guaranteed to shut down in spite of a system lockup if one should occur).

This is a bit more brute force but is still safe and relatively uncomplicated using off the shelf components.