Skip to content

Latest commit

 

History

History

infrared

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Infrared control

I am using Lirc on my Libreelec based Raspberry Pi3 to control my old audio gear by infrared control.

I am running Libreelec 8.2.2 with my own hardware IR sender on pin 22, no reader but put it to 23 to avoid collition with my Digi+ audio card. The IR is an old Logitech IR dual LED extender.

To control the infrared remote I use MQTT as middleware, this is based on cec-mqtt-bridge by @michaelarnauts which I updated to run on Libreelec.

TODO:

  • Move the lirc stuff into docker container, use 'docker run --privileged' to grant access to the GPIO

Configuration:

Check out gpio-tx

  1. Edit the /flash/config.txt to add Lirc modules:
# mount -o remount,rw /flash
# vi /flash/config.txt
...add the lines...
dtoverlay=gpio-ir,gpio_pin=23
dtoverlay=gpio-ir-tx,gpio_pin=22
..save and quit...
# mount -o remount,ro /flash
  1. Reboot
  2. Verify module load:
# lsmod | grep lirc
lirc_rpi                5930  0
lirc_dev                7007  1 lirc_rpi
rc_core                20369  1 lirc_dev
#
  1. Simple test.py program, direct your cell phone camera at leds to see blinking
  2. Test Lirc configuration:
  1. Try to run Lircd:
# lircd -n /storage/infrared/etc/lircd.conf
# irsend -d /run/lirc/lircd.socket SEND_ONCE Denon_RC-1047 KEY_POWER
  1. Configure Libreelec 9 to run lircd at boot:
  1. Configure cec-mqtt-bridge (config.ini/lircrc)

  2. Build the MQTT bridge docker

# docker image build --tag mqtt-bridge .
# docker run -d --net=host -v /var/run/lirc:/var/run/lirc \
  --restart unless-stopped --name mqtt-bridge mqtt-bridge