HOW-TO: Use a Harmony Remote to Seamlessly Use XBMC, Hulu Desktop, and Netflix - AVS Forum
Forum Jump: 
 
Thread Tools
post #1 of 27 Old 12-03-2010, 02:26 PM - Thread Starter
Member
 
shaxs's Avatar
 
Join Date: Jan 2005
Posts: 45
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
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

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.



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?t=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.











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.

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\
etflix 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.ex e
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.

shaxs is offline  
Sponsored Links
Advertisement
 
post #2 of 27 Old 12-03-2010, 02:47 PM
Member
 
plew's Avatar
 
Join Date: Aug 2008
Posts: 37
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Thanks. I'm going to try it but using the color buttons on a MCE remote to switch between XBMC and Netflix. I don't have a Harmony but may go that route later.
I'm only using Win Media Center so I can get to Netflix. XBMC is my main front end.

Patrick
plew is offline  
post #3 of 27 Old 12-03-2010, 08:04 PM - Thread Starter
Member
 
shaxs's Avatar
 
Join Date: Jan 2005
Posts: 45
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by plew View Post

Thanks. I'm going to try it but using the color buttons on a MCE remote to switch between XBMC and Netflix. I don't have a Harmony but may go that route later.
I'm only using Win Media Center so I can get to Netflix. XBMC is my main front end.

Patrick

Cool, wasnt sure you could reprogram the keys on a MCE remote. If you can, those colored buttons will be perfect. Red = Netflix, Green - Hulu
shaxs is offline  
post #4 of 27 Old 12-04-2010, 06:47 AM
Member
 
plew's Avatar
 
Join Date: Aug 2008
Posts: 37
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
See this thread.

forum.xbmc.org/showthread.php?t=78179


Looks doable. I'll let you know.
plew is offline  
post #5 of 27 Old 12-04-2010, 08:19 AM
Member
 
Mallet21's Avatar
 
Join Date: Jan 2009
Posts: 147
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Outstanding !!

I've been waiting on working plugins for Hulu and Netflix on XBMC to complete my HTPC but this pretty much eliminates any need for those plugins. Thanks again !!
Mallet21 is offline  
post #6 of 27 Old 12-04-2010, 10:16 AM
Member
 
plew's Avatar
 
Join Date: Aug 2008
Posts: 37
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Shaxs, Great write up. It went very smoothly. Only change was where my executables were. I got my MCE remote working with large green button for XBMC, red button for Netflix, and green button for Hulu. Hulu is new for me. Everything is working seamlessly. Thanks again. Patrick
plew is offline  
post #7 of 27 Old 12-04-2010, 07:07 PM
AVS Special Member
 
Smitty2k1's Avatar
 
Join Date: May 2005
Location: Washington DC
Posts: 1,034
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 12
Great resource thanks!
Smitty2k1 is online now  
post #8 of 27 Old 12-04-2010, 07:33 PM - Thread Starter
Member
 
shaxs's Avatar
 
Join Date: Jan 2005
Posts: 45
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Im glad ya'll are finding it useful! I needed a good solution that my wife could use and this seems to work great.
shaxs is offline  
post #9 of 27 Old 12-11-2010, 11:47 AM
Senior Member
 
bob2300NX's Avatar
 
Join Date: Jun 2005
Posts: 334
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 1 Post(s)
Liked: 12
Thanks shaxs this has been really useful. I was using hulu integration before, it would open/close media center/hulu perfectly but it would not focus media center. So when I would close hulu and it would automatically open media center I could see MCE but could also see the taskbar so it wasnt focused.

This has fixed it and I have removed hulu integration. One problem I am having is I have noticed more crashes in hulu. It would happen before when you open hulu sometimes it would crash. I am having this problem but it is more frequent and I am wondering if the batch file is doing it.
bob2300NX is offline  
post #10 of 27 Old 12-11-2010, 04:10 PM - Thread Starter
Member
 
shaxs's Avatar
 
Join Date: Jan 2005
Posts: 45
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Very odd. Im not having any Hulu crashes on two machines. The batch file should only be used for Windows Media Center.
shaxs is offline  
post #11 of 27 Old 12-11-2010, 04:35 PM
Senior Member
 
