[mythtv-users] mythfrontend channel changing

Robin Gilks g8ecj at gilks.org
Wed Jun 6 01:09:22 UTC 2007


> Ok,
>
> I have finally successfully compiled a lircd.conf file that from the
> terminal works great. I can change channels consistently without issue.
> The problem that I now have is when I fire up mythfrontend I get duplicate
> channel change sends. Meaning that if I press 120 on the remote I get 120
> 0, so the channel goes to 0. Or if I send 45 it will send 45 5. There is
> about a 1-1.5 second delay between the 45 and 5. This does not happen when
> I run my channel change script from the terminal. Any Ideas?

Why not try making a copy of the script, echo the data passed to it to a
file and change the irsend to echo the data into the file as well - that
way you can see what is getting to the script and what it passes on...

Sound to me like you have a 'for' count of the number of digits and its
picking up the wrong string length so sends the last character twice.

Another possibility is that you have the ';;' double semicolon missing
after the 'done' so the next line gets executed as well.

Here is what I use (which is probably the same as everyone elses apart
from the sleep time maybe!!)

#!/bin/sh
REMOTE_NAME=sky
cmd="$1"
DEVICE=/dev/lircd

case $cmd in
    [0-9]*)
    for digit in $(echo $1 | sed -e 's/./& /g'); do
        /usr/bin/irsend -d $DEVICE SEND_ONCE $REMOTE_NAME $digit
        sleep 0.1
    done
    ;;

    *)
        /usr/bin/irsend -d $DEVICE SEND_ONCE $REMOTE_NAME $cmd
    ;;
esac


-- 
Robin Gilks



More information about the mythtv-users mailing list