PDA

View Full Version : Setting the Remote programmatically



cojonesdetoro
08-26-2004, 02:32 PM
I'm interested in writing a script that would "force feed" the remote control code the Tivo is supposed to use. I've been looking in the MFS hierchy as accessible throught Tivoweb but I can't make heads or tails of where this is done. I've looked in /Compnent and there is lots of interesting stuff but I can't find what changes when I change a Tivo's remote code. This looks more like stuff for the IRblaster.

Has anyone done any research in this regard? What are some good techniques for taking a "before and after" snapshot of the MFS hierarchy so I can find where this is set?

I remember a script somewhere that allowed you to use a Sony remote with a Philips unit. That might be useful. I intend to track that down but was hoping for some quick pointers in the meantime.

Thanks.

alldeadhomiez
08-26-2004, 03:35 PM
http://www.dealdatabase.com/forum/showthread.php?t=31887

Lots of persistent user/system settings live under /State. Like in /State/GeneralConfig.RemoteAddress. I guess you could dump selected parts of MFS to take a snapshot using something like dumpobj-tcl.tcl.

There might be an event you can send to make the change take effect immediately (without a reboot) but I'm not sure what it is.

cojonesdetoro
08-26-2004, 03:50 PM
That looks like what I needed. Thanks. The "remote address" corresponds to the remote codes I have set in my three S1/30 units.

Now I'll just have to crack open Jeff Keegan's book and write the script. Should be pretty simple...

cojonesdetoro
08-26-2004, 10:42 PM
Well, as ADH postulated, it works if you run the script below (only tested on SA1/3.0, YMMV) and then reboot. Does anyone know of a way to trigger an event that will read the remote code? A brute force way would be to use sendkey to bring up the "info" screen but that's probablematic at best.

BTW, this is alpha code so use at your own risk.



#!/tvbin/tivosh
set newaddress $argv

proc usage {} {
puts ""
puts "Usage: remotecode CODE"
puts " Changes remote code. Where CODE is 0 to 9"
puts ""
puts "Pre-Alpha Code: Use at your own risk!"
puts ""
exit
}


if { $newaddress == "" } {
usage
}

if [ catch { set newaddress [expr { int($newaddress) }] } ] {
puts "bad argument"
usage
} elseif [ expr $newaddress > 9 ] {
puts "bad argument"
usage
} elseif [ expr $newaddress < 0 ] {
puts "bad argument"
usage
}


set db [dbopen]
RetryTransaction {
set x [db $db open /State/GeneralConfig ]
set RemoteAddress [dbobj $x get RemoteAddress]
puts stdout "Current Remote Adress $RemoteAddress"
if { $newaddress == $RemoteAddress } {
puts "Code already set to $newaddress NOTHING CHANGED"
} else {
puts "Setting Code to $newaddress"
catch {dbobj $x set RemoteAddress $newaddress}
}

}

Cat Jesus
09-07-2004, 10:07 PM
thanks cojonesdetoro for doing this, it will work great. Do you or anyone else know how to turn off the "feature" of the Tivo that prevents it from changing the channel with an IR Blaster if it detects IR signals? I have my cable box in an isolated aread away from the Tivo where there can be no IR interference so this feature is keeping me from changing channels due to some additional IR signals coming from my IR receiver.

cojonesdetoro
09-15-2004, 12:19 PM
thanks cojonesdetoro for doing this, it will work great. Do you or anyone else know how to turn off the "feature" of the Tivo that prevents it from changing the channel with an IR Blaster if it detects IR signals? I have my cable box in an isolated aread away from the Tivo where there can be no IR interference so this feature is keeping me from changing channels due to some additional IR signals coming from my IR receiver.

Thjis would require a hack to tivoapp. It would not be easy. Only a few truly uber tivo hackers know enough to do this.