LibreELEC 8.1.2 Topseed eHome Infrared Transceiver not working

  • Just upgraded my Rpi2 from LibreELEC 8.0.1 to 8.1.2. But my remote stopped working and I can't find out why.

    Intro

    I'm using a custom lircd.conf which contains 2 remotes:

    • mceusb, so all the default kodi mappings should work out of the box
    • harmony_kls_vdr, a second remote with a lot of extra codes I use to define custom actions in remote.xml through Lircmap.xml

    lircd.conf

    I configured both remotes in my Harmony remote.

    The receiver is a Topseed eHome Infrared Transceiver

    Dmesg:

    To load the custom lircd.conf I use an autostart.sh file:

    Code
    killall lircd
    ir-keytable -p lirc
    lircd --device=/dev/lirc0 /storage/.config/lircd.conf

    Problem

    I can no longer navigate the interface with my remote. Irw does not register any keypresses. The leds light up, so the receiver is receiving.. And when I reconnect my ir receiver, the default ir-keytable kicks in and I can use the normal buttons, but not the extra buttons I use in the keymap harmony_kls_vdr

    So how do I get my old lirc.conf working again? I've tried switching to a rc keymap before, bur like all the extra buttons this second remote has which don't overlap with any keys in the default kodi keymaps,

    I've tried adding different drivers (devinput/mceusb) in lirc_options.conf, but that did nothing...


  • To load the custom lircd.conf I use an autostart.sh file:

    Code
    killall lircd
    ir-keytable -p lirc
    lircd --device=/dev/lirc0 /storage/.config/lircd.conf

    Don't do that.

    Remove autostart.sh and make sure Lirc is enabled in LibreELEC settings. You may also have to disable ir-keytable auto-configuration (via ": > /storage/.config/rc_maps.cfg").

    Another alternative is to keep lirc disabled and create a custom rc_keymap (yes, you can enable multiple protocols and have multiple remote codes in it). See the wiki for details:

    infrared_remotes [LibreELEC]

    so long,

    Hias

  • Remove autostart.sh and make sure Lirc is enabled in LibreELEC settings. You may also have to disable ir-keytable auto-configuration (via ": > /storage/.config/rc_maps.cfg").

    Ok, I created an empty rc_maps.cfg, removed autostart.sh and enabled Lirc in the LibreELEC settings. The normal navigation keys are working now, but Lirc is not picking up my second remote.

    Btw, I got the instruction to create an autostart.sh from the Kodi Wiki (although the instructions were for OpenELEC).

    irw now shows output like

    Code
    6c 0 KEY_DOWN devinput

    But when I was still using autostart.sh, I got output like:

    Code
    000000037ff07be0 01 KEY_DOWN mceusb
    000000000000102d 00 com2d harmony_kls_vdr

    What am I missing here? Is LibreELEC not picking up lircd.conf?

    Edited once, last by tojnk (September 30, 2017 at 8:29 AM).

  • Thanks for the link to the kodi / openelec wiki page, now I know where the autostart.sh instructions were coming from. I think I'll have to add a section to the LE wiki page to not do that.

    About your issue: The main problem is that your lircd.conf file contains now invalid key codes (Media, PlayPause, com2d etc). Only standard linux keycodes will work (those starting with KEY_). In early lirc days you could use any key/button code you'd like but this quickly led to a mess (everyone used slightly different spellings or names for the same buttons). Now this is restricted to the well defined standard codes.

    You can get a list of all supported keycodes with the following command:

    Code
    irrecord -l

    Then change your lircd.conf file to use these codes (eg KEY_PLAYPAUSE instead of PlayPause).

    so long,

    Hias

  • Then change your lircd.conf file to use these codes (eg KEY_PLAYPAUSE instead of PlayPause).

    I changes my lircd.conf so it only uses the keycodes from irrecord -l. I mapped the keys from my second remote to KEY_F11 through KEY_F22. These keys are not part of the set of default keys in Kodi as far as I could find out. So I mapped these to the same actions I used to using Lircmap.xml:

    And left my remote.xml unchanged:

    So now everything is working again as it should, thanks HiassofT. The only thing that still bugs me is what has changed between LibreELEC 8.0.2 and 8.1.2 that has broken the way my setup used to work? What is different in the way that LibreELEC loads lircd.conf and the way I loaded it with my autostart.sh. The keypresses now seem to be coming from devinput instead of the name of the remote I used in lircd.conf. Does this have something to do with what is written on the Wiki in section LIRC integration with eventlircd / Kodi:

    Quote
    Although, at a first glance, it might seem odd to translate between LIRC, Linux input and then again LIRC events there's a rather simple reason for that: Kodi can receive LIRC events only from a single LIRC socket and with eventlircd collecting all remote events and feeding them to Kodi LibreELEC can support both LIRC-decoded and kernel-decoded remotes without needing the user (or some sophisticated script) having to change the configuration.


    Edited 2 times, last by tojnk (September 30, 2017 at 1:08 PM).

  • Lirc now uses a different startup method (the same as used by upstream lirc, instead of the rather custom way OpenELEC and LibreELEC used before).

    It's puzzling why your autostart.sh script even worked with LE 8.0.2 (IMO it should already have failed there), but I certainly won't work with LE 8.1.

    so long,

    Hias