[HOW-TO] Use ANY IR remote with OpenELEC
#1
How To Get Your Infared LIRC Remote Working In OpenELEC

This seems to be a common question on the forums and nobody seems to know for certain.

After having a pretty good look around I came up empty handed.

Well,.......Here it is.

I beleive the main issue is the OpenELEC devs have elected to change the LIRC protocol to something non standard.

We will fix that and you can use ANY IR remote you want.

4 Files will be needed and you will likely create 3 of those according to your own personal setup.

The 4 files are lircd.conf Lircmap.xml remote.xml and autostart.sh

This is really simple and can be accomplished in 15-20 min.

You can likely use any remote.xml you can find. The one in the default root location (/usr/share/xbmc/system/keymaps) should be fine. Copy it and put it in the /storage/.xbmc/userdata/keymaps location as we might be tweaking it.

***************************************************************************************************************
EDIT

We must first change the protolcol if you are going to use irrecord on the openelec machine.

execute this command before attempting the "Use Any IR Remote In The House"

Code:
ir-keytable -p lirc


***************************************************************************************************************

First thing is grab the IR remote of your choice and follow my previous tutorial "Use Any IR Remote In The House"
skip the remote.xml part.

Start at step 13 and dont use sudo. Also, use the terminal editor nano or do all of it on some other linux based machine. You will have to adjust a few things as OpenELEC is different.

This will get you the first 2 files and consumes most of the 15 mins.

lircd.conf
Lircmap.xml (see below for template)



Next create an autostart.sh file in /storage/.config (If you have one already just add the following to that file)

Code:
#!/bin/sh

killall lircd
ir-keytable -p lirc
lircd --device=/dev/lirc0 /storage/.config/lircd.conf

You dont need the #!/bin/sh if you already have it in the file.

Make the file executable
chmod +x /storage/.config/autostart.sh

Then

Place lircd.conf in /storage/.config/

Lircmap.xml in /storage/.xbmc/userdata

and remote.xml in /storage/.xbmc/userdata/keymaps

Thats it! Piece of cake. Reboot

If for any reason you want to go back to the way it was, simply detelte those files.


Make sure the name of your remote matches in Lircmap.xml and lircd.conf

Here are the valid Lircmap.xml names. Dont try to make up your own
Dont go too crazy. Stick to the common names and it will mean less editing.
Copy this entire thing to your Lircmap.xml (change your remote name) and only fill in the ones you need.

Code:
<lircmap>
    
<remote device="MY-Remote-Name">
                
  <left></left>
  <right></right>
  <up></up>
  <down></down>
  <select></select>
  <back></back>

  <play></play>
  <pause></pause>
  <stop></stop>

  <volumeplus></volumeplus>
  <volumeminus></volumeminus>
  <mute></mute>

  <pageplus></pageplus>
  <pageminus></pageminus>

  <power></power>
  <menu></menu>
  <info></info>
  <display></display>
  <title></title>

  <red></red>
  <green></green>
  <yellow></yellow>
  <blue></blue>

  <zero></zero>
  <one></one>
  <two></two>
  <three></three>
  <four></four>
  <five></five>
  <six></six>
  <seven></seven>
  <eight></eight>
  <nine></nine>

  <skipplus></skipplus>
  <skipminus></skipminus>

  <reverse></reverse>
  <forward></forward>

  <subtitle></subtitle>
  <language></language>

  <channelplus></channelplus>
  <channelminus></channelminus>

  <mytv></mytv>
  <mymusic></mymusic>
  <mypictures></mypictures>
  <myvideo></myvideo>
  <livetv></livetv>
  <recordedtv></recordedtv>
  <liveradio></liveradio>
  <epgsearch></epgsearch>

  <guide></guide>

  <record></record>
  <start></start>
    
  <star></star>
  <hash></hash>
  <clear></clear>
  <enter></enter>
  <xbox></xbox>

  <playlist></playlist>
  <teletext></teletext>
  
  

  </remote>

</lircmap>


You also may want to have a look at Understanding LIRC & XBMC

If it doesn't work the first step is to find out if LIRC is configured correctly

SSH into the box and type irw

Push some buttons on the remote.

Your custom remote name should be displayed along with the button name.
Reply
#2
If you have a DirecTV remote you can be up and running even quicker as I have provided the 3 remote files

http://forum.xbmc.org/showthread.php?tid=189190
Reply
#3
EDIT: Moving my question to another (already started) thread.
Reply
#4
Hello:

Tanks a lot for the tutorial. I´m using OpenElec on a Cubox-i4pro, I´ve been able to follow all the steps but in point 22, when i try to create lircd.conf in etc/lirc nano says me "Error writing lircd.conf:Read-only file system", I´ve tried to give permission using chmod but with any result.

How can i solve this in order to kepp continuing?

Thankyou very much in advance
Reply
#5
(2014-09-29, 16:17)agmvc5 Wrote: Hello:

Tanks a lot for the tutorial. I´m using OpenElec on a Cubox-i4pro, I´ve been able to follow all the steps but in point 22, when i try to create lircd.conf in etc/lirc nano says me "Error writing lircd.conf:Read-only file system", I´ve tried to give permission using chmod but with any result.

How can i solve this in order to kepp continuing?

Thankyou very much in advance

Look at the file locations in THIS thread.

You will not create that file in that location.
Reply
#6
I'm not able to get ir-keytable -p lirc to run.
I'm using Kodi Isengard OpenElecBuild #304

Here is the cmd and response...
BedRoom:~ # ir-keytable -p lirc
Couldn't find any node at /sys/class/rc/rc*.

Is this still needed?

Thanks for taking time to writing up the guide.
Reply
#7
Me too
ir-keytable -p lirc
Couldn't find any node at /sys/class/rc/rc*.

I have created lircd.conf without problem with irecord
I have edited the other two files.
irw does work and lists all keys, but no response from OPENELEC

PLEASE: is there a definitive guide for latest version of openelec and Raspberry? I don't understand how to tell Kodi to use lirc...
Reply
#8
Where can I find the lircd.conf, or is this only an empty file?
thanks
Reply
#9
Hello,

i am trying to get the context menu to work with the xbox 360 26 key remote.

i can get everything else working but this menu.

it seems to be mapped to Yellow 'Y' button but when i run irw there is no response from it.

Any of you gurus know how to get it working?
Reply



Logout Mark Read Team Forum Stats Members Help
[HOW-TO] Use ANY IR remote with OpenELEC1
This forum uses Lukasz Tkacz MyBB addons.