EPISODE 4: Opening and Closing Applications

WARNING: WORK IN PROGRESS (DRAFT)
We now know how to pair our Harmony one with Plex, Boxee and Remote Buddy. We also know all about Remote Buddy keymaps and how we can define a mapping between a key on the Harmony and a Remote Buddy action.

So what?

Well with actions we can control multiple apps on our HTPC. Remote Buddy provide us with a library of "actions" for applications such as Plex, Boxee, iTunes, Safari and so on.

In the previous episode we have mapped the button "Boxee" and "Plex" to "Activate Boxee Behavior" and "Activate Plex  Behavior". Remember?


This is fine to open new applications. But we don't need both applications open at the same time. We want to close "Boxee" when "Plex" opens and vice versa. To do this we need a custom action.

Creating a Custom Action

1. Open the Remote Buddy menu and select "Behavior Construction Kit" option. Then select "Action Factory" as you see in the following picture.



2. Each action have a name and belong to a group. To add an action click on the "+" button in the bottom left corner as you see in the picture. In the group write "Mini Harmony" column. In the title write "Open Boxee".


3. Since we want the action to be globally accessible we select "Action globally available". This way we  can use the action in the Global keymap.


4. We will now define the steps that the action will take to achieve its goal. Select "Implementation".



5. To add a step click on the "+" sign and select "Behavior Action" as you see in the picture. We need this type of action because we want to reuse one already defined in the RB library.



6. Select "Execute Behavior Action" followed by "Behaviors" and finely select the action "Quit currently controlled application". This action basically closes whatever app is controlling at the moment. If it is "Plex" it closes "Plex", if it is "Boxee" it closes "Boxee", etc.


7. Click the "+" followed by  "Behavior Action" once again. Then select "Behaviors" followed by "Activate Boxee Behavior". This one you should already know what it does. If not check the previous episode.



8. After defining all the steps described for the "Open Boxee" action, our screen looks like the the one pictured bellow:


9. Now we will map this new action to the "Boxee" button on the Harmony that we have defined in a previous eposide. So go to Remote Buddy "Preferences" and open the "Mapping" window. There select the Global keymap.

If you have followed the last episode you should find something like it is shown in the following picture.


10. We will change the "Activate Boxee Behavior" action to the one we just defined. So bring up the action menu browse down to "Miscellaneous" and select "Open Boxee [Mini Harmony" as you see in the picture bellow.



11. Repeat the steps above to do the same for "Plex" 

An that is it. We now have RB opening and closing both "Boxee" and "Plex accordingly with a click of a button in the Harmony One. You can do the same with any other app with a behavior/keymap defined in RB.

Defining new Keymaps/Behaviors 

Say for instance we want to start an app for which there is no Keymap/"Behavior" yet defined. Without it we can not for sure control the app.

That is certainly the case of Kylo, the internet browser used by Mini Harmony to satisfy the needs of the couch potatoes in the house.

After installing Kylo we notice that RB does not show it in the "Mappings" window. So we need to add a brand new keymap.

For the purpose of this tutorial we will use Kylo as an example.

1. So please download and install Kylo if you haven't done already.

2. Open ...

30 comments:

July 6, 2010 at 11:38 AM Unknown said...

Looking good so far. I am curious how well you were able to get remote buddy to control Kylo. It seems they purposely made the browser keyboard commands limited in order to get people to buy their proprietary wireless mouse hardware. Netflix has recently started streaming HD to the Mac, but the Boxee and Plex plugins have not yet been updated to reflect it, and Kylo would be a great option until they do. Again... keep up the good work!

July 6, 2010 at 1:26 PM Unknown said...

I really need to find some time to finish this episode.

For Kylo you can use the remote to control the pointer but its a pain if you plan for some heavy browsing.

Due to this I bought the Logitech MX Air. Doubles as a air mouse (similar to wii) and as a laser mouse. It nice.

Cheers,

Nuno

