#!/tvbin/tivosh source /tvlib/tcl/tv/mfslib.tcl # IR codes for DTT900 set IRCodes(Dig0) "0 47 34 2 516 259 32 97 32 97 32 97 32 32 32 97 32 97 32 97 32 97 32 32 32 32 32 32 32 97 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 97 32 32 32 32 32 32 32 97 32 97 32 97 32 97 32 32 32 97 32 97 32 97 32 2066 516 129 32 5279" set IRCodes(Dig1) "0 47 34 2 516 259 32 97 32 97 32 97 32 32 32 97 32 97 32 97 32 97 32 32 32 32 32 32 32 97 32 32 32 32 32 32 32 32 32 97 32 32 32 32 32 32 32 97 32 32 32 32 32 32 32 32 32 97 32 97 32 97 32 32 32 97 32 97 32 97 32 2066 516 129 32 5279" set IRCodes(Dig2) "0 47 34 2 516 259 32 97 32 97 32 97 32 32 32 97 32 97 32 97 32 97 32 32 32 32 32 32 32 97 32 32 32 32 32 32 32 32 32 32 32 97 32 32 32 32 32 97 32 32 32 32 32 32 32 97 32 32 32 97 32 97 32 32 32 97 32 97 32 97 32 2066 516 129 32 5279" set IRCodes(Dig3) "0 47 34 2 516 259 32 97 32 97 32 97 32 32 32 97 32 97 32 97 32 97 32 32 32 32 32 32 32 97 32 32 32 32 32 32 32 32 32 97 32 97 32 32 32 32 32 97 32 32 32 32 32 32 32 32 32 32 32 97 32 97 32 32 32 97 32 97 32 97 32 2066 516 129 32 5279" set IRCodes(Dig4) "0 47 34 2 516 259 32 97 32 97 32 97 32 32 32 97 32 97 32 97 32 97 32 32 32 32 32 32 32 97 32 32 32 32 32 32 32 32 32 32 32 32 32 97 32 32 32 97 32 32 32 32 32 32 32 97 32 97 32 32 32 97 32 32 32 97 32 97 32 97 32 2066 516 129 32 5279" set IRCodes(Dig5) "0 47 34 2 516 259 32 97 32 97 32 97 32 32 32 97 32 97 32 97 32 97 32 32 32 32 32 32 32 97 32 32 32 32 32 32 32 32 32 97 32 32 32 97 32 32 32 97 32 32 32 32 32 32 32 32 32 97 32 32 32 97 32 32 32 97 32 97 32 97 32 2066 516 129 32 5279" set IRCodes(Dig6) "0 47 34 2 516 259 32 97 32 97 32 97 32 32 32 97 32 97 32 97 32 97 32 32 32 32 32 32 32 97 32 32 32 32 32 32 32 32 32 32 32 97 32 97 32 32 32 97 32 32 32 32 32 32 32 97 32 32 32 32 32 97 32 32 32 97 32 97 32 97 32 2066 516 129 32 5279" set IRCodes(Dig7) "0 47 34 2 516 259 32 97 32 97 32 97 32 32 32 97 32 97 32 97 32 97 32 32 32 32 32 32 32 97 32 32 32 32 32 32 32 32 32 97 32 97 32 97 32 32 32 97 32 32 32 32 32 32 32 32 32 32 32 32 32 97 32 32 32 97 32 97 32 97 32 2066 516 129 32 5279" set IRCodes(Dig8) "0 47 34 2 516 259 32 97 32 97 32 97 32 32 32 97 32 97 32 97 32 97 32 32 32 32 32 32 32 97 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 97 32 97 32 32 32 32 32 32 32 97 32 97 32 97 32 32 32 32 32 97 32 97 32 97 32 2066 516 129 32 5279" set IRCodes(Dig9) "0 47 34 2 516 259 32 97 32 97 32 97 32 32 32 97 32 97 32 97 32 97 32 32 32 32 32 32 32 97 32 32 32 32 32 32 32 32 32 97 32 32 32 32 32 97 32 97 32 32 32 32 32 32 32 32 32 97 32 97 32 32 32 32 32 97 32 97 32 97 32 2066 516 129 32 5279" set IRCodes(Enter) "0 47 34 2 516 259 32 97 32 97 32 97 32 32 32 97 32 97 32 97 32 97 32 27 32 32 32 27 32 97 32 32 32 32 32 32 32 32 32 32 32 32 32 97 32 32 32 32 32 32 32 97 32 32 32 97 32 97 32 32 32 97 32 97 32 97 32 32 32 97 32 2066 516 129 32 5279" 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] RetryTransaction { try { # Open LG (satellite) and Zenith (cable) set top box objects set LG [db $db open /Component/Type/2/LG] set Zenith [db $db open /Component/Type/3/ZENITH] # Add LG satellite codes to Zenith Cable foreach code [dbobj $LG get Code] { dbobj $Zenith add Code $code } # Add enter key to LG code set ir [db $db open /Component/Ir/TivoFormat/10075] setIr $ir "Enter" $IRCodes(Enter) puts "Added code 10075 to Zenith set top boxes" set done 1 } catch errCode { puts "No LG codes found, will use Zenith 10013 instead." set done 0 } } if {$done == 0} { # We failed to add the LG codes, overwrite existing Zenith entry 10013 RetryTransaction { set ir [db $db open /Component/Ir/TivoFormat/10013] foreach key [array names IRCodes] { setIr $ir $key $IRCodes($key) } puts "Overwrote remote codes for Zenith 10013." puts "Reboot your TiVo for the new codes to take effect." } } dbclose $db