[WINDOWS] HOW-TO Use a Harmony Remote to Seamlessly Use XBMC, Hulu Desktop, & Netflix

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
shaxs Offline
Junior Member
Posts: 15
Joined: Nov 2010
Reputation: 0
Post: #1
HOW TO: Using a Harmony Remote to control XBMC, Hulu Desktop and Netflix (Windows Media Center)

I did a lot of research and tinkering to find a way to control a htpc and switch between different media applications only using the remote and trying to make it as user friendly as possible. I needed this to pass the wife acceptance test - W.A.T. for short Wink

Below is a video of the solution I came up with. For the most part, a very seamless integration of XBMC, Hulu Desktop, and Netflix using the Windows Media Center plugin. I also threw Boxee on there after this video was shot.

http://www.youtube.com/watch?v=x0iaSo4otFg

I only have a dual core Athlon II X2 2.65 ghz so one of the challenges was making sure only one application was running at a time because having two of them running at once really taxed the cpu.

========================================================

Requirements:

1) Software
- XBMC (http://xbmc.org/)
- Hulu Desktop
- Windows Media Center with Netflix Plugin
- WinHotKey (http://directedge.us/content/winhotkey)
- AutoHotKey (http://www.autohotkey.com)

2) Harmony Remote Control

3) A RC6 capable receiver

========================================================

Steps:

1) Harmony Remote Setup - Im not going to go through the whole setup process for the Harmony Remote. Go here to read full instructions:

http://forum.xbmc.org/showthread.php?tid=77519. One caveat, I had to also add a device called "Microsoft Windows Media Center" as a device to get the htpc to turn off and on. I am also posting my button mapping for the Harmony remote. I have found these to be a good mix to allow use in all three major applications. These keys are optimized for XBMC, so some of the special ones only pertain to XBMC. Lastly, make sure to change the power settings on your htpc to sleep when the power button is pushed.

[Image: custom%20buttons.PNG]

[Image: standard%20buttons%201.PNG]

[Image: standard%20buttons%202.PNG]

[Image: standard%20buttons%203.PNG]

[Image: standard%20buttons%204.PNG]

2) Create a bat file to launch directly to the Netflix plugin in Windows Media center. Open up Notepad in Windows and type:

Start windowsmediacenterapp:{e6f46126-f8a9-4a97-9159-b70b07890112}\{982ea9d3-915c-4713-a3c8-99a4688b7c59}?EntryPointParameters=

Save the file as netflix.bat (or whatever you want). Just make sure it is saved as a .bat file.
find quote
shaxs Offline
Junior Member
Posts: 15
Joined: Nov 2010
Reputation: 0
Post: #2
3) Create the AutoHotKey scripts. AutoHotKey is a neat little utility that allows you to write custom scripts that do things when executed. I only scratched the surface on what it can do. The idea is to have a script executed that will launch a certain application, maximize the windows of that application, and kill any of the other major applications in the background. For example, when I execute the Netflix script, it will first check to see if NetFlix is already running and if so, focus on it and maximize the window. Otherwise, it will launch the bat file above in step 2 and then look for XBMC and Hulu and see if they are running. If they are, they kill them in the background. The same thing is done for XBMC except it looks to kill Netflix (Windows Media Center) and Hulu. Please note, all examples below also include Boxee in the kill process. All scripts are written in Note Pad and saved as a .ahk file.

Script for XBMC:

Quote:IfWinExist XBMC
{
WinActivate

}
else
{
Run C:\Program Files (x86)\XBMC\XBMC.exe
WinWait XBMC
WinActivate

}

IfWinExist, Hulu Desktop
WinClose ;

IfWinExist, Windows Media Center
WinClose ;

IfWinExist, BOXEE
WinClose ;

Script for Netflix:

Quote:IfWinExist Windows Media Center
{
WinActivate
WinMaximize ;
}
else
{
Run C:\Users\Jason\Desktop\netflix app.bat
WinWait Windows Media Center
WinActivate
WinMaximize ;
}

IfWinExist, XBMC
WinClose ;

IfWinExist, Hulu Desktop
WinClose ;

IfWinExist, BOXEE
WinClose ;

Script for Hulu:

Quote:IfWinExist Hulu Desktop
{
WinActivate
WinMaximize ;
}
else
{
Run C:\Users\htpc\AppData\Local\HuluDesktop\HuluDesktop.exe
WinWait Hulu Desktop
WinActivate
WinMaximize ;
}

IfWinExist, XBMC
WinClose ;

IfWinExist, Windows Media Center
WinClose ;

IfWinExist, BOXEE
WinClose ;

Note: Make sure that .ahk files are associated with AutoHotKey. I had issues downloading and installing AutoHotKey so let me know if you need help here.

4) Set Windows to auto start your preferred application. For me that application is XBMC. Go to Start > All Programs > Right click on the Startup folder and select "Explore for all users". This will open a Windows Explorer box of the Startup folder. Copy one of your AutoHotKey scripts to this folder. This way when Windows starts, the script to launch, say XBMC, is triggered.

5) Setup WinHotKey to map a specific keyboard key to launching your scripts. For me I used F8-F11. Make sure you uncheck "When I press these keys:" so that ONLY the F keys are needed to be pushed in order to trigger the launch command. Im not sure if the Harmony remote can do custom key presses like windows key + F10 which is why I have this unchecked. In the dropdown for "I want WinHotKey to:" choose 'Open a Document'. Make sure that whatever keys you select here to launch your scripts is mapped to the same custom keys on your Harmony Remote.

[Image: WinHotKey.PNG]
find quote
mheath Offline
Junior Member
Posts: 1
Joined: Jan 2011
Reputation: 0
Post: #3
Great post. I had been trying to come up with a solution to the IDENTICAL problem (W.A.T., Harmony and all). You just saved me hours.
find quote
jdawg0528 Offline
Junior Member
Posts: 40
Joined: Sep 2010
Reputation: 0
Location: Sartell, MN USA
Post: #4
Outstanding. Very nice work, thanks for sharing. I just ordered the hardware for my first XBMC HTPC today, definitely going to incorporate this. Now I'm even more stoked to build it and get it up and running Smile

Thanks again.
find quote
shaxs Offline
Junior Member
Posts: 15
Joined: Nov 2010
Reputation: 0
Post: #5
Awesome! Glad you found it helpful. I will be honest, I was surprised at how little attention this thread got here. I thought it was pretty useful.
find quote
randal Offline
Junior Member
Posts: 6
Joined: Mar 2010
Reputation: 0
Post: #6
Another thanks! I have the same config, but have had issues launching Boxee. This gives me some solutions to issues that I've fought with for months. Thank you for the terrific write up!
find quote
neomits Offline
Junior Member
Posts: 35
Joined: Jan 2010
Reputation: 0
Post: #7
Very cool, and well written post. Great for WAF.

I set this up on my Revo 3610 last night and it works great, but the time switching between programs is drastically longer than yours. I'm guessing its just the slower CPU.
find quote
hick Offline
Senior Member
Posts: 118
Joined: Jan 2011
Reputation: 0
Post: #8
I <3 this thread.
find quote
Salem Offline
Junior Member
Posts: 39
Joined: Mar 2011
Reputation: 0
Post: #9
Great tut. Thanks for taking the time to help!

I'd just say to folks that try and use the online Harmony software, it might be a little more confusing and have a few minor discrepancies.

I'd recommend downloading the 7.7.0 software if it's available for your OS and give it a go. I used it on my Harmony 650 just yesterday.
find quote
RGB_Gamer Offline
Senior Member
Posts: 118
Joined: Jul 2011
Reputation: 0
Post: #10
I know this thread is old, but it is very useful! I myself have a Harmony Universal Remote (Has XBOX 360 buttons) that I use with XBMC, and I have an HP IR reciever. I was wondering, how would I configure my PC (it's running Windows 7 64-bit) so that I can turn the PC off/on?
find quote
Deniz343 Offline
Junior Member
Posts: 13
Joined: Jan 2012
Reputation: 0
Post: #11
shaxs Wrote:3) Create the AutoHotKey scripts. AutoHotKey is a neat little utility that allows you to write custom scripts that do things when executed. I only scratched the surface on what it can do. The idea is to have a script executed that will launch a certain application, maximize the windows of that application, and kill any of the other major applications in the background. For example, when I execute the Netflix script, it will first check to see if NetFlix is already running and if so, focus on it and maximize the window. Otherwise, it will launch the bat file above in step 2 and then look for XBMC and Hulu and see if they are running. If they are, they kill them in the background. The same thing is done for XBMC except it looks to kill Netflix (Windows Media Center) and Hulu. Please note, all examples below also include Boxee in the kill process. All scripts are written in Note Pad and saved as a .ahk file.

Script for XBMC:



Script for Netflix:



Script for Hulu:



Note: Make sure that .ahk files are associated with AutoHotKey. I had issues downloading and installing AutoHotKey so let me know if you need help here.

4) Set Windows to auto start your preferred application. For me that application is XBMC. Go to Start > All Programs > Right click on the Startup folder and select "Explore for all users". This will open a Windows Explorer box of the Startup folder. Copy one of your AutoHotKey scripts to this folder. This way when Windows starts, the script to launch, say XBMC, is triggered.

5) Setup WinHotKey to map a specific keyboard key to launching your scripts. For me I used F8-F11. Make sure you uncheck "When I press these keys:" so that ONLY the F keys are needed to be pushed in order to trigger the launch command. Im not sure if the Harmony remote can do custom key presses like windows key + F10 which is why I have this unchecked. In the dropdown for "I want WinHotKey to:" choose 'Open a Document'. Make sure that whatever keys you select here to launch your scripts is mapped to the same custom keys on your Harmony Remote.

[Image: WinHotKey.PNG]

Hi,

I have only XBMC do I need still create script
find quote
crimsonfury Offline
Fan
Posts: 514
Joined: Mar 2012
Reputation: 1
Location: Arizona, U.S.
Post: #12
What if I want to make this a Link on home screen? How do I set that up?

I want it to be a link on the home screen that my wife could click on "Netflix" and it would minimize XBMC and jump right to WMC-Netflix!

[Image: all-thin-banner@2x.jpg]
find quote
wjhazel Offline
Junior Member
Posts: 3
Joined: Mar 2011
Reputation: 0
Post: #13
Everything works like a charm, sans Netflix in WMC. Screen flickers like it's trying for a sec and then goes back to desktop.

Verified it's saved as a .bat file and that it's actually loading the script. Ideas?

Windows 7 Home Premium Edition

****UPDATE****
Fixed, stupid me had a trailing space at the end of the

Start windowsmediacenterapp:{e6f46126-f8a9-4a97-9159-b70b07890112}\{982ea9d3-915c-4713-a3c8-99a4688b7c59}?EntryPointParameters=

command. Gracias.
(This post was last modified: 2012-04-20 00:09 by wjhazel.)
find quote
svinyard Offline
Member
Posts: 76
Joined: Jul 2011
Reputation: 0
Post: #14
Hey your guide helped me setup a Harmony 900 with OVU412002 DELL receiver and worked great.

The only issues I had are the following:

1- After setting up my two Keyboard and remote devices I still had to set them to be transmitted over RF. They would work over IR initially but mysteriously nothing happened over RF. This was fixed in the remote settings and can be googled (set harmony 900 RF device settings).

Basically I went into the menu, RF settings on the remote (in there somewhere is a menu with all devices on it...you can select each one to toggle RF usage on or off).

2- Your guide doesn't mention how to setup the power options for Sleeping and Waking your XBMC box (not that I saw). This is critical for WAT certification. Fast start up and fast shutdown are keys to ease of use.

I accomplished this by going into the Harmony Menu>Devices>(Your MCE Remote) Settings. From here I said this device can be turned on and off using separate keys. I setup to power on using the "POWER" toggle as PowerON specifically had no effect. For power off I was however able to use the "PowerOff" specifically. All of this allowed me to sleep my machine quickly and bring it online immediately using only the harmony remote.

SIDE NOTE: Sleeping/Waking a Windows PC for weeks is not advisable as Windows gets crappy after a few times. To fix this I simply created a Batch file with one line in it "shutdown -r -t 05". I then setup a Windows Scheduled task to run this script every night at 3am. Programs>Accessories>System Tools>Task Scheduler. This greatly increases overall stability when using Sleep/Wake.

My machine is a Gigabtye ITX Fusion Zacate system. Movies are on a 1.5 terrabyte seagate USB 3 external drive. I use confluence but I modded it to have a Kiosk Mode...which is the final step in WAT certification.

Thanks for the guide!!
find quote
Livin Offline
Posting Freak
Posts: 3,525
Joined: May 2004
Reputation: 17
Location: above ground
Post: #15
I had not seen this thread before... I use Eventghost so I don't need AHK, but I'll ask a question just for my own future use...
Why not eliminate WinHotkey and just use AHK to launch your apps?

example:

#N::Run %WinDir%\notepad.exe

I'm not an expert but I play one at work.
find quote
Post Reply