installing lirc on odroid xu4 - cloudshell

Guides and tutorials for various stuff. Posted by DietPi users.
Post Reply
delaerp

installing lirc on odroid xu4 - cloudshell

Post by delaerp »

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

Code: Select all

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

Code: Select all

# /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

Code: Select all

#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 :

Code: Select all

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.
User avatar
Fourdee
Site Admin
Posts: 2782
Joined: Tue Feb 06, 2007 1:36 pm

Re: installing lirc on odroid xu4 - cloudshell

Post by Fourdee »

@delaerp

Legend! Excellent guide and many thanks for sharing. Post got a sticky, :)
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
delaerp

Re: installing lirc on odroid xu4 - cloudshell

Post by delaerp »

adding the line to dietpi-services is not necessary.
rz3dvp

Re: installing lirc on odroid xu4 - cloudshell

Post by rz3dvp »

Thank you for good tutorial @delaerp!
I have some little questions about Odroid XU4 - cloudshell, - it can start ("power on") from IR remote control?
User avatar
johnvick
Legend
Posts: 693
Joined: Wed Jun 08, 2016 11:53 am
Location: New Zealand

Re: installing lirc on odroid xu4 - cloudshell

Post by johnvick »

rz3dvp wrote: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.
delaerp

Re: installing lirc on odroid xu4 - cloudshell

Post by delaerp »

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

Re: installing lirc on odroid xu4 - cloudshell

Post by rz3dvp »

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... :(
delaerp

Re: installing lirc on odroid xu4 - cloudshell

Post by delaerp »

After upgrade to 137 I had to reinstall lirc
Post Reply