Guide: Automatic Sleep and Wake-up from any device / location
So, I don't want my computer running 24 hours a day, chewing up electricity when it is not in use. My server uses a little over 100 watts when on, and only 2 watts when it is sleeping.
For those that don't know why this is important, the math:
100 watts saved
18 hours a day my computer could be sleeping
30 days a month
1000 watts per kilowatt
= 54 kilowatt hours (kwh) per month
@ $0.2424 per kwh (Massachusetts rate)
= $13 a month
With a little configuration work, I am able to save that $13 a month in electricity.
For anyone who wants to make this work, it is possible, and I've got it running. Here are the short requirements:
1) PMS server with WOL enabled
2) DDWRT router with automatic WOL to VLAN enabled
3) WinOff software to prevent PMS server from sleeping when serving up content
1) Your computer running PMS must support Wake-On-Lan (WOL). You'll need to enable WOL in both the bios (check your motherboard's website for instructions in the manual for it), and you need to enable WOL in your operating system (for Windows 7, here is a good guide: http://windows7-issues.blogspot.com/2011/03/wake-on-lan-wol-for-windows-7-made-easy.html)
After configuring for WOL, you should put your PMS computer to sleep, and then try to wake it up with WOL software (search google, there are lots of freebies to do this). This is to make sure that your computer wakes up to a "magic packet" that tells your computer to wake up. Once working, proceed to step 2.
2) The next challenge is that the Plex clients (or other services if your server is doing stuff additional to PMS) don't send a "magic packet" when you tr to connect to your PMS server. So, we will use a router with DDWRT to watch for network traffic going to the PMS server, and when it sees the network traffic going to the PMS server, the router will check (by pinging) if the PMS server is awake, and if it is not awake, the router will send the "magic packet" automatically.
This will require a router with DDWRT installed.
Next, the server needs to be put on its own VLAN (technically the router can only monitor traffic between VLAN's, not to individual devices). Here is a tutorial on putting port 4 on its own VLAN: https://aaka.sh/patel/2011/07/17/creating-isolated-vlan-ddwrt-wnr3500l/
Next, a logging script, and a wake on lan script need to be added to the router: http://wetzelrice.com/?q=blog/how-to-automatically-wol-a-local-or-remote-server-using-dd-wrt
At this point, anytime traffic is sent to the VLAN on port 4 (which should only have your PMS server on it), from a device inside your network or outside your network, the router will check if the PMS server is awake, and if not, will send a "magic packet" to wake the PMS server up.
3) WinOff software (free) setup to monitor outbound traffic and only put computer to sleep when there has been no outbound traffic for a period of time (I've set mine to 15 minutes): http://www.ampsoft.net/utilities/WinOFF.php