XBMC, from the couch with an IR Remote

There’s not a whole lot of coverage on how to get your XBMC working with a remote control. Here’s the short of it. If you’ve followed my guide for installing MCE remote control using LIRC with Ubuntu 8.10, and assuming that worked, then this may very well work for you.

Open up a terminal and start irw. We want to echo the keypresses from the IR remote. Mine does something like this for the Play, Left Arrow and Power buttons (just for example).

USER@PC:~$ irw
000000037ff07be9 00 KEY_PLAY mceusb2
000000037ff07bdf 00 KEY_LEFT mceusb2
000000037ff07bf3 00 KEY_POWER mceusb2

Which means when I press the Play button, XBMC is going to want to know that it should be looking for the “KEY_PLAY” message. Here’s how we do that.

First, back up your XBMC Lircmap.xml file. Mine was found in /usr/share/xbmc/system/

sudo cp /usr/share/xbmc/system/Lircmap.xml /usr/share/xbmc/system/Lircmap.xml.orig

That’s just so you’ve got an original to fall back on if things really mess up. Next, download my Lircmap.xml configuration.

wget http://n3wt0n.com/blog/wp-content/uploads/2009/02/lircmap.xml

Stick the Lircmap.xml file in /usr/share/xbmc/system/

sudo mv lircmap.xml /usr/share/xbmc/system/Lircmap.xml

NOTE: Keep a copy of your configured Lircmap.xml handy. I just turned on XBMC today and found that my remote wasn’t working. My customized Lircmap.xml was overwritten (possibly through an update) so I had to find my configured Lircmap.xml and overwrite the default one again.

irw should show you that your keys map the same way mine did (KEY_PLAY, etc). If they don’t, open up the /usr/share/xbmc/system/Lircmap.xml and replace the KEY_X with whatever irw tells you it is.

Here’s a snippet of what my Lircmap.xml looks like:

    <remote device="mceusb2">

One thing you may notice, and this is very important, is the <remote device=”mceusb2″> part. Remember irw told me that my Play button echos

000000037ff07be9 00 KEY_PLAY mceusb2

Well, pay attention to that mceusb2 part there. If yours does not say mceusb2 then change <remote device=”mceusb2″> to reflect whatever yours may be (perhaps just mceusb).

And contrary to other tutorials out there, you do not need a Keymap.xml file in your ~/.xbmc/userdata directory for this to work.

3 Responses to “XBMC, from the couch with an IR Remote”

  1. Armin Forster says:

    You made my day. This short manual is the one I was looking since days.
    I spent many hours to find our how to work my ATI remote with xbmc.
    Now my hairs are fading to grey and I found this.
    Thank you!
    Greetings from Freising, Germany

  2. admin says:

    @Armin Forster
    I’m glad the instructions worked for you. I mostly write them for myself, so I don’t forget, so it’s nice to see other people benefit from them as well.

  3. anonymuos says:

    Great! Very useful, you made me save a lot of time figuring out how that works.

    Thank you very much.

Leave a Reply

Staypressed theme by Themocracy