manipulate.org

Making the internet smarter, one post at a time

Adding FLIRC to a Raspberry Pi for remote control of XBMC

I have been slowly migrating to a Raspberry Pi for my media front-end.  One of the final components that I have been waiting on was a USB IR receiver: FLIRC.  It arrived today, so off we go!  I have several Logitech Harmony One remotes that I use in different rooms, and some research showed that Flirc worked amazingly well as an XBMC remote receiver.  After a few minutes of working with logitech’s configuration software, I was up and running.

There is not currently a method of programming the FLIRC from the RPi, so you’re going to need another computer.  I pulled out my laptop and got started with it by downloading the appropriate software from FLIRC. FWIW, I used the Windows version because the one for OS X kept crashing.

Note: all of these steps work properly for any device that supports wireless keyboards (PC, Mac, RPi, etc). The Flirc simply emulates a usb keyboard when talking to the OS.

Step 1 – Open your logitech Harmony Remote Software and Add a new Device.  I found an interesting post over at the Flirc forums that explains which device you should select.

Unfortunately not all device settings for the harmony are they same – some better than others.

A super helpful forum user; Eskro, has found what I have verified as a better device setting for the following reasons:

  • It enables key repeat even on cheaper harmony remotes (e.g. 300i)
  • All remotes signals are recognised as different by FLIRC

Manufacturer: Panasonic

Device: TC-P65VT30

-or-

Manufacturer: Samsung

Device: LN46C650L1F

Add one of those 2 devices mentioned, and then rename the device to something more meaningful like “XBMC Remote”.

Step 2 – Add a new Activity that utilizes the Device you just setup.  Use the settings you would use to display XBMC on your TV (selecting the proper inputs, etc), and finally rename the Activity to something like “Watch XBMC”.

Step 3 – Customize the buttons to get the most out of Flirc.  You’ll want to add a few commands that are missing from the normal remote.  Again, it doesn’t matter what you associate them to, so long as it is not in use somewhere else on the remote. (eg, don’t map the up arrow to something, as it is already assigned to the up arrow on the remote).  For informational purposes, here is what I chose:

  • Assigned Rewind button to “Rewind”
  • Assigned Skip Back button to “InputHdmi1″
  • Assigned Fast Forward button to “FastForward”
  • Assigned Skip Forward button to “InputHdmi4″
  • Assigned Play button to “InputHdmi2″
  • Assigned Pause button to “InputHdmi2″ (intentionally)
  • Assigned Stop button to “Stop”

Step 4 – Click “Additional Buttons” and get rid of all of the default selections they have created, and replace it with something like the following:

  • Toggle Subtitles -> ClosedCaption
  • Mark as Watched -> SAP
  • Update Library -> SubMenu

For reference, I have included screenshots of my button configuration below.

Step 5 – Update Remote.

Step 6 – Grab a laptop and download and install the appropriate software from Flirc.. Launch the software, and plug in your Flirc to a usb port.  You should see the software say “Connected”.  Under the Controllers menu, you will see a few options.  The intuitive choice would be “XBMC” since it is listed there, but I decided to go with “Full Keyboard” instead after trying it out.  I didn’t like how limited the XBMC mapping was, and I wanted to control some of the deeper options; particularly the ability to do short jumps ahead and long jumps.

Step 7 – Grab a piece of paper to jot down some notes, and head over to the XBMC Wiki to view the full list of keyboard shortcuts.  Here are the ones that I chose:

  • BUTTON NAME | KEY | COMMAND SENT
  • Menu | C | Contextual Menu
  • Info | I | Info
  • OK | enter | Select
  • Prev | Esc | Previous Menu
  • Up | Up | Up
  • Right | Right | Right
  • Down | Down | Down
  • Left | Left | Left
  • Skip Back | ‘ |  | Small Step Back (7 sec)
  • Skip Forward | . | Skip Forward (30 sec)
  • Rewind | R | Rewind
  • Fast Forward | F | Fast Forward
  • Stop | X | Stop
  • Play | Space | Play/Pause

Step 8 – Return to your Flirc application, with the Full Keyboard up and begin clicking the keys corresponding to your list (or mine above) along with the appropriate buttons for your Harmony One remote. If you are using the same exact commands I have listed above, you can skip this part and download my flirc config, then apply it using the menu option to Load Configuration within the Flirc application.

Step 9 – Once you have completed this process, go into the Flirc menu and choose Save Configuration.

Step 10 – Unplug the Flirc and bring it to your Raspberry Pi (or whatever computer/device that is running XBMC). Plug it in, and give it a test! If you are having problems with scroll rates or multiple key presses (I didn’t) then be sure to check the Flirc forums for information on how to fix it – Flirc Forum post on Harmony Remotes.

1 comment for “Adding FLIRC to a Raspberry Pi for remote control of XBMC

  1. Edi
    05/10/2013 at 12:51 am

    Great guide, thank you!
    I also own a Harmony One, a FLIRC and a HTPC built on a GA-Z77N-WIFI mobo.
    What about the scroll rate/ multiple key press events, have you found a workaround yet?

Leave a Reply

Your email address will not be published. Required fields are marked *