Guide To lirc rpi GPIO Receiver

From OpenELEC
Jump to: navigation, search
20px   OpenELEC Configuration Guide To lirc rpi GPIO Receiver

From OpenELEC 3.0 there is better support for lirc_rpi remotes

Note: For this to work all previous autostart.sh scripts and .config/lircd.conf files needs to be removed!

Supported Remotes

MacMini Remote

DreamBox Remote

XBOX DVD Remote

XBOX 360 DVD Remote

Most RC6 Compatible MCE Remotes

GPIO IR Receiver

You need to have a IR Receiver connected thru GPIO on your RPI of course.

Here is a guide for that: http://aron.ws/projects/lirc_rpi

Activate Device Tree Overlay

You need to add the following to config.txt

dtoverlay=lirc-rpi

Add your own remote

You can easily add your own remote to a lircd.conf by running irrecord

First you need to kill the running lircd process:

killall lircd

You might need to run:

ir-keytable -p LIRC

Then start irrecord thelling it were to create the new config file:

irrecord /storage/.config/lircd.conf

Follow the on screen instructions...

Remember that you need to use the new KEY_ map names for it to work, like KEY_POWER and so on.

When you are done you need to reboot you system for it to start working in XBMC.

Troubleshooting

No Response

You can run irw to see if you get any input at all:

irw /var/run/lirc/lircd-lirc0

Start pushing buttons.

If you don't see any output your remote is not supported.

You can still create or add a custom .config/lircd.conf for it though.

Joust remember that it needs to have the new KEY_ lirc map names. like this:

       KEY_POWER         0x00007bf3

Limit Repeats

If your remote Repeats to much you can limit repeats like this.

Copy the /etc/lirc/lircd.conf.rpi to /storage/.config/lircd.conf

cp /etc/lirc/lircd.conf.rpi /storage/.config/lircd.conf

Then change the line in that file thats saying: suppress_repeat 4 to suppress_repeat 6 or something in your remotes section.

vi /storage/.config/lircd.conf

Then reboot and see if its better...

After reboot you can joust run:

killall -HUP lircd

To reload the config after future edits.

You can also disable repeats completely by adding this to your autostart.sh

killall eventlircd
eventlircd --evmap=/etc/eventlircd.d --socket=/var/run/lirc/lircd --release=_UP --repeat-filter

Note: This will disable repeats. If you hold a button only one press will be registered.

Links

Original GPIO forum thread: http://openelec.tv/forum/124-raspberry-pi/51887-raspberry-pi-gpio-ir-receiver-with-openelec-compilation-patches-and-snapshot

GPIO hardware guide: http://aron.ws/projects/lirc_rpi