[mythtv-users] extra digits

Sreeram Kumar Sreeramkumar at yahoo.com
Sat Apr 7 19:14:05 UTC 2007


Thanks to all of you for the suggestions. I am using
#!/bin/sh
REMOTE_NAME=blaster
for digit in $(echo $1 | sed -e 's/./& /g'); do
irsend SEND_ONCE $REMOTE_NAME $digit
sleep 0.3 # note, you may have to tweak the interdigit
delay up a bit
done
irsend SEND_ONCE $REMOTE_NAME select

as the script. I changed the repeat count to 3. Still
I see the problem. What could be the issue? 

Also, I tried the script below but it drives the
dishbox with the first digit only whereas if I capture
the log I see all the three digits.

#!/usr/bin/perl

# make sure to set this string to
# the corresponding remote in /etc/lircd.conf
$remote_name = "blaster"; 

# Let's assume you don't need to press enter after you
punch in a
# channel number. Change this to 1 if your cable box
expects you press
# enter after each command
$needs_enter = 1;

# Change this to point to your rc executable
$rc_command = "/usr/local/bin/irsend";

# This subroutine actually sends the signal to the
cable box
sub change_SIGNAL {
    my($SIGNAL) = @_;
    system ("$rc_command --device=/dev/lircd1
SEND_ONCE $remote_name $SIGNAL select");
    sleep 0.4
}

$SIGNAL=$ARGV[0];
open F, ">> /var/log/channel.log";
print F "channel changing $SIGNAL\n";
close F;
print "channel changing $SIGNAL\n";

# Checks if $SIGNAL begins with a digit
# If it detects that the string is made up of digits,
then it puts
# spaces between the digits.  Ex. 1234 becomes 1 2 3 4
if ( $SIGNAL =~ /^\d+$/ )
{
    my $length = length($SIGNAL);
    my $counter = 0;
    my $temp;

    while( $counter < $length )
    {
        $temp .= substr($SIGNAL,$counter,1) ." ";
        $counter++;
    }

    change_SIGNAL($temp);
}
else
{
    # argument we passed was not made up of digits, so
it must be a
    # command that does something other than channel
changing on the
    # cable box
    change_SIGNAL($SIGNAL);
}

# Do we need to send enter
if ( $needs_enter )
{
    system ("$rc_command --device=/dev/lircd1
SEND_ONCE $remote_name select");
}

====================================================
 Experts, 
> Greetings. I was able to setup successfuly the 
> serial ir tx/rx. Everything is working fine. I have 
> one small issue though. When I type a channel for 
> example 799, the channel changes to 799 but 
> immediately after that myth somehow changes itself
to 
> channel 9 and forces the dishbox to channel 9. Same
is 
> the case when I press 802, channel changes to 802 
> followed by channel 2. Looks like myth is behaving
as 
> if it is receiving the last digit once more. Is
there 
> anyway I can get around with this? This is happening

> quite often. 

If this is happening with the serial IR receiver in
MythTV, you can 
verify this by using irw from the command line. In
this instance you 
need to check and adjust the repeat values in your
lircrc as Paul 
states. 

If this is happening with the serial IR transmitter
(which is 
controlling an external cable box via IR) you might
want to check/post 
your channel change script and check your freqid
values in the channel 
editor. 

Nick 



 
____________________________________________________________________________________
Expecting? Get great news right away with email Auto-Check. 
Try the Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html 


More information about the mythtv-users mailing list