[mythtv-users] Can a script be set to run before each
Robin Gilks
g8ecj at gilks.org
Thu Apr 5 01:36:32 UTC 2007
>
> Any comments or suggestions about how this problem might be circumvented
> ---when a scheduled recording is started, when does mythtv send the
> channel change command to the irblaster script? Is there a delay that can
> be programmed in the script to cause a delay in the script sending the
> channel change to the satellite receiver?
Not knowing how Myth will behave if a channel change script does a 10 or
20 second sleep, how about this as an idea.
Create a script that only does a call to your channel change script (a
wrapper as it were) what puts the channel change script into the
background. Something like:
#!/bin/sh
/usr/local/bin/change_channel &
Then mod your channel change script to send the power up command, wait for
whatever using 'sleep' and then send the channel change command. It will
make LiveTV a PITA but it will get round the powerup problem.
The alternate is to not power down the sat box (treat it as a part of the
myth system which is running 24/7 anyway).
One way to improve the LiveTV performance would be to use a intercept an
otherwise unused IR code with irexec and run a script that does:
#!/bin/sh
date +%s > ~/flagfile
and in your channel change script see if that button has been pressed in
the last minute or so, if so skip the powerup and the delay.
#!/bin/sh
DATE=`date +%s`
PRESS=`cat ~/flagfile`
if [ $(($PRESS + 60)) -lt $DATE ]
then
irsend ..... powerup
sleep 20
fi
irsend .... channel nums
(I think I have the conditional the right way round!! its untested...). I
use a similar idea to get multiple presses of the remote control power
button ignored to prevent the system going up & down when 'someone' plays
with the remote.
--
Robin Gilks
More information about the mythtv-users
mailing list