I have a GPIO IR remote working on my PI 2 running OpenELEC 5.0.8 as I recall.
I am using an Ortec VRC-1100 (actually a Logitech 300 remote set as a VRC-1100). The following file locations apply to OpenELEC so if you use another the locations may be different.
I used an IR Receiver I had lying around that probably came off of an HDMI Switch. It had a stereo plug on it which I cut off. I connected the RED wire to GPIO Header Pin 2 (5 volts since it would not work on GPIO Header Pin 1 3.3 volts), Black Wire to GPIO Header Pin 6 (GND) and White Wire to GPIO Header Pin 12 (which is GPIO Input 18 as I recall). NOTE. I also purchased an IR Receiver from Amazon that worked with my VRC-1100 remote and I was able to connect the RED Wire to GPIO Pin 1 (3.3 volts) for it. Link
http://www.amazon.com/Infrared-Receiver ... r+receiver
After you have your IR Receiver connected, use Putty to ssh into your PI 2 and use nano editor to add a line to /flash/config.txt
mount -o remount,rw /flash
nano /flash/config.txt
scroll down to the end of config.txt and add
# added to enable lircd used with gpio IR Receivers
dtoverlay=lirc-rpi
# NOTE the above entry should be all you need but if if not add the following but remove the # at beginning
# dtoverlay=lirc-rpi,gpio_in_pin=18
write the data to config.txt and exit nano editor
mount -o remount,ro /flash
reboot
and continue as follows
You will need to either create or find a ' lircd.conf ' file for your particular remote (or remotes). There are lircd.conf files available at this link
http://lirc-remotes.sourceforge.net/remotes-table.html or
http://lirc.sourceforge.net/remotes/ and you may or may not find yours there.
You can also use Putty to ssh into your PI 2 and use ' irrecord ' command to create a lircd.conf file using your remote. It is tricky to get going and understand how to use but does have on screen instructions as you go.
I never could get it to create lircd.conf for my VRC-1100 until I used a VRC-1100.conf file I found somewhere at one of the above links as a ' template ' (but it did not have keys 0 - 9 defined and other keys I needed ) and then was able to record my remote keys into my own vrc-1100.conf file for later use.
To use a ' template ' , use Putty to ssh in to your PI 2 and do the following (I used the vrc-1100.conf file I had found at one of the above links which I had placed in /storage/.kodi/userdata/vrc-1100.conf and yours may be different)
killall lircd
irrecord /storage/.kodi/userdata/vrc-1100.conf
which will create a new file in /storage/.kodi/userdata/vrc-1100.conf.conf
Note: it adds .conf to the new file name and does not change the original template file.
Only new keys (buttons) that you have defined will be in this new file. Once you have all your keys defined and finish with irrecord, you can then rename your new file to lircd.conf and place it in /storage/.config/lircd.conf
You will need to modify the remote name in lircd.conf once it is created.
The first few lines of my lircd.conf looked like this
# Please make this file available to others
# by sending it to <
lirc@bartelmus.de>
#
# this config file was automatically generated
# using lirc-0.9.1-git(default) on Sat Apr 11 10:36:41 2015
#
# contributed by
#
# brand: ORTEK
# model no. of remote control: VRC-1100
# devices being controlled by this remote:
#
begin remote
name VRC-1100
After a reboot, you can see if your remote is working at this point by using Putty to ssh into your PI 2 and typing
irw
and if things are working you will see the remote's keys being recognized and displayed on screen.
You will now need ' Lircdmap.xml ' (Note: the capital ' L ') to be placed in /storage/.kodi/userdata/Lircdmap.xml
and ' remote.xml ' to be placed in /storage/.kodi/userdata/keymaps/remote.xml
You can find the system default ' Lircdmap.xml ' at /usr/share/kodi/system/Lircdmap.xml and ' remote.xml ' at /usr/share/kodi/system/keymaps/remote.xml. Both are read only so copy them to the locations I have shown above and then modify them as needed for your remote. It is my understanding the system will use your Lircdmap.xml and remote.xml files instead of the defalts.
In my case (and probably yours) the name of my remote had to be "devinput" in Lircdmap.xml to get things working. I also added <altname>VRC-1100</altname> just below but never did prove it was actually needed. The first few lines of my Lircdmap.xml looked like this
<lircmap>
<remote device="devinput">
<altname>VRC-1100</altname>
Good luck, it can be done.