I managed to make Kodi 17.3 work with Lubuntu 17.04 and Lirc using my remote control. It is a little bit tricky, but it woks. First af all, there are two things that you have to consider.
- Newer versions of LIRC do not dump the socket in /dev/lircd anymore, as it used to be. Instead, the socket is now dumped into /var/run/lirc/lircd. Kodi still tries to find the socket in the older location, so a symlink from the newer to the older location solves that problem.
- It seems the hardware.conf file has changed a little bit. In order to make it work, I modified a few parameters in /etc/lirc/lirc_options.conf instead of hardware.conf. In my specific case (I work with an external Sound Blaster X-Fi 5.1 pro, which has a remote control and a volume knob in the sound card itself) I made the following modifications:
driver = alsa_usb
This is the driver my soundcard uses.
device = "hw
ro"
In your specific case, you have to find out which is your specific device. Since mine is a soundcard, I found it out within the file /proc/asound/cards ; since mine is a soundcard.
you have to preserve lircd.conf file as it should be for your remote.
You can restart LIRC after this, then you can try whether it recognizes your remote using irw.
Once LIRC recognizes your control, now you have to make KODI recognize it. For that, you have to create a symlink from the new socket to the old socket:
sudo ln -s /var/run/lirc/lircd /dev/lirc
Then you can restart KODI and find out whether it recognizes your remote commands.
Since symlinks are temporary, they're lost when you reboot your computer. I worked that around through a local startup script. (rc.local).
Ubuntu 17.04 do not use rc.local, but you can configure rc.local as service.
First, you have to create a script called /etc/systemd/system/rc-d.service having the following code:
[Unit]
Description=/etc/rc.local Compatibility
ConditionPathExists=/etc/rc.local
[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes
SysVStartPriority=99
[Install]
WantedBy=multi-user.target
Then, you create a /etc/rc.local file the script may look like the regular rc.local file:
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
exit 0
make the script executable:
sudo chmod +x /etc/rc.local
make sure you introduce, before exit 0, your symlink command (ln -s /var/run/lirc/lircd /dev/lircd)
then enable the service:
sudo systemctl enable rc-local
then you can start the service:
sudo systemctl start rc-local.service
This way, every time you boot your system, the rc-local service will create the symlink in the old socket location for KODI to find it.
I hope this helps.