PDA

View Full Version : Need help with adding IR code



Moose Man
20-09-2006, 07:35 AM
After following this guide http://www.tuhs.org/twiki/bin/view/IR/IRConversionAndSetup

I get the following error message when trying to execute the tcl file from the bash prompt, "can't open object (TV_DB NOT FOUND)" right after it says "Setting mystb codes for Tivo 2995...". My tivo is a U.S. standalone ATT series2 130040 running the latest software 7.3... using kernal 7.2.2-oth-K1. Any help would be appreciated.

Thanks
Moose


Here the mystb.tcl file I am trying to execute:


source /tvlib/tcl/tv/mfslib.tcl

proc setIr { irObj field irSequence } {

set savedInitial 0

foreach irPart $irSequence {

if {$savedInitial == 0} {
set savedInitial 1
dbobj $irObj set $field $irPart
} else {
dbobj $irObj add $field $irPart
}

}
}


proc mystb {} {

set db [dbopen]

puts "Setting mystb codes for TiVo 29995..."

RetryTransaction {

set tivoir [db $db open /Component/Ir/TivoFormat/29995]

setIr $tivoir "Dig0" "0 51 34 2 522 260 33 33 32 33 33 33 32 33 32 33 33 98 32 33 33 33 32 99 32 98 33 98 32 99 32 98 33 98 33 98 32 98 33 98 33 33 32 33 33 98 32 35 32 33 33 33 32 33 33 33 32 99 32 98 33 33 32 99 32 98 33 98 32 99 32 2318 522 131 33 5654"
setIr $tivoir "Dig1" "0 51 34 2 522 260 33 33 32 33 33 33 32 33 32 33 33 98 32 33 33 33 32 99 32 98 33 98 32 99 32 98 33 98 33 98 32 98 33 33 33 33 32 33 33 33 32 33 33 33 32 33 33 32 33 98 32 98 33 98 33 98 32 98 32 98 33 98 32 99 32 2315 522 131 33 5648"
setIr $tivoir "Dig2" "0 51 34 2 521 260 33 33 32 33 33 32 32 33 32 32 33 98 32 33 33 32 32 98 32 98 33 96 32 98 32 98 33 96 33 98 32 98 32 96 33 33 32 33 33 33 32 33 33 32 32 33 32 32 33 33 32 98 32 96 33 98 32 98 32 96 33 98 32 98 32 2306 521 131 33 5634"
setIr $tivoir "Dig3" "0 51 34 2 519 258 33 32 32 32 33 32 32 33 32 32 32 98 32 32 33 32 32 98 32 96 33 96 32 98 32 96 33 96 32 98 32 96 33 32 32 98 32 32 33 32 32 33 33 32 32 33 32 32 33 96 32 33 33 96 33 96 32 96 32 96 33 96 32 98 32 2301 519 129 33 5621"
setIr $tivoir "Dig4" "0 51 34 2 521 260 33 33 32 33 33 33 32 33 32 32 33 98 32 33 32 33 32 98 32 98 33 98 32 98 32 98 33 96 33 98 32 98 32 96 33 98 32 33 33 32 32 33 32 32 33 33 32 33 33 33 32 33 32 98 33 98 32 98 32 98 33 98 32 98 32 2310 521 131 33 5636"
setIr $tivoir "Dig5" "0 51 34 2 519 258 33 32 32 32 33 32 32 33 32 32 32 96 32 32 33 32 32 98 32 96 33 96 32 98 32 96 33 96 33 96 32 96 33 32 33 33 32 96 33 32 32 32 33 32 32 33 32 32 33 96 32 98 33 32 33 96 32 98 32 96 33 96 32 98 32 2301 519 129 33 5621"
setIr $tivoir "Dig6" "0 51 34 2 522 260 33 33 32 33 33 33 32 33 32 33 33 98 32 33 33 33 32 99 32 98 33 98 32 99 32 98 32 98 33 98 32 98 33 98 33 33 32 98 33 33 32 35 32 33 33 33 32 33 33 33 32 99 32 33 33 98 32 99 32 98 33 98 32 99 32 2316 522 131 33 5649"
setIr $tivoir "Dig7" "0 51 34 2 521 260 33 33 32 33 33 33 32 33 33 32 33 98 32 33 33 33 32 99 32 98 33 98 33 98 32 98 33 98 33 98 32 98 33 32 33 98 32 98 32 33 33 33 32 33 33 33 32 33 33 98 33 33 32 33 33 98 32 98 32 98 33 98 32 99 32 2315 522 131 33 5646"
setIr $tivoir "Dig8" "0 51 34 2 522 260 33 33 32 33 33 33 32 33 32 33 33 98 32 33 33 33 32 99 32 98 33 98 32 99 32 98 33 98 33 98 32 98 33 98 33 98 32 98 32 33 33 33 32 33 33 33 32 33 32 33 32 35 32 33 33 98 32 98 32 98 33 98 32 99 32 2316 522 131 33 5651"
setIr $tivoir "Dig9" "0 51 34 2 522 260 33 33 32 33 33 33 32 33 33 32 33 98 32 33 33 33 32 99 32 98 33 98 32 99 32 98 33 98 33 98 32 98 32 33 33 33 32 33 33 98 32 33 33 32 33 33 32 33 33 98 32 99 32 98 33 33 32 98 32 98 33 98 32 99 32 2316 522 131 33 5649"
setIr $tivoir "Enter" "0 51 34 2 522 260 33 33 32 33 33 33 32 33 32 33 33 98 32 33 33 33 32 99 32 98 33 98 32 99 32 98 33 98 33 98 32 98 33 98 33 33 32 33 33 98 32 99 32 33 33 33 32 33 32 33 32 99 32 98 33 33 32 35 32 98 33 98 32 99 32 2318 522 131 33 5652"
}

puts "Finished! Reboot your TiVo for the new codes to take effect."

dbclose $db

}

