Guide - using a Harmony with amlogic devices


  • Yep everything is fine now. Thanks again.
    I just have some problems with mapping the home button, the equivalent to pressing "esc" on a keyboard. In your KODI map it resembles pressing "z" I think.
    How do I change the "z" to "esc"? Because I can't find a home screen command in the keymap editor addon.


    IIRC that key was originally mapped to KEY_HOME / 102, which wasn't recognised as a command in libreelec. I mapped it to z to use as a utility key, then decided to use that to jump to the home screen. So in my keymaps I have:


    If you want it to point to escape just edit the relevant line in remote.conf - the replacement would be:

    Code
    0x95    1      ; ESC          61467           escape


    But you'll still face the same issue - that key maps to back / fullscreen rather than ActivateWindow(Home).


  • Where exactly do I paste that first code?
    In the gen.xml where I previously changed fullscreen to back?


    You can add it to that or stick a new .xml file next to it. If you intend to use keymap editor again it's better to add it to that, because it has the nasty habit of nuking any other custom keymaps if you so much as look at it.
    Any .xml file in that folder is loaded to keymaps (in alphabetical order, so if there's a conflict the last one loaded wins).
    Edit: you can't just paste the code into gen.xml - you have to paste into the relevant sections - ie 1 line into the global section, 1 line into fullscreenvideo. Or add via the gui - can't help with that but it's certainly the recommended way.

    Edited once, last by trogggy (December 3, 2016 at 7:22 PM).

  • It took me a while to figure that gen.xml out but now I understand how it works an what kodis keymap editor does to it. You where right, it's realy confusing but I ended up using it anyway and now I've mapped everything I wanted.
    I don't need more buttons than that but It might be helpfull to others if you could offer a code for another remote control than the pivos xios ds that has even more buttons. The pivos has 42 I think. Including the favourites buttons 1-5 on my Harmony 350 I could theoretically map 48 buttons.
    The one or other person might want to map them all. Could be a nice addition to this tutorial.
    Think about it.


  • It took me a while to figure that gen.xml out but now I understand how it works an what kodis keymap editor does to it. You where right, it's realy confusing but I ended up using it anyway and now I've mapped everything I wanted.
    I don't need more buttons than that but It might be helpfull to others if you could offer a code for another remote control than the pivos xios ds that has even more buttons. The pivos has 42 I think. Including the favourites buttons 1-5 on my Harmony 350 I could theoretically map 48 buttons.
    The one or other person might want to map them all. Could be a nice addition to this tutorial.
    Think about it.


    Glad it all worked.
    I used this remote.conf because it had as many or more buttons than any other I looked at. If someone suggests one with more I'm happy to check it. Tbh though this is probably just a temporary solution - as it looks as though amlogic boxes will probably end up using lirc.
    Expanding gen.xml (as in a few posts up) makes it a lot easier to follow btw - and it still works.

  • Kudos troggy! Great stuff!
    Worked for my Beelink Mini MXIII II with a Harmony 555.
    User has to be aware of that if the remote.conf isn't existing in /storage/.config nothing will work until the reboot. Or they have to execture the remotecfg command instead. No big deal.

    One question though:
    Is there a possibilty to map the "AudioNextLanguage"? I didn't find a keymap.xml on LE and on the Harmony if haven't found this command. Still figuring it out how this could work.

    Thank!


  • One question though:
    Is there a possibilty to map the "AudioNextLanguage"? I didn't find a keymap.xml on LE and on the Harmony if haven't found this command. Still figuring it out how this could work.

    Thank!

    Hi

    I'm using this with a Harmony 650 :

    Code
    <key id="61474">audionextlanguage</key>
  • I do it , work great ..... logitech harmony 900 based on remote for a mut@nt hd 2400 (nec protocol too)
    but
    just one key doesn't work .... the function KEY_RECORD 167 ..... :s on LibreElec 7.0.3.12 does nothing do .... , on live tv , press menu bar and select record button work , but if i pressed my REC button on the harmony ... do nothing....

    someone can confirme that KEY_RECORD doesn't work


  • I do it , work great ..... logitech harmony 900 based on remote for a mut@nt hd 2400 (nec protocol too)
    but
    just one key doesn't work .... the function KEY_RECORD 167 ..... :s on LibreElec 7.0.3.12 does nothing do .... , on live tv , press menu bar and select record button work , but if i pressed my REC button on the harmony ... do nothing....

    someone can confirme that KEY_RECORD doesn't work

    Just checked, and can confirm it doesn't work. The key is read but no action linked to it by default.
    Log entry:

    Code
    DEBUG: OnKey: record (0xf0c6) pressed, action is


    To make that work for record (presumably what you want?) is fairly straightforward...
    Change the hex code to decimal, make an .xml file pointing to that (or edit your existing keymap), drop it in userdata/keymaps and either reload keymaps / restart / reboot.
    eg make a file called record.xml:

    XML
    <?xml version="1.0" encoding="UTF-8"?>
    <keymap>
      <global>
        <keyboard>
            <key id="61638">Record</key>
        </keyboard>
      </global>    
    </keymap>


    Looking at the log it might even work using '<record>Record</record>' but I've not tested that.

    Could you post the remote.conf you're using for the mut@nt here? It's always handy to have alternatives.
    TIA.

  • Many thanks , it's a good idea , if it canhelp someone, I will post my remote.conf in few hours.....

    if i must use keymap i will take advantage for add fonction < AudioNextLanguage > too

    PS : it seem's key id can be specified like this too <key id = "0xf0c6"> Record </key> , much simple for use with dmesg -c | grep scan

  • remote.conf for mutant hd 2400 on logitech harmony 900, work great with libreelec 7.0.3.012a on leelbox S1 1gb/8gb on SD card (at the time)

    just need to learn the real ir code for create function power on harmony screen.... the function on/off provided by logitech is monitored by the event code 116

    (key record Ok with userdata/keymap/gen.xml and remaped key_a for fonction audionextlanguage)


    userdata/keymap/gen.xml

    Code
    <keymap><global><keyboard><key id="0xf0c6">record</key><key id="61505">audionextlanguage</key></keyboard></global><pvr><keyboard><key id="61505">audionextlanguage</key></keyboard></pvr><fullscreenlivetv><keyboard><key id="61505">audionextlanguage</key></keyboard></fullscreenlivetv><fullscreenvideo><keyboard><key id="61505">audionextlanguage</key></keyboard></fullscreenvideo></keymap>

    key on the logitech screen not mapped (because unnecessary for me)...
    button on screen logitech-> ir code send
    favoris -> 0x1a
    radio -> 0x36
    user -> 0x2c
    F1 -> 0x2e
    F2 -> 0x2f
    F3 -> 0x30
    navigation left -> 0x0a
    navigation right -> 0x0b

    however i did not understand how to translate key_record to key id=61638,... where are you find it

    Code
    <key id="61638">


    , only the debug mode can provide the key id for key pressed ?

    Edited once, last by thiryer (January 17, 2017 at 10:12 PM).


  • however i did not understand how to translate key_record to key id=61638,... where are you find it

    Code
    <key id="61638">


    , only the debug mode can provide the key id for key pressed ?


    Yep, I just look in the log after pressing a key. There might well be an easier way, but that's what I've used because it's all I know.

    Thanks for adding your remote.conf.

  • Hi,

    just thought I'll give it a try but on putty I get the error message remotecfg: not found ... any idea why? I copied your test config file without any problems ...

    Best


  • Hi,

    just thought I'll give it a try but on putty I get the error message remotecfg: not found ... any idea why? I copied your test config file without any problems ...

    Best

    Just to keep this thread tidy - you're on a NUC, so the guide won't do nuffin. Amlogic only. :)


  • Worked for me but didn't get power toggle to work. The moment you load the keymap, the original remote no longer works. Also would like to set the guide button for the Kodi TV guide and the menu button to context. How do I do this?

    Troggy just gave me a link that brings the whole thing together:

    [HowTo] Register and use two remote controllers at the same time.

    Usually the power button must be 'learned' by the remote control logitech via the original remote control.
    For the tv guide of memory, it is necessary to point to the function key_h, function 35