View Full Version : re-enable webremote with sendkeyplus
mrpenguin
09-22-2007, 01:33 PM
Here's what I did to re-enable webremote in TWP, it is not the prettiest way, but works:
- Install RouterPlus (http://www.pvrhax0r.com/forum/showthread.php?threadid=51)
- copy SendKeyPlus (http://www.dealdatabase.com/forum/showthread.php?p=287921) to your tivo. I put it in the TWP bin_mips dir
edit TWP libs/sendkey.itcl
change
if {$::version>4} continue
to
if {$::version>4} {
proc SendKey { key } {
exec <location of TWP>/bin_mips/sendkeyplus $key
}
} else { and add } just before the SendKeyAndWait proc
Then remove the line if {$::version > 4} {continue} from the TWP modules/webremote.itcl file
restart TWP and it should work
steve90071
09-22-2007, 03:49 PM
Thanks for the explanation. I made the modifications as described. TWP booted properly and the web remote appeared. However, when I used the remote it did not work. As an example, when I pushed the mute button, I got the following:
INTERNAL SERVER ERROR
--cut here--
action_sendkey '/mute' ''
couldn't execute "/devbin/sendkey": no such file or directory
while executing
"exec $env(TIVO_ROOT)/devbin/sendkey -wait -waitTimeOut 2500 $evrc($key)"
(procedure "SendKey" line 8)
invoked from within
"SendKey $key"
(procedure "MOD::action_sendkey" line 25)
invoked from within
"$cmd $p1 $p2 $p3"
(procedure "do_action" line 19)
invoked from within
"do_action $action $chan $part $env 1"
--cut here--
The one edit I made to TWP libs/sendkey.itcl that I wasn't certain of was the instruction to add "}" just before the SendKeyAndWait proc. I added a line with "}" just above the line that reads "proc SendKeyAndWait { key } {".
Any suggestions?
mrpenguin
09-24-2007, 12:13 AM
couldn't execute "/devbin/sendkey": no such file or directory
while executing
"exec $env(TIVO_ROOT)/devbin/sendkey -wait -waitTimeOut 2500 $evrc($key)"
That is the problem. where you have your exec $env(tivo_root)/devbin/sendkey. Did you put sendkey in /devbin/sendkey? if you want, hardcode the dir. like "/twp/bin_mips/sendkey" you are right there, just need to get the sendkey cmd properly done.
as for the } yes, just before the proc. I was not sure if it would work, pretty cool of tcl to allow for proc creation in a if. basically, you are telling TWP to use the new sendkey if the ver is proper, or just do as it did before for sendkey.
steve90071
09-24-2007, 11:51 AM
mrpenguin:
I'm confused. I do not have a file named "sendkey". I do have "sendkeyplus" and I moved it to /hack/TivoWebPlus/bin_mips per your earlier instructions.
Should I go to /tvlib/tcl/tv/sendkey.tcl and change the references: "exec $env(TIVO_ROOT)/devbin/sendkey..." to "exec $env (TIVO_ROOT)/hack/TivoWebPlus/bin_mips/sendkeyplus..." ?
ScanMan
09-24-2007, 01:35 PM
mrpenguin:
I'm confused. I do not have a file named "sendkey". I do have "sendkeyplus" and I moved it to /hack/TivoWebPlus/bin_mips per your earlier instructions.
Should I go to /tvlib/tcl/tv/sendkey.tcl and change the references: "exec $env(TIVO_ROOT)/devbin/sendkey..." to "exec $env (TIVO_ROOT)/hack/TivoWebPlus/bin_mips/sendkeyplus..." ?
Where is your TivoWebPlus??? That is the question. Is it in /hack/TivoWebPlus as it appears in your post?
Then the code above should look like:
if {$::version>4} {
proc SendKey { key } {
exec /hack/TivoWebPlus/bin_mips/sendkeyplus $key
}
} else {And your sendkeyplus should be in:
/hack/TivoWebPlus/bin_mips/sendkeyplus
You need to match the path to the location of sendkeyplus.
mrpenguin
09-24-2007, 04:27 PM
"exec $env (TIVO_ROOT)/hack/TivoWebPlus/bin_mips/sendkeyplus" ?
Yes. FYI - it does not hurt the tivo when you try something and it does not work. Have faith in yourself and try your ideas. This time you would have found you were correct.
good luck
steve90071
09-25-2007, 08:44 PM
I have been successful in establishing the webremote and I no longer get the "no such file or directory" message when I activate a key on the remote. However, I now get the following message when I activate a key:
INTERNAL SERVER ERROR
--cut here--
action_sendkey '/tivo' ''
Unknown key: 2500
child process exited abnormally
while executing
"exec $env(TIVO_ROOT)/hack/TivoWebPlus/bin_mips/sendkeyplus -wait -waitTimeOut 2500 $evrc($key)"
(procedure "SendKey" line 8)
invoked from within
"SendKey $key"
(procedure "MOD::action_sendkey" line 25)
invoked from within
"$cmd $p1 $p2 $p3"
(procedure "do_action" line 19)
invoked from within
"do_action $action $chan $part $env 1"
--cut here--
I guess it doesn't understand key 2500. Unfortunately, neither do I. I'm guessing the 2500 is a millisecond delay command that sendkeyplus does not recognize but, if so, I don't know what to do about it. Any suggestions?
mrpenguin
09-25-2007, 11:25 PM
not sure, do other keys work? tivo key works on a 540
jsmmd
09-26-2007, 12:10 AM
I hate to be the one to ask this, but did you make an updated routerplus.o or did you use of the the existing files supplies by all alldeadhomiez.
I'm leary of blowing up my DTV S2 again. I'm running 6.2-01-2-321
mrpenguin
09-26-2007, 01:42 AM
Pretty sure it was straight out of the zip. I did make other apps (run independent) and changed around the sniffer app, but the router.o stayed the same. Did you rename the original router.o to router.old and copy the routerplus to router.o?
Honestly, if you are leary of blowing up a tivo, again, you should not play like this. Webremote is not really a needed thing for a tivo you cannot afford to mess up and rebuild if something is really hosed.
jsmmd
09-26-2007, 02:23 AM
I followed the directions, but there's a good chance I used the wrong file. Don't have a time machine to be sure....
I NEED webremote. I have a video out in my homeoffice from my DTiVo in the family room. It would be handy to use webremote vs. getting up every 15 mins when a show stinks....
Since stoploop is installed, I guess I'll try it again...
Pretty sure it was straight out of the zip. I did make other apps (run independent) and changed around the sniffer app, but the router.o stayed the same. Did you rename the original router.o to router.old and copy the routerplus to router.o?
Honestly, if you are leary of blowing up a tivo, again, you should not play like this. Webremote is not really a needed thing for a tivo you cannot afford to mess up and rebuild if something is really hosed.
steve90071
09-26-2007, 03:07 AM
mrpenguin:
I'm running 6.3e on a hr10-250 using twp v.070925. I can use sendkeyplus as a standalone program, ie "bash sendkeyplus -v TIVO" and it works. But, using the webremote it produces the error:
INTERNAL SERVER ERROR
--cut here--
action_sendkey '/tivo' ''
Unknown key: 2500
child process exited abnormally
while executing
"exec $env(TIVO_ROOT)/hack/TivoWebPlus/bin_mips/sendkeyplus -wait -waitTimeOut 2500 $evrc($key)"
(procedure "SendKey" line 8)
invoked from within
"SendKey $key"
(procedure "MOD::action_sendkey" line 25)
invoked from within
"$cmd $p1 $p2 $p3"
(procedure "do_action" line 19)
invoked from within
"do_action $action $chan $part $env 1"
--cut here--
Strange!!!
mrpenguin
09-26-2007, 10:39 AM
steve90071 why do you have the other parameters in the cmd? the 2500 lost key = your wait timeout value I bet. look at the CMD I had, simple sendkey $key. no other parameters. try that.
jsmmd, sorry, but no real clue on what is up. First guess is routerplus is not installed properly (replacing router.o with new ver and REBOOTING). Have you looked into a remote extender, or an RF remote, like the all-in-one 9910 or so, they work great.
Since it seems both of you have DTivo units and I have standalone, maybe a post on the SendKeyPlus thread about these issues, as it is still beta.
jsmmd
09-26-2007, 10:45 AM
thanks, I moved the posting back there. routerplus was installed right. backup old, copy new, reboot.
steve90071
09-26-2007, 09:47 PM
mrpenguin: Thanks for you help. But still no cigar! By eliminating the 2500 reference and just using ($key) I avoid the error message, but the remote commands have no effect on my tivo. I think the problem rests with sendkey.tcl which resides in /tvlib/tcl/tv on my tivo. When I activate a button on the remote the command apparently goes to sendkey.tcl and never gets to sendkeyplus. In your setup, is there a sendkey.tcl file and, if so, does it then transfer commands to the sendkeyplus file you have in (twp)/bin_mips?
jsmmd
09-27-2007, 01:01 AM
Maybe I can help...
steve90071,
I was in the same boat as you. I created /devbin and copied sendkeyplus as sendkey in that folder. All was well. no more error messages.
jsmmd
10-02-2007, 11:12 PM
Strange behavior between .8 beta and .9 beta with Webremote.
.8 beta works great except for the known issues
.9 beta is throwing errors for buttons. below is the guide button. Only variance is the sofware versions.
Thoughts?
INTERNAL SERVER ERROR
--cut here--
action_sendkey '/guide' ''
Usage: sendkeyplus [options] [...]
Send one or more keypress events to TiVo software v6.1 and higher.
sendkeyplus requires alldeadhomiez' routerplus kernel module,
see http://www.pvrhax0r.com/forum/showthread.php?threadid=51
Options:
-l List all possible keypress events
-w Wait for acknowledgment after sending each event
-r Treat arguments as raw event numbers instead of names
-v Verbose mode
Advanced Options:
-p Pause milliseconds after sending each event
Note: The keypress event names are case-insensitive
NUM0 through NUM9 can be written as 0 through 9
The default pause (unless specified) is 1000
sendkeyplus v0.9 beta
Copyright (c) 2007, tivo4mevo
All Rights Reserved.
Permission to use and distribute this software for non-commercial use
is hereby granted, provided that both the copyright notice and this
permission notice appear in all copies of the software, derivative works
or modified versions and any portions thereof, and that both notices appear
in supporting documentation.
See http://dealdatabase.com/forum/showthread.php?p=287662 for more information.
/devbin/sendkey: invalid option -- a
while executing
"exec $env(TIVO_ROOT)/devbin/sendkey -wait $evrc($key)"
(procedure "SendKey" line 8)
invoked from within
"SendKey $key"
("foreach" body line 8)
invoked from within
"foreach key $cmds {
set index [lsearch "thumbsdn volup voldown chanup chandn slow advance" $key]
if {$index >= 0} {
set key [lindex "thumbsdown volume..."
(procedure "MOD::action_sendkey" line 18)
invoked from within
"$cmd $p1 $p2 $p3"
(procedure "do_action" line 19)
invoked from within
"do_action $action $chan $part $env 1"
--cut here--
mrpenguin
10-03-2007, 01:10 AM
try sending the cmd outside of twp, see what is done. if it bombs outside twp, go from there. Honestly, if it worked on an old ver, and bombs on the new,something with the app messed up I'd think
jsmmd
10-03-2007, 01:20 AM
try sending the cmd outside of twp, see what is done. if it bombs outside twp, go from there. Honestly, if it worked on an old ver, and bombs on the new,something with the app messed up I'd think
all the commands work great from bash prompt
tivo4mevo
10-03-2007, 09:48 AM
In v0.8 beta, the wait option took an argument, but in v0.9 beta, it does not. It never really handled the long form "-wait", but just incorrectly interpreted "ait" as an argument to the "-w" option.
Thus, I think you want to change this line
"exec $env(TIVO_ROOT)/devbin/sendkey -wait $evrc($key)" to this "exec $env(TIVO_ROOT)/devbin/sendkey -w $evrc($key)"
or perhaps even removing the wait option entirely, as webremote seems to only send one key at a time, so blocking on acknowledgment probably creates complications rather than doing good?"exec $env(TIVO_ROOT)/devbin/sendkey $evrc($key)"
I also needed to replace all instances of "surfup" and "surfdown" in webremote.itcl with "channelup" and "channeldown". There were three occurrences of each.
***EDIT*** First diff was backwards; corrected one attached
Here's a diff which rolls a few updates into webremote.itcl. It fixes the channel, exit and windows keys as well as removing the line that used to block it from working on versions > 4.0.
You'll also have to add the following lines to tvlib/tcl/tv/sendkey.tcl:
set evrc(exit) EXIT
set evrc(window) WINDOW
just put them at the bottom, below AOLTV. While you're editing the file, don't forget to update the line:
exec $env(TIVO_ROOT)/devbin/sendkey -wait $evrc($key)
Substitute the current location for sendkeyplus, and optionally remove the -wait flag.
steve90071
10-04-2007, 07:15 PM
Thanks to all who have done the heavy lifting - I am now able to control my dtivo (hr10-250 running 6.3e and twp v071004) from tivowebplus!!!
In my case, there were three places where I had to modify:
exec $env(TIVO_ROOT)/devbin/sendkey -wait $evrc($key)
in /tvlib/tcl/tv/sendkey.tcl. They originally read:
exec $env(TIVO_ROOT)/devbin/sendkey -wait -waitTimeOut 2500 $evrc($key).
lgkahn
10-11-2007, 04:23 PM
any idea using the new routerplus what the syntax would be to wait on a keypress now.. so that other code that looks for certain keypresses can be reenabled thanks
SteveT
01-11-2008, 08:09 PM
I'm looking at adding support for this to TivoWebPlus 2.1. To those who've modified their copy of TWP to support it, how is it working? Any issues?
After I made the modifications described in post #22 it worked perfectly on my Series 2. Some of the jpeg coordinates were wrong on the original, and a few keys had wrong names. I can't send the Window key to toggle closed-captions, but I would assume that's because tivovbi is taking precedence.
I'm looking at adding support for this to TivoWebPlus 2.1. To those who've modified their copy of TWP to support it, how is it working? Any issues?
SteveT
01-12-2008, 07:32 PM
OK, I've changed TivoWebPlus 2.1b3 to check for /devbin/sendkey. If found, it sets on a flag which is now used throughout TWP to allow sendkey functions.
To use with versions later than 3.x, you need to:
1) install routerplus.o (per those instructions)
2) download the latest sendkeyplus (v1.0 from 10/20/2007)
3) rename sendkeyplus to sendkey, create a folder called /devbin, and copy the sendkey binary into this folder.
This allows Tivo's existing sendkey.tcl to work without changes, and should keep older versions working as now (not tested).
I also added djl's fixes from post 22 to webremote.
The changes have been placed into cvs and should be available in the next package release.
Thanks to all who contributed to making this available and testing it. Please let me know of any problems.
unclemoosh
02-17-2008, 07:37 PM
3) rename sendkeyplus to sendkey, create a folder called /devbin, and copy the sendkey binary into this folder.
Should the /devbin directory be created in the root or in TivoWebPlus directory? I'm really having fits trying to get this working.
Thanks.
SteveT
02-17-2008, 09:20 PM
Should the /devbin directory be created in the root or in TivoWebPlus directory? I'm really having fits trying to get this working.
Thanks.in the root. Make sure the name is sendkey and it is executable.
Test by running "/devbin/sendkey tivo" at the command line, and check the output text for errors. Don't forget that sendkeyplus requires routerplus be installed at 6.x.
unclemoosh
02-17-2008, 09:44 PM
Test by running "/devbin/sendkey tivo" at the command line, and check the output text for errors. Don't forget that sendkeyplus requires routerplus be installed at 6.x.
I get:
Unknown key: tivo/
:confused:
EDIT: Nevermind. I rebooted and all seems well. Thanks.
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.