I use this on both RPI3 and Vero 4k and it doesn’t work on either. Not sure where to begin with this one as it has always been something of a mystery to me. Anybody else using irexec?
It looks like the daemon is not being started. It looks like the default socket is no longer /var/run/lirc/lircd. I created a variable to define this. Now it starts, but I still can’t get it to do anything. If I push a button that is supposed to trigger it, it creates a new instance of it, but doesn’t do anything. I tried to set the debug log, but it doesn’t write anything to it. It did create an empty file though.
irexec is not a IR blaster tool. It is a tool to execute an arbitrary command based on an IR input. I use it to execute scripts based on a remote key press.
Fair enough, although using irexec to trigger irsend is a very common use of irexec.
irexec is supposed to connect directly to the lirc socket of lircd.
On OSMC this is /var/run/lirc/lircd-lirc0 but you say you are using /var/run/lirc/lircd. Have you tried using the first one ?
Also, try running irw /var/run/lirc/lircd-lirc0 to make sure that lirc events are being generated for the buttons you’re pressing and that they match your irexec config.
By the way there is nothing in OSMC to automatically start irexec - so I’m not sure what you mean when you say it is no longer starting automatically - you would have had to create your own service in the first place to run it automatically.
By “starting automatically” I mean starting as a daemon at boot by adding the line" ```
/usr/bin/irexec -d /etc/lirc/lircrc" to rc.local. This isn’t working anymore. When I try to do this from the command line, it errors out saying “no such file or directory” I think this means the socket that it is looking at. According to the documentation, this is supposed to be “/var/run/lirrc/lircd”. This may have changed since when I explicitly tell it to look there through setting an environment variable, it will start. It seems to be getting signals from there in that it starts a new instance of irexec, but it stalls there. The action is not executed and the new irexec process never ends. So, if I push a bunch of buttons, it will start a bunch of new instances of irexec that never end.
So, if no one else is using this, I will have to do a lot more work to figure it out. Right now, I don’t have the time, so I am switching back to the 2020-June build. I was hoping that somebody a lot smarter than I am was using this and could help.
Thank you for your explanations. This may help me figure this out eventually.
Had the same issue, after setting socket path to
export LIRC_SOCKET_PATH=/var/run/lirc/lircd
noticed that irexec was running but when action was attempted on receipt of IR signal it failed with something linke “execvp failed”.
Some googling turn up this solution, seems irxec uses /usr/bin/sh to execute scripts, however, when there is no /usr/bin/sh (as on my Rpi) it fails.
This fixes/works around that:
ln -s /bin/bash /usr/bin/sh
Now my irexec is functioning again.
Add the following line: deb http://apt.osmc.tv buster-devel main
Run the following commands to update: sudo apt-get update && sudo apt-get dist-upgrade && reboot
Your system should have have received the update.
Please see if the issue is resolved.
I also recommend you edit /etc/apt/sources.list again and remove the line that you added after updating. This will return you to the normal update channel.
The documentation says that /var/run/lirc/lircd is the default, but it doesn’t seem to be working. We have had to explicitly direct irexec to that path by defining the environment variable with:
export LIRC_SOCKET_PATH=/var/run/lirc/lircd
I added this line to rc.local just before launching the daemon (also done in rc.local). The daemon launch looks like this:
OK Maybe I didn’t understand your comment. If it is using another path by default, it is unknown to me. All I know is that it is not looking in the right place.
Okay, I’ll trace the path it’s using tomorrow. I do understand that you are saying that it is not using the expected default path. I had just wondered if you knew which path it happened to be using instead.