EPISODE 4: Opening and Closing Applications

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 ...


EPISODE 3: Pairing the Harmony One with Remote Buddy

Pairing the remote buddy with either Plex or Boxee is a trivial process.

1. Select the "Home Theatre" activity in your Harmony One remote control (The one we setup in EP2).

2. With you mouse open either Boxee or Plex.

3. Select the Harmony input method.



By selecting "Always Running" in one of them we configure the system in such way that when the "Play" button is pressed it opens either Boxee or Plex. We can also have of one of these apps opening up as soon as the computer starts, but just one.

This is nice yet we want with the touch of a button jump between features that may be inside different apps, not just one app.  We do this with another app called Remote Buddy.

In the Mini Harmony system, Remote Buddy works as an translator of button/key presses on the Harmony One (hard and soft) to actions taken by HTPC.

1. So please download and install Remote Buddy

2. After installation select "Preferences" in Remote Buddy.

3. We will now pair the Harmony Remote with RB so select "Hardware".

In the picture above we see an area on the left with list of all receivers available, while on the right we see their configuration. Each receiver accepts input from several emitters, in our case one emitter is an Harmony One remote control.

We know that the RB can recognize the Harmony as if we had 10 Apple remotes working in paralel. Unfortunately it does not recognize them automatically.

4. Most probably your Mac has a IR receiver built in, that is certainly the case of a Mac mini, so select the "BUILT IN IR RECEIVER" in the left area.

5. On the right select "Enable support or multiple remote controls" followed by select "Automatically newly found remotes to control this computer".

6. On your Harmony One select the "Home Theatre". This puts the Harmony One in a mode such that any button press is mapped to a Plex action as we have defined in EP1. This is necessary for your Mac and RB in particular to able to recognize the remote control.

7. Press each button of the Harmony until you see 10 entries in the "Pair with selected remote" panel.

Basically by pressing the buttons on the Harmony we are adding Apple remote controls. Each remote has an ID.

As we have said earlier, RB recognizes the Harmony One remote as 10 independent Apple remotes. This is such way that all the buttons of our Harmony One (both soft and hard keys) are spread across these 10 Apple remotes.

In the end we should have remotes with ID 150, 151, 152, 153, 154, 155, 157, 158, 158, 160 listed on the screen as in the picture above.

8. In RB we don't configure anything against the physical remotes that RB recognizes. So we need to add one logical remote on the right for each Apple remote on the left. 

We start by adding one by clicking the "+" button on the "Logical remotes" area and write "AR150".

9. Now that we have defined the logical remote "AR150" we will map it to a Apple remote on the right. So on the first line in the area "Pair with selected remote" (the one with ID 150),  click in the cell  "Mapped to logical remote" and select the AR150 logical remote that we have just defined.

10. Now repeat the steps 8 and 9 adding the rest of the logical remote controls (AR151, AR152, AR153, AR154, AR155, AR157, AR158, AR158, AR160) and mapping them to the respective apple remote. We need to get a picture like the following:

That is it. Now we have the RB paired with our Harmony One.

All this is necessary because unfortunately the RB does not have a predefined profile for the Harmony One remote control (Plex actions). Hope later versions will have this profile already set for us.

11. We will now map some keys of our Harmony One remote control, when in the "Home Theatre" activity, to some actions on our HTPC.  Just to get the feeling of it.

So please select "Mapping".

Has you can see in the picture we have two large areas. On the left we see a list of "Behaviours" and on the right we have mappings between the buttons and actions for each logical remote that we defined (and some more).

Like all "genious" type of software, Remote Buddy is a bit schizophrenic. It has multiple personalities depending how you see it, yet that is precisely why it is so powerful.

For us to understand it better we should know that what is shown on the left is nothing but a list of keymaps. A keymap being a simple list that defines a correspondence between a key or button in a keyboard (say a remote control keyboard) and an action in the HTPC.

By selecting a "Behaviour" on the left we indeed are selecting a keymap that is then presented on the right. I would say that "Behaviour" is not the most explicit name for the task, it should be "keymap".

Remote Buddy allow us to define a keymap for each application we want to control (and some more). To this it provides us with a set of predefined keymaps to control the applications that we may have already installed.

If you have installed Boxee and Plex you should see a Plex keymap and Boxee keymap on the left.

We can change the predefined keymaps but we can also create new ones. Furthermore, keymaps can be defined for other things but to control applications. We will use this feature later in EP4.

Now remember that we defined a logical remote for each of the 10 Apple remotes that RB recognized for our Harmony One. As we said earlier RB only works with logical remotes, so we have no explicit correspondence between the keys in the Harmony that we mapped to Plex actions, to keys of these logical remotes in Remote Buddy.

This is where the following info comes handy.

The figure above shows as how each Button/Plex-Action that we configured for the "Home Theatre" activity back in the Harmony One software to the keys in the logical remotes in Remote Buddy.

This is always the same irrespectively how we name the soft buttons in the Harmony.

For "hard buttons" it is easy to understand as the naming scheme for Plex actions follows closely the ones setup for the  Harmony. So when we press hard button "Menu" in our Harmony One,  it correspondes to the Plex action "Menu" , and by looking at the reference table above we are virtually pressing the "Menu" button on the logical remote "AR150".

[Harmony Button] -> [Plex Action] -> [Logical Remote Button]

Now for "soft buttons" we can name them anyway we would like in the Harmony. Remember that "Boxee" soft button that we have mapped to "Green" Plex action EP2? That's right, when we press the soft button "Boxee" defined in EP2 we are virtually pressing the "Left" button on the logical remote "AR159" since it maps to "Green" Plex action.  The name we give to the soft button does not matter, what matters is the Plex action we gave to it ("Green").

So the best way to configure this is start by using "Plex" names or all button and then change them as we would like. We haven't followed this practice and named two soft buttons as "Boxee" and "Plex" instead of "Green" and "Red" right away in EP1 for the sake of the tutorial. This may make things more difficult to understand for some people yet I hope not too much.

12. What we want now is to have Remote Buddy opening either Boxee or Plex when we press the "Boxee" or "Plex" soft-buttons in the Harmony One.

To this we know the following:

A. Each keymap in RB is either active or inactive.

B. If a keymap is inactive and the corresponding application is not running, activating the keymap by default opens the corresponding application.

C. If a keymap is inactive and the corresponding application is already running, activating the keymap brings the corresponding application to the front of any other.

D. For any key press, RB first looks in the Global keymap for the mapping. If none is found then it looks for it in the active keymap. Finally if no mapping is found it turns to the Default keymap.

Given the above all we need to do is then tell RB that when "Boxee"(AR159, Left) or "Plex" (AR159, Right) keys are pressed on our Harmony One  it should activate the keymap "Boxee" or "Plex" whatever is current active keymap.

The first thing we need where we will put our mapping.

Given the above our choice then the Global keymap since it is the first to handle anything irrespectively of any active keymap that may be active:

- Map the Left button of the logical remote AR159 to the action "Activate Boxee Behaviour".

- Map the Right button of the logical remote AR159 to the action "Activate Plex Behaviour".

Voila! We can now press the soft-button Plex and Boxee and see that both Plex and Boxee application start.

This is the end of episode 4. We have learned a lot I hope. Our Harmony One is paired with RB, we now understand the basics of RB and how it works. We also learned that the keys of our Harmony Remote are mapped not only to Plex actions but indirectly are also mapped to keys of logical Apple remotes in the RB. So we used this information to start both Plex and Boxee with a touch of a button.

Yet this isn't still what we would like. We would like that when Plex starts Boxee closes and vice versa. That is, to save resources we want only one HTPC app to be running at a time. Much like the iPhone works. To this we need to understand a but more about actions, but that is for the next episode.

All this indirection would be unnecessary if RB simply supported the Harmony remotes, making things easier for us. Oh well, we can only hope.


EPISODE 0: Setting the objectives of the Tutorials


EPISODE 1: Architecture

WARNING: WORK IN PROGRESS (DRAFT) The picture on the left describes the architecture and the technologies used to customize a system that is both extremely versatile for the power user and simple to operate by our guests and family.

As you can see by the picture, different apps provide a distinct feature set to the solution. Some features need to use a VPN while others do not.

The features might also be integrated deep into the apps yet we the system gets the user there quickly by passing menus.

To achieve its goal the system uses the features provided by Remote Buddy coupled with Apple Scripts.

The experienced users probably recognize that this approach is not unique or original, but hopefully there will be something to be learned and shared in the next episodes.

You will need:

- Apple Mac
- Harmony One Remote Control
- Remote Buddy
- Plex
- Boxee
- Kylo


- VPN account along with Viscosity
- Hulu Desktop

By the end of these tutorials you will know how to add whatever features you may like or dislike.

So stay tuned.

EPISODE 2: Preparing the Harmony One to be Paired with the HTPC


Pairing the Harmony One remote with the Mac mini is a two step process. The first step is done with the remote control. The second step with the Mac mini, our HTPC.

Added to this it can be done with or without the Remote Buddy software.

We will start without the Remote Buddy but to achieve the kind of fluent control of multiple apps we will use it.

We assume that you have already configured the remote to pair with both your TV Set and Amp if you have one. It is also assumed that you already have basic knowledge about configuring devices and activities with the Harmony remotes.

