apple ir remote (atvclient) not working after upgrade from 9.0.2. to 9.1.002

  • After upgrading from LE Generic 9.0.2. to 9.1.002 my apple ir remote (atvclient) is no longer working.

    Any suggestions what might be wrong??

  • atvclient has been dropped in LibreELEC master and 9.2 because it was constantly causing troubles.


    The remote should be supported by the linux kernel, but probably the buttons need to be remapped - the hid-appleir kernel driver sends volume-up/down and back/forward when you press the navigation keys.


    Please post dmesg, lsusb and journal from LE 9.1.002 and a kodi debug log where you pressed the various buttons on the remote - this should allow us to create a proper default config for the remote.


    so long,


    Hias

  • HiassofT I will do this in the weekend when I am back home.

    I know how to login to LE with putty.

    Can you send me the instructions/commands for the output you need?

    Thanks for your help, very much appreciated !!

  • First install the System Tools addon (from the LibreELEC repository, in the section "Programs") and enable debug logging in kodi. Then reboot.


    Now press up/down/left/right/OK buttons (plus any other buttons on the remote) and observe if they trigger some obvious functions in kodi.


    Then ssh into LE and run the following commands and post the output:

    Code
    1. systemctl stop kodi
    2. systemctl stop eventlircd
    3. paste .kodi/temp/kodi.log
    4. journalctl -a | paste
    5. lsusb


    Then run

    Code
    1. evtest

    and choose the event device number of the Apple IR receiver (it should have appleir or something similar in it's description. evtest will then output some info, ignore that.


    Now press all of the buttons, one after the other. You should see some lines like

    Code
    1. Event: time 1565859742.121362, type 4 (EV_MSC), code 4 (MSC_SCAN), value c00e9
    2. Event: time 1565859742.121362, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 1
    3. Event: time 1565859742.121362, -------------- SYN_REPORT ------------
    4. Event: time 1565859742.137362, type 4 (EV_MSC), code 4 (MSC_SCAN), value c00e9
    5. Event: time 1565859742.137362, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 0
    6. Event: time 1565859742.137362, -------------- SYN_REPORT ------------

    for each button press. Post that output here, too.


    so long,


    Hias

  • HiassofT ,


    Here is the requested output:


    journalctl ==> http://ix.io/1rls


    lsusb ==> http://ix.io/1rlu


    evtest.==> http://ix.io/1rly


    The kodi.log file I have zipped and attached, since the paste didnot work for it.


    By the way, I tried to create keymap.xml file as described here ==> Apple remote - Official Kodi Wiki

    and store it in .kodi/userdata/keymaps, but that didnot work either.


    Thanks.

    Files

    • kodi.zip

      (539.21 kB, downloaded 2 times, last: )
  • I was forgotten the output for KEY_ENTER:


    Code
    1. Event: time 1565871751.104493, type 1 (EV_KEY), code 28 (KEY_ENTER), value 1
    2. Event: time 1565871751.104493, -------------- SYN_REPORT ------------
    3. Event: time 1565871751.390925, type 1 (EV_KEY), code 28 (KEY_ENTER), value 0
    4. Event: time 1565871751.390925, -------------- SYN_REPORT ------------
  • Thanks for the info!


    The info on the kodi wiki page looks a bit outdated. Please try with this keymap instead:

    This maps the "menu" button on the remote to "Back" (something in kodi's "menu" key handling doesn't look quite right, therefore I had to use the id variant), long-pressing on the center return/OK/select button will bring up the context menu (that's the default action in kodi, so it's not listed in the keymap above).


    so long,


    Hias

  • HiassofT


    Hi Hias,


    I triied your keymap. The Navigation works (but different then with atvclient), but volume up/down is not working at all.


    The LIRC tool looks really complicated to me.

    I also looked into wiki pages:

    Infrared Remotes [LibreELEC.wiki]

    LIRC - Official Kodi Wiki


    It seems to me that I also need following two files configured for the remote:

    lircd.conf

    Lircmap.xml

    However these files are not present on my system in the /storage/.config or /storage/.kodi (sub)directories.

    Do I need these files or not?


    Otherwise if I cannot get it properly working with LIRC, is it possible for me to install atvclient myself?


    Thanks,

    Jeroen

  • Good to know that navigation works now!


    How did you previously (with atvclient) get volume up/down?


    With keyboard input in kodi (which is how the remote is recognized/setup at the moment) you can assign separate functions to long-pressing a button.


    eg to get volume-up/down when long-pressing up/down add the following 2 lines after the volume_up / down entires in your keymap:

    Code
    1. <volume_up mod="longpress">VolumeUp</volume_up>
    2. <volume_down mod="longpress">VolumeDown</volume_down>


    PS: forget about lirc, it's not needed and you would loose longpress support in kodi.


    so long,


    Hias

  • Hi HiassofT ,


    Apple remote is very simple. It only has a few buttons (as shown by evtest):

    KEY_ENTER

    KEY_VOLUMEDOWN

    KEY_VOLUMEUP

    KEY_MENU

    KEY_BACK

    KEY_FORWARD

    KEY_PLAYPAUSE


    When I use the atvclient it depends on the context which action is executed when I press the up/down buttons. If playing full screen music/video then the volume is increased/decreased, but when in a menu/navigation screen then it navigates up/down.


    So I still do not understand why you use the Kodi keyboard keys instead of the Kodi remote keys in the keymap.xml ??

    I also do not understand how the device keys (as listed by evtest) gets translated into Kodi keys as used in keymap.xml ??

    My thinking was that (after reading the wiki's):

    - eventlircd maps device events to LIRC events using /etc/eventlircd.d/03_05ac_8241.evmap

    - Lircmap.xml maps LIRC events/buttons to Kodi buttons

    - keymap.xmp maps Kodi buttons to Kodi commands (Keymap - Official Kodi Wiki)


    N.B.

    I also noticed the following line in my kodi.log, which did not seem to work :

    Loading special://xbmc/system/keymaps/customcontroller.AppleRemote.xml


    However with atvclient it all worked flawlessly without any configuration.

    Is there a possibility to install the atvclient myself, or to provide it as add-on ?


    Jeroen

  • Kodi already supports context-specific keymapping. For example to map up/down on the navigation wheel to volume-up/down when visualization/full-screen music or full-screen video is playing you can use add the following block (between </global> and </keymap>) to keymap.xml:

    The main reasons for dropping atvclient is that it didn't really work perfect and was constantly causing issues over the past few years. And as no one on the team is using an Apple IR remote testing and fixing was rather cumbersome.


    As in the meanwhile the Apple IR receiver is perfectly supported by the linux kernel and with kodi keymap configuration people have a far more flexible possibility to map and configure the remote the decision to drop atvclient wasn't a really hard one - as a better alternative to it exists.


    I'm a bit undecided if we should route it through eventlircd (like a few other remotes) by default, the pro of that would be that you could use the navigation wheel to navigate through the menus OOTB, but you'd also loose the possibility to use longpress mappings - which some users prefer to have on low-button-count remotes like the Apple one.


    so long,


    Hias

  • Thanks for all your help again HiassofT . The keymap works.

    However, I never had any issues with atvclient, on the contrary it always worked perfect for me (using macmini).

    As an alternative/test I also tried to install the atvclient myself, and that also worked:

    I stored the binary in /storage/bin/atvclient

    and then created a service to start it at boottime in /storage/.config/system.d/atvclient.service

    Regards.