2017-11-27, 21:44
Ever since ubuntu 17.04 (but perhaps also 16.10) I could not get Lirc working in Kodi.
A lot of sites on the internet told me to switch to ir-keytable, but I didn't want to because I use irexec which is part of Lirc.
In ubuntu 17.10 I still had problems to get Lirc working in combination with Kodi. I encountered the following problems:
- Not being able to control kodi with remote control at all
- Whenever a key was pressed on the remote, it was repeated indefinitely
- Lirc was working outside Kodi, but not inside Kodi.
This was I did to get it working:
1) Install Lirc
2) disable a specific Lirc service
3) copy and adjust Lircmap.xml
4) point Kodi to the correct Lirc device
Install lirc
Test if Lirc is working
Now press some keys on your remote control. If Lirc is working you should be greeted with something like this:
0000000080010160 00 KEY_OK devinput-32
0000000080010160 01 KEY_OK devinput-32
000000008001006a 00 KEY_RIGHT devinput-32
000000008001006a 01 KEY_RIGHT devinput-32
0000000080010069 00 KEY_LEFT devinput-32
0000000080010069 01 KEY_LEFT devinput-32
000000008001006c 00 KEY_DOWN devinput-32
000000008001006c 01 KEY_DOWN devinput-32
Note the 4th column, this contains the device-name that registers the remote control buttons, this is necessary later on.
Disable lirc service lircd-uinput
For me this was necessary to stop the undef-init key-presses, after one single press on the remote. (see: 322294 (thread))
Copy default Lircmap.xml to kodi userdata folder. Mine was /root/.kodi/userdata
Noticed the device 'devinput-32' ? It is not in the default Lircmap.xml!! A device called devinput is mentioned!!
Execute the following command to redirect devinput to devinput-32
make sure kodi uses the correct reference to Lirc device. I start Kodi using the following command which allows me to give the 'new' device location. (see: 314249 (thread))
After these steps Kodi was working fine with Lirc. And I could still use irexec. Nice !!
Hope this helps someone. I had a very difficult time to put it all together
A lot of sites on the internet told me to switch to ir-keytable, but I didn't want to because I use irexec which is part of Lirc.
In ubuntu 17.10 I still had problems to get Lirc working in combination with Kodi. I encountered the following problems:
- Not being able to control kodi with remote control at all
- Whenever a key was pressed on the remote, it was repeated indefinitely
- Lirc was working outside Kodi, but not inside Kodi.
This was I did to get it working:
1) Install Lirc
2) disable a specific Lirc service
3) copy and adjust Lircmap.xml
4) point Kodi to the correct Lirc device
Install lirc
Quote:sudo apt-get install lirc
Test if Lirc is working
Quote:sudo irw
Now press some keys on your remote control. If Lirc is working you should be greeted with something like this:
0000000080010160 00 KEY_OK devinput-32
0000000080010160 01 KEY_OK devinput-32
000000008001006a 00 KEY_RIGHT devinput-32
000000008001006a 01 KEY_RIGHT devinput-32
0000000080010069 00 KEY_LEFT devinput-32
0000000080010069 01 KEY_LEFT devinput-32
000000008001006c 00 KEY_DOWN devinput-32
000000008001006c 01 KEY_DOWN devinput-32
Note the 4th column, this contains the device-name that registers the remote control buttons, this is necessary later on.
Disable lirc service lircd-uinput
Quote:sudo systemctl stop lircd-uinput.service
sudo systemctl disable lircd-uinput.service
For me this was necessary to stop the undef-init key-presses, after one single press on the remote. (see: 322294 (thread))
Copy default Lircmap.xml to kodi userdata folder. Mine was /root/.kodi/userdata
Quote:export kodiuserdata=<your userdata folder>
sudo cp "/usr/share/kodi/system/Lircmap.xml" "${kodiuserdata}/Lircmap.xml"
Noticed the device 'devinput-32' ? It is not in the default Lircmap.xml!! A device called devinput is mentioned!!
Execute the following command to redirect devinput to devinput-32
Quote:sudo sed -i 's/devinput/devinput-32/g' "${kodiuserdata}/Lircmap.xml"Direct Kodi to the correct Lirc device
make sure kodi uses the correct reference to Lirc device. I start Kodi using the following command which allows me to give the 'new' device location. (see: 314249 (thread))
Quote:/usr/bin/kodi-standalone --lircdev /var/run/lirc/lircd
After these steps Kodi was working fine with Lirc. And I could still use irexec. Nice !!
Hope this helps someone. I had a very difficult time to put it all together