So let's prepare our Harmony One for the rest of the episodes. For most of the stuff we will not need to do anything else to the Harmony but the following.

1. Load you Harmony Software and click "Add Device".

2.  Select the "Media Center PC" for device, "Plex"for manufacturer and" Plex Player" for the model as you see in the pic bellow.

3. Click "Next".

4. Click do "Save". You should then see your Media Center PC device as follows (Plex).

5. Click "Settings" and rename the device to your fitting but I suggest Home Theatre PC. Press "Save".

6. Select "Advanced Setup for this device" and click "Next".

7. Select "I want to leave this device on all the time". Click "Next".

8. Select "One button on the remote for turning it both On and Off". Click "Next".

9. Since your HTPC will always on what the "On/Off" button is irrelevant. Just Select as you see bellow and click "Next".

10. The Harmony One is not a fast remote control. The most responsive settings that I've found while not compromising speed are as you see bellow. If you have any other please share. Click "Next".

11. The setting bellow depends on the way your TV Set changes inputs. You know, "AV1", AV2", "HDMI-1" etc. Select yours and click "Next". Mine is as represented in the pic bellow.

12. Click "Next"

13. We will use three numbers to emulate changing channels in the HTPC. Instead of changing channels we will actually run applications or select features. Each number will correspond to an app or feature. Select as you see bellow and click "Next".

14. Click "Next". Click "Done". Click "Done".

15. We will now add an Activity to the "Home Theatre PC" device. Select as you see bellow and click "Next".

16. The configuration will be done manually. Click "Next".

17. We need to choose an activity type of "Watch Television". If not for its ability to present a list of favorite channels with Icons our choice could be different. But we want this feature for later episodes so select as you see bellow and click "Next".

18. What actually instructs the TV about what is to be displayed is our "Media Center PC" so select as you see bellow and click "Next".

19. What controls the operation of switching channels is our Home Theatre PC. Select as you see bellow and click "Next".

20. What actually displays the video is our TV Set. In my case is an LG TV you'll need to choose yours.

21. You will need to choose your Amplifier if the Mac mini connected to it using the sound output jack. If you have and your Mac mini sound output connected to your TV then choose your TV. Otherwise choose "Plex Home Theatre PC" and click "Next".

22.  You will need to choose the "input" to which the Mac mini is connects to your TV Set. In my case I'm connected the Mac mini to my LG TV Set with a DVI-to-HDMI cable connected through HDMI-1. Check how your TV names its inputs select and click "Next".

23. Select "Yes, but I want to add more control or options and devices for this Activity" followed by a click on "Next"

24. Click "Save". Click "Next".

25. We will now add a "Start Action". So select "Plex Home Theatre PC" and click "Add>>".

26. Select "Send this infrared command" and select "F7". Click "Next".

27. You should have a screen similar to the following pic. Now add a "Leave Action". The steps are very much the same has for the "Start Action". Yet instead of selecting "F7" choose "Powertoggle"

28. After adding the "After Action" you should now see a screen as the following pic. Click "Save".

29. Review your settings and click "Next".

30. Click "Done". Click "Done". On you list of activities you should have one activity as the pic bellow.

31. Now select "Settings" and then select the option to rename the activity followed by a press on the button "Next". Then give a new name to the activity and press "Save". I suggest "Home Theatre" for the name of the activity.

32. Click "Done". You should now have something similar to the following pic.

33. Now we need to customize the button of the remote to our fitting so press "Customize Buttons". You should see something like the following pic.

34. As you can see, the Harmony One software by default does not map all the its keys to Plex commands. So starting with the "Standard Buttons" we need to map them as you can see in the pic.

35. Now add all other admissible Plex command that don't fit in the hard keys of the remote. So we add them as additional buttons on the Harmony. Basically we map every single command that Plex may accept so that they can be used for any purpose we would like later. The Harmony One displays the additional buttons on the LCD. They are also called soft buttons. As you can see in the pic bellow Boxee and Plex are already suggested for you to define. They are being mapped to the Red and Green commands on Plex.

36. Click "Done"

37. Select "Set Up Favorite Channels and add icon" followed by a click on then "Next" button.

37. Add least the first 4 channels as you see in the pic bellow. The all of them will be referenced in the later episodes yet if you don't fancy those features there is no point in adding it. I also include all the icons that I'm currently using. If you have better ones please send me a comment as I no design skills.

Here are the icons:

Dark Blue Theme:

Light Blue Theme:

And that is it! For the rest the tutorials probably we will come once or twice to the Harmony One software, but 99% of the work is done.

In the next episode we will focus on doing what needs to be done on the Plex and Boxee side of things so stay tunned