[mythtv-users] Lirc commands in a shell script

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


On Mon, 29 Sep 2014 02:21:21 +1300, you wrote:

>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.

I should add that when I run mplayer from mythfrontend for a video
file that mythfrontend can not play, only mplayer gets the remote
buttons, not the underlying mythfrontend.  I do not know how that
works, as if I run irexec in parallel with mythfronted, they both see
the remote buttons.

Another alternative for changing radio stations is to add them to
MythTV as channels and use a channel change script to send the change
station commands to your radio service.  I have that working for my FM
radio scripts I use with my mothers PVR-150 FM tuner.


More information about the mythtv-users mailing list