1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

TiVo UI Control via Telnet - No Hacking Required!

Discussion in 'TiVo Underground' started by Omikron, Apr 30, 2008.

  1. Apr 30, 2008 #1 of 692
    Omikron

    Omikron Member

    135
    0
    Feb 27, 2006
    As many of you may have already heard, TiVo added support for Crestron systems back in software version 9.1 but there isn't a whole lot of information available about from TiVo or from Crestron.

    After thinking about it for a small while, my curiosity was piqued, and I decided to try and figure out the protocol Crestron was using to talk to an unhacked TiVo, and how we non-Crestron users could somehow harness it.

    As it turns out both the TiVo HD and Series3 units now listen on port 31339 for connections from a Crestron device. What is really interesting about this discovery is that this service is enabled and accessible by default on a stock Series3 running software 9.1 and up. There is NO HACKING REQUIRED to use this interface.

    The protocol and its commands aren't published, but some heavy digging on Crestron and debugging the tivoapp binary resulted in some interested finds.

    If you telnet into your TiVo on port 31339, you will be presented with the following:

    Code:
    CH_STATUS <CHANNEL> <STATUS>
    This prompt reflects the current status of the TiVo and will tell you the current channel being watched, and if it's being recorded.

    Once the telnet session is started, the following commands are available:


    KEYBOARD - The current purpose and syntax of this command is unknown.

    TELEPORT <PLACE>- I'm not sure why this command exists, because I believe anything that TELEPORT does can also be accomplished via IRCODE. That said, the four currently known places you can "teleport" to are TIVO, LIVETV, GUIDE, and NOWPLAYING.

    SETCH <CHANNEL> - This command will change the channel on the current tuner being watched to the channel number defined. If the current tuner is recording a program, it will change the other tuner. If both tuners are recording, the channel will not change and the TiVo will respond with "CH_FAILED RECORDING "Show Title". Using this command when a recording is being played back will result in "CH_FAILED NO_LIVE".

    FORCECH <CHANNEL> - This command will force the current tuner to the tune the desired channel regardless of what it's doing. If a recording is being recorded it will cancel the recording and change the channel without confirmation.

    IRCODE <COMMAND> - IRCODE seems to mimic the old "sendkey" command in almost every way. While it can't handle multiple commands on one line, almost all of the commands listed in sendkey.tcl are valid and working.


    The following is a list of IRCODE commands that I have verified as working:

    Code:
    UP
    DOWN
    LEFT
    RIGHT
    SELECT
    TIVO
    LIVETV
    THUMBSUP
    THUMBSDOWN
    CHANNELUP
    CHANNELDOWN
    RECORD
    DISPLAY
    DIRECTV
    NUM0
    NUM1
    NUM2
    NUM3
    NUM4
    NUM5
    NUM6
    NUM7
    NUM8
    NUM9
    ENTER
    CLEAR
    PLAY
    PAUSE
    SLOW
    FORWARD
    REVERSE
    STANDBY
    NOWSHOWING
    REPLAY
    ADVANCE
    DELIMITER
    GUIDE
    If take too long to type a command, it will result in COMMAND_TIMEOUT since the interface was designed to receive whole and complete commands, and was not designed to be used manually via telnet.

    That's all I've found for now, but I'll be sure to post updates as they come along.
     
  2. Apr 30, 2008 #2 of 692
    Omikron

    Omikron Member

    135
    0
    Feb 27, 2006
    [reserved Post]
     
  3. May 1, 2008 #3 of 692
    bdraw

    bdraw Member

    465
    4
    Aug 1, 2004
    Tampa, FL
    Wow, nice job!

    Now why they hell didn't I ever think of that?
    I just tried it and it works great, now we just need to figure out how to query information like current channel, current recording etc.
     
  4. May 1, 2008 #4 of 692
    tivoupgrade

    tivoupgrade Sponsor

    2,494
    0
    Sep 27, 2000
    Chicago, IL...
    That is a really interesting discovery. Just played around with it a bit on one of my Series3 and it was simple and straightforward. Would be really interesting to see what additional information emerges and how this could be applied.

    Perhaps a JAVA application to remotely control the TiVo?

    Perhaps a TiVoWebPlus module would give folks in 'hybrid' environments the ability to remotely control unhacked TiVos in their environment?

    Could be fodder for a 'bounty' somewhere down the line?

    Lou
     
  5. May 1, 2008 #5 of 692
    StanSimmons

    StanSimmons Senior Moment Member

    4,717
    0
    Jun 10, 2000
    Flower...
    It works on prom-hacked TiVoHD's too. ;)
     
  6. May 1, 2008 #6 of 692
    Omikron

    Omikron Member

    135
    0
    Feb 27, 2006
    It would appear that the <STATUS> field has 3 states: LOCAL, REMOTE, and RECORDING

    It would appear so far that LOCAL refers to the current tuner being watched, REMOTE refers to the tuner not being watched, and RECORDING means that the current tuner is recording.

    Can someone do some testing and confirm or refute this?
     
  7. May 1, 2008 #7 of 692
    Omikron

    Omikron Member

    135
    0
    Feb 27, 2006
    The current channel is automatically reported back anytime you connect or anytime the channel changes.
     
  8. May 1, 2008 #8 of 692
    StanSimmons

    StanSimmons Senior Moment Member

    4,717
    0
    Jun 10, 2000
    Flower...
    interesting datapoint:

    333 is an invalid channel.
     
  9. May 1, 2008 #9 of 692
    StanSimmons

    StanSimmons Senior Moment Member

    4,717
    0
    Jun 10, 2000
    Flower...
    That looks to be the case:

     
  10. May 1, 2008 #10 of 692
    Omikron

    Omikron Member

    135
    0
    Feb 27, 2006
    I assume your TiVo doesn't have access to channel 333? It works fine on mine.

    That said, here are some other possible responses I pulled from tivoapp:

    Code:
    INVALID_KEY
    INVALID_COMMAND
    MISSING_TELEPORT_NAME
    CH_FAILED
    MISSING_CHANNEL
    MALFORMED_CHANNEL
    LIVETV_READY
    NO_LIVE
    INVALID_CHANNEL
    COMMAND_TIMEOUT
     
  11. May 1, 2008 #11 of 692
    windracer

    windracer joined the 10k club

    11,580
    3
    Jan 3, 2003
    St. Pete, FL
    /subscribe

    Pretty cool stuff! :up: I could really mess with my wife in the other room this way. :D
     
  12. May 1, 2008 #12 of 692
    davezatz

    davezatz Funkadelic

    4,588
    3
    Apr 18, 2002
    Northern...
  13. May 1, 2008 #13 of 692
    StanSimmons

    StanSimmons Senior Moment Member

    4,717
    0
    Jun 10, 2000
    Flower...
    333 is not an active channel on my setup.
     
  14. May 1, 2008 #14 of 692
    Omikron

    Omikron Member

    135
    0
    Feb 27, 2006
    Well then that makes sense. ;-)
     
  15. May 1, 2008 #15 of 692
    WinBear

    WinBear Konner Kringle

    6,476
    0
    Aug 24, 2000
    Carrollton,...
    You could "page" the person watching the TiVo in another part of the house by sending a pause, a thumbs up, and a thumbs down or something like that.
     
  16. May 1, 2008 #16 of 692
    Omikron

    Omikron Member

    135
    0
    Feb 27, 2006
    That...would be incredibly lazy! ;-)

    I imagine in most houses where such a feature would be remotely useful are already big enough where they have an intercom system installed.
     
  17. May 1, 2008 #17 of 692
    PaulS

    PaulS Member

    674
    1
    Sep 16, 2002
    Southern NH
    /subscribe

    Really cool stuff!

    Pumping commands through CURL would probably avoid the problems of having the commands time-out.

    Paired with some guide data, you could completely replace the TiVo's own scheduling functionality with a PC-based version. Redundant, but interesting.
     
  18. May 1, 2008 #18 of 692
    KRKeegan

    KRKeegan Im lost and confused

    215
    0
    Jul 20, 2004
    Los Angeles, CA
    I am very interested in seeing how this develops. I agree with the general sentiment that there is probably some nice functionality that could be built using this, but I can't think of one yet.
     
  19. May 1, 2008 #19 of 692
    Omikron

    Omikron Member

    135
    0
    Feb 27, 2006
    Well, the only functionality I can think of is just TiVo control over TCP/IP which is exactly what it was designed for. The main advantage here is that we are now able to create our own interfaces for it. I imagine it won't be long before someone develops a small iPhone app that mimics TivoWebPlus's WebRemote module.

    Some might also be interested in a Mac OS X Widget or a Windows Vista Gadget that does the same.
     
  20. May 1, 2008 #20 of 692
    enthalpy

    enthalpy Member

    47
    0
    Oct 11, 2006
    NJ
    Nice. This makes so much sense. I can't wait to get home and try it.

    But telnet? Will ssh work? telnet is so out of favor due to lack of security. My Nokia N810 doesn't have telnet built in.
     

Share This Page