How to configure IR remote control

IR remote controls can be configured in 1 of 2 ways in CoreELEC, both are detailed in this guide below.

meson-ir
meson-ir allows you to use almost any IR remote controller to control your device.

CoreELEC uses meson-ir by default and our builds come with a limited selection of IR remote configurations for devices built in.

If your remote does not work then you will need to follow the below instructions to create a config and get it working.

Firstly you must SSH into your device and then Kodi and eventlircd services must be stopped.

systemctl stop kodi
systemctl stop eventlircd

Next you need to run ir-keytable to scan for remote codes.

ir-keytable -p NEC,RC-5,RC-6,JVC,SONY -t

Start to press all of the buttons on your remote and make a note of each scan code in notepad on your computer.

Now you need to create your configuration, an example can be seen here. Don’t delete 1st line, only name and protocol could be modified in it. A list of functions can be found here.

For CoreELEC 19 use this example.

When you have created your map file it needs to be saved in the following location.

/storage/.config/rc_keymaps/YOURMAPNAME

or for CoreELEC 19

/storage/.config/rc_keymaps/YOURMAPNAME.toml

You must also create the following file /storage/.config/rc_maps.cfg with the following contents.

meson-ir * YOURMAPNAME

or for CoreELEC 19

meson-ir * YOURMAPNAME.toml

Now you must load your config and start Kodi and eventlircd back up to test your changes.

ir-keytable -a /storage/.config/rc_maps.cfg -s rc0
systemctl start eventlircd
systemctl start kodi

If your config works and you are happy with it then you are not required to do anything further and it will be loaded automatically when rebooting/powering on your device.

Pre-made remote control configurations can be found here.

CoreELEC 19 change
For CoreELEC 19 YOURMAPNAME needs extension .toml. The whole filename is then YOURMAPNAME.toml. So instead to use only YOURMAPNAME it has to be YOURMAPNAME.toml.

Please ensure your YOURMAPNAME.toml does meet the .toml file structure including the sections:

[[protocols]]
[protocols.scancodes]

But old format of the keymaps from CoreELEC 9 are still compatible with CoreELEC 19. But they must not have .toml extension to work properly.

amremote
Many of you will be most familiar with this method, amremote typically gives a much better user experience with the bundled remotes with generic devices.

To use an amremote configuration simply copy your remote.conf file to either the root folder of your SD card / USB flash drive or to /storage/.config/remote.conf.

NOTE: after the first time you boot your device with an amremote configuration it will automatically reboot whilst modifications are made to your dtb to enable amremote.

You can change back to meson-ir at any time by simply removing the remote.conf file and rebooting.

14 Likes