Skip to main content

How to enable a GPIO IR Receiver on LibreELEC 7.x.x

Getting this to work is actually pretty easy now.

Login to your Pi using SSH and perform the following commands in order.
  1. mount -o remount,rw /flash
  2. nano /flash/config.txt
    1. On the last line, paste in the following text
      device_tree_overlay=lirc-rpi
    2. CTRL + X to exit and choose 'Y' save.
  3. mount -o remount,ro /flash
  4. reboot
(Or you could remove the MicroSD card and edit the config.txt in Windows).



After the Pi has restarted, right click in the top left of your PuTTy session and choose 'Restart session'. Log back in and type the following:

dmesg | grep lirc_rpi






You should see the following indicating the O/S is happy.

LibreELEC:~ # dmesg | grep lirc_rpi
[    5.256588] lirc_rpi: module is from the staging directory, the quality is unknown, you have been warned.
[    6.154621] lirc_rpi: auto-detected active low receiver on GPIO pin 18
[    6.154867] lirc_rpi lirc_rpi: lirc_dev: driver lirc_rpi registered at minor = 0
[    6.154876] lirc_rpi: driver registered!


Note: Even if I remove the actual IR receiver altogether, the Pi still reports the above.

According to my testing, no remote.xml file is required in /Userdata/keymaps or a lircd.conf in /storage/.config, it just works.

I tested remote control operation under LibreELEC 7.0.1 on a RPi3 with a home-made IR receiver and a standard RC6 IR remote like this one.

Instructions for making a GPIO receiver were found here.

Comments

  1. Newer versions of LibreELEC don't have lirc-rpi anymore, you have to use gpio-ir instead.

    ReplyDelete

Post a Comment

Popular posts from this blog

How to retain your GUI settings in Kodi

When you restore Kodi or copy your existing Kodi userdata folder to another device it will always default the guisettings.xml, always. Even if you drop your previous settings into Kodi via a network folder, it will still reload it to default upon restart. This is because the guisettings.xml can't be written into the userdata folder when Kodi is running. To prevent this from happening, overwrite the guisettings.xml with SSH using two programs. One to stop and start the Kodi process and one to copy over the backed up guisettings.xml file that contains all your GUI goodness.

Using ESPEasy with Home Assistant via MQTT

Preface: I've just started playing around with Home Assistant on a Raspberry Pi and exploring the world of MQTT to control devices on the network. Learning curve is a bit steep but worth the effort as MQTT is very fast. The hardware and software tools I'm using are as follows: 2 x Sonoff relay units 2 x NodeMCU Boards ESPEasy firmware (must be version 121 or above as that contains the MQTT 'retain' flag option. Home Assistant software on Raspberry Pi2 MQTT Test Software: PC: MQTT.fx Android: MQTT Dashboard

How to check what entities are filling up your Home Assistant database

If you use the Home Assistant MariaDB add-on, this tip will show you how to query the database so see what Home Assistant entity states are triggering the most, filling up your database. What were going to do: Install the phMyAdmin add-on for MariaDB. Query the MariaDB database. See what entity state changes have the most action. Paste the code below into the SQL query box:  select entity_id,count( * ) from states group by entity_id order by count ( * ) desc; And if you're using the internal home-assistant_v2.db instead, you can use the SQLite Web add-on to achieve the same thing.