25

It would be interesting to use the Raspberry Pi as a replacement for a media center; however, as I see it now the Raspberry Pi needs to be controlled by means of a keyboard or over the network. Is it possible to control the Raspberry Pi using an universal remote control or something similar?

I'm planning to use the Raspberry Pi where carrying or connecting a keyboard is not feasible.

4
  • 3
    Yes, it is possible. You would probably want to use one of the IR receiver modules that demodulates the 38-40 KHz typical encoding. The question would then be if the pi's operating-system-slowed interrupt latency is reliably low enough to detect all of the pulses in the remote protocol, or if you will need to use a real time operating system patch, or perhaps more simply, put a two dollar microcontroller in there to convert the IR pulse protocol to something the pi will readily accept like logic-level asynchronous serial (UART). Aug 11, 2012 at 22:58
  • If you are not into hardware, then look into a network solution. You can get quite far with a simple web server. Aug 12, 2012 at 8:12
  • My Pi is hosting a simple server that accepts input from a little remote control app on my Android phone. It's pretty simple to set something like this up, or perhaps I'll release it once it's looking a bit better.
    – Jivings
    Aug 12, 2012 at 10:59
  • @ThorbjørnRavnAndersen: I'm planning to use this in a small RV, the reason for the replacement would be to have less space. Placing a network would only increase the amount of space. Aug 12, 2012 at 12:14

10 Answers 10

15

Have a look at this page: http://aron.ws/projects/lirc_rpi/

It describes how to use an IR receiver component with the GPIO pins.

11

This Multimedia IR Remote Controller with USB Receiver is supposed to appear as a plain USB HID keyboard. It shouldn't need drivers. Alternatively, MythTV users have a lot of experience in getting odd remote controls to work, sometimes with LIRC.

1
  • I'm one of those MythTV users, and if you get a Windows Media Centre USB IR receiver and remote then they are no problem to get working. This is a very PC-ish way of doing it though, and the GPIO pin IR receiver pointed at by Adam M-W is more in the spirit of the RPi, IMO :) Dec 1, 2012 at 13:55
3

I had the same though, and decided to just try a cheap'n cheerful HID style device.

The item below seems to work perfectly (for all small values of perfect)...

PC Computer Wireless Remote Controller with USB IR Receiver

(It looks to be very similar or the same as the Deal Extreme device above).

Furthermore it works with the similarly cheep'n cheerful Ralink Wireless card on the other USB port, on an unmodified (as in still with the factory fitted fuses) version 1 model B Pi running off the USB connector on my laptop, so no power issues so far.

DMESG shows the following...

    [    3.181011] usb 1-1.2: new high-speed USB device number 4 using dwc_otg
    [    3.308976] usb 1-1.2: New USB device found, idVendor=148f, idProduct=5370
    [    3.318423] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [    3.328287] usb 1-1.2: Product: 802.11 n WLAN
    [    3.335089] usb 1-1.2: Manufacturer: Ralink
    [    3.341716] usb 1-1.2: SerialNumber: 1.0
    [    3.431060] usb 1-1.3: new low-speed USB device number 5 using dwc_otg
    [    3.544469] usb 1-1.3: New USB device found, idVendor=1d57, idProduct=ad02
    [    3.553826] usb 1-1.3: New USB device strings: Mfr=0, Product=0, SerialNumber=0
    [    3.575628] input: HID 1d57:ad02 as /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.0/input/input0
    [    3.591806] generic-usb 0003:1D57:AD02.0001: input,hiddev0: USB HID v1.10 Keyboard [HID 1d57:ad02] on usb-bcm2708_usb-1.3/input0
    [    3.614598] input: HID 1d57:ad02 as /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.1/input/input1
    [    3.630092] generic-usb 0003:1D57:AD02.0002: input,hiddev0: USB HID v1.10 Mouse [HID 1d57:ad02] on usb-bcm2708_usb-1.3/input1

... and

lsusb shows.

    ...
    Bus 001 Device 004: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter

    Bus 001 Device 005: ID 1d57:ad02 Xenta 
    ...

.. and if I do a startx, I have an IR mouse, media type buttons, and a rather difficult to use keyboard (fine for media center applications, but since you type text style on it, i.e. several clicks for each letter, I wouldn't want to compose a novel).

The whole thing is in a small form factor similar to the Pi, the remote being about 2cm longer and slightly narrower than the Pi.

Not bad for £3.42 shipped (About $5 US).

I suspect most of these HID style devices should work, but I can vouch for the above.

3

Yes, it is possible to use the RaspberryPi as a remote infrared control. I have been building this exact project myself and have been documenting every step I have taken to accomplish it.

You can install LIRC (Linux Infrared Remote Control) to give the RaspberryPi the ability to send and receive IR commands. Then, you can use some open source software I have written (lirc_node and lirc_web) to create a web interface to control LIRC. This lets you pull up a web page on your mobile phone to act as your universal remote. Much more convenient than having to type in commands manually!

Check out the two blog posts I wrote that describes how to set this up yourself:

http://alexba.in/blog/2013/01/06/setting-up-lirc-on-the-raspberrypi/ http://alexba.in/blog/2013/02/23/controlling-lirc-from-the-web/

Hope this helps!

2

Not an IR device, but you can get a Playstation 3 Remote and a Bluetooth adapter. It's a Bluetooth remote, and if I recall correctly, sends keyboard events and is straightforward to configure in Linux. Since it uses radio waves rather than IR, you don't need to be in line with a receiver either. It's pretty cheap, especially second hand.

1

If you have an IR keyboard, you can program a universal remote to talk to the receiver

1

If you want a ready-made solution you could look at the RemotePi Board ( http://msl-digital-solutions.myshopify.com/ ), which in addition to letting you control your mediacenter using an infrared remote control with LIRC, lets you as well switch the power of the Raspberry Pi on an off with your remote.

0

I have been using a standard RC6 Media Center Remote with my Raspberry Pi for a few months now. But instead of the USB receiver, I use this HoneyPi brand GPIO IR Receiver. It's a daughter board that mounts directly on the Raspberry Pi motherboards GPIO pins. No soldering - which sold me on it.

Works great and doesn't use up a USB port. RaspBMC and OpenELEC are both supported out of the box. It even works through my opaque case.

0

I have successfully setup USB IR Receiver to control my Raspberry Pi media center running OpenELEC. After setting it up I programmed my Logitech Harmony remote too.

Personally (and like AndyH mentioned above), I think this is the best and cheapest with least amount of work. Tested with Xbian too.

0

Since you're talking about media centers there might be another way to use an existing remote to control the PI without any additional hardware. There is a feature called CEC which allows communication between different devices using HDMI. Assuming your PI is connected via HDMI to a TV screen it might be possible to use use the existing remote control of your TV and monitor commands sent by your remote. This wiki page seems to offer a small introduction. Here is another one talking about CEC support for kodi.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.