Archive:Use any IR remote with OpenELEC: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
(13 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<section begin="intro" />How to get your infrared LIRC remote working in [[OpenELEC]]. This guide will show you how to modify OpenELEC so that it works with almost any [[LIRC]] remote. The four files are lircd.conf Lircmap.xml remote.xml and autostart.sh
{{forum link2|1=Have questions about this guide or want to comment on it? Go here: http://forum.kodi.tv/showthread.php?pid=1656784}}
<section begin="intro" />How to get your infrared [[LIRC]] remote working in [[Archive:OpenELEC]]. This guide will show you how to modify OpenELEC so that it works with almost any LIRC remote. The four files are lircd.conf Lircmap.xml remote.xml and autostart.sh


This is really simple and can be accomplished in 15-20 min.<section end="intro" />
This is really simple and can be accomplished in 15-20 min.<section end="intro" />
Line 5: Line 6:
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.
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.


== Preparation ==
== Guide ==
{{how-to
| Step1 = We must first change the protocol if you are going to use irrecord on the OpenELEC machine.


We must first change the protocol if you are going to use irrecord on the OpenELEC machine.
<syntaxhighlight lang=bash>ir-keytable -p lirc</syntaxhighlight>


Execute this command before attempting the [http://forum.xbmc.org/showthread.php?tid=170372 Use Any IR Remote In The House] guide.  
| Step2 = First thing is grab the IR remote of your choice and follow the previous tutorial [http://forum.kodi.tv/showthread.php?tid=170372 "Use Any IR Remote In The House"], but '''skip the remote.xml part.'''


<syntaxhighlight lang="bash">ir-keytable -p lirc</syntaxhighlight>
| Step3 = Start at step 13 and don't 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.


== Guide ==
| Step4 = This will get you the first 2 files and consumes most of the 15 mins.
{{how-to
| Step1 = First thing is grab the IR remote of your choice and follow the previous tutorial [http://forum.xbmc.org/showthread.php?tid=170372 "Use Any IR Remote In The House"] '''skip the remote.xml part.'''
 
| Step2 = Start at step 13 and don't 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.
 
| Step3 = This will get you the first 2 files and consumes most of the 15 mins.


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


| Step4 = Next create an autostart.sh file in /storage/.config (If you have one already just add the following to that file)
| Step5 =  
 
<syntaxhighlight lang="bash">
#!/bin/sh
killall lircd
ir-keytable -p lirc
lircd --device=/dev/lirc0 /storage/.config/lircd.conf
</syntaxhighlight>
 
You don't need the #!/bin/sh if you already have it in the file.
 
Make the file executable
<syntaxhighlight lang="bash">chmod +x /storage/.config/autostart.sh</syntaxhighlight>
 
Then
 
Place lircd.conf in /storage/.config/
 
Lircmap.xml in /storage/.xbmc/userdata
 
and remote.xml in /storage/.xbmc/userdata/keymaps
 
That's it! Piece of cake. Reboot
 
If for any reason you want to go back to the way it was, simply delete those files.
 
 
Make sure the name of your remote matches in Lircmap.xml and lircd.conf
Make sure the name of your remote matches in Lircmap.xml and lircd.conf


Here are the valid Lircmap.xml names. Don't try to make up your own
Here are the valid Lircmap.xml names. Don't try to make up your own. Don't 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.  
Don't 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.  


<syntaxhighlight lang="xml"><lircmap>
<syntaxhighlight lang=xml><lircmap>
 
<remote device="MY-Remote-Name">
<remote device="MY-Remote-Name">
           
   <left></left>
   <left></left>
   <right></right>
   <right></right>
Line 144: Line 112:
</syntaxhighlight>
</syntaxhighlight>


| Step6 = Next create an autostart.sh file in /storage/.config (If you have one already just add the following to that file)
<syntaxhighlight lang=bash>
#!/bin/sh
killall lircd
ir-keytable -p lirc
lircd --device=/dev/lirc0 /storage/.config/lircd.conf
</syntaxhighlight>
You don't need the #!/bin/sh if you already have it in the file.
| Step7 = Make the file executable:
<syntaxhighlight lang=bash>chmod +x /storage/.config/autostart.sh</syntaxhighlight>
| Step8 = Place lircd.conf in /storage/.config/


You also may want to have a look at [url=http://forum.xbmc.org/showthread.php?tid=189617]Understanding LIRC & XBMC[/url]
Place Lircmap.xml in /storage/.xbmc/userdata/
[hr]
If it doesn't work the first step is to find out if LIRC is configured correctly


SSH into the box and type irw
and place remote.xml in /storage/.xbmc/userdata/keymaps/


Push some buttons on the remote.
| Step9 = That's it! Piece of cake. Reboot


Your custom remote name should be displayed along with the button name.
| Step10 = If for any reason you want to go back to the way it was, simply delete those files.
}}


== Notes ==
== Notes ==
* Credit goes to FishOil for the original guide: http://forum.xbmc.org/showthread.php?pid=1656784
* Credit goes to FishOil for the original guide: http://forum.kodi.tv/showthread.php?pid=1656784
 
* You also may want to have a look at [http://forum.kodi.tv/showthread.php?tid=189617 Understanding LIRC & XBMC]


[[Category:How-to]]
* If it doesn't work the first step is to find out if LIRC is configured correctly
[[Category:Remotes]]
:# 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.

Latest revision as of 02:20, 10 September 2020

Attention talk.png Have questions about this guide or want to comment on it? Go here: http://forum.kodi.tv/showthread.php?pid=1656784

How to get your infrared LIRC remote working in Archive:OpenELEC. This guide will show you how to modify OpenELEC so that it works with almost any LIRC remote. The four 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.

Guide

1 We must first change the protocol if you are going to use irrecord on the OpenELEC machine.
ir-keytable -p lirc
2 First thing is grab the IR remote of your choice and follow the previous tutorial "Use Any IR Remote In The House", but skip the remote.xml part.
3 Start at step 13 and don't 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.
4 This will get you the first 2 files and consumes most of the 15 mins.
lircd.conf
Lircmap.xml (see below for template)
5 Make sure the name of your remote matches in Lircmap.xml and lircd.conf

Here are the valid Lircmap.xml names. Don't try to make up your own. Don't 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.

<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>
6 Next create an autostart.sh file in /storage/.config (If you have one already just add the following to that file)
#!/bin/sh
 
killall lircd
ir-keytable -p lirc
lircd --device=/dev/lirc0 /storage/.config/lircd.conf

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

7 Make the file executable:
chmod +x /storage/.config/autostart.sh
8 Place lircd.conf in /storage/.config/

Place Lircmap.xml in /storage/.xbmc/userdata/

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

9 That's it! Piece of cake. Reboot
10 If for any reason you want to go back to the way it was, simply delete those files.


Notes

  • If it doesn't work the first step is to find out if LIRC is configured correctly
  1. SSH into the box and type irw
  2. Push some buttons on the remote.
  3. Your custom remote name should be displayed along with the button name.