Harmony Hub issue with MCE Remote: some buttons don't work

  • Hello,

    I have a MCE remote (HA-IR01SV) that works perfectly with LibreElec, however when I use my Harmony Hub remote, most buttons work except the "Exit" and "Menu" buttons (which I am wantingto have mapped to "Back" and "Context Menu", respectively)

    In my Harmony software, I have the "Microsoft MCE Keyboard" and "Microsoft Windows Media Center SE" added as devices. When I try to map *anything* to the "Exit" or "Menu" keys, nothing registers (I run 'ir-keytable -t' and see nothing; same when I run 'irw'). Oddly, if I try to map, say "C" (for "Context Menu") from the "Microsoft MCE Keyboard" to any other key which already works with something else, nothing registers when I press it.

    I should note that the actual MCE remote I have works without issue, and when I was running Kodi on Ubuntu up to about 3-4 months ago, the Harmony Remote was working perfectly as well (i.e., "Menu" was working as the Context menu)

    I have edited my 'keyboard.xml' file in /http://storage.kodi/userdata/keymaps/keyboard.xml to add '<menu>C</menu>' to the '<keybaord></keyboard>' section under "Global", and even restarted the whole machine, but still nothing registers.

    Any insight or advise greatly appreciated! :)

    Thanks, in advance.

  • I don't know your IR devices and there're missing important details (even the LE version you are running) and I have no idea what do you have connected to LE. But if you have attached more IR devices at the same time, you need to specify the right parameters which may be different from defaults.

    At first, run ir-keytable without parameters, it should list all recognized IR receivers. You should see there, among others, something like:

    Found /sys/class/rc/rc2/ with:

    ...

    Enabled kernel protocols: lirc nec

    ...

    Found /sys/class/rc/rc0/ with:

    ...

    Enabled kernel protocols: lirc rc-5
    ...

    You can also see the device names there.

    Then you run again for instance ir-keytable -t -s rc2 and push buttons on your IR remote control. If it has the appropriate protocol enabled, you'll see the scancodes received from rc2 device.

    You need to have the /storage/.config/rc_maps.cfg configured properly and each active device should have there specified the correct path to mapping file which should be stored in /storage/.config/rc_keymaps/ folder.

    For instance mceusb * /storage/.config/rc_keymaps/myIRremote

    In the mapping file myIRremote you need to configure the assignment between scancodes and commands (that irw displays when the mapping is correct).

    When you change the mapping file, you need to update the configuration, for instance:

    ir-keytable -a /storage/.config/rc_maps.cfg -s rc0

  • It's best to avoid the "MCE Keyboard", this is a really awkward protocol that's working poorly. Just stick to the Microsoft mediacenter (MCE) remote protocol, this is what you want to use ("Microsoft Windows Media Center SE" sounds like that might be fine, though I'm not really familiar with the harmony remotes)

    so long,

    Hias

  • My LE version is 'LibreELEC (official): 9.2.6 (Generic.x86_64)'. Here is my output from 'ir-keytable':

    Code
    Found /sys/class/rc/rc0/ (/dev/input/event9) with:
        Name: Media Center Ed. eHome Infrared Remote Transceiver (1784:0008)
        Driver: mceusb, 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: 3, vendor/product: 1784:0008, version: 0x0101
        Repeat delay = 500 ms, repeat period = 125 ms

    I ran 'ir-keytable -t -s rc0' still nothing comes up when I press the "Exit" or "Menu" buttons on my Harmony remote.

    I have nothing in my /storage/.config/rc_keymaps folder; what *should* be in there? My actual MCEUSB remote "just works" without any files needing to be in there.

  • The output looks fine and if you still have MCE Keyboard buttons mapped to menu/exit the output is expected - ir-keytable shows you that the MCE Keyboard protocol mce_kbd is supported but not enabled.

    The MCE Remote (rc-6 protocol) usually has "Back" and "(DVD) Menu" buttons that map to exit/back and (context)menu in kodi. Just use these and stay away from MCE keyboard in the harmony configuration software.

    BTW you can find more info on the wiki Infra-Red Remotes - LibreELEC.wiki and if you search the forum for mce_kbd you'll find info how to get MCE keyboard working - but that's rather tedious and not really needed in your case, MCE Remote should have everything you need/want and will work OOTB.

    so long,

    Hias

  • I have nothing in my /storage/.config/rc_keymaps folder; what *should* be in there? My actual MCEUSB remote "just works" without any files needing to be in there.

    Yeah so in your case you are in defaults so the current settings should be based on /etc/rc_maps.cfg and /usr/lib/udev/rc_keymaps/libreelec_multi.toml default files located in read-only filesystem. If you read the wiki as recommended by HiassofT, I think you'll understand how it works.

    I would copy libreelec_multi.toml file to /storage/.config/rc_keymaps/ folder and rc_maps.cfg to /storage/.config/ folder where you can modify them to override defaults.

    At least you need to change the line in /storage/.config/rc_maps.cfg from

    * rc-rc6-mce libreelec_multi.toml

    to

    * rc-rc6-mce /storage/.config/rc_keymaps/libreelec_multi.toml

    Then use ir-keytable -a /storage/.config/rc_maps.cfg -s rc0 command to update the configuration (always stop kodi and eventlircd before using systemctl, then start them again in reverse order). Everything should work as before. Then update /storage/.config/rc_keymaps/libreelec_multi.toml file to change scancodes <--> commands assignment, apply ir-keytable -a /storage/.config/rc_maps.cfg -s rc0 again and you irw should show you the results.

    In case you don't receive scan codes, you have to enable additional IR protocol, for instance to add mce_kbd (but consider HiassofT's advice above):

    ir-keytable -p lirc -p nec -p rc-6 -p mce_kbd -s rc0

    Also you may need to use another suitable template instead of libreelec_multi.toml for your preffered IR protocol, check the /usr/lib/udev/rc_keymaps/ folder and use the best file for you.

    Edit: See below the HiassofT's correction - I did not notice that there's a change between your LE 9.2.6 and my 9.80 Nightly build so the mapping files you'll find won't have the .toml extension. Everything else should be the same regarding the described steps.

    Edit2: Corrected the path for rc_maps.cfg file.

    Edited 6 times, last by ghtester (December 9, 2020 at 1:05 PM).

  • /etc/rc_maps.cfg and /usr/lib/udev/rc_keymaps/libreelec_multi.toml

    Uh, no, LE 9.2.6 doesn't use toml files.

    The wiki page describes the setup and files used in LE 9.x, master / LE 10 uses a newer ir-keytable version which uses toml files by default (the old files without toml extension are still supported though). The new toml format isn't documented on the wiki yet as it'd just confuse LE 9.x users for now, this will follow at some later point when we release LE 10.

    so long,

    Hias

  • OK, thanks for a correction, sorry, my fault as I have looked at my LE 9.80... And as I am using my proprietary mapping files originally copied from previous LE version (and then renamed) for a long time and everything still works fine, I did not notice the change.

    So SilkBC just need to use the files which can be found in the /usr/lib/udev/rc_keymaps/ folder and does not have .toml extension in LE 9.2.x. The name is not important and can be changed but the file structure is more important and should match the LE version.

  • Again, no, this won't help you with MCE Keyboard - LE 9.2 doesn't ship with any configuration files for that.

    LE with newer ir-keytable comes with mce_keyboard.toml, which is basically the same as rc6_mce with both rc-6 and mce_kbd protocols enabled.

    Still, you don't want to use that, mcd_kbd doesn't use key configuration from that file - the driver sends fixed KEY_A etc (like normal keyboards) which aren't really supported in LE's/Kodi's IR remote stack (you'd need to extend Lircmap.xml to translate KEY_A or whatever to some button name).

    Simply stay away from MCE Keyboard, that causes lots of unnecessary troubles.

    so long,

    Hias

  • Exactly. There'll be additional work to do if he won't give it up... Perhaps another way could be through irexec which I am using for several IR buttons to do everything I need and this could be configured easily (don't know if it's a good idea for a whole keyboard but it could work fine at least for some important buttons). Did not test that but I suppose this could work when there's a scan code mapping done to KEY_A etc. properly (or if it's send as fixed values by this driver). But maybe I don't understand the mce_kbd's difference...

    echo /usr/bin/irexec -d /storage/.config/lircrc >> /storage/.config/autostart.sh

    /storage/.config/lircrc :

    begin

    prog = irexec

    button = KEY_A

    config = kodi-send --button=a

    end

    begin

    prog = irexec

    button = KEY_B

    config = kodi-send --button=b

    end

    ...

    ...

    Edited 2 times, last by ghtester (December 9, 2020 at 2:00 PM).