Fun With Computers

March 1, 2008

Using the Harmony 880 remote with your mac’s built-in IR port.

Filed under: OS X — Tags: , , , — jkm9000 @ 9:45 pm
Recently I discovered a wonderful application called XBMC for Mac OS X. This application is a port of the popular media center developed for the original Xbox and despite being very new to the scene, is quite stable and full of features. After a few hours playing around I decided to ditch my previous setup (HTPC software running under XP) and use OS X XBMC for my home theater.
The biggest challenge I faced was using my Harmony 880. While I appreciate the simplicity of Apple’s remote, when it comes to a truly rich experience, 6 buttons simply are not enough. This meant that having my 880 mimic the Apple remote was not an option. After playing around with another wonderful piece of software called Remote Buddy, and finding a couple of posts on the possibilities, I have things working exactly as I had hoped. Since this does take quite a bit of time to get going, I felt that a guide would be useful to others.
Note this is written for XBMC, but pertains to any application you wish to control with your remote. I put this page together after I had everything working so hopefully it contains every step. If you notice anything missing, leave a comment and I will update the info here.

  • Harmony 880 remote (other learning remotes can also be used)
  • Mac with built-in IR port
  • Apple Remote
  • Remote Buddy
  • OS X XBMC (Intel leopard systems only)
The IR port on your mac will only process input from an Apple remote (or a universal that can send the same signals). While someone may develop a driver that expands the functionality, I have not been able to locate anything of this nature. Each button press on your Apple remote also passes along an ID number for that particular remote. In unpaired mode, your mac treats all remotes the same, so you can use the remote from your iMac to control your mini and vice-versa.
If you hold menu+play/pause for a few seconds this ID is incremented with possible integer values between 1 and 252. This allows your remote to send 1,512 (252 * 6) distinct signals (ignoring any differences sent when you hold down a button vs a press).
Fortunately, Remote Buddy takes advantage of this fact and allows you to create several logical remotes. While it does take some effort to get everything setup, the result is pretty seamless.

Step 1: Identify the keys
Behind the scenes Remote Buddy will be sending keystrokes to XBMC so your first step is to take a look at the keymap file and determine which keys you will be using. This file is located at ~/Library/Application\ Support/XBMC/UserData/Keymap.xml. After inspecting this file, I put together a spreadsheet to start mapping these keys to buttons on my 880. Please forgive the organization of this spreadsheet as I was learning as I went!
You can download my spreadsheet as a pdf here.

Step 2: Create the logical remotes and teach codes to your 880
After a bit of planning, I decided to use 8 logical remotes with remote buddy. To set this up, load Remote Buddy’s preferences, click on hardware, ensure that you have checked both “Enable support for multiple remote controls” and “Automatically authorize newly found remotes to control this computer.” Your screen should look something like the image below (ignore “ID” and “Mapped to logical remote” columns for now). Be sure not to click “Pair with selected remote.”
Now that the logical remotes have been created, you’ll teach your 880 the various signals from your Apple remote. The basic workflow is:
  1. Teach the harmony IR signals for each button on the Apple remote.
  2. Point the Apple remote to your mac running Remote Buddy and press MENU twice to register the remote id.
  3. Hold MENU+PLAY/PAUSE for a few seconds to increment the remote’s ID.
  4. Repeat 1-3 for each logical remote you have created.
To do this, connect your 880 to your mac using the supplied USB cable and launch the Logitech Harmony Remote Software. My approach was to create a new device called Mac Mini and then click “Learn IR.” Referring to my spreadsheet I knew that for the first logical remote I would be using 3 buttons:
Harmony Button Apple Remote Button
Channel + Up
Channel – Down
Prev Play/Pause
Some of the buttons on your 880 will already be listed, others you will need to create. To do this, just scroll to the bottom of page and find the section called “Learn a New Command”. Enter the name of the key on your 880, and click “Learn New Command.” This will present you with a new screen where you teach the 880 a command from the Apple Remote. It looks something like what you see below:
Teaching your Harmony a new IR command.
Point your Apple Remote towards the bottom of your 880 and press the button you are teaching. In my case for Channel Up, I pressed the Up (or +) button on my Apple Remote. Once the remote has learned the new command, it will take you back to the previous screen or learn the next one if you have selected to learn many at once.
After repeating this for each of the first 3 buttons, point your Apple remote to your mac, press MENU 2x and you should see the Remote Buddy software recognize the ID currently assigned to your Apple Remote. In my case, this was 75. I then mapped ID 75 to the logical remote named “Apple Remote.”
The next step in our workflow is to increment the ID of the Apple Remote by pressing both MENU+Play/Pause and holding for about 5 seconds. You won’t get any feedback here, but if you count to 5 you’ll be fine.
Lather, rinse, repeat. At the end of the process you will have taught your 880 all of the commands from your spreadsheet, and your Remote Buddy hardware preferences will look very much like the screenshot above. You will also need to update your remote using the Logitech software in order to transmit all of the learned commands.

