[mythtv-users] MCE Remote and also controlling other devices

Joacim J jocke4news at gmail.com
Wed Sep 5 21:21:30 UTC 2007


On 9/5/07, Robin Gilks <g8ecj at gilks.org> wrote:
>
>
> > Hello,
> >
> > I have a MythTV box with a MS MCE Remote. What I have understand it can
> > also
> > control other devices, I mean the "IR Receiver" can also act "IR Sender"
> > with the two plugs.
> > Would it be possible to press "PC power" button and that put both the TV
> > and
> > Myth box in standby mode. If so how can it be done?? Any hints ??
>
> I use mine to control both the TV and theatre amp power. No point in using
> it to power off the myth box as otherwise it won't wake up again.
>
> My lirc.conf file has the codes for the MCE remote, the TV remote and the
> amp remote in it. This is required to generate the correct codes for the
> IR senders. I run irexec with an entry in the .lircrc file that uses
> irexec to call a script when the power button is pressed. Note that lirc
> uses ALL entries in lircrc for a button definition so the same button can
> be used by several applications SIMULTANEOUSLY. This allows me to use the
> MENU jumppoint mapped to the power button in mythtv so I always 'park'
> myth in a known place as well as calling the script.
>
> These are my script and lircrc entries, the latter also maps the volume
> controls (so I can use spdif output since mythtv can't then use the
> internal alsa mixer controls):
>
> $ cat power_toggle.sh
> #!/bin/sh
>
> TV=panasonic_tv_01
> AMP=rm-aap013
> FILE=/home/mythtv/.power
> DEV=/dev/lircd1
>
> DATE=`date +%s`
>
> # Use the presense of a flag file to see if we are powering up or down
> if [ -e $FILE  ]
> then
> LAST=`cat $FILE`
> # ignore unless at least 10 seconds has passed  this stops a keybounce
> # from turning us off straight after a turn on
> if [ $(($LAST + 10)) -lt $DATE ]
> then
> # power down - just blindly do it
> /usr/bin/irsend -d $DEV SEND_ONCE $TV T_power
> /usr/bin/sleep 1
> # the amp needs the code repeated to get it to work
> /usr/bin/irsend -d $DEV SEND_ONCE $AMP A_power
> /usr/bin/irsend -d $DEV SEND_ONCE $AMP A_power
> /bin/rm -f $FILE
> fi
>
> else
> # power up - select tuner channel One on TV, that turns it on, then AV to
> get to AV1
> #           meanwhile, power up and select the correct input on the amp
> /usr/bin/irsend -d $DEV SEND_ONCE $TV T_one
> /usr/bin/sleep 1
> /usr/bin/irsend -d $DEV SEND_ONCE $AMP A_dvd
> /usr/bin/irsend -d $DEV SEND_ONCE $AMP A_dvd
> /usr/bin/irsend -d $DEV SEND_ONCE $AMP A_dvd
> /usr/bin/sleep 4
> /usr/bin/irsend -d $DEV SEND_ONCE $TV T_av
> echo $DATE > $FILE
>
> fi
>
> $
>
> =========================
> $ tail lircrc
>
> begin
>     prog   = irexec
>     button = Power
>     config = /usr/local/bin/power_toggle.sh
> end
>
> #begin
> #    prog   = irexec
> #    button = *
> #    config = /usr/local/bin/mythclick /usr/local/share/mythtv/beep.wav &
> #end
>
> begin
>     prog   = irexec
>     button = VolUp
>     config = /usr/local/bin/setvol.sh A_volup
> end
>
> begin
>     prog   = irexec
>     button = VolDown
>     config = /usr/local/bin/setvol.sh A_voldown
> end
>
> begin
>     prog   = irexec
>     button = Mute
>     config = /usr/bin/irsend -d /dev/lircd1 SEND_ONCE rm-aap013 A_mute
> end
>
>
>
>
> --
> Robin Gilks



Thanks for the very good example  (live one :) )

One other questions regarding MCE Remote....I have Lirc 0.8.1 that are
provided in the (K)ubuntu repository. I have problems with repeating key
strokes (e.g. navigating in EPG results almost often with 2 steps up/down
instead of 1.

I saw that there is a patch on
http://www.mythtv.org/wiki/index.php/MCE_Remote but it also says that it
should not be needed since it was fixed in 0.8.1.

Any idea??

-- 
Regards
Joacim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-users/attachments/20070905/0ebe5252/attachment.htm 


More information about the mythtv-users mailing list