LIRC watcher - IR receiver via MQTT

Using remote from TV for something else was always what i wanted to do so i created this docker image that listens to LIRC (ie. on Raspberry Pi) and forwards the button name to MQTT where everybody connected can get this information. It has a added benefit that it distinguish between short and long press so for one button on remote you can have a two functions! Can easily be run with docker-compose.

Tested with Pi 4 on Buster and Pi 3 on Stretch with VS1883B IR receiver. In readme you will find install information.

automation.yaml

- id: ir_toggle_lamp
  alias: IR toggle lamp
  trigger:
  - payload: short
    platform: mqtt
    topic: lirc/pioneer/KEY_SCROLLDOWN
  action:
  - data:
      entity_id: light.lamp
    service: light.toggle
2 Likes

Nice app! My Pi 2b uses an old Creative Extigy usb sound card, which comes with a built-in IR receiver. I was looking for an elegant way to put the LIRC-captured key presses into an mqtt topic (since my hass runs elsewhere in the house) and this did the trick. I don’t use docker, but lirc_watcher.py worked just as well in a venv.

1 Like