Remote controlling Tivo

I was interested in what my ethernet port was doing on my virgin media TIVO box, so I ran some tests and found I could control my TIVO box from my laptop, here are my findings.

First, I went into the Tivo boxes settings on screen and enabled network access.

Next, I logged into my home hub/router to find out what IP address it had been allocated
http://192.168.100.1/ and clicked devices.

Once I had its IP address, (192.168.0.7) I scanned its ports and found the following services:

adrian@adrian-laptop:~$ nmap 192.168.0.7
 
Starting Nmap 5.00 ( http://nmap.org ) at 2012-10-21 10:37 BST
Interesting ports on 192.168.0.7:
Not shown: 997 filtered ports
PORT     STATE SERVICE
443/tcp  open  https
2190/tcp open  unknown
2191/tcp open  unknown
 
Nmap done: 1 IP address (1 host up) scanned in 5.50 seconds

The obvious one that stands out is port 443, so visiting https://192.168.0.7/ shows a web server requesting login, I found that the username is tivo and the password is your media key found in settings > mediakey.

Once logged in, a list of recorded programmes will be displayed but however streaming and downloading are disabled :(.

I tried for sometime to circumvent the streaming restriction using various techniques the closest I came was with VLC and special plugins http://tivo-vlc.sourceforge.net/notes.php#install, but so far I haven’t been able to achieve this.

I looked into what the box is, and it turns out its fundamentally Linux box with a glossy coat, with some features disabled (like streaming something to do with UK copyright laws).

Along the way I found I could telnet to port 31339 on the box

telnet 192.168.0.7 31339

which responded with

CH_STATUS 0213 RECORDING

This is the status of the two tuners, and what they are doing, you can now use commands like:

Code:

KEYBOARD (Dunno what this does)

TELEPORT <PLACE>- e.g TIVO, LIVETV, GUIDE, and NOWPLAYING.

SETCH <CHANNEL> - Change channel. If the current tuner is recording a program, it will change the other tuner. If both tuners are recording, the TiVo will respond with "CH_FAILED RECORDING <Title>. Using this command while Tivo is replaying will give "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.

Also a complete set of IRCODE’s exist

Code:

IRCODE <COMMAND>

a quick google and I found the following IRCODE commands that seem to work.

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

Typing these commands into the telnet session, made the tivo box change channel etc…. cool!

To exit the telnet session press

Code:

CTRL + ]

thats right, control and right square bracket!!, then type quit at the prompt

I was able to source a nice GUI that can automate these commands https://github.com/wmcbrine/tivoremote

So, as long as you have Python installed (Mac & linux users by default), just running the script produces a nice GUI that can manage your Tivo box from your laptop.

I also found, if your interested in developing apps for it, its SDK is written for AS3 and can be found here http://developer.tivo.com/

VN:D [1.9.9_1125]
Rating: 8.1/10 (9 votes cast)
VN:D [1.9.9_1125]
Rating: +3 (from 5 votes)
Remote controlling Tivo, 8.1 out of 10 based on 9 ratings

35,596 views

This entry was posted on Sunday, October 21st, 2012 at 10:54 am and is filed under Bash. You can follow any responses to this entry through the RSS 2.0 feed.

4 Responses to “Remote controlling Tivo”

  1. Adrian Byrne says:

    You’re a star
    I am thinking of hooking up Amazon Echo to this. Do you know where there might be some code for that?

    Adrian

    VA:F [1.9.9_1125]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.9_1125]
    Rating: 0 (from 0 votes)
  2. Gary Wilson says:

    is this https://www.tivo.com/assets/images/abouttivo/resources/downloads/brochures/TiVo_TCP_Network_Remote_Control_Protocol.pdf
    any good to you for the commands?

    VA:F [1.9.9_1125]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.9_1125]
    Rating: 0 (from 0 votes)
  3. Justin Glover says:

    This is awesome i just wish there was a command for My Shows!

    VA:F [1.9.9_1125]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.9_1125]
    Rating: 0 (from 0 votes)
    • Antony Gerrish says:

      For the “My Shows” function I used “TELEPORT NOWPLAYING”

      VA:F [1.9.9_1125]
      Rating: 0.0/5 (0 votes cast)
      VA:F [1.9.9_1125]
      Rating: 0 (from 0 votes)

Leave a Reply