[mythtv-users] Lirc commands in a shell script

Stephen Worthington stephen_agent at jsw.gen.nz
Sun Sep 28 13:21:21 UTC 2014


On Sun, 28 Sep 2014 13:37:09 +0200, you wrote:

>Hoi All ,
>
> I have Radio integrated in Myth with some adaptations as in the wiki.
> The radio command (ivtv-radio and aplay) itself runs as an
> independent service and I can select stations (with iradio, which can
> set the station on the screen or v4l2-ctl) either through a Mythmenu
> or through a shellscript. Also Volume (with amixer) I can control
> through that script. 
> Through my remote I can turn it on and off, by starting/stopping the
> service. I would like to also be able to select stations and adjust
> volume through the remote. That way I do not need to turn on the
> screen. As I have seen suggested, it would be possible to receive
> Lirc commands in a shellscript, as long as of cause it's on the
> foreground. Does anybody know how to do that?

Take a look at irexec - that runs things when triggered by a remote
button.  It could be used to send signals to your radio service.  I
have some test irexec setup in the MCE remote config I posted on my
web server a couple of days ago:

   http://www.jsw.gen.nz/mythtv/mythbuntu-devinput-lirc.bz2

Look at the end of the "mythtv" file that goes in /home/<your
mythfrontend user>/.lirc.  You can make an entire file of irexec setup
and add it to the /home/<your mythfrontend user>/.lircrc file to be
included in the lirc setup.  Whenever irexec is running, it will get
those commands.


More information about the mythtv-users mailing list