petestrash
22-09-2006, 07:34 AM
Not sure if the twiki will work on a series two tivo running V7.3 software.

The twiki is written for series one units running software upto V3.

I'm overseas at the moment, so I can't clarify by testing on my S2 running V4.01b at home.

Peter.

Moose Man
30-09-2006, 10:39 AM
Peter

Thanks for the reply. I have been away as well and will start to do more homework on using this mod for a S2. If/when you get a chance to test on your machine that would be greatly appreciated.

Moose

T1voZA
30-09-2006, 03:24 PM
I get the following error message when trying to execute the tcl file from the bash prompt, "can't open object (TV_DB NOT FOUND)" right after it says "Setting mystb codes for Tivo 2995...". My tivo is a U.S. standalone ATT series2 130040 running the latest software 7.3... using kernal 7.2.2-oth-K1. The 'mystb.tcl' script doesn't create a new IR component but simply assigns the IR codes to an existing IR component, 29995 is a dummy component found in the OzTivo IR slice and is not listed in TiVo Inc's official slices hence the reason you're getting "TV_DB NOT FOUND".

The below script should fix your problem as well as give you the command needed to assign the new codes to your current setup (I've used ComponentCode 10001. If that gives the same error, have a look for valid codes via TivoWeb: http://yourtivoip/mfs/Component/Ir/TivoFormat).

#!/tvbin/tivosh

source /tvlib/tcl/tv/mfslib.tcl

proc setIr { irObj field irSequence } {
set savedInitial 0

foreach irPart $irSequence {
if {$savedInitial == 0} {
set savedInitial 1
dbobj $irObj set $field $irPart
} else {
dbobj $irObj add $field $irPart
}
}
}

set db [dbopen]

puts "Setting IR codes for CableBoxCodeNum 10001 ..."
puts ""

RetryTransaction {

set tivoir [db $db open /Component/Ir/TivoFormat/10001]

setIr $tivoir "Dig0" "0 51 34 2 522 260 33 33 32 33 33 33 32 33 32 33 33 98 32 33 33 33 32 99 32 98 33 98 32 99 32 98 33 98 33 98 32 98 33 98 33 33 32 33 33 98 32 35 32 33 33 33 32 33 33 33 32 99 32 98 33 33 32 99 32 98 33 98 32 99 32 2318 522 131 33 5654"
setIr $tivoir "Dig1" "0 51 34 2 522 260 33 33 32 33 33 33 32 33 32 33 33 98 32 33 33 33 32 99 32 98 33 98 32 99 32 98 33 98 33 98 32 98 33 33 33 33 32 33 33 33 32 33 33 33 32 33 33 32 33 98 32 98 33 98 33 98 32 98 32 98 33 98 32 99 32 2315 522 131 33 5648"
setIr $tivoir "Dig2" "0 51 34 2 521 260 33 33 32 33 33 32 32 33 32 32 33 98 32 33 33 32 32 98 32 98 33 96 32 98 32 98 33 96 33 98 32 98 32 96 33 33 32 33 33 33 32 33 33 32 32 33 32 32 33 33 32 98 32 96 33 98 32 98 32 96 33 98 32 98 32 2306 521 131 33 5634"
setIr $tivoir "Dig3" "0 51 34 2 519 258 33 32 32 32 33 32 32 33 32 32 32 98 32 32 33 32 32 98 32 96 33 96 32 98 32 96 33 96 32 98 32 96 33 32 32 98 32 32 33 32 32 33 33 32 32 33 32 32 33 96 32 33 33 96 33 96 32 96 32 96 33 96 32 98 32 2301 519 129 33 5621"
setIr $tivoir "Dig4" "0 51 34 2 521 260 33 33 32 33 33 33 32 33 32 32 33 98 32 33 32 33 32 98 32 98 33 98 32 98 32 98 33 96 33 98 32 98 32 96 33 98 32 33 33 32 32 33 32 32 33 33 32 33 33 33 32 33 32 98 33 98 32 98 32 98 33 98 32 98 32 2310 521 131 33 5636"
setIr $tivoir "Dig5" "0 51 34 2 519 258 33 32 32 32 33 32 32 33 32 32 32 96 32 32 33 32 32 98 32 96 33 96 32 98 32 96 33 96 33 96 32 96 33 32 33 33 32 96 33 32 32 32 33 32 32 33 32 32 33 96 32 98 33 32 33 96 32 98 32 96 33 96 32 98 32 2301 519 129 33 5621"
setIr $tivoir "Dig6" "0 51 34 2 522 260 33 33 32 33 33 33 32 33 32 33 33 98 32 33 33 33 32 99 32 98 33 98 32 99 32 98 32 98 33 98 32 98 33 98 33 33 32 98 33 33 32 35 32 33 33 33 32 33 33 33 32 99 32 33 33 98 32 99 32 98 33 98 32 99 32 2316 522 131 33 5649"
setIr $tivoir "Dig7" "0 51 34 2 521 260 33 33 32 33 33 33 32 33 33 32 33 98 32 33 33 33 32 99 32 98 33 98 33 98 32 98 33 98 33 98 32 98 33 32 33 98 32 98 32 33 33 33 32 33 33 33 32 33 33 98 33 33 32 33 33 98 32 98 32 98 33 98 32 99 32 2315 522 131 33 5646"
setIr $tivoir "Dig8" "0 51 34 2 522 260 33 33 32 33 33 33 32 33 32 33 33 98 32 33 33 33 32 99 32 98 33 98 32 99 32 98 33 98 33 98 32 98 33 98 33 98 32 98 32 33 33 33 32 33 33 33 32 33 32 33 32 35 32 33 33 98 32 98 32 98 33 98 32 99 32 2316 522 131 33 5651"
setIr $tivoir "Dig9" "0 51 34 2 522 260 33 33 32 33 33 33 32 33 33 32 33 98 32 33 33 33 32 99 32 98 33 98 32 99 32 98 33 98 33 98 32 98 32 33 33 33 32 33 33 98 32 33 33 32 33 33 32 33 33 98 32 99 32 98 33 33 32 98 32 98 33 98 32 99 32 2316 522 131 33 5649"
setIr $tivoir "Enter" "0 51 34 2 522 260 33 33 32 33 33 33 32 33 32 33 33 98 32 33 33 33 32 99 32 98 33 98 32 99 32 98 33 98 33 98 32 98 33 98 33 33 32 33 33 98 32 99 32 33 33 33 32 33 32 33 32 99 32 98 33 33 32 35 32 98 33 98 32 99 32 2318 522 131 33 5652"

}

RetryTransaction {
set setup [db $db open /Setup]
set sources [dbobj $setup get Source]

foreach source $sources {
set sourcefsid [dbobj $source fsid]
set sourcesubid [dbobj $source subobjid]
set connector [dbobj $source get Connector]

if { $connector == "3" } {
set connector "Cable"
} elseif { $connector == "5" } {
set connector "Satellite"
}

puts "To associate CableBoxCodeNum 10001 with your '$connector' input, type:"
puts " dbset $sourcefsid/$sourcesubid CableBoxCodeNum 10001"
puts ""
}
}

dbclose $db

puts "Reboot your TiVo for the new codes to take effect."
puts ""

Save the above to a file named 'ir_codes.tcl', ftp the file to your TiVo's '/tmp' directory and execute the script as follows:

chmod 755 /tmp/ir_codes.tcl
/tmp/ir_codes.tcl
dbset 2274/12 CableBoxCodeNum 10001 (change 2273/12 to the value supplied)
reboot