July 10, 2010 at 4:56 PM Anonymous said...

This is amazing. Nuno, you are a gem!! I will be following these tutorials blow by blow as this is exactly how I would like my HT Mac to operate, but I am far too blonde to do it without your help!

Thanks,
Kate

July 28, 2010 at 2:20 PM Anonymous said...

Great series Nuno! I'd still be monkeying around with my mouse and keyboard if I had not found your posts. I've managed to get everything working as described, but have a problem mapping the Harmony Favorites (custom icons; hulu, ted etc.) to Remote Buddy actions. Mind giving us a little teaser as to how that's accomplished?

Spock.

July 29, 2010 at 2:56 AM Unknown said...

Spock,

I have the same thoughts as you. I'm going to open a thread titled "miniharmony unofficial discussion" so we can share ideas and work out how to crack this part of the ultimate theater solution. Search that title or my username on miniharmony, which is mobelby

July 29, 2010 at 2:59 AM Unknown said...

Spock,

I forgot to say the forum would be at the plex forums under user forums - general user help. Go to
http://forums.plexapp.com/index.php?/forum/3-general-user-help/

mobelby

July 29, 2010 at 12:05 PM Spock said...

Great idea mobelby, count me in!

July 29, 2010 at 12:51 PM Nuno Lopes said...

Sorry guys. I've been to busy to give the blog the proper feedback. I'm starting my holidays tomorrow. Next I week I plan to end this episode and have the next one posted.

The trick to use the favorites is more or less like this.

We know that the favorite channels in the Harmony works with numbers only right? Basically the channel number.

Now on the Miniharmony we don't have channel numbers we have keymaps that can be activated with key presses along with other actions.

So say we gave a number with 3 digits:

011

First number activate a keymap sat HTPC0. Second number activates another keymap HTPC1. Third number activates the application you want to run or any other actions you may think of.

1. Map the '0' button on the Global Behaviors to activate dummy keymap (say HTPC0).
2. On HTPC0 keymap you map the buttons 1 to activates keymap HTPC1
3. Activates BOXEE keymap (all is running straight)

The drawback is that since 0 is in the global behaviours it can no longer be used for anything else but activate the keymap HTPC0.

The good news is that you can put up to 9x9=81 favorite channels :)

Hope it helps.

Nuno

August 6, 2010 at 1:22 PM Anonymous said...

Hi Nuno! Looking forward to the episode explaining the "three digits". I was not able to set this up in Global Mapping based on your previous comment yet... Not sure to which keymaps these need to be assigned. Looking forward to the next episode! Thanks for creating these super episodes!!!

August 10, 2010 at 11:43 AM Regula Oblique said...

This is a great blog Im planning on setting this up when I purchase my mac mini. My favorite part is the computer lady voice that speaks when you open up a command. I hope you get some free time to finish soon lol

August 11, 2010 at 3:19 AM Anonymous said...

Nuno

"three digits"
Is the logic as follows:
1) In RB create a new 'Behaviour' called HTPC0 - our dummy keymap;
2) In RB Global Mapping set AR154 Right to activate HTPC0 'Behaviour';
3) In RB create another new 'Behaviour' called HTPC1 (and presumably eight further HTPC 'Behaviours');
4) In RB HTPC0 'Behaviour' map AR151 UP to activate HTPC1 'Behaviour'; and
5)In RB HTPC1 'Behaviour' map AR151 Up to Activate Plex or any other Behaviour?

cheers

Mark

August 12, 2010 at 1:28 AM Niels said...

I allready have an Harmony 555 for i think 3 years now.
But after upgrading to an Harmony One and reading your blogpostings for the first time i'm start to understand everyting.

Thanks for the work en please keep posting!

August 14, 2010 at 6:55 AM Anonymous said...

Any idea when we can expect this to be updated?

Partic looking forward to hoe you are getting the vpn to switch between your location to the US (Hulu) and then to the UK (iPlayer).

