LibreELEC 9.2.0 + LG TV IR remote

  • Hi guys,


    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.

    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.


    Update: Solved :)

    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:

    Code
    mount -oremount,rw /flash
    nano /flash/config.txt
    <add next line above [all] section>
    dtoverlay=gpio-ir,gpio_pin=18
    Ctrl+X -> Y -> Enter
    mount -oremount,ro /flash

    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:

    Code
    cp /usr/share/kodi/system/Lircmap.xml /storage/.kodi/userdata/Lircmap.xml


    6. Add your RC into Lircmap.xml:

    Code
    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

    7. reboot


    That's it. Booted Kodi works with your RC.

    Now I can control both TV and Kodi with the same remote :)

    Edited 4 times, last by grhhm: bug fix ().

  • Another update:

    Both lircd.conf and Lircmap.xml have definition for 'power' button on the RC.

    Not clear how this can be useful: once you shut Raspi down with RC, you can't turn it on.

    To workaround this I removel all lined in both files which contain word 'power'.

    Now the RC turns the TV on and off, however Raspi is always on.