[PLUGIN] IR Remote Controller feedback thread

Hi I have a Pi 3B with a PiFi Digi interface on it. After a lot of reading I have been able to get it working with a NOWtv remote. I went through the procedure of learning the remote codes and making up custom lircd.conf and lircrc files for it.

It works fine but with one odd feature, every time the Pi is rebooted the remote is inactive until I go into the plugin section for the remote control and hit save with it as the selected profile (which it already is). It’s as if it boots up uninitialised and the save does the initialisation. As this makes it work I’m at a loss as to whether it’s a feature/bug or if I have missed something in the configuration.

@Jonesy_sa

As far as I see the P5 header on the Pi1 B provides +5V, 3V3, Ground and GPIO 28 to GPIO 31 (in the BCM way of numbering) (for the different numbering schemes see http://wiringpi.com/pins/). To me the P5 connector does not seem to conflict at all with the P1 connector, but maybe I am overlooking something.

When you mention pins 18 and 22 are you refering to the numbering of the physical header pins of P1? Then pin 18 would be BCM GPIO 24. Physical pin 22 of P1 would be BCM GPIO 25. For both I would not see a conflict.

Furthermore: What do you mean with “where should the other two go?” If you have/buy a diode for receiving IR signals you would typically have to connect three pins: Data (see above), Ground and Power. On Pi1 B GND should be on physical pin numbers 6, 14, 20 and 25 of P1. Power is on pin number 1 of P1 (3.3V) respectively physical pin number 2 of P1 (5V). No liability taken for providing the right pin numbers :wink:

@Saiyato

If you haven’t already found a solution, does irw work if you start lircd like this?

lircd -d /dev/lirc0

Before make sure no lircd process is running anymore.

Edit: Typo

There is some progress, I installed a different Pi (Pi2B) with a different DAC (Boss) and the latest image; right now I’m not seeing the errors starting irexec. However, the signals are still not being processed as it seems. When I list the processes (pstree) both lircd and irexec are showing now, so I think the other image might have been disrupted.

pstree

volumio@volumioboss:/$ pstree systemd-+-2*[agetty] |-avahi-daemon---avahi-daemon |-dbus-daemon |-dhcpcd |-haveged |-irexec |-lircd |-mpd-+-{decoder} | |-{io} | |-{output:alsa} | `-{player} |-netplugd |-nmbd---nmbd |-node-+-sh---node-+-3*[node-+-4*[{V8 WorkerThread}]] | | | `-{node}] | | |-4*[{V8 WorkerThread}] | | `-{node} | |-4*[{V8 WorkerThread}] | `-7*[{node}] |-ntpd |-polkitd-+-{gdbus} | `-{gmain} |-rpc.idmapd |-rpc.statd |-rpcbind |-shairport-sync---2*[{shairport-sync}] |-smbd---smbd |-sshd-+-sshd---sshd---sftp-server | `-sshd---sshd---bash---pstree |-systemd---(sd-pam) |-systemd-journal |-systemd-logind |-systemd-udevd |-udisks-daemon-+-udisks-daemon | `-{gdbus} |-udisks-glue |-upmpdcli---7*[{upmpdcli}] |-volumio-remote----2*[{volumio-remote-}] `-winbindd---3*[winbindd]

Dmesg, the service and the journal don’t seem to be showing errors regarding lirc.

dmesg

volumio@volumioboss:/$ dmesg | grep lirc [ 50.760549] lirc_dev: IR Remote Control driver registered, major 244 [ 50.768200] lirc_rpi: module is from the staging directory, the quality is unknown, you have been warned. [ 51.822520] lirc_rpi: auto-detected active low receiver on GPIO pin 27 [ 51.822866] lirc_rpi lirc_rpi: lirc_dev: driver lirc_rpi registered at minor = 0 [ 51.822873] lirc_rpi: driver registered! [ 53.108772] input: lircd as /devices/virtual/input/input3
service status

[code]volumio@volumioboss:/$ systemctl status lirc
â lirc.service - LSB: Starts LIRC daemon.
Loaded: loaded (/etc/init.d/lirc)
Active: active (running) since Fri 2018-05-04 19:25:17 UTC; 2min 6s ago
Process: 1039 ExecStart=/etc/init.d/lirc start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/lirc.service
ââ1053 /usr/sbin/lircd --driver=default --device=/dev/lirc0 --uinput
ââ1058 /usr/bin/irexec -d /etc/lirc/lircrc

