This guide will show you how to execute commands from your remote using irexec. This example will show you how to restart xbmc.

Firstly login to your OpenELEC machine via SSH and install the nano text editor

nano /storage/.config/.lircrc

Paste in:

begin
        button = KEY_BRL_DOT1
        prog = irexec
        config = /bin/killall -9 xbmc.bin &
end

Crtl + x to exit. Use the command irw to see what button is being pressed on your remote and replace the button field.

nano /storage/.config/udev.rules.d/irexec.rules

ACTION=="add", SUBSYSTEM=="rc", RUN+="/usr/bin/irexec -d /storage/.config/.lircrc"

I find irexec crashes sometimes so I restart it on suspend. Resume/suspend hooks to restart irexec:

nano /storage/.xbmc/addons/_pm-suspend/sleep.d/irexec.power

if [ "$1" = "resume" ]; then
  sleep 2
  /usr/bin/irexec -d /storage/.config/.lircrc
fi

nano /storage/.xbmc/addons/_pm-suspend/sleep.d/kill-irexec.power

if [ "$1" = "suspend" ]; then
  killall -q irexec
fi

You may need to create some of the directories using mkdir.

Reboot and that should do it.