[PLUGIN] IR Remote Controller feedback thread

My pleasure.

I have two Volumio units, both RPi based. Recently, I added an IR Receiver to the RPi3B system and installed the plugin and all is working well. I’m using the Justboom IR Remote. The RPi3 system is running an IQAudio DAC Plus board for output.

Yesterday I tried the same with the RPi2 based system, but I cannot seem to get it working. This system has a HiFi Berry DAC Plus which works fine and does not use the GPIO 25 pin that the plugin normally assigns. This system also has an OLED display driven by the mpd_oled code (installed via the plugin).

I checked the voltage at the ground and +3.3v pins of the IR Receiver (TSOP3848 - same device I used on the other system) and I can see the voltage there. Using a voltmeter (not the ideal test device), I monitored the output pin and pressed a button on the remote and could see a momentary drop in voltage which I am assuming is what should happen. I bought 5 of these IR receiver devices and tried another one and it did the same thing (i.e. didn’t work).

I manually went into the /boot/config.txt file and changed the GPIO pin from 25 to 26 and connected the IR Receiver’s output there (pin 37 on the header), rebooted and still no joy.

Thinking that maybe the DAC Plus was not passing the output signal from the IR Receiver to the Raspberry Pi, I removed the board and used a voltmeter to see if the +3.3V, ground and output pins did connect - and they did.

I even left the DAC Plus board disconnected, booted the system with the IR Receiver connected directly to the header pins of the RPi2. Still no joy.

Any suggestions on what to try next?

Rick

Plugin version is 1.3.3?

Please post the output of

cat /boot/config.txt

and

cat /boot/userconfig.txt

With the IR controller plugin enabled also post the results of

dtoverlay -l

and

systemctl status -l lirc.service

Furthermore please post the logs you get from

sudo journalctl -f | grep ir_controller

when the plugin starts, i.e. when you switch the plugin from disabled to enabled.

Hi,

I’d like to use the Volumio IR Plugin to send IR commands to different devices (TV, amp).

EDIT:
… and had a problem configuring the plugin for this case. One minute after posting i found the solution for myself:
In the /boot/config.txt it has to be (transmitter has to be connected to GPIO 17):

dtoverlay=gpio-ir-tx,gpio_pin=17

Further, i made a folder: /data/plugins/accessory/ir_controller/configurations/my_remote
In this folder has to be the lircd.conf for your devices/remotes.
Thats it. Then, you can send commands with

irsend SEND_ONCE TV_On_Off ON

In my case, i use Home Assistant (open source smarthome project) to switch on my devices with a ssh-command.

I suggest to use /boot/userconfig.txt instead. Using userconfig.txt has the advantage that your own entries remain untouched when Volumio gets updated. In contrast /boot/config.txt file will be overwritten on each Volumio update (find more information here).

Plugin version is 1.3.3?

        Yes

Please post the output of

cat /boot/config.txt

    initramfs volumio.initrd
    gpu_mem=32
    max_usb_current=1
    dtparam=audio=on
    audio_pwm_mode=2
    dtparam=i2c_arm=on
    disable_splash=1
    hdmi_force_hotplug=1

    include userconfig.txt
    # Enable the lirc-rpi module
    dtoverlay=lirc-rpi

    # Override the defaults forthe lirc-rpi module
    dtparam=gpio_in_pin=26

    #### Volumio i2s setting below: do not alter ####
    dtoverlay=hifiberry-dacplus

and

cat /boot/userconfig.txt

   dtparam=i2c_arm_baudrate=800000

With the IR controller plugin enabled also post the results of

dtoverlay -l

    No overlays loaded

and

systemctl status -l lirc.service

    * lirc.service - LSB: Starts LIRC daemon.
       Loaded: loaded (/etc/init.d/lirc)
       Active: active (running) since Fri 2021-02-12 16:27:30 PST; 16h ago
      Process: 1126 ExecStart=/etc/init.d/lirc start (code=exited, status=0/SUCCESS)
       CGroup: /system.slice/lirc.service
               |-1141 /usr/sbin/lircd --driver=default --device=/dev/lirc0 --uinput
              `-1145 /usr/bin/irexec -d /etc/lirc/lircrc

    Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

Furthermore please post the logs you get from

sudo journalctl -f | grep ir_controller

    info: Disabling plugin ir_controller
    info: ir_controller: LIRC correctly stopped.  
    info: Enabling plugin ir_controller
    info: Loading plugin "ir_controller" ...
    info: Applying required configuration parameters for plugin ir_controller
    info: PLUGIN START: ir_controller
    info: ir_controller: HAT already loaded /proc/device-tree/ir_receiver!
    info: ir_controller: File permissions successfully set on /etc/hardware.conf
    info: ir_controller: File permissions successfully set on /etc/lirc/.
    info: ir_controller: LIRC correctly updated.
    info: ir_controller: lirc.service correctly started.

These files reflect the situation with the IR Receiver connected to GPIO 26 (Pin 37).

Kinda looks like the ir_controller is starting…

Rick

These parameters would only work with kernels older than 4.19. Volumio 2.861 is using kernel 4.19.118 on Raspberry Pis. So the appropriate overlay to load would be “gpio-ir” and the parameter setting the GPIO-in-pin would be “gpio_pin”.

You could remove the current “dtoverlay=lirc-rpi” and “dtparam=gpio_in_pin=26” and try

dtoverlay=gpio-ir,gpio_pin=26

instead.

If that should work, it would be nice to if you could comment that line and reboot. Then set the GPIO from the config page of the plugin. When doing so again watch the log with

sudo journalctl -f | grep ir_controller

and post the result.

Also once again post the output of

systemctl status -l lirc.service

gvolt,

That change to the config.txt file worked! Thanks for that.

I failed to mention that my Volumio version is 2.806. I decided to upgrade the system so had to do a Factory Reset since it complained that I had some manually modified files (probably due to the manual installation of the mpd_oled code). Then I did the upgrade to 2.861.

Then I installed the IR Remote plugin and configured it for GPIO 26. It worked fine and the resulting output from the systemctl status -l lirc.service command was:

    * lirc.service - LSB: Starts LIRC daemon.
       Loaded: loaded (/etc/init.d/lirc)
       Active: active (running) since Sat 2021-02-13 13:29:19 PST; 34min ago
       CGroup: /system.slice/lirc.service
               |-1208 /usr/sbin/lircd --driver=default --device=/dev/lirc0 --uinput
               `-1213 /usr/bin/irexec -d /etc/lirc/lircrc

    Feb 13 13:29:19 volumio1 systemd[1]: Starting LSB: Starts LIRC daemon....
    Feb 13 13:29:19 volumio1 lirc[1199]: Loading LIRC modules:.
    Feb 13 13:29:19 volumio1 lircd-0.9.0-pre1[1208]: lircd(default) ready, using /var/run/lirc/lircd
    Feb 13 13:29:19 volumio1 lirc[1199]: Starting remote control daemon(s) : LIRC :.
    Feb 13 13:29:19 volumio1 lircd-0.9.0-pre1[1208]: accepted new client on /var/run/lirc/lircd
    Feb 13 13:29:19 volumio1 systemd[1]: Started LSB: Starts LIRC daemon..
    Feb 13 13:29:19 volumio1 lirc[1199]: Starting execution daemon: irexec:.
    Feb 13 13:29:28 volumio1 systemd[1]: Started LSB: Starts LIRC daemon..

Now everything is working and there’s no comments in the /boot/config.txt file about the ir controller gpio.

Thanks so much!

Rick

Great it’s working!

Thanks for your feedback! :grinning:

hello everyone, I hope someone can kindly help me, … I modified the lirccr file in the Volumio plugin related to the xiaomi tv remote control in order to change the functions of the keys to my liking and everything works for now; my problem is that I would like to assign to the menu key the possibility to open the playback queue and with the up and down keys move through the song list and then select that choice with the central key, to do this I need to insert in the string of the lircrc file to the keys in question the corresponding Volumio command, would someone be able to tell me the syntax of these commands please? thank anyone who will help me!

I applied this solution and the play/pause button in the remote worked properly, but now i can’t use the “play” button in the site (volumio.local) or app to play a new song. The only way to go around this is to delete the playlist and start a new one with the songs i want.
is anybody experiencing the same?

Thanks!

Hi,

shall plugin work while playing music via Tidal Connect ?
I updated to the latest Volumio version today, remote/plugin works while playing all other sources (SSD drive, spotify connect and tidal within volumio)
While playing through tidal connect after pressing any mapped button plugin stops to work 🥲

Maybe this issue is related.

Yes, totally! Thank you :slight_smile:

Cross posting from How to override the default IR Remote Control functions in order to collect (hopefully) relevant information about the plugin:

This has been implemented with version 1.4.2 of the plugin.

User-specific configurations for remote controls can now be stored in a dedicated folder named “/data/INTERNAL/ir_controller/configurations”. A subfolder must be created in the aforementioned directory for each remote control, in which the LIRC files “lircrc” and “lirc.conf” are stored for the remote control.

The name of the subfolder appears in the list of selectable remote controls. If this name is also used for one of the remote control configurations already supplied, the user’s own configuration with the same name takes precedence.

NOTE: Updating the plugin does not affect the user-defined configurations. However, when the plugin is uninstalled, the “/data/INTERNAL/ir_controller” directory is deleted along with all the subfolders and files it contains.

ODROID N2
object: IR Remote plugin overwrite lirc config file hardware.conf with wrong modules.

Hi,
I used your plugin to customize a remote.
Every boot the plugin overwrite the line “MODULES” in /etc/lirc/hardware.conf
My correct modules line (for Odroid N2) is:
MODULES=“meson-ir”

The plugin replace it (at every boot) with a wrong one:
MODULES=“lirc_rpi”

I think the problem is in the file /data/plugins/accessory/ir_controller/index.js:

if (device === ‘Odroid-C’) {
data = data.replace(new RegExp(’^#? MODULES="."$’, ‘m’), ‘MODULES=“meson-ir”’);
} else {
data = data.replace(new RegExp(’^#? MODULES="."$’, ‘m’), ‘MODULES=’ + ((overlay === ‘gpio-ir’) ? ‘“gpio_ir_recv”’ : ‘“lirc_rpi”’));
}

My device should be probably considered an “Odroid-C” or you should add the Odroid N* devices in that line.
I’m not an expert and I wasn’t able to find my device name according to your script, so I just removed that part of your script and now EVERYTHING is working.

Thank you, I hope it will be useful to you or someone else.

Could you post the result of

cat /volumio/app/plugins/system_controller/system/devices.json

and

cat /volumio/app/plugins/system_controller/system/config.json

please?

This list gets queried to determine the device. At least here Odroid N2 as a device is missing, but on your image this might be different and the list may contain a dedicated entry for Odroid N2.

@gkkpch I just have downloaded the volumio-2.877-2021-04-19-odroidn2 image. The included “/volumio/app/plugins/system_controller/system/devices.json” does not contain an entry for Odroid N2. I guess this concerns other community builds as well.

Would it make sense to extend the list with the device the (community) image was built for, so in this case something like “ODROID-N2”?

cat /volumio/app/plugins/system_controller/system/devices.json
{“devices”:[
{“name”:“Raspberry PI”, “cpuid”:“BCM2835”},
{“name”:“Raspberry PI”, “cpuid”:“BCM2836”},
{“name”:“Raspberry PI”, “cpuid”:“BCM2837”},
{“name”:“Raspberry PI”, “cpuid”:“BCM2709”},
{“name”:“Raspberry PI”, “cpuid”:“BCM2708”},
{“name”:“Raspberry PI”, “cpuid”:“BCM2711”},
{“name”:“Odroid-C”, “cpuid”:“ODROIDC”},
{“name”:“Odroid-C2”, “cpuid”:“ODROID-C2”},
{“name”:“Sparky”, “cpuid”:“gs705a”},
{“name”:“Pine64”, “cpuid”:“sun50iw1p1”},
{“name”:“BBB”, “cpuid”:“GenericAM33XX(FlattenedDeviceTree)”},
{“name”:“Tinkerboard”, “cpuid”:“Rockchip(DeviceTree)”},
{“name”:“NanoPi NEO2”, “cpuid”:“Allwinnersun50iw2Family”},
{“name”:“Amlogic”, “cpuid”:“Amlogic”}
]}

cat /volumio/app/plugins/system_controller/system/config.json
{
“playerName”: {
“value”: “Volumio”,
“type”: “string”
},
“startupSound”: {
“value”: true,
“type”: “boolean”
},
“kernelSettingValue”: {
“value”: 1,
“type”: “number”
},
“kernelSettingLabel”: {
“value”: “Default”,
“type”: “string”
},
“device”: {
“value”: “”,
“type”: “string”
},
“show_wizard”: {
“value”: true,
“type”: “boolean”
}
}

My image was very recent too:
volumio-2.878-2021-04-21-odroidn2.img

The content of “/volumio/app/plugins/system_controller/system/devices.json” shows that the Odroid N2 is not listed as a device.

Currently the plugin uses the Raspberry Pi settings as default if the device is unkown. I guess will do a PR with a new plugin version that will not alter the module to be used at all, if the device is unkown (according to “devices.json”).

That would require the users of “unknown” devices (probably all community builds) to manually set the approriate module in “/etc/lirc/hardware.conf”.

In case the list in “/volumio/app/plugins/system_controller/system/devices.json” should be extended (and the correct settings for new device are known), the handling of the new device can be added in the plugin, as it is currently the case for Ordoid-C.