May 04 19:25:17 volumioboss lirc[1039]: Loading LIRC modules:.
May 04 19:25:17 volumioboss lircd-0.9.0-pre1[1053]: lircd(default) ready, using /var/run/lirc/lircd
May 04 19:25:17 volumioboss lirc[1039]: Starting remote control daemon(s) : LIRC :.
May 04 19:25:17 volumioboss lircd-0.9.0-pre1[1053]: accepted new client on /var/run/lirc/lircd
May 04 19:25:17 volumioboss lirc[1039]: Starting execution daemon: irexec:.
May 04 19:25:17 volumioboss systemd[1]: Started LSB: Starts LIRC daemon…
[/code]
journal

volumio@volumioboss:~$ sudo journalctl -x | grep lirc May 04 19:25:14 volumioboss sudo[980]: volumio : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/dtoverlay lirc-rpi gpio_in_pin=27 May 04 19:25:14 volumioboss sudo[983]: volumio : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/chmod 777 /etc/lirc/hardware.conf May 04 19:25:14 volumioboss sudo[986]: volumio : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/chmod -R 777 /etc/lirc/hardware.conf /etc/lirc/lircd.conf /etc/lirc/lircmd.conf /etc/lirc/lircrc May 04 19:25:14 volumioboss kernel: lirc_dev: IR Remote Control driver registered, major 244 May 04 19:25:14 volumioboss kernel: lirc_rpi: module is from the staging directory, the quality is unknown, you have been warned. May 04 19:25:15 volumioboss volumio[820]: info: lirc permissions set May 04 19:25:15 volumioboss volumio[820]: info: lirc-rpi overlay enabled May 04 19:25:16 volumioboss kernel: lirc_rpi: auto-detected active low receiver on GPIO pin 27 May 04 19:25:16 volumioboss kernel: lirc_rpi lirc_rpi: lirc_dev: driver lirc_rpi registered at minor = 0 May 04 19:25:16 volumioboss kernel: lirc_rpi: driver registered! -- Subject: Unit lirc.service has begun with start-up -- Unit lirc.service has begun starting up. May 04 19:25:17 volumioboss volumio[820]: info: lirc correctly updated May 04 19:25:17 volumioboss lirc[1039]: Loading LIRC modules:. May 04 19:25:17 volumioboss kernel: input: lircd as /devices/virtual/input/input3 May 04 19:25:17 volumioboss lircd-0.9.0-pre1[1053]: lircd(default) ready, using /var/run/lirc/lircd May 04 19:25:17 volumioboss lirc[1039]: Starting remote control daemon(s) : LIRC :. May 04 19:25:17 volumioboss lircd-0.9.0-pre1[1053]: accepted new client on /var/run/lirc/lircd May 04 19:25:17 volumioboss lirc[1039]: Starting execution daemon: irexec:. -- Subject: Unit lirc.service has finished start-up -- Unit lirc.service has finished starting up.

What has not changed?

  1. controls are not being propagated to volumio, I’m not seeing anything when I tail the journal
  2. irw still gives me nothing as well, I think this should rule out a problem in Volumio?

I’m using an Apple A1156 remote and a TSOP38238 receiver wired to the GPIO27 pin on the Boss DAC @3.3V and mode2 shows activity when I press buttons.

Any tips for this tinkerer? I really don’t know how to debug/check the irexec, but if someone can tell me how, I’ll definitely give it a try.

Good to see there is some progress with your other system :slight_smile:

I assume you copied the lircd.conf you recorded yourself to the fresh system. Before running irw, did you systemctl stop lirc and then sudo lircd -d /dev/lirc0 ?

If that did/does not work could you alternatively try out another remote control?

I have the same problem as JayDee with RemotePi board and the Justboom remote (not the Justboom Dac). When I save the plugin settings, the remote works until the next reboot.

What version of the plugin do you have installed, the one you get through the UI (plugins management) which would be version 1.0.0 or version 1.2.0 from github?

After booting voIumio what is the content of the plugin’s config.json and what are the permissions of this file? If you have version 1.2.0 of the plugin the file is located in /data/configuration/accessory/ir_controller. The older version of the plugin saves the config.json in /data/configuration/system_controller/ir_controller (if I remember correctly).

This plugin seems to not work with the Odroid-C2.
There seems to be two problems:

  1. There is no /dev/lirc0.
    That may require an update to more than just the plugin.

  2. /etc/lirc/hardware.conf has MODULES=“lirc_rpi”
    The looks like it’s set in the index.js file, which has a reference to “Odroid-C”, but also needs a case for “Odroid-C2”

