Lirc mod2 and irw work, but no responds in kodi

Dear,

I recently switched from raspbmc to osmc and i’m struggling to get my remote operational.
when I test the remote with the command:

 mode2 -d /dev/lirc0 

A correct output returns. This is also the case when I uses the following command:

 irw /var/run/lirc/lircd-lirc0 

However simpley using: irw does not work

The problem is that kodi does not see the commands (tested it with)

 tail -f /home/osmc/.kodi/temp/kodi.log

Anybody an id on how i could solve this problem?
Thanks in advance
Baeseke

Please post a copy of your lircd.conf file. Most likely your problem is that your key names do not conform to the correct naming scheme used by uinput in the Linux kernel, which will cause them to be filtered out by the Kernel when passed from lircd to eventlircd.

irw /var/run/lirc/lircd-lirc0 is looking at the output directly from lircd, however irw (or irw /var/run/lirc/lircd) is looking at the output from eventlircd - this is what actually gets sent to Kodi.

lircd.conf:

# Please make this file available to others
# by sending it to <lirc@bartelmus.de>
#
# this config file was automatically generated
# using lirc-0.9.0(default) on Sat Aug  1 07:52:51 2015
#
# contributed by 
#
# brand:                       customremote
# model no. of remote control: 
# devices being controlled by this remote:
#

begin remote

  name  customremote
  bits           16
  flags SPACE_ENC|CONST_LENGTH
  eps            30
  aeps          100

  header       8985  4424
  one           604  1622
  zero          604   496
  ptrail        603
  repeat       8987  2178
  pre_data_bits   16
  pre_data       0x20DF
  gap          106783
  min_repeat      1
#  suppress_repeat 1
#  uncomment to suppress unwanted repeats
  toggle_bit_mask 0x0

      begin codes
      mute                     0xB24D
          exit                     0xC03F
          left                     0x9A65
          up                       0x2AD5
          right                    0x3AC5
          down                     0xBA45
          ok                       0xB847
          menu                     0x00FF
          volup                    0x10EF
          voldown                  0x50AF
          chup                     0x38C7
          chdown                   0x18E7
          telone                   0x728D
          teltwo                   0xD827
          telthree                 0xA25D
          telfour                  0x926D
          rewind                   0x08F7
          play                     0xA05F
          forward                  0x28D7
          record                   0x40BF
          stop                     0xE01F
          pauze                    0xF807
          keyone                   0x8877
          keytwo                   0x708F
          keythree                 0xF00F
          keyfour                  0xA857
          keyfive                  0x48B7
          keysix                   0xC837
          keyseven                 0x9867
          keyeight                 0x6897
          keynine                  0xE817
          keyav                    0x32CD
          keyzero                  0x58A7
          keyreturn                0xAA55
      end codes
end remote

I make use of a lircmap.xml:

[code]

up
down
left
right
ok
exit
menu

<one>keyone</one>
<two>keytwo</two>
<three>keythree</three>
<four>keyfour</four>
<five>keyfive</five>
<six>keysix</six>
<seven>keyseven</seven>
<eight>keyeight</eight>
<nine>keynine</nine>
<zero>keyzero</zero>

<mute>mute</mute>
<volumeminus>voldown</volumeminus>
<volumeplus>volup</volumeplus>

<subtitle>keyav</subtitle>
<start>keyreturn</start>

<play>play</play>
    <pause>pause</pause>
    <stop>stop</stop>
    <forward>forward</forward>
    <reverse>rewind</reverse>

<pageplus>chup</pageplus>
    <pageminus>chdown</pageminus>

<myvideo>telone</myvideo>
<mytvshows>teltwo</mytvshows>
<start>telthree</start>    
[/code]

By killing lircd, restarting it and doing the same for kodi it all works fine

kill $(pidof lircd)
/usr/sbin/lircd --driver=default --device=/dev/lirc0 --uinput --output=/var/run/lirc/lircd --pidfile=/var/run/lirc/lircd.pid /etc/lirc/lircd.conf
systemctl restart mediacenter

Thanks in andvance,
Baeseke

The Lircd.conf you show will not work, as none of the key names are valid linux kernel uinput key names, so you will need to fix the naming of the keys.

I would use the xbox360 profile in /etc/lirc as an example of correct key naming and update your lircd.conf. (For example you should have KEY_OK not ok)

There shouldn’t be any need for a custom Lircmap, also a custom lircmap with “customremote” as the remote device will not work, because eventlircd changes the remote name to “linux-input-layer” regardless of the remote name you specify in lircd.conf.

Have a look at the linux-input-layer section of the standard system Lircmap.xml at /usr/share/kodi/system for the usable mappings. None of the other sections are usable except this one.