irblast, inspired by LJs noreddot program, runs on the TiVo in the background and can send infrared signals to external set top boxes based on the current channel, recording state and system state.
While it is possible to customise the behaviour, the default version will send the Backup key every minute when recording from a Sky Digibox, to remove the red dot (i.e it replaces noreddot) and it also resends the digits for the current channel number, two minutes into a recording. This will make sure that the set top box is definately on the right channel. No more missed recordings because the digibox has reset itself, or a chance IR interference cause it to miss the TiVo channel change.
If you have no external set top boxes, i.e you just record from a TV aerial, it won't do anything for you. If you use FreeView or cable, some support is included for channel changing, and it is quite easy to add support for other boxes too. If you do, please send it back to me so I can include it in the main release.
The program can be run from rc.sysint.author, so it will be restarted automatically when the TiVo reboots (which isn't currently possible with noreddot). It also handles priorities so that it doesn't adversly affect the current playback (some previous attempts to do this resulted in a warbling in the playback sound when the infrared signals were being sent).
The program can be suspended using the TiVo remote, by three key presses, 0 Clear Clear.
Restart IR sending using the key sequence 1 Clear Clear.
Many many thanks go to LJ for his original noreddot program, and to Stuart Anderton for endpad (THE best addition to any TiVo). I've swiped the Log rotation code from endpad, which I think came from LJ originally, and I've swipped the 8 clear clear code to exit the program from LJ's noreddot.
Options [default value]:
keydelay_boxid=ms [1000] Delay between keys in milliseconds
NB: delay between two identical digits = 1.5*ms
Supported boxes
Sky: 20006, 20010, 20016, 20017
. noreddot - sends backup key during recordings
. channel - sends SkyKey/Backup/Backup/channel digits/Backup after 2 mins into a recording
Options [default value]:
+ skychanneldelay=n [2] Delay n minutes from start of recording to send channel change
+ skylivepoweroff [no] Power Off when not recording
+ skylivetv [no] Also send backup for live tv
FreeView: 20031
. channel - sends channel digits after 2 mins into a recording
Options [default value]:
+ freeviewchanneldelay=n [2] Delay n minutes from start of recording to send channel change
NTL: 20035
. channel - sends channel digits after 2 mins into a recording (keydelay_20035 defaults to 300)
Options [default value]:
+ ntlchanneldelay=n [2] Delay n minutes from start of recording to send channel change
How to install
Copy ir_1.2.1.tar to the TiVo using binary mode FTP then:
cpio -i -H tar -u -d <ir_1.2.1.tar
Run with:
/var/hack/ir/irblast.tcl [options]
Stop with:
/var/hack/ir/irblast.tcl -stop
or press 8 Clear Clear on the TiVo remote control.
Auto-Run at startup in /etc/rc.d/rc.sysinit.author with the -forcestart flag:
/var/hack/ir/irblast.tcl -forcestart [options] >> /dev/null &
To create a rc.sysinit.author type :
mount -o remount,rw /
echo "/var/hack/ir/irblast.tcl -forcestart >> /dev/null &" >>/etc/rc.d/rc.sysinit.author
chmod +x /etc/rc.d/rc.sysinit.author
mount -o remount,ro /
An example using options :
/var/hack/ir/irblast.tcl -forcestart skychanneldelay=1 skylivetv >> /dev/null &
A log file is created in /var/log/irblast.log and is cycled regularly. The previous log is also kept in /var/log/Oirblast.log Both these files can be consulted using TiVoweb. The log tells you what it got up to each minute, and what it tried to send if anything.
An error file is also created for more serious startup errors in /var/log/irblast.err
How it works
On startup, irblast checks to see what set top boxes are attached, and extracts the Infrared codes for the digits 0 to 9 from the TiVo database for those boxes. For each box it finds, identified by the TiVo IR code (e.g 20016 for a Sky digibox), it looks in the directory /var/hack/ir for a file called Blast_ircode.itcl (e.g Blast_20016.itcl). If the file for a given box doesn't exist, it will not do anything if the TiVo is switched to a channel on that box.
The Blast_ircode.itcl file contains a procedure that will be called to execute an action when that box is selected.
irblast wakes up at 15 seconds past every minute, and checks what the TiVo is up to (15s ensures no clash with standard channel changes which happen on the minute). It will then call the procedure Blast_ircode for the current set top box with the following arguments :
chnum the current channel number
isrecording 1 if currently recording
wasrecording 1 if was recording one minute ago
newrecording 1 if this is a new recording
lastchannel the channel number one minute ago
newchannel 1 if the channel has changed
elapsedmins the number of minutes since the recording began
onstandby 1 if the TiVo is on standby
The Blast_ircode procedure can then determine if it wants to do anything based on these parameters. To send a channel number it uses
SendChannel $chnum
To send a custom button sequence it uses
SendButtons "ircode" {"buttonname1" "buttonname2" ...}
Where ircode is the box number and buttonnameN is the name of a button to send. For each button name, a function IR_ircode_buttonname must be defined that returns the inrfared sequence for that button. For instance :
SendButtons "88008" {"Cancel" "OK"}
will call the following functions
The main file for Sky DigiBox is contained in Blast_SkyDigiBox.itcl, which is called from individual files for each of the ircode files related to digiboxes. That file sends the Backup button every minute during recordings, and resends the channel number after two minutes into a program.
Where the Backup button is defined by
This behaviour for any box can be easilly changed by editing the Blast_ files. New boxes can be supported by adding new Blast_ files. If you add support for a new box, please PM me your file so I can add it to the main release.
The quit signal is sent by creating the file /tmp/blastquit
You can easilly add new buttons using the irtest command on the tivo plus a few tools on the internet. For more info, see here. Alternatively people have managed to convert codes from Pronto CCF files.
Also included with the Blast files is one I use to keep a VCR awake, so the TiVo can record some French channels I can receive. This should help as a non-sky example for those that might want to add support for other boxes.
Version History
#
# 1.2.1 29/03/04
# Add option to set delay between keys being sent. Default 1000ms on per box basis
# Update Blast_SkyPlusDigiBox to send Sky Backup Backup Digits Backup
# Add 1s pause before sending Sky digits, and 3s after, to avoid problems with Backup
# When sending digits, if one digit is the same as previous digit, wait 1.5 * wait time
# Added Blast_20035 for ntl cable box, with default 300ms key delay
#
# 1.2 28/03/04
# Add files for Sky+
# Add option for sky delay before channel change, and sending backup during livetv
# Add option to power down a sky box after a recording
# Add option for freeview delay before channel change
# Add remote control options to suspend and restart sending IR signals
#
# 1.1 27/03/04
# First Public release
While it is possible to customise the behaviour, the default version will send the Backup key every minute when recording from a Sky Digibox, to remove the red dot (i.e it replaces noreddot) and it also resends the digits for the current channel number, two minutes into a recording. This will make sure that the set top box is definately on the right channel. No more missed recordings because the digibox has reset itself, or a chance IR interference cause it to miss the TiVo channel change.
If you have no external set top boxes, i.e you just record from a TV aerial, it won't do anything for you. If you use FreeView or cable, some support is included for channel changing, and it is quite easy to add support for other boxes too. If you do, please send it back to me so I can include it in the main release.
The program can be run from rc.sysint.author, so it will be restarted automatically when the TiVo reboots (which isn't currently possible with noreddot). It also handles priorities so that it doesn't adversly affect the current playback (some previous attempts to do this resulted in a warbling in the playback sound when the infrared signals were being sent).
The program can be suspended using the TiVo remote, by three key presses, 0 Clear Clear.
Restart IR sending using the key sequence 1 Clear Clear.
Many many thanks go to LJ for his original noreddot program, and to Stuart Anderton for endpad (THE best addition to any TiVo). I've swiped the Log rotation code from endpad, which I think came from LJ originally, and I've swipped the 8 clear clear code to exit the program from LJ's noreddot.
Options [default value]:
keydelay_boxid=ms [1000] Delay between keys in milliseconds
NB: delay between two identical digits = 1.5*ms
Supported boxes
Sky: 20006, 20010, 20016, 20017
. noreddot - sends backup key during recordings
. channel - sends SkyKey/Backup/Backup/channel digits/Backup after 2 mins into a recording
Options [default value]:
+ skychanneldelay=n [2] Delay n minutes from start of recording to send channel change
+ skylivepoweroff [no] Power Off when not recording
+ skylivetv [no] Also send backup for live tv
FreeView: 20031
. channel - sends channel digits after 2 mins into a recording
Options [default value]:
+ freeviewchanneldelay=n [2] Delay n minutes from start of recording to send channel change
NTL: 20035
. channel - sends channel digits after 2 mins into a recording (keydelay_20035 defaults to 300)
Options [default value]:
+ ntlchanneldelay=n [2] Delay n minutes from start of recording to send channel change
How to install
Copy ir_1.2.1.tar to the TiVo using binary mode FTP then:
cpio -i -H tar -u -d <ir_1.2.1.tar
Run with:
/var/hack/ir/irblast.tcl [options]
Stop with:
/var/hack/ir/irblast.tcl -stop
or press 8 Clear Clear on the TiVo remote control.
Auto-Run at startup in /etc/rc.d/rc.sysinit.author with the -forcestart flag:
/var/hack/ir/irblast.tcl -forcestart [options] >> /dev/null &
To create a rc.sysinit.author type :
mount -o remount,rw /
echo "/var/hack/ir/irblast.tcl -forcestart >> /dev/null &" >>/etc/rc.d/rc.sysinit.author
chmod +x /etc/rc.d/rc.sysinit.author
mount -o remount,ro /
An example using options :
/var/hack/ir/irblast.tcl -forcestart skychanneldelay=1 skylivetv >> /dev/null &
A log file is created in /var/log/irblast.log and is cycled regularly. The previous log is also kept in /var/log/Oirblast.log Both these files can be consulted using TiVoweb. The log tells you what it got up to each minute, and what it tried to send if anything.
An error file is also created for more serious startup errors in /var/log/irblast.err
How it works
On startup, irblast checks to see what set top boxes are attached, and extracts the Infrared codes for the digits 0 to 9 from the TiVo database for those boxes. For each box it finds, identified by the TiVo IR code (e.g 20016 for a Sky digibox), it looks in the directory /var/hack/ir for a file called Blast_ircode.itcl (e.g Blast_20016.itcl). If the file for a given box doesn't exist, it will not do anything if the TiVo is switched to a channel on that box.
The Blast_ircode.itcl file contains a procedure that will be called to execute an action when that box is selected.
irblast wakes up at 15 seconds past every minute, and checks what the TiVo is up to (15s ensures no clash with standard channel changes which happen on the minute). It will then call the procedure Blast_ircode for the current set top box with the following arguments :
chnum the current channel number
isrecording 1 if currently recording
wasrecording 1 if was recording one minute ago
newrecording 1 if this is a new recording
lastchannel the channel number one minute ago
newchannel 1 if the channel has changed
elapsedmins the number of minutes since the recording began
onstandby 1 if the TiVo is on standby
The Blast_ircode procedure can then determine if it wants to do anything based on these parameters. To send a channel number it uses
SendChannel $chnum
To send a custom button sequence it uses
SendButtons "ircode" {"buttonname1" "buttonname2" ...}
Where ircode is the box number and buttonnameN is the name of a button to send. For each button name, a function IR_ircode_buttonname must be defined that returns the inrfared sequence for that button. For instance :
SendButtons "88008" {"Cancel" "OK"}
will call the following functions
Code:
proc IR_88008_OK {} {
return "0 36 9 0 105 99 99 48 48 99 99 102 99 99 99 99 51 45 51 45 51 366"
}
proc IR_88008_Cancel {} {
return "0 36 11 0 51 48 99 51 48 48 48 99 99 99 48 48 48 48 102 48 48 48
48 99 48 360"
}
Code:
if { $isrecording } {
# Send Backup key
SendButtons "SkyDigiBox" {"Backup"}
# Send Channel number after 2 minutes into program (only)
if { $elapsedmins == 2 } {
SendChannel $chnum
}
}
Code:
proc IR_SkyDigiBox_Backup {} {
return "0 50 24 0 152 51 25 25 25 25 25 49 25 49 49 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 49 49
25 25 25 25 25 25 25 25 49 25 25 600"
}
The quit signal is sent by creating the file /tmp/blastquit
You can easilly add new buttons using the irtest command on the tivo plus a few tools on the internet. For more info, see here. Alternatively people have managed to convert codes from Pronto CCF files.
Also included with the Blast files is one I use to keep a VCR awake, so the TiVo can record some French channels I can receive. This should help as a non-sky example for those that might want to add support for other boxes.
Version History
#
# 1.2.1 29/03/04
# Add option to set delay between keys being sent. Default 1000ms on per box basis
# Update Blast_SkyPlusDigiBox to send Sky Backup Backup Digits Backup
# Add 1s pause before sending Sky digits, and 3s after, to avoid problems with Backup
# When sending digits, if one digit is the same as previous digit, wait 1.5 * wait time
# Added Blast_20035 for ntl cable box, with default 300ms key delay
#
# 1.2 28/03/04
# Add files for Sky+
# Add option for sky delay before channel change, and sending backup during livetv
# Add option to power down a sky box after a recording
# Add option for freeview delay before channel change
# Add remote control options to suspend and restart sending IR signals
#
# 1.1 27/03/04
# First Public release
Attachments
-
7.3 KB Views: 407