<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://kodi.wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Slinkygn</id>
	<title>Official Kodi Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://kodi.wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Slinkygn"/>
	<link rel="alternate" type="text/html" href="https://kodi.wiki/view/Special:Contributions/Slinkygn"/>
	<updated>2026-07-05T13:29:33Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://kodi.wiki/index.php?title=LIRC&amp;diff=126578</id>
		<title>LIRC</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=LIRC&amp;diff=126578"/>
		<updated>2016-11-05T21:36:04Z</updated>

		<summary type="html">&lt;p&gt;Slinkygn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{mininav|[[Remote controls]]}}&lt;br /&gt;
&amp;lt;section begin=&amp;quot;intro&amp;quot; /&amp;gt;[[w:LIRC|LIRC]] (Linux Infrared Remote Control) is an open source package that allows users to receive and send infrared signals with a Linux-based computer system.&amp;lt;section end=&amp;quot;intro&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* http://www.lirc.org/&lt;br /&gt;
&lt;br /&gt;
== How LIRC works ==&lt;br /&gt;
You push a button on your remote (lircd.conf), That button is seen by the Kodi translator (Lircmap.xml), Kodi starts the requested command (remote.xml)  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Lets trace it backwards.&lt;br /&gt;
&lt;br /&gt;
{{color|#32CD32|&#039;&#039;&#039;&amp;lt;play&amp;gt;&#039;&#039;&#039;}}{{color|#FF0000|&#039;&#039;&#039;Play&#039;&#039;&#039;}}{{color|#32CD32|&#039;&#039;&#039;&amp;lt;/play&amp;gt;&#039;&#039;&#039;}} The one in RED is the {{color|#FF0000|&#039;&#039;&#039;remote.xml &#039;&#039;&#039;}}command&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;{{color|#32CD32|&amp;lt;play&amp;gt;}}&#039;&#039;&#039;{{color|#1E90FF|&#039;&#039;&#039;KEY_GO&#039;&#039;&#039;}}&#039;&#039;&#039;{{color|#32CD32|&amp;lt;/play&amp;gt;}}&#039;&#039;&#039; is the {{color|#32CD32|&#039;&#039;&#039;Lircmap.xml&#039;&#039;&#039;}} Translated name that points to {{color|#1E90FF|&#039;&#039;&#039;lircd.conf KEY_GO&#039;&#039;&#039;}} button&lt;br /&gt;
&lt;br /&gt;
{{color|#1E90FF|&#039;&#039;&#039;KEY_GO&#039;&#039;&#039;}} is the actual button name on the remote in {{color|#1E90FF|&#039;&#039;&#039;lircd.conf&#039;&#039;&#039;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Kodi performs a command {{color|#FF0000|&#039;&#039;&#039;Play &#039;&#039;&#039;}}(remote.xml)&lt;br /&gt;
# The lower case {{color|#32CD32|&#039;&#039;&#039;play &#039;&#039;&#039;}}in the angle brackets is the (Lircmap.xml) translated name&lt;br /&gt;
# Then we go to the Lircmap.xml to see what Lirc button holds the value of the lowercase play above.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So we expect to see {{color|#32CD32|&#039;&#039;&#039;&amp;lt;play&amp;gt;&#039;&#039;&#039;}}{{color|#1E90FF|&#039;&#039;&#039;*******&#039;&#039;&#039;}}{{color|#32CD32|&#039;&#039;&#039;&amp;lt;/play&amp;gt;&#039;&#039;&#039;}} with some value in between the angle brackets.&lt;br /&gt;
&lt;br /&gt;
Whatever value is there is the REAL name of our button on the remote as defined in lircd.conf. Remember, we can map any button to any function. The actual name of the button could be STOP if we wanted to (kinda dumb but it could be) The REAL button name on the remote is NOT required to have anything to logically do with the name of the command you want to perform&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just to illustrate we called it the KEY_GO button&lt;br /&gt;
&lt;br /&gt;
So to sum it up&lt;br /&gt;
&lt;br /&gt;
XBMC sent a command &#039;&#039;(Remember we are going in reverse)&#039;&#039; called Play&lt;br /&gt;
&lt;br /&gt;
That Play command is tied to the Lircmap.xml &amp;lt;play&amp;gt;&amp;lt;/play&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That Lircmap.xml &amp;lt;play&amp;gt;&amp;lt;/play&amp;gt; is tied to the real button on the remote that is called KEY_GO in lircd.conf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;remote.xml:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;keymap&amp;gt;&lt;br /&gt;
  &amp;lt;global&amp;gt;&lt;br /&gt;
    &amp;lt;remote&amp;gt;&lt;br /&gt;
      &amp;lt;play&amp;gt;Play&amp;lt;/play&amp;gt;&lt;br /&gt;
    &amp;lt;/remote&amp;gt;&lt;br /&gt;
  &amp;lt;/global&amp;gt;&lt;br /&gt;
&amp;lt;/keymap&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Lircmap.xml:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;lircmap&amp;gt;&lt;br /&gt;
  &amp;lt;remote device=&amp;quot;My-Remote-Name&amp;quot;&amp;gt;		&lt;br /&gt;
    &amp;lt;play&amp;gt;KEY_GO&amp;lt;/play&amp;gt;&lt;br /&gt;
  &amp;lt;/remote&amp;gt;&lt;br /&gt;
&amp;lt;/lircmap&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;lircd.conf:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
begin remote&lt;br /&gt;
&lt;br /&gt;
  name  &amp;quot;My-Remote-Name&amp;quot;&lt;br /&gt;
  bits            5&lt;br /&gt;
  flags RC6|CONST_LENGTH&lt;br /&gt;
  eps            30&lt;br /&gt;
  aeps          100&lt;br /&gt;
&lt;br /&gt;
  header       2662   836&lt;br /&gt;
  one           452   429&lt;br /&gt;
  zero          452   429&lt;br /&gt;
  pre_data_bits   32&lt;br /&gt;
  pre_data       0x1BFF83DF&lt;br /&gt;
  gap          106001&lt;br /&gt;
  toggle_bit_mask 0x8000&lt;br /&gt;
  rc6_mask    0x100000000&lt;br /&gt;
&lt;br /&gt;
      begin codes&lt;br /&gt;
          KEY_GO             0x0F&lt;br /&gt;
                    &lt;br /&gt;
      end codes&lt;br /&gt;
&lt;br /&gt;
end remote&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Generally, lirc is installed as a dependency by any system that requires it when installing Kodi.&lt;br /&gt;
&lt;br /&gt;
If for whatever reason you have to install/reinstall lirc, note that the manual says systemctl should be configured to enable/start lircd.socket, and lircd.socket will start lircd.service itself.  This is NOT the case if you&#039;re installing for Kodi: Kodi will open its own socket, so you should enable *only* lircd.service for it to function properly.&lt;br /&gt;
&lt;br /&gt;
== lircmap.xml ==&lt;br /&gt;
{{see also|Userdata}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A custom Lircmap.xml&#039;&#039;&#039; - This file merely defines the translation, bridging a &#039;&#039;&#039;LIRC_button&#039;&#039;&#039; to a &#039;&#039;&#039;XBMC_button&#039;&#039;&#039;. The file is literally named &#039;&#039;&#039;Lircmap.xml&#039;&#039;&#039; and is stored in the [[userdata]] directory. Do not confuse the &#039;&#039;&#039;Lircmap.xml&#039;&#039;&#039; with [[Keyboard.xml]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;LIRC_Button&#039;&#039;&#039; - what your lircd.conf calls the physical button on your remote control. &lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;XBMC_button&#039;&#039;&#039; - an Kodi internal button title. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;device name&#039;&#039;&#039; - is defined in your lircd.conf file in the &amp;quot;name&amp;quot; field. &lt;br /&gt;
&lt;br /&gt;
This information can be had using the test application &amp;quot;irw&amp;quot; and then hitting some buttons. More on this in the [[Lirc and Lircmap.xml#Testing Lirc Output]] section below.&lt;br /&gt;
&lt;br /&gt;
=== File format ===&lt;br /&gt;
Lircmap.xml format is as follows:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;lircmap&amp;gt;&lt;br /&gt;
        &amp;lt;remote device=&amp;quot;devicename&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;XBMC_button&amp;gt;LIRC_button&amp;lt;/XBMC_button&amp;gt;&lt;br /&gt;
                ...&lt;br /&gt;
        &amp;lt;/remote&amp;gt;&lt;br /&gt;
   &amp;lt;/lircmap&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Device name ====&lt;br /&gt;
The device name is defined in your lircd.conf file in the &amp;quot;name&amp;quot; field. This information can be had using the test application &amp;quot;irw&amp;quot; and then hitting some buttons. More on this in the [[Lirc and Lircmap.xml#Testing Lirc Output]] section below.&lt;br /&gt;
&lt;br /&gt;
==== Kodi button names ====&lt;br /&gt;
There are two type of XBMC_buttons in XBMC. &lt;br /&gt;
&lt;br /&gt;
* Predefined Buttons are labelled using their button title such as:&lt;br /&gt;
   &amp;lt;left&amp;gt;&lt;br /&gt;
   &amp;lt;right&amp;gt;&lt;br /&gt;
   &amp;lt;title&amp;gt;&lt;br /&gt;
   &amp;lt;menu&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These buttons are predefined in [[keymap.xml]] and handle all functions needed for a working system. For a complete list of buttons see [[keymap.xml#Remote Buttons]].&lt;br /&gt;
&lt;br /&gt;
* Customized buttons are for people who require more buttons than are defined by default. For example;&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;obc1&amp;gt;BUTTON1&amp;lt;/obc1&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
   &amp;lt;obc254&amp;gt;BUTTON254&amp;lt;/obc254&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 Note : These obc buttons must be defined in [[keymap.xml]] under the [[&amp;lt;universalremote&amp;gt;]] heading&lt;br /&gt;
&lt;br /&gt;
 FYI : obc stands for original button code and is a legacy of the old xbox IR remote system&lt;br /&gt;
&lt;br /&gt;
=== Testing Lirc Output ===&lt;br /&gt;
use the command &#039;irw&#039; to test your LIRC configuration&lt;br /&gt;
&lt;br /&gt;
   xbmc@xbmclinux:~$ irw&lt;br /&gt;
   0000000000040004 00 ARROW_UP Cyp_Se_WitheHome&lt;br /&gt;
   0000000000040004 00 VOLUME_UP Cyp_Se_WitheHome&lt;br /&gt;
   0000000000040004 00 NUMPAD_6 Cyp_Se_WitheHome&lt;br /&gt;
   0000000000040004 00 INFO Cyp_Se_WitheHome&lt;br /&gt;
&lt;br /&gt;
In this example Cyp_Se_WitheHome is the device name&lt;br /&gt;
ARROW_UP, VOLUME_UP, NUMPAD_6, INFO are button names&lt;br /&gt;
&lt;br /&gt;
If you wish to redefine the button names it can be done in /etc/lircd.conf&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
* [http://www.loggn.de/linux-ubuntu-lirc-xbmc-mit-logitech-harmony-steuern-lircmap-xml-und-keyboard-xml/ HOW-TO - Ubuntu/Linux – LIRC – control Kodi with Logitech Harmony remote – Lircmap.xml and Keyboard.xml]&lt;br /&gt;
* [http://www.loggn.de/arch-linux-lirc-konfiguration-mit-mce-rc6-ir-und-lircmap-xml-fuer-xbmc-logitech-harmony/ HOW-TO - Arch Linux - LIRC Version 0.9.0, Kernel 3.2 and new Lircmap.xml for XBMC]&lt;br /&gt;
&lt;br /&gt;
{{Gotham updated}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Manual]]&lt;br /&gt;
[[Category:Linux]]&lt;br /&gt;
[[Category:Remotes]]&lt;br /&gt;
[[Category:Supplemental tools]]&lt;/div&gt;</summary>
		<author><name>Slinkygn</name></author>
	</entry>
</feed>