[mythtv-users] IR Blaster not always changing channel
Chris Tepe
cstepe at ctdataservices.com
Wed Dec 15 02:00:09 UTC 2010
I have an IR blaster set up to control my STB. It works 90% of the time
but 10% of the time it fails to change the channel. I've put some
logging in the channel change script so it is getting called. I've
tried putting a delay in the script and also sending the command twice
within the same script but it has not improved the reliability. some
times it will pickup just the first digit and sometimes just the last.
Here is the script I'm currently using.
#!/bin/sh
LOG=/var/log/mythtv/changer.log
exec >> $LOG 2>&1
NOW=$(date)
#$(date +"%b-%d-%y")
echo ===========
echo $NOW
echo Tuner 1
echo $1
echo ===========
REMOTE_NAME=blaster
irsend SET_TRANSMITTERS 1
sleep 0.4
irsend SET_TRANSMITTERS 1
sleep 0.4
for digit in $(echo $1 | sed -e 's/./& /g'); do
irsend SEND_ONCE $REMOTE_NAME $digit
sleep 0.4 # note, you may have to tweak the interdigit delay
up a bit, depending on your STB model
echo $REMOTE_NAME - $digit
done
# irsend SEND_ONCE $REMOTE_NAME Enter
echo ===========
sleep 10.0
NOW=$(date)
echo ===========
echo $NOW
echo Tuner 1 - second send
echo $1
echo ===========
REMOTE_NAME=blaster
irsend SET_TRANSMITTERS 1
sleep 0.4
irsend SET_TRANSMITTERS 1
sleep 0.4
for digit in $(echo $1 | sed -e 's/./& /g'); do
irsend SEND_ONCE $REMOTE_NAME $digit
sleep 0.4 # note, you may have to tweak the interdigit delay
up a bit, depending on your STB model
echo $REMOTE_NAME - $digit
done
# irsend SEND_ONCE $REMOTE_NAME Enter
echo ===========
exit 0
More information about the mythtv-users
mailing list