[mythtv-users] Re: add skybox to my MythTV system

David myth at dgreaves.com
Tue Aug 9 19:29:03 UTC 2005


Neil Bird wrote:

> Around about 09/08/05 02:29, Craig Tinson typed ...
>
>> I use redeye serial too.. but with a *very* simple one line bash
>> script.. would be interested in what you've done with redeye.c and
>> the script too..
>
>
>   Okey-doke.  I make no pretention that I'm the original
> author/modifier! The 'digibox.c' [née red_eye.c] and its Makefile I
> purloined from somewhere and then fine-tuned to speed it up
> (near-instant channel changes now).

ditto.
Smaller and perl based.

send_sky_backup
Started from rc5.d/
This sends the Sky 'Backup' and 'Sky' signal every few seconds. This
ensures that no 'red dots' are recorded and it powers on the digibox if
it's had a s/w update.
The locking allows the channel change to take place without colliding.
change_channel
Used as Myth's external channel changer.
The channel change sends the digits. Then tries to 'erase' them by
pressing 'backup'. Then it resends the digits and 'erases' them again.
This ensures that if either set of channel-change digits doesn't quite
make it they don't hang around for the first N seconds of the recording.

Not missed a channel change in over a year.

David

-------------- next part --------------
#!/usr/bin/perl -w

use lib '/myth/bin/';
use ir;

my $chan=join(" ", split(//,$ARGV[0]));

# There's a problem in live TV if you change channel rapidly

exit if fork;

get_lock || die "No lock to change to $chan : $!\n";

print "Sending $chan\n";
system "irsend SEND_ONCE SKY SKY BACKUP BACKUP $chan";
sleep 0.5;
system "irsend SEND_ONCE SKY SKY BACKUP BACKUP BACKUP";
sleep 0.5;
system "irsend SEND_ONCE SKY SKY BACKUP BACKUP $chan";
sleep 0.5;
system "irsend SEND_ONCE SKY SKY BACKUP";

clear_lock;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ir.pm
Type: text/x-perl
Size: 438 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-users/attachments/20050809/41254f72/ir.pm
-------------- next part --------------
#!/usr/bin/perl -w

use lib '/myth/bin/';
use ir;

while (1)
{
  sleep 5;
  get_lock && do {
    system "irsend SEND_ONCE SKY BACKUP SKY";
    clear_lock;
  }
}


More information about the mythtv-users mailing list