[mythtv-users] Sky Digital pin code

Richard Woelk richardwoelk at yahoo.ca
Sat Mar 29 01:28:40 UTC 2008



Damian O'Sullivan wrote:
> Hi,
>
> Has anyone got an update to their sky digital channel changing script that 
> enters their PIN number for movie channels that require it (ie. during the 
> watershed) ? Or is there a way to stop it being requested altogether?
>
> Might stop me having 2 hour blue recordings!
>
> Damian O'Sullivan  Tel: 087 2241456    damian at linux.ie
>   
Damian,
    I'm assuming you're using the lirc channel change perl code.
If your movie channels are in a sequential block it is relatively easy.
This example sends "1234 Enter" if the channel falls between 200 and 300.

if your box doesn't need an enter after the password, or after the 
channel, you can remove those lines.


----------------------------------------------------------------
#!/usr/bin/perl

# make sure to set this string to
# the corresponding remote in /etc/lircd.conf
$remote_name = "gi-motorola-dct2000";
$pin = "1234";

sub change_channel {
        my($channel_digit) = @_;
        system ("rc SEND_ONCE $remote_name $channel_digit");
        sleep 1;
}

$channel=$ARGV[0];

if ($channel > 200 and $channel < 300) {
        change_channel(substr($pin,0,1));
        change_channel(substr($pin,1,1));
        change_channel(substr($pin,2,1));
        change_channel("ENTER");
}
sleep 1;
if (length($channel) > 2) {
        change_channel(substr($channel,0,1));
        change_channel(substr($channel,1,1));
        change_channel(substr($channel,2,1));
} elsif (length($channel) > 1) {
        change_channel(substr($channel,0,1));
        change_channel(substr($channel,1,1));
} else {
        change_channel(substr($channel,0,1));
}

change_channel("ENTER");

---------------------------------------------------------


More information about the mythtv-users mailing list