Reading this cool document didn't help me to make the RC working. Please, advise.
The IR receiver is connected to GPIO 18 on Raspberry PI 3 model B, running LibreELEC 9.2.0.
The log with configuration is here. Not sure I inserted the dtoverlay line in proper place of /flash/config.txt.
The lirc is up.
- # ps -ef | grep lirc
- 246 root 0:00 /usr/sbin/eventlircd -f --evmap=/etc/eventlircd.d --socket=/run/lirc/lircd
- # ir-keytable
- Found /sys/class/rc/rc0/ (/dev/input/event2) with:
- Name: gpio_ir_recv
- Driver: gpio_ir_recv, table: rc-rc6-mce
- lirc device: /dev/lirc0
- Supported protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon rc-mm
- Enabled protocols: lirc nec rc-6
- bus: 25, vendor/product: 0001:0001, version: 0x0100
- Repeat delay = 500 ms, repeat period = 125 ms
At this moment Kodi does not react on RC keys.
I found the proper RC configuration file for LIRC for the RC I have (TV LG xx-LW5700-yy), which looks different from all descriptions of the document above. I understand the file describes the protocol of LG TV.
This awesome page was a good start to connecting things together.
Here's a guide for newbies like me. Maybe this will help someone with info abuse and docs distraction.
Apparently, no need to 'enable LIRC' or install any service/software to have the IR RC working.
1. Get any Arduino-type IR receiver connected to Raspberry PI. Default pins:
IR -- RasPI
Vin -- 3.3V (Raspi GPIO intolerant to 5V, use 3.3V to not burn the CPU).
Out -- GPIO18 (you can choose any IO - just update the config later properly).
Gnd -- Gnd
2. Find and download the closest possible lircd.conf file in the internet. Look on part number or model name on your IR RC, search to your appliance model, be creative. In my case, the IR RC model matched first 5 symbols with what was published in sourceforge, and it works.
3. Configure /flash/config.txt as following:
4. Put the conf file you've found in step 2 at /storage/.config/lircd.conf. Usually, the files are published with model number before lircd.conf. So keep just lircd.conf as file name. You are going to work with this file a lot in next step. So keep it open in side window.
5. Prepare template for your own RC:
6. Add your RC into Lircmap.xml:
- nano /storage/.kodi/userdata/Lircmap.xml
- pick/cope any ready configuration in the file. The configuration starts from tag <remote .... and finishes with </remote>
- paste it under any remote, but above the </lircmap> tag.
- change <remote device="..."> with the name you device conf file you've found in step 2. Look into the lircd.conf, as said in step 4.
- change required key functions accordingly to key names in lircd.conf, as said in step 4.
- Ctrl+X -> Y -> Enter
That's it. Booted Kodi works with your RC.
Now I can control both TV and Kodi with the same remote