View Full Version : Self-hosting HME
wmcbrine
02-23-2008, 02:13 AM
Just an idea; I don't have a hacked TiVo currently running, so I haven't tried it.
Take:
1. Hacked TiVo
2. Python for TiVo (http://marc-abramowitz.com/archives/2005/01/23/python-for-tivo-series-2/)
3. HME for Python (http://www.tivocommunity.com/tivo-vb/showthread.php?t=382883)
:D
kdmorse
02-23-2008, 02:31 AM
Silly as it is - I can immediately think of one practical use for such a thing - a WakeOnLan application.
The problem with waking your PC from your Tivo, is that your PC has to be on for the HMA app to run that would send the magic packet to wake up your PC.
But if the HME app were running on the tivo, it could generate the packet itself, and wake the PC.
This idea amuses me... but if I were to do it, I'd probably do it in native C. It'd be a pain, but it's important to keep the memory footprint small.
-Ken
Tivo_Terry
10-16-2008, 10:54 PM
Silly as it is - I can immediately think of one practical use for such a thing - a WakeOnLan application.
....
This idea amuses me... but if I were to do it, I'd probably do it in native C. It'd be a pain, but it's important to keep the memory footprint small.
-Ken
I found wakeonlan TCL scripts (meant for generic Linux), but they require UDP. Would it be possible to compile UDP support into Tivo (tcludp project on SourceForge), then run wakeonlan.TCL ?
Anywho, here is the code from one of the scripts. Maybe the code steps will be inspiration as a starting point for your C program:
========
package require udp
proc WakeOnLan {broadcastAddr macAddr} {
set net [binary format H* [join [split $macAddr -:] ""]]
set pkt [binary format c* {0xff 0xff 0xff 0xff 0xff 0xff}]
for {set i 0} {$i < 16} {incr i} {
append pkt $net
}
# Open UDP and Send the Magic Paket.
set udpSock [udp_open];
udp_conf $udpSock $broadcastAddr 4580;
fconfigure $udpSock -translation binary;
puts $udpSock $pkt
flush $udpSock;
close $udpSock
}
scotttc
06-18-2010, 03:35 AM
Any updates? I'm very interested because my router which supported broadcasting WOL packets died. Best case would be to get whatever is on the LAN and on 24x7 receive and broadcast the UDP packet. Ah, the tivo! I too began to write a tcl script to broadcast the packet but found the udp library missing before I started on the inf loop and listening code. I wasn't able to run any of it so I'm not sure if any of it is any good.
#!/tvbin/tivosh
package require udp
set port [lindex $argv 0]
set ip [lindex $argv 1]
set mac [lindex $argv 2]
set sock [udp_open]
udp_conf $sock $ip $port
fconfigure $sock -buffering none -translation binary
set bstr [binary format H3H* ffffff]
puts -nonewline $sock $bstr
set bstr [binary format H3H* $mac]
for { set i 0 } { $i < 16 } { incr i } {
puts -nonewline $sock $bstr
}
flush $sock
close $sock
djl25
07-15-2010, 09:12 PM
I just ran across this thread, but thought I'd let you know that some of this stuff was discussed over at the 'other' forum some time ago. I wrote a set of tcl scripts for hacked tivos called trickeyplus addons that do things like download news and weather forecasts, show caller-id info, and read logs. In conjuction with Trickeyplus, you can trigger them from your remote, and all of the scripts run on the Tivo itself. It's at:
http://deal data base .com/forum/showthread.php?t=60474
As far as WOL, you can get a copy of wakelan for mips tivos that works well with the trickeyplus scripts, or just from the command line. It's at
http://www.deal data base .com/forum/showpost.php?p=290813&postcount=8
vBulletin® v3.6.8, Copyright ©2000-2013, Jelsoft Enterprises Ltd.