August 18, 2010 at 1:22 AM Unknown said...

These tutorials are very good. Thank you.

I am in the process of getting my system up and running and you have given me many ideas on how to do it differently to what I was originally planning.

I know I am probably getting ahead of myself but I'd really love to know how you are getting the applications to open in the certain sections. ie. Boxee opens in Pandora, Plex opens in music, Plex opens in movies. I assume this is via AppleScript?

Keep up the great work. Cheers mate.

August 26, 2010 at 11:18 AM Anonymous said...

These are awesome post and have helped me a ton. Any word on when you will make the next one?

September 18, 2010 at 8:13 AM Anonymous said...

When do you think this 4th episode can be finished?

September 30, 2010 at 5:41 PM Anonymous said...

Nuno,

I was able to set up the HPTC0,1,2 etc dummy behaviors and got the keymap.xml in boxee and plex working correctly the only problem I have is an error I get when I try to launch one of the short cuts. "behavior htpc1 does not support application quitting" any thoughts on how I can overcome this, is it a setting in RB action or behavior that I don't have set right?

October 4, 2010 at 6:43 PM Unknown said...

mobelby, or spock, how did you overcome the issue of "behavior htpc1 does not support application quitting"?

October 6, 2010 at 2:30 PM Anonymous said...

Why do I think that Nuno quit this blog?

October 7, 2010 at 3:32 PM Cory said...
This comment has been removed by the author.
October 10, 2010 at 11:40 AM Anonymous said...

Damn! 3 months since is last posting!!! What could have happened???

October 10, 2010 at 4:58 PM Cory said...

Hey Nuno,

How did you get Kylo to launch to a URL?

tried setting kylo to default browser and doing applescript "open location "http://www.whatever.com" and it doesn't work

October 18, 2010 at 9:00 AM Anonymous said...

Nuno,

PLEASE PLEASE continue this blog! You couldn't imagine how helpful it has been for so many of us. Before this blog I was using a wireless mouse and keyboard. With this blog you have now made my TV setup look like a regular television again. My wife is very happy now and I no longer have to hear that we might as well sit in front of the computer to watch a movie. :)

THANKS AND PLEASE KEEP UP THE POSTINGS!!!

December 11, 2010 at 2:59 AM Anonymous said...

Just chiming in to say: great job! and please keep posting.

December 12, 2010 at 2:03 PM Unknown said...

Hello All,

I've created a continuation of Nuno's great guide. Its step 4.5 and I've posted it at:

http://forums.plexapp.com/index.php/topic/15332-miniharmony-unofficial-discussion/page__view__findpost__p__131322

Please go take a look and let me know what you think.

February 7, 2011 at 9:25 AM Ryan said...

Re: Patrick, How did you overcome the "does not support application quitting" issue?

"mobelby, or spock, how did you overcome the issue of "behavior htpc1 does not support application quitting"?"

February 7, 2011 at 3:01 PM Ryan said...

Step 6 may be the cause. Patrick, mobelby, spock, Nuno, can you share your Step 6 settings again? Do you rely on the AppleScript to quit apps instead of Remote Buddy? If so, do you just delete this Behaviour Action altogether, or do you pick a new one?

June 16, 2011 at 1:38 AM ralph bacolod said...

got everything working pretty much on my macbook. love it!
one thing though is when I press power button it doesn't seem to exit the plex app. It just keeps running . I notice this when I flip open the macbook screen.

February 26, 2012 at 7:00 AM Sander said...

Hi Nuno,

Many thanks for the extensive tutorials. However they are now around for 2 years and I was wondering how and if you have improved your setup in those years?

And have you also considered integrating your other apple devices into this setup, so you could for instance also control the whole setup from your iOS device?

Thanks!

April 26, 2013 at 2:43 PM Anonymous said...

Hi

Thanks a lot for everything!!
Does anyone know how to add the female voice and how to control it??

This tutorial is amazing!!! Thanks again!!!

Post a Comment