installing lirc on odroid xu4 - cloudshell

I managed to get the odroid c1 remote working on my XU4 cloudshell box :
1. install lirc as mentioned on the odroid wiki :

wget https://raw.githubusercontent.com/mdrjr/cloudshell_ir/master/install_ir.sh
chmod +x install_ir.sh
sudo ./install_ir.sh

2. edit the config files in /etc/lirc :

  • hardware.conf
# /etc/lirc/hardware.conf
#
# Arguments which will be used when launching lircd
LIRCD_ARGS=""

#Don't start lircmd even if there seems to be a good config file
#START_LIRCMD=false

#Don't start irexec, even if a good config file seems to exist.
#START_IREXEC=false

#Try to load appropriate kernel modules
LOAD_MODULES=true

# Run "lircd --driver=help" for a list of supported drivers.
DRIVER="default"
# usually /dev/lirc0 is the correct setting for systems using udev 
DEVICE="/dev/lirc0"
MODULES="gpioplug_ir_recv gpio_ir_recv"

# Default configuration files for your hardware if any
LIRCD_CONF=""
LIRCMD_CONF=""

the DRIVER, DEVICE and MODULES need to be altered.

  • lircmd.conf
#UNCONFIGURED
#
# To find out how to get a proper configuration file please read:
# 
#	/usr/share/doc/lirc/README.Debian

begin
	prog   = irexec
	button = KEY_POWER
	config = poweroff
end

begin
	prog   = irexec
	button = KEY_HOME
	config = reboot
end

You can add other remote buttons if you wish.
3. auto start the lirc service
In /DietPi/dietpi/dietpi-services add “lirc” to the aSERVICE_NAME list near the top of the script.
add to the bottom of ~/.bashrc the following line :

irexec -d /etc/lirc/lircmd.conf

4. Reboot and the remote should be working

I don’t know if the changes to the dietpi-services will survive an update. If not can someone find an other solution.

@delaerp

Legend! Excellent guide and many thanks for sharing. Post got a sticky, :slight_smile:

adding the line to dietpi-services is not necessary.

Thank you for good tutorial @delaerp!
I have some little questions about Odroid XU4 - cloudshell, - it can start (“power on”) from IR remote control?

I’d be interested to know this as well - I have an Odroid C2 (running Libreelec) that can be powered on and off with a Logitech Harmony remote programmed as an Odroid remote. Would be good if this worked with the XU4 also.

I don’t run a Xserver on XU4 with cloudshell, so I use a shell to with lirc to pass the commands.

Unfortunate, XU4 can’t start from IR and it’s strange for me, - this feature is must have for XU4&CloudShell than for C2, where it’s enabled… :frowning:

After upgrade to 137 I had to reinstall lirc