lircd fudging keypresses during video playback

  • hi yall


    i have some philipsHue lights & openHAB ... so i thought how awesome would it be to control them from kodi ... i didnt want the openHab addon in the kodi repo that lets you navigate the entire sitemap. i hand rolled an addon so i could control each light by a keypress. i mapped it to some buttons... and that's when the fun started...


    im making use of the keyPad, so 1 = everything, 2 = the office, 3 = the livingRoom...


    it works when im in the kodi UI. i see this in the logs

    Code
    1. 23:38:04.383 T:1962676224   DEBUG: OnKey: 203 (0xcb, obc52) pressed, action is runscript(script.openHab.lights,officelamp)
    2. 23:38:05.036 T:1962676224   DEBUG: OnKey: 202 (0xca, obc53) pressed, action is runscript(script.openHab.lights,Light_kitchen_sink)
    3. 23:38:06.516 T:1962676224   DEBUG: OnKey: 200 (0xc8, obc55) pressed, action is runscript(script.openHab.lights,livingRoomLight)


    however when something is playing, i have to double-click each button ? this is what i see in the log

    Code
    1. 23:46:01.933 T:1962676224   DEBUG: OnKey: 199 (0xc7, obc56) pressed, action is Number8
    2. 23:46:02.717 T:1962676224   DEBUG: OnKey: 199 (0xc7, obc56) pressed, action is runscript(script.openHab.lights,Light_livingRoom_One)


    my keymap

    Code
    1. # cat ~/.kodi/userdata/keymaps/custom.xml
    2. <keymap>
    3.   <global>
    4.     <universalremote>
    5.       <obc49>runscript(script.openHab.lights,light)</obc49>
    6.       <obc50>runscript(script.openHab.lights,officelamp)</obc50>
    7.       <!-- and the rest -->
    8.     </universalremote>
    9.   </global>
    10. </keymap>


    i also tried with key-codes, but that made no difference

    Code
    1. ...
    2.     <key id="0xce">runscript(script.openHab.lights,light)</key>
    3. ...


    if i kill lircd, my log then shows these buttons as numpadone/numpadtwo/numpadthree and i don't need to douplePress during playback... but this is not ideal as i would have to kill lircd from autostart.sh & also redo the rest of my customKeymap.xml. (i have another addon that runs with the "start" button, which is <key id="0x25"> with lircd and meta-0 without ... i couldn't figured out how to map that)


    any ideas why its only catching the right command on the 2nd press during playback ?


    on the same vein (with lircd) 9 is not the next "obc" in sequence ? and i can't figure out how to map that either

    Code
    1. 23:38:39.583 T:1962676224   DEBUG: OnKey: 206 (0xce, obc49) pressed, action is Number1
    2. 23:38:42.700 T:1962676224   DEBUG: OnKey: 205 (0xcd, obc50) pressed, action is Number2
    3. 23:38:45.750 T:1962676224   DEBUG: OnKey: 204 (0xcc, obc51) pressed, action is Number3
    4. 23:38:48.867 T:1962676224   DEBUG: OnKey: 203 (0xcb, obc52) pressed, action is Number4
    5. 23:38:51.583 T:1962676224   DEBUG: OnKey: 202 (0xca, obc53) pressed, action is Number5
    6. 23:38:55.067 T:1962676224   DEBUG: OnKey: 201 (0xc9, obc54) pressed, action is Number6
    7. 23:38:58.216 T:1962676224   DEBUG: OnKey: 200 (0xc8, obc55) pressed, action is Number7
    8. 23:39:06.451 T:1962676224   DEBUG: OnKey: 199 (0xc7, obc56) pressed, action is Number8
    9. 23:39:12.167 T:1962676224   DEBUG: OnKey: record (0xc6) pressed, action is Number9


    i've tried both of these with no luck ?

    • global > keyboard > "<key id=0xc6>"
    • global > keyboard > "<record>


    this is my remote

    Code
    1. # lsusb
    2. Bus 001 Device 005: ID 05a4:9881 Ortek Technology, Inc. IR receiver [VRC-1100 Vista MCE Remote Control]


    one of these (that's so old none of the buttons have labels anymore :))


    PS: rPi 3 + LE 8

    Edited once, last by zosky ().

  • i used the keyMap editor addon and it told me "9" (record) is actually <key id="198">


    still need help with the "double press" during playback situation please.