[SOLVED] LibreELEC + PCTV 461e + XBox One Remote

  • Hello HiassofT,

    today I was able to test the dev-build. I used the latest, which is: LibreELEC (community): devel-20170807025305-#0806-gc0c5545 (RPi2.arm)

    The output of the lsof command is:

    Code
    # lsof | grep /dev/input
    261     /usr/sbin/eventlircd    /dev/input/event0

    During this test, I used the rc_map.cfg:

    Code
    # cat .config/rc_maps.cfg
    * * xbox_one

    I tested with the "old" xbox_one keymap that contains:

    Code
    0x80d822 KEY_OK
    0x80d823 KEY_EXIT

    ... and it worked. That means: pressing the "OK" and the "BACK" button is recognized by Kodi.

    So it seems, that my Problem will be solved with the next release. Do you know if there is a roadmap for the rollout of the new release?

    I want to thank you very much for all the efforts you had with my Topic! Thank you also for answering all my questions!!!

    Since I always try to understand why and how things work, I have a last question regarding this problem:

    the system did not recognize the OK/ENTER button when the keymap contained KEY_OK but it did, as I changed to KEY_ENTER. Why did you designate it only as a workaround? Is there a transition from KEY_OK to KEY_ENTER which did not work in my case? In other words: is there a reason why I have to switch back to KEY_OK instead of leaving KEY_ENTER in the keymap?

    Again: thank you very much for your helpfulness!

    Best regards, Nico.

  • Thanks again for testing, your feedback was really helpful!

    The Milhouse build you tested is the current development state of the next major LibreELEC release (9.0) with Kodi 18 Leia. It's still a long way there, about half a year or so.

    But we are planning on releasing a 8.2 version soon (within the next weeks), with Kodi 17 .4 Krypton and several updates/fixes.

    Could you test if this build works, that's our current 8.2 development state:

    LibreELEC-RPi2.arm-8.2-devel-20170808010044-r25961-g2568ed687.tar

    If my suspicion (libudev/systemd bug) is correct that build should have the same issue as 8.0.2 as systemd is the same version as in 8.0 builds (Milhouse builds have a newer version). But maybe my guess was wrong and the issue is caused by something else that's already fixed in 8.2 :)

    As for the KEY_OK/EXIT: I called that a workaround because you should not need to change that - LE should be able to cope with unmodified keymaps and there's a real bug present (eventlircd not working as expected).

    so long,

    Hias

  • Hello HiassofT,

    I downloaded your dev build and installed it (by copying it to the .update folder).

    The ssh shell displays LibreELEC (community): devel-20170808010044-r25961-g2568ed687 (RPi2.arm).

    I rolled back the changes, that I made to the keymap, so:

    Code
    # cat .config/rc_keymaps/xbox_one
    # table xbox_one, type: NEC
    0x80d864 KEY_MEDIA
    0x80d820 KEY_LEFT
    0x80d821 KEY_RIGHT
    0x80d81e KEY_UP
    0x80d81f KEY_DOWN
    0x80d822 KEY_OK
    0x80d823 KEY_EXIT
    [...]

    ... is active.

    With that configuration your dev build works ... which means that the OK/ENTER button is recognized by Kodi.

    When will this dev branch be merged to the head revision?

    Best regards, Nico.

  • Thanks again for testing! It's very good to know that the issue is fixed.

    I compiled that build from current 8.2 head (rev 2568ed687) with no additional modifications. Public 8.2 beta builds should be out soon after kodi 17.4 is released.

    so long,

    Hias

  • Hello HiassofT,

    I have got another question regarding this topic:

    you wrote earlier in this thread, that "The eventlircd process running is fine, it's needed to feed the remote button presses into kodi.". Does that mean, that I can use Lircmap.xml to map the keycodes to Kodi actions in remote.xml? When not, can you tell me, how to shorten that gap between keycodes (like KEY_ENTER) and the codes in remote.xml (like "Select")?

    The information in the Kodi-Wiki were not helpful for me in this case.

    Thank you again for your help and have a nice weekend, Nico.

  • Hello HiassofT,

    sorry for consulting you again (I hope not to annoy you too much), but there is one more thing I do not understand:

    if I get you right, the lirc daemon is not used - only eventlircd is running for passing ir events to Kodi (lircd is also not shown in my process list). So in my opinion, no lircd.conf is used nor present.

    The Lircmap.xml documentation defines the remote name as

    Code
    <remote device="name_Lirc_calls_the_remote">

    How does that fit toget her? Can you tell me which device name I have to use for the Kodi built in mechanism?

    Thank you again!

    Nico

  • No problem, feel free to ask! Remote handling in Kodi is somewhat confusing, took me a while to understand it as well :)

    The LIRC events from eventlircd will show up with "devinput" as remote name (with lirc they'd show up as the remote name defined in lircd.conf).

    Hint: enable debug logging in kodi and then check .kodi/temp/kodi.log. A lirc event from eventlircd will look like this:

    Code
    12:40:51.762 T:1943990288   DEBUG: LIRC: Update - NEW at 10148446:6c 0 KEY_DOWN devinput (KEY_DOWN)
    12:40:51.763 T:1943990288   DEBUG: OnKey: 167 (0xa7, obc88) pressed, action is Down

    "devinput" is the "remote name".

    Keyboard input OTOH looks like this:

    Code
    12:47:40.167 T:1943990288   DEBUG: Keyboard: scancode: 0x6c, sym: 0x0112, unicode: 0x0000, modifier: 0x0
    12:47:40.167 T:1943990288   DEBUG: OnKey: down (0xf081) pressed, action is Down

    so long,

    Hias

  • Hello HiassofT,

    it's really great that you are so helpful and that you always reply such quick!

    I tried to activate debugging but I only get the outputs:

    Code
    19:47:03.287 T:1962553344   DEBUG: Keyboard: scancode: 0x6c, sym: 0x0112, unicode: 0x0000, modifier: 0x0
    19:47:03.287 T:1962553344   DEBUG: OnKey: down (0xf081) pressed, action is Down
    19:47:03.737 T:1962553344   DEBUG: Keyboard: scancode: 0x6c, sym: 0x0112, unicode: 0x0000, modifier: 0x0
    19:47:04.003 T:1962553344   DEBUG: Keyboard: scancode: 0x67, sym: 0x0111, unicode: 0x0000, modifier: 0x0
    19:47:04.004 T:1962553344   DEBUG: OnKey: up (0xf080) pressed, action is Up
    19:47:04.487 T:1962553344   DEBUG: Keyboard: scancode: 0x67, sym: 0x0111, unicode: 0x0000, modifier: 0x0
    19:47:07.836 T:1962553344   DEBUG: Keyboard: scancode: 0x74, sym: 0x014b, unicode: 0x0000, modifier: 0x0

    and

    Code
    19:47:07.836 T:1962553344   DEBUG: OnKey: zoom (0xf0e7) pressed, action is
    19:47:08.086 T:1962553344   DEBUG: Keyboard: scancode: 0x74, sym: 0x014b, unicode: 0x0000, modifier: 0x0

    for buttons that can not be assigned.

    So I retried your development build and there I get the outputs you mentioned (DEBUG: LIRC: Update - NEW at 10148446:6c 0 KEY_DOWN devinput (KEY_DOWN)). So something seems to be different in the current public release.

    Furthermore I tried to change the function of keys with adjustments in Lircmap.xml and remote.xml but they had no effect in Kodi. I tried the same changes to both files with your development build and there they worked fine.

    Since the PVR functions are not working with your development build (in the logfile I can find messages that connections to the PVR backend can not be established) it is no option for me to use this build until the next official (minor) release. So I give up (at least with my ambitions to customize remote behaviour) since I invested several hours without success and so I have to wait for the next release.

    Nonetheless I want to thank you for all your support in this case!!!

    Nico.

  • Hello HiassofT,

    sorry for the delay (I was occupied by my job).

    Today I tested the new 8.1.0 and the remote (with my modifications in Lircmap and remote.xml) works fine. Also the PVR works fine again, but since I also switched from VDR to TvHeadend I do not know if this was related to the involved versions.

    So this topic is solved.

    Thank you very very much for your really great support and help!

    Best regards, Nico.