This shows you the differences between two versions of the page.
remotes [2014/06/04 15:45] ollie smith |
remotes [2016/02/05 09:38] (current) jvig Link to fixing double commands with single keystroke issue |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | **Configuring a remote** | + | **Configuring a Remote** |
- | For all users that have remotes that don't or only partially work, here is a guide on how to map your specific device. | + | For all users that have remotes that don't or only partially work, here is a guide on how to map your specific device. These steps don’t include the loading of the necessary kernel modules and specific LIRC hardware.conf configuration. If you have followed the guide below but your remote still does not work, please ask for help on the forum. |
- | This step doesn’t include the loading of the necessary kernel modules/specific LIRC hardware.conf configuration. | + | |
- | If you have followed the guide below but your remote does not work: please ask for help on the forum. | + | |
- | //Step 1: Is your remote recognized?// | + | **//Step 1: Is Your Remote Recognized?//** |
- | The first thing you need to do is to make sure your remote is recognized by LIRC: | + | Verify that your remote is recognized by LIRC: |
<code> | <code> | ||
xbian@xbian:~# sudo su | xbian@xbian:~# sudo su | ||
Line 26: | Line 24: | ||
</code> | </code> | ||
- | If mode2 doesn’t output anything, then your remote isn’t recognized by the system. | + | If mode2 doesn’t output anything, then your remote isn’t recognized by the system. Ask for support so we can figure out what the right hardware.conf should be. |
- | Ask for support so we can figure out what the right hardware.conf should be. | + | |
- | //Step 2 - Check if LIRC recognized the buttons of your remote// | + | If you use GPIO on the Raspberry Pi, add "lirc_rpi gpio_in_pin=#" to /etc/modules. (Replace # with your input pin.) Also, move and rename /etc/lirc/hardware/lirc_rpi.conf to /etc/lirc/hardware.conf. |
+ | |||
+ | **//Step 2 - Check If LIRC Recognized the Buttons of Your Remote//** | ||
Start irw and check if it generates output when you press a button on your remote. | Start irw and check if it generates output when you press a button on your remote. | ||
Line 41: | Line 40: | ||
</code> | </code> | ||
- | If all buttons are recognized by LIRC, go directly to Step 4. | + | If all buttons are recognized by LIRC, go directly to Step 4. If some or none of the buttons are recognized, go to Step 3a. |
- | If some or non of the buttons are recognized go to Step 3a. | + | |
- | //Step 3 - Mapping your remote// | + | **//Step 3 - Mapping Your Remote//** |
- | //Step 3a - Check online if your remote is already mapped// | + | **//Step 3a - Check Online to Determine If Your Remote is Already Mapped//** |
- | Lets say we have a Microsoft XBOX remote | + | Lets say we have a Microsoft XBOX remote. |
- | Go to [[http://lirc.sourceforge.net/remotes/|http://lirc.sourceforge.net/remotes/]] Look for Microsoft then open that folder. There we see 3 files names XBOX: | + | Go to [[http://lirc.sourceforge.net/remotes/|http://lirc.sourceforge.net/remotes/]]. Look for Microsoft. Then open that folder. There we see three files named XBOX: |
* Xbox | * Xbox | ||
Line 56: | Line 54: | ||
* lircd.conf.xbox | * lircd.conf.xbox | ||
- | Open those files and paste its content at the end of /etc/lirc/lircd.conf. | + | Open those files and paste the contents at the end of /etc/lirc/lircd.conf. |
Restart LIRC: | Restart LIRC: | ||
Line 63: | Line 61: | ||
</code> | </code> | ||
- | And recheck if Step 2 generates output. If it does go to Step 4, if not, then remove the old settings from /etc/lirc/lircd.conf and try one of the other configuration files by repeating step 3a. | + | Now recheck if Step 2 generates output. If it does, go to Step 4. If not, then remove the old settings from /etc/lirc/lircd.conf and try one of the other configuration files by repeating step 3a. |
If none of these configuration files work, then go to step 3b. | If none of these configuration files work, then go to step 3b. | ||
- | //Step 3b - Create a custom LIRC config// | + | **//Step 3b - Create a Custom LIRC Config//** |
If no configuration file exists, create a custom one. | If no configuration file exists, create a custom one. | ||
- | One important step for creating a custom LIRC map is that you give logical names to each button, and those names are uniform between remotes. | ||
- | For that purpose LIRC has create ‘namespaces’. | ||
- | A list of namespaces and there meanings can be found here | ||
- | Creating a custom LIRC map is done by using irrecord: | + | One important step for creating a custom LIRC map is that you give logical names to each button. Those names are uniform among remotes. |
+ | |||
+ | For that purpose LIRC has create ‘namespaces’. A list of namespaces can be found [[http://arnaud.quette.free.fr/lirc/lirc-nns.html|here]] or by running: | ||
+ | <code>$ irrecord --list-namespace</code> | ||
+ | |||
+ | Creating a custom LIRC map is done by using irrecord: | ||
<code> | <code> | ||
root@xbian:~# irrecord /home/xbian/remote.conf | root@xbian:~# irrecord /home/xbian/remote.conf | ||
</code> | </code> | ||
- | irrecord is pretty verbose so just carefully follow all steps. When you’re done, you will end up with a custom LIRC map for your specific remote in /home/xbian/remote.conf | + | irrecord is pretty verbose so just carefully follow all steps. When you’re done, you will end up with a custom LIRC map for your specific remote in /home/xbian/remote.conf. |
- | Edit this file (/home/xbian/remote.conf ) and look for the parameter name. This should say | + | Edit this file (/home/xbian/remote.conf) and look for the parameter name. This should say |
<code> | <code> | ||
- | name /home/xbian/remote.conf | + | name /home/xbian/remote.conf |
</code> | </code> | ||
- | Change this name in the name of your remote e.g.: | + | Change this name to the name of your remote e.g.: |
<code> | <code> | ||
- | name Xbox_Remote | + | name Xbox_Remote |
</code> | </code> | ||
Line 94: | Line 95: | ||
begin remote | begin remote | ||
- | name Xbox_Remote | + | name Xbox_Remote |
bits 8 | bits 8 | ||
eps 30 | eps 30 | ||
Line 119: | Line 120: | ||
Now repeat Step 2 to check if all buttons of your remote are recognized. | Now repeat Step 2 to check if all buttons of your remote are recognized. | ||
- | When you miss some buttons simply redo Step 3b. However, remember to first remove the old config from /etc/lirc/lircd.conf. | + | |
+ | If you miss some buttons, simply redo Step 3b. However, remember to first remove the old config from /etc/lirc/lircd.conf. | ||
If all buttons are recognized by LIRC, go to Step 4. | If all buttons are recognized by LIRC, go to Step 4. | ||
- | //Step 4 - Create a XBMC lircmap// | + | **//Step 4 - Create a XBMC lircmap//** |
- | The next step is to create a map that maps the buttons of your remote to XBMC functions. | + | Create a map that maps the buttons of your remote to XBMC functions. |
- | To do this, create a new file (if it doesn’t already exists): | + | |
+ | To do this, create a new file (if it doesn’t already exist): | ||
<code> | <code> | ||
root@xbian:~# nano /home/xbian/.xbmc/userdata/Lircmap.xml | root@xbian:~# nano /home/xbian/.xbmc/userdata/Lircmap.xml | ||
Line 143: | Line 146: | ||
</code> | </code> | ||
- | This file contains three important aspects. All of this information can be distracted from the irw output in step 2: | + | This file contains three important aspects. All this information can be extracted from the irw output in step 2: |
<code> | <code> | ||
root@xbian:~# irw | root@xbian:~# irw | ||
Line 155: | Line 158: | ||
<remote device="logitech-harmony-300i"> | <remote device="logitech-harmony-300i"> | ||
</code> | </code> | ||
- | Make sure this device is the same as the name in your lircd.conf you just made, or the irw output. | + | Make sure this device is the same as the name in your lircd.conf you just made or the irw output. |
The second and third aspects are the name of the LIRC button and the make of the XBMC command: | The second and third aspects are the name of the LIRC button and the make of the XBMC command: | ||
Line 191: | Line 194: | ||
<green>XBMC.ActivateWindow(MyVideos)</green> | <green>XBMC.ActivateWindow(MyVideos)</green> | ||
</code> | </code> | ||
- | The green command is linked to the internal command XBMC.ActivateWindow(MyVideos). This means that when i push the yellow button of my remote, the MyVideos window is opened. | + | The green command is linked to the internal command XBMC.ActivateWindow(MyVideos). This means that when I push the yellow button of my remote, the MyVideos window is opened. |
- | Now create a Lircmap.xml for all buttons of your remote. When to want to test your config start XBMC again: | + | Now create a Lircmap.xml for all buttons of your remote. When to want to test your config, start XBMC again. |
<code>root@xbian:~# service xbmc start</code> | <code>root@xbian:~# service xbmc start</code> | ||
Whenever you change something in your the config files, restart XBMC to let the changes take effect: | Whenever you change something in your the config files, restart XBMC to let the changes take effect: | ||
- | </code>root@xbian:~# service xbmc restart</code> | + | <code>root@xbian:~# service xbmc restart</code> |
- | // Step 5 - Share your remote config with us// | + | **//Step 5 - Share Your Remote Config With Us//** |
+ | |||
+ | When you have created a custom lircd.conf + Lircmap.xml that has a generic functionality, please share them with us by mailing these two files to development@xbian.org. We will include them in our default XBian releases. | ||
+ | |||
+ | Please remember to only change lircd.conf and Lircmap.xml. Also provide your (nick)name and email address in case users have questions. | ||
- | When you have created a custom lircd.conf + Lircmap.xml that has a generic functionality, please share them with us by mailing these two files to development@xbian.org. | ||
- | We will include them in our default XBian releases. | ||
- | Please remember to only change lircd.conf and Lircmap.xml. Also provide your (nick)name and email address would users have questions. | ||
If you have followed all steps above but your remote does not work: please ask for help at the forum. | If you have followed all steps above but your remote does not work: please ask for help at the forum. | ||
- | Additional Notes: | + | Additional Note: |
- | If XBMC responds to LIRC after: <code>service xbmc restart</code> but not on system reboot. You may have a problem with XBMC starting too quickly on boot. | + | If XBMC responds to LIRC after: <code>root@xbian:~# service xbmc restart</code> but not on system reboot, you may have a problem with XBMC starting too quickly on boot. |
+ | |||
+ | One solution too this is to edit the 4th line of /etc/init/xbmc-preload.conf to read: | ||
+ | |||
+ | <code>start on stopping mountall and started networking and net-device-up wlan0</code> | ||
+ | |||
+ | This only applies to a network-enabled setup. Change wlan0 to eth0 if you use Ethernet. | ||
+ | Known issue with lirc remotes and Kodi: | ||
+ | If you press a button on your remote once and the command is executed twice, follow the instructions here: http://forum.xbian.org/thread-2967-post-30449.html#pid30449 |