bob2300NX's Avatar
 
Join Date: Jun 2005
Posts: 334
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 1 Post(s)
Liked: 12
Quote:
Originally Posted by shaxs View Post

Very odd. Im not having any Hulu crashes on two machines. The batch file should only be used for Windows Media Center.

I guess I miss spoke. I meant the autohotkey scripted. I will keep testing it but just seemed like weird timing that it was crashing more frequently all of a sudden.
bob2300NX is offline  
post #12 of 27 Old 12-11-2010, 08:21 PM - Thread Starter
Member
 
shaxs's Avatar
 
Join Date: Jan 2005
Posts: 45
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Is it crashing on startup? Closing? Or randomly?
shaxs is offline  
post #13 of 27 Old 12-11-2010, 08:32 PM
Senior Member
 
bob2300NX's Avatar
 
Join Date: Jun 2005
Posts: 334
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 1 Post(s)
Liked: 12
Quote:
Originally Posted by shaxs View Post

Is it crashing on startup? Closing? Or randomly?

I have my machine to goto WMC automatically but when I hit the hulu button as it is loading hulu it is crashing and then if I hit enter it closes.
bob2300NX is offline  
post #14 of 27 Old 01-13-2011, 10:34 AM
Senior Member
 
bob2300NX's Avatar
 
Join Date: Jun 2005
Posts: 334
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 1 Post(s)
Liked: 12
UPDATE: Working great. I have figured out the crashing, so videos that autoplay are sometimes buggy. I noticed it later on that it would keep crashing until I was able to pick some other video.

Thread deserves a bump.
bob2300NX is offline  
post #15 of 27 Old 01-13-2011, 11:55 AM - Thread Starter
Member
 
shaxs's Avatar
 
Join Date: Jan 2005
Posts: 45
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Glad you got it figured out!
shaxs is offline  
post #16 of 27 Old 04-15-2011, 10:22 AM
Member
 
tomjoetan's Avatar
 
Join Date: Mar 2011
Posts: 24
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
I know this is an old topic but I have a question regarding Boxee Launching
I created an autohotkey script that launches Boxee but will not kill the other applications running, whether it be XBMC, Hulu or Neflix.
Here is the script:
Quote:


IfWinExist Boxee
{
WinActivate

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

}

IfWinExist, Hulu Desktop
WinClose ;

IfWinExist, Windows Media Center
WinClose ;

IfWinExist, XBMC
WinClose ;

Am I missing something?? Im not really a programmer so it is very possible
tomjoetan is offline  
post #17 of 27 Old 04-15-2011, 10:53 AM - Thread Starter
Member
 
shaxs's Avatar
 
Join Date: Jan 2005
Posts: 45
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Humm...

Try this:

IfWinExist Boxee
{
WinActivate

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

IfWinExist, Hulu Desktop
WinClose ;

IfWinExist, Windows Media Center
WinClose ;

IfWinExist, XBMC
WinClose ;
shaxs is offline  
post #18 of 27 Old 04-15-2011, 11:06 AM
Member
 
tomjoetan's Avatar
 
Join Date: Mar 2011
Posts: 24
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Ok i'll try that when I get home, Thanks for the quick reply!

Do you think it is just getting hung up at the boxee launch command and doesn't go any further hence not killing the background apps?
tomjoetan is offline  
post #19 of 27 Old 04-15-2011, 11:08 AM - Thread Starter
Member
 
shaxs's Avatar
 
Join Date: Jan 2005
Posts: 45
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
That is my guess. I do have a Boxee script I wrote too. I formatted my computer but it is on my HTPC machines. Let me see if I can find those.
shaxs is offline  
post #20 of 27 Old 04-15-2011, 07:21 PM
Member
 
tomjoetan's Avatar
 
Join Date: Mar 2011
Posts: 24
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Ok I got the script working.... I just had to cap 'BOXEE'
Thanks for your help
tomjoetan is offline  
post #21 of 27 Old 04-15-2011, 08:21 PM
AVS Special Member
 
bonscott87's Avatar
 
Join Date: Oct 2000
Location: Wilds of West Michigan
Posts: 3,964
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 22
FYI that you could use the XBMC, Hulu Desktop and Boxee plugs for WMC found here: http://teknowebworks.com/

Seamless really with WMC and your remote will work with them all with no further programming or macros. I simply had my MX-700 "learn" all the buttons on my WMC remote and it's good to go.

Scott
bonscott87 is offline  
post #22 of 27 Old 04-16-2011, 05:08 AM
Newbie
 
bobonov's Avatar
 
Join Date: Apr 2007
Posts: 7
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by bonscott87 View Post
FYI that you could use the XBMC, Hulu Desktop and Boxee plugs for WMC found here: http://teknowebworks.com/

Seamless really with WMC and your remote will work with them all with no further programming or macros. I simply had my MX-700 "learn" all the buttons on my WMC remote and it's good to go.
They do work as advertised, but whenever I would go back to WMC, the Windows taskbar would be in focus instead of Media Center and I'd have to click a mouse button or alt-tab or something. I had better luck with the Hulu, Boxee, Zinc Launcher plugins at The Green Button (sadly, no XBMC plugin yet):

http://thegreenbutton.com/forums/t/87094.aspx
bobonov is offline  
post #23 of 27 Old 04-16-2011, 06:16 AM
AVS Special Member
 
bonscott87's Avatar
 
Join Date: Oct 2000
Location: Wilds of West Michigan
Posts: 3,964
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 22
Quote:
Originally Posted by bobonov View Post
They do work as advertised, but whenever I would go back to WMC, the Windows taskbar would be in focus instead of Media Center and I'd have to click a mouse button or alt-tab or something.
Strange. Never had that happen to me once in over a year of having this HTPC. Weird.

Scott
bonscott87 is offline  
post #24 of 27 Old 06-19-2011, 05:01 PM
Member
 
mykebass's Avatar
 
Join Date: Mar 2003
Location: Germantown, MD
Posts: 46
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
First, thanks for the information. Just an FYI that you might be able to clean up the number of applications your running by simply creating one autohotkey script which is run at startup. Contained within the script you'd use hotkey labels for each sub-script.

For example, the following code would active whenever you press the windows+z button:

#x::
IfWinExist XBMC
{
WinActivate
}
else
{
Run C:\\Program Files\\XBMC\\XBMC.exe
WinWait XBMC
WinActivate
}
IfWinExist, Hulu Desktop
WinClose ;
IfWinExist, Windows Media Center
WinClose ;
return

You could add to this hotkeys for boxee and netflix. Using this approach, you could do away with the winhotkey program and you'd simply be left with one autohotkey script that launches at startup, waits for the keyboard commands (send from your Harmony) and launches.
mykebass is offline  
post #25 of 27 Old 02-03-2012, 06:59 AM
Newbie
 
Fezzik222's Avatar
 
Join Date: Feb 2012
Posts: 1
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
I know this is a really old thread, and I haven't been able to take the time to look through every comment to see if this has been mentioned, but i've made 2 modifications to the Netflix script that do the following:

1) Removes requirement for separate .bat file.
2) Removes the IfWinExist, Else for Windows Media Center thus allowing a jump straight to the Netflix panel even if you're already in media center.

Quote:


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

IfWinExist, XBMC
WinClose ;

IfWinExist, Hulu Desktop
WinClose ;

IfWinExist, BOXEE
WinClose ;

Fezzik222 is offline  
post #26 of 27 Old 02-03-2012, 01:17 PM
Advanced Member
 
djearl81's Avatar
 
Join Date: Jan 2005
Location: Midwest
Posts: 722
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 9 Post(s)
Liked: 20
Looking forward to trying this. Thanks for the post.

I'm confused too.

djearl81 is offline  
post #27 of 27 Old 02-03-2012, 01:25 PM
Member
 
alnztln's Avatar
 
Join Date: Oct 2009
Posts: 26
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by bonscott87 View Post

Strange. Never had that happen to me once in over a year of having this HTPC. Weird.

I have that, it gives focus to the taskbar at the bottom....I have my Harmony set up with "mouseleft" and "mouseright" keys, so it just takes a quick click of "mouseleft" to get focus back on WMC, but it is annoying.
alnztln is offline  
Reply Home Theater Computers

User Tag List

Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page


Forum Jump: 

Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off