Thursday, February 27, 2014

How to Add Wake On Lan (WOL) to Plex or any windows application




This was made to work on Windows 8, but should be compatible with windows 7

I decided to switch to Plex from XBMC to play movies from my server due to constant problems with XBMC. The only thing holding me back was the absence of wake on lan in plex. I decided to trial and error with other guides to create script to make this possible with my Harmony remote. I am not a coder so there may be better ways but this works for me 100% of the time now. I go back and forth from Plex and WMC for live TV so I will describe that process here. If you just want to wake up plex you can leave out WMC part.

1. Download files from here. Rename folder to wol.

2. Download AutoHotKey and WinHotKey

2. Move all files in folder to C:// drive of HTPC.

3. Unzip WakeOnLan2.8.1-src.zip.

4. Install the software.

5. Now find the install directory for the wakeonlan program and copy all the files in it and paste it into your wol folder in C:// drive.

6. Open WinHotKey and click 'New Hotkey'
                 -I put description plex
                 -Check Alt box only and remove windows box (click ok in popup)
                 -Along with the key: 8 (NOTICE I HAVE IT WRONG IN PICTURE)
                 -I want WinHotKey to: Open a Document
                 -Browse to where you stored file
                 -Make sure it looks like picture below with exception of A should be 8


7. Repeat this but do one for WMC like picture below
                 -I put description wmc
                 -Check Alt box only and remove windows box (click ok in popup)
                 -Along with the key: 9
                 -I want WinHotKey to: Open a Document
                 -Browse to where you stored file
                 -Make sure it looks like picture below


8. WinHotKey screen should look like this when done


9. Open wake.bat in wordfile. Change BC:5F:F4:4C:44:F4 to your server's mac address

10. Test scripts by double clicking wake.bat. This should open command prompt and wake you server up then close box. Troubleshoot this before continuing on.

11. Test both plex.ahk and wmc.ahk to make sure both work
          -plex.ahk should run wakeonlan script then close, then open plex and close wmc (if its open)
          -wmc.ahk should close plex and open wmc

          *notice in script I have plex to wait a few seconds until opening, you can delete the sleep 5000                 line if you want

12. Now that its working properly you can program harmony remote to run these scripts. I have Harmony One remote so you will have to change this guide to fit your remote (Harmony One has been discontinued). I programed the up and down arrows in picture below to activate scripts. UP turns on WMC (turns off plex) and DOWN turns on server and pled (turns off WMC). Also note I have media center device setup as MediaCenter SE in logitech software. This allows to hit keyboard presses (I have a simple usb adapter that I got from amazon - go here to buy)


13. Customize button in harmony software. Up Should activate Alt+9 and down Alt+8. Sync your remote and try it out!



No comments:

Post a Comment