Step 3: Create a new activity for your 880.
Using the Logitech software, create a new activity using the devices hooked up to your mac and name it XBMC. I won’t go through all the steps here, but you’ll need to customize the buttons on the 880 to match your hardware and to communicate with your mac. The below screenshot shows some of my custom button setup. Once the activity is complete, update the remote once more.
Harmony Custom Button Setup for XBMC
Step 4: Use Remote Buddy’s Behaviour Construction Kit to define keystrokes for XBMC.
Remote Buddy has a very useful feature called the Behaviour Constrution Kit which really allows the software to be customized for any application. The author of Remote Buddy has been kind enough to make a screencast that goes through every step in creating behaviors. Take a few moments and check it out here, but do come back as we still have some work to do!
Now that you understand how to use the Behaviour Construction Kit, go ahead and create actions for each keystroke in your spreadsheet. Once you’ve done this, it should look something like this:
Remote Buddy Behaviour Construction Kit Action Factory
At this point we depart slightly from the methods used in the screencast. You will still need to setup behaviours but we won’t do any mapping via the BCK, that is done elsewhere. So follow the screencast instructions, but skip over any mapping. Once you have selected all actions to be used in this behavior (screenshot below), click the little gear icon and select “Compile, testdrive and permanently install Scripted Behaviour.”
Remote Buddy Behaviour Construction Kit Behaviour Factory
Step 5: Use Remote Buddy’s Mapping Preferences to tie it all together.
We’re almost there! The last step is to map the all of the actions to the various logical remotes. Open up Remote Buddy’s preferences and click on “Mapping.” Select the XBMC behavior and one by one map actions to the buttons on the different Apple Remote entries you see on the left side. The screenshot below is how yours should be looking at this point.
Note: You will need to disable any conflicting actions under the Global mapping section. Otherwise the global mapping actions will compete with those of the various Apple Remotes you have setup.
Remote Buddy Mapping Preference
Once all of the information from your spreadsheet has been mapped you’re all done. Fire up XBMC and take control with your 880!
To save yourself a bit of time, you may also download my XBMC behavior.


  1. WOW, great post. I have a harmony 550 and I was using a similar method to program my remotebuddy. I just didn’t know I could change the ID of my remote, so I was getting remotes from all my friends with macs…. Your method would have saved me a lot of trouble have I read it a few weeks later. But now I can have lots more remotes (I have 6 currently…).

    Just one suggestion: could you export the behaviour you created so as to save me the trouble of doing it? That would be the cherry on the cake of this great post!!!


    Comment by Gustavo — March 2, 2008 @ 9:20 pm

  2. Could you send me the behaviour you created to my email?


    Comment by Gustavo — March 3, 2008 @ 5:15 am

  3. Thanks for the detailed write up! I have been struggling with just having my Harmony (676) just mimicing the one apple remote with XBMC. It works well enough, but I would really like to have more (FULL) functionality out of the Logitech. I’ll give this method a shot.

    Comment by fall-line — March 3, 2008 @ 7:37 pm

  4. Very nice writeup!
    Thanks for the work..
    I’m using a 525 and it basicly works, but somehow the signal does not get transmitted fast enough…
    I guess this is a problem or a limitaion to my model.
    Do you guys expierience the same behaviour ?


    Comment by iam — March 10, 2008 @ 10:48 pm

  5. Does this still work in 0.1.5 and beyond? For some the buttons I setup using your guide dont work in XBMC… Is there some other option that I have to enable? Thanks.

    Comment by Brian — March 12, 2008 @ 12:31 am

  6. If you increment the apple remote, how do you get it back to any of the previous logical remote numbers. ie go backwards after incrementing?

    Comment by Jon — March 18, 2008 @ 9:36 am

  7. please, could you share the beahviour?
    thanks for the guide|

    Comment by checco — March 19, 2008 @ 10:41 pm

  8. Virtual keyboard tip: if you occasionally want to enter some text with just your Harmony remote using Remote Buddy’s virtual keyboard-
    1) make sure you’ve mapped the directional keys (up/down/left/right/OK) on your Harmony remote to the corresponding keys (plus/minus/left/right/play-pause) on one of the mac remote instances. (You’ve probably already done this)
    2) assign a mac remote “Menu” key to a key on your remote that you want to use to activate/de-activate the virtual keyboard (toggle virtual keyboard). I picked an obscure key on the remote and did this under the “Global” mapping so that I would always have access to the keyboard.

    This way, when you hit the key, the virtual keyboard will appear and be active, and you use the Harmony’s directional/OK keys to navigate and enter text. Once you are done, because the toggle key is assigned to a mac remote “Menu” key, you can use it to hide the keyboard.

    Comment by scram69 — March 27, 2008 @ 7:46 pm

  9. Thanks everyone for your comments, glad that this is of some help!

    I have linked to the remote buddy behavior which some of you have requested, and also added a note regarding global mappings. I suspect this is the issue that Iam and Brian have encountered as I’m running the latest versions of both Remote Buddy and XMBC without issue.

    @Jon – The only way I know of to go back would be to go full circle, as you can only increment the id. If anyone knows how to decrement, leave a comment and I’ll add to the article.

    Comment by jkm9000 — March 29, 2008 @ 9:30 pm

  10. Ok, very, very dumb question. Is the XBMC project strictly for Xboxes? At first, I thought that had to be the case, but then your howto page only mentions the Xbox once at the top.

    Or is this a spinoff media center? Is OSXBMC a replacement for FrontRow?

    Comment by Rob — April 4, 2008 @ 5:23 pm

  11. @Rob – Nope, XBMC is quite portable ( I link to the OS X version at the top of this article.

    Comment by jkm9000 — April 4, 2008 @ 5:52 pm

  12. Thanks, JKM! This is my first exposure to either XBMC or OSXBMC. So at first, it wasn’t directly obvious that the XBMC could be run sans Xbox. 🙂

    Perhaps unrelated to your post, what kind of Mac do you have defined in your Logitech software? I’ve tried “Mac Mini”, generic “PC”, as well as my Mini’s part number and none of these will allow me to learn held Apple Remote buttons. The Logitech software won’t learn in either normal or raw mode.

    Comment by Rob — April 4, 2008 @ 6:32 pm

  13. Hello JKM,
    thanks for the hard work to document all this stuff. One (I hope only one) question remains open for me. How do you handle the fact that the AppleRemote changes the code when the buttons are pressed for longer than app. a second ? You need it eg. the sleep command or the fast forward in a stored movie and so on. As I learned in Blogs, after a second all buttons change to the command “the last button keeps pressed…the last button keeps pressed… ” and so on. I cannot imagine how to teach this into the harmony ? Didn’t you recognize this obstacle ? Or do I miss something ?
    Bye !

    Comment by Andree — April 10, 2008 @ 6:39 pm

  14. @Rob – I have mine defined as “Mac Mini (AppleMA206LL/A)”. It has been a long time since I set this up, but I’m pretty sure I just entered the Apple part number.

    Comment by jkm9000 — April 12, 2008 @ 10:01 pm

  15. @Andree – Easy, I did not use the longer presses when setting things up. I only used the click which gave me 6 options per logical remote.

    Comment by jkm9000 — April 12, 2008 @ 10:04 pm

  16. This is brilliant. I never would have thought of using multiple instances of the remote to increase the number of functions. Using the instructions I was able to program my Harmony 550 just the way I like it. Also for those of you that actually use this, i suggest you program an extra button with a “force quit” function so that you can get out of a hung up XBMC. It certainly helps.

    Anyway, I do have a question. How do you speed the key actions ?

    I’ve tried setting the speed in the Harmony software as well as setting the delay betwen events to 0, yet the inter-key delay seems to be about 1/2 second. Even key repeats (like scrolling through a menu) seem to go at about the same rate. If you have a long lists (100+ items) you’ll grow old waiting to get to the end.

    Any ideas ?


    Comment by Dudeman — May 28, 2008 @ 4:38 am

  17. […] Due to a request, I’ve decided to export and make available my RemoteBuddy settings for XBMC/OSXBMC/Plex and Boxee on OSX.  You’ll still need to create virtual remotes and map the buttons to the actions (please don’t ask me how), but it should make some lives easier.  I take no credit for these settings, I set them up by following a guide here. […]

    Pingback by Multiple Entendre » XBMC and Boxee Remote Buddy Settings — August 7, 2008 @ 1:16 am

  18. Thanks for taking the time to document all this!

    I having one persistent problem, though. I’m getting a lot of double-clicks when I try to select something (which sends the Enter key), and it only happens when I use the Harmony remote. Running the behavior manually from the Behavior Construction Kit doesn’t result in the double-clicks on Enter, so the pervading theory is that the Harmony is goofing and sending two commands sometimes (not all the time).

    Do you have *any* suggestions on how to fix this? I’ve talked to Logitech support, Remote Buddy support, and the folks at the Plex forums and so far no one has come up with anything.

    Comment by rogersmj — October 24, 2008 @ 8:00 pm

  19. […] a good two hours for you to get oriented, program the Harmony, and configure it to your liking (a tutorial at FunWithComputers really helps — it’s for XBMC, but Plex is nearly the same thing), but once […]

    Pingback by Follow up: Plex and the Mac Mini media center | — November 6, 2008 @ 3:25 am

  20. hi, and thanks for this tuto.
    but i have to say that i am stuck on the part 2, i am sorry i am french then sometimes its just quite hard to understand.

    on the part 2 :

    1) for the first remote control (with only 3 buttons to configure) do you have to do the steps 2) and 3) before ?

    2) when you hold buttons “menu” and “play” during 5 seconds on my computer i have a symbol “paired with remote ID 187” did i wait too long ?

    3) do you have to select the remote in the right column before learning to the harmony remote ? but then how do the apple remote code is changed ?

    sorry for my english and for being french 😉

    thanks for the answers


    Comment by pv — November 11, 2008 @ 1:56 am

  21. Any idea how to get RB working with the new ‘built-in’ Harmony behaviour in 0.7.5? Will the downloadable behaviour above work??



    Comment by Tom Wynne — December 31, 2008 @ 12:17 am

  22. @rogersmj: In the “Behavior Construction Kit…” in Remote Buddy, under the “Implementation” tab for that, make sure that the “Operation” is set to “Single key press” WITHOUT autorepeat. The default there has autorepeat active, and that caused problems for me a few times while setting up custom behaviors.

    Comment by Bryan — February 1, 2009 @ 7:44 pm

  23. […] Using the Harmony 880 remote with your mac’s built-in IR port. « Fun With Computers Tags: audiobook, emulators, flash, games, harmony, htpc, itunes, lifehacker, osx, osxbmc, plex […]

    Pingback by Christopher Craig » Links for the Week Ending October 19, 2008 — March 11, 2009 @ 6:12 pm

  24. Great writeup! Thanks.

    I was wondering if you’ve ever had problems getting your Harmony to accurately emulate a Press & Hold function of the Apple Remote. Mine Harmony apparently holds for only a few milliseconds at a time and then releases. It won’t hold though I’m physically holding the button.

    Just wondering.

    Comment by Rob — May 23, 2009 @ 4:59 pm

  25. Great tutorial!

    Comment by Dominik Pich — February 21, 2010 @ 3:00 pm

  26. […] remote can only send 7 discreet codes (14 if you count holding down a button as a new code).  This hack allows you to create limitless button mappings with a programable remote.  I think the software […]

    Pingback by Mac-Mini as an HTPC « baltimore_dad — March 21, 2010 @ 12:04 am

  27. […] first discovered this process here, but it was a quite lengthy process and involved learning each remote individually. I've now […]

    Pingback by lotech blog — October 18, 2010 @ 11:52 pm

  28. Hi,
    i amgoing to try this but i cannot install behaviour script.
    I also tried with Remote Buddy version 1.0RC1, 1.11.2 and 1.16.6
    And it never works.
    Kernel extension coming with is respectively 1.4.0, 1.5.4 and 1.8.1
    The version of scriptXBMCbehaviour(3.0) you want to install is not newer than the version already installed (3.0)
    An other point i did not get is on Logitech Remote Sofware. What I am supposed to do ? To create 8 mac mini devices and group all of them in an activity ? or to create juste one macmini device then learn it to get all fonctions from apple remote from ID1 to ID8 ?
    If someone could send his script and his remote buddy apps. Thanks for all
    My email address : fauxrum free fr

    Comment by gizmo — January 10, 2011 @ 3:32 pm

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at

%d bloggers like this: