Petter Holt Juliussen • Mail | GitHub | Letterboxd

for later reference.

LibreELEC

2019-04-04 | libreelec, kodi, lirc

Actions

kodi-send [OPTION] --action=ACTION
Example
        kodi-send --host=192.168.0.1 --port=9777 --action="Quit"
Options
        -?, --help              Will bring up this message
        --host=HOST             Choose what HOST to connect to (default=localhost)
        --port=PORT             Choose what PORT to connect to (default=9777)
        --action=ACTION         Sends an action to XBMC, this option can 
                                be added multiple times to create a macro

Examples

kodi-send --action="ToggleDebug"
kodi-send --action="RunScript(/storage/scripts/watchlist.py)"

See list of built-in functions.

LIRCd

/storage/.config/autostart.sh

#!/bin/sh

# Use LIRCD service instead
#killall lircd
#lircd -H usb_uirt_raw -d /dev/ttyUSB0 /storage/.config/lircd.conf

nohup python -u /storage/sysapi/sysapi.py &

echo USB1 > /proc/acpi/wakeup
echo USB2 > /proc/acpi/wakeup
echo USB3 > /proc/acpi/wakeup
echo USB4 > /proc/acpi/wakeup
echo USB5 > /proc/acpi/wakeup
echo USB6 > /proc/acpi/wakeup
echo USB7 > /proc/acpi/wakeup
echo enabled > /sys/bus/usb/devices/usb1/power/wakeup
echo enabled > /sys/bus/usb/devices/usb2/power/wakeup
echo enabled > /sys/bus/usb/devices/2-1.7/power/wakeup

/storage/.config/lirc_options.conf

[lircd]
nodaemon        = False
driver          = uirt2_raw
device          = /dev/ttyUSB0
output          = /run/lirc/lircd.socket
pidfile         = /run/lirc/lircd.pid
plugindir       = /usr/lib/lirc/plugins
permission      = 666
allow-simulate  = No
repeat-max      = 600

[lircmd]
uinput          = False
nodaemon        = False