Here’s what I did to (temporarily) make it work on my C2:

modprobe meson-ir

modify /etc/lirc/hardware.conf so MODULES=“meson-ir”

Seems to work fine then, but I don’t expect it to stick after rebooting.

Great product all around!
Thanks

Hey @all,

I saw that in “IrController.prototype.enablePIOverlay” the gpio_in_pin will be set to 25. Would be if it could configured over web interface.
Also the configuration for gpio_out_pin would be nice.

I just create a plugin which will switch on an off an amplifier via infrared . For this plugin the configuration would be nice.

Thanks
Julian

Hi,
I make pull request for adding remote controll Xiaomi IR for TV box.

It is possible update this plugin in volumio store? When you look in github (https://github.com/xlisec/volumio-plugins/tree/master/plugins/accessory/ir_controller/configurations), you will see more remote controllers.

Last week I did a fresh install of Volumio as I bought a new RPi 3B+ and to my dismay I still am stuck with an old version of this plugin and a permanently disfunctional update button. This issue still has not been solved.
Would anyone have an indication of what the status is, or how I can solve this myself?

I also don’t know the reasons why the plugin available from the plugin manager has not been updated yet. For the moment you need to install the current version from github manually.

You have to connect via ssh to volumio and download the files of the latest version from https://github.com/volumio/volumio-plugins/blob/master/plugins/accessory/ir_controller.

Then from the directory where you downloaded the files

volumio plugin install

If an older version of the plugin has already been installed uninstall that first.

Why I can’t run custom script with Apple Remote A1294?

/etc/lirc/lircrc

begin
prog = irexec
button = KEY_MENU
config = /home/volumio/myscript.sh
end

It always runs default volumio toggle command. If I comment it out, then the button does nothing. In cmd line my script works fine.

What am I missing here?

@stosoorok

Where did you alter the lircrc file? Under /etc/lirc or /data/plugins/accessory/ir_controller/configurations/Apple Remote A1294
If you modified the lircrc under /etc/lirc this would not “stick”: As soon as you select the remote from the plugins configuration page and hit safe /etc/lirc/lircrc will be overwritten with the lircrc from “/data/plugins/…”.

In case you already changed the lircrc under “/data/plugins/…” make sure your script file has been made executable. You can check it with ls -al /home/volumio/myscript.sh
If the executable bit has been set you should see something like -rwxr-xr-x ... myscript.sh
Should the “x” be missing run chmod +x /home/volumio/myscript.sh
If it still doesn’t work I would suspect there is some code in the script that irexec handles differently from the shell.

P.S. I assume you are using the plugin version 1.2.0 from Github. Otherwise the path to the remote configurations (/data/plugins/…) would be slightly different (if memory serves well: “/data/plugins/accessory/ir_remote_controller/configurations”) .

@gvolt thanks!

I have uninstalled the plugin now and installed lirc and the problem is the same. So it is not the plugin’s fault but have something to do with volumio.

I did a new script let’s call it stop.sh

[code]#!/bin/bash

volumio stop
[/code]
-rwxr-xr-x 1 volumio volumio 165 Oct 23 21:21 stop.sh

in cmd line it works fine (stops player) but not with remote.

/etc/lirc/lircrc

begin prog = irexec button = KEY_MENU config = /home/pi/stop.sh end
Now when I write like this in /etc/lirc/lircrc it works fine.

begin prog = irexec button = KEY_MENU config = volumio stop end
What am I doing wrong?

Hm, no idea ATM. I tried it on my system and calling stop.sh from lircrc worked…

One question though: As your path to the script is /home/pi/stop.sh did you rename the user “volumio” or create another user “pi”?

OMG, I can’t be so blind… :blush: I’m so embarrassed now, that was it! Everything works great now. :laughing:

Thanks @gvolt!

Great! :smiley:
Thanks for your feedback.

Can anyone provide a better description on how to download the latest version from github?

I’ve had zero luck with wget github.com/volumio/volumio-plug … controller and volumio plugin install via ssh.

So anyone have an idea what I’m missing inbetween?

Raspberry Pi-3 with x400 dac integrated IR and Apple remote A1294.

You are missing the right URL :wink:

You need to download from “blob” not “tree”. When you compare the link I have posted above (https://volumio.org/forum/remote-controller-feedback-thread-t6668-90.html#p53730 with the one you tried you will notice the difference. :slight_smile: