Follow my TiVo on Twitter

The other night my friend Bob mentioned somebody had set up a Twitter account for their TiVo. After thinking about it for a second I said something like “that’s almost trivial”.

Naturally I had to see if it really was trivial, which in fact it turned out to be. @mrbalkytivo is busier than I am.

Put tweetTivo.php someplace to be called by cron.

class_tivo_xml.php is not written by me and is required. Google it up. Figuring out how to get the XML info from the TiVo is left as an exercise for the reader.

The script will tweet about any new recording that starts, including TiVo suggestions, which are not always reflective of my taste, but then again, neither are many of MrsBalky’s choices. I thought about enhancing the script to skip suggestions, but grew bored and drifted away.

Tags: ,

3 Responses to “Follow my TiVo on Twitter”

  1. Michael says:

    Any chance you’d be willing to describe the process in more detail? I’d love to get this working with my Tivo. Thanks!

  2. mrbalky says:

    Hi Michael,

    There are many ways to set this up. In my case, I have a server on my home network that polls my TiVos for the now playing list every 1/2 hour (since that’s when programs tend to start).

    I am using a Linux server that is always on so updates can always happen. The update is scheduled through cron.

    The server runs a shell script to fetch the now playing list with a command like this:
    curl --anyauth --insecure --user tivo:**TiVo MAK** --output tivo_nowplaying.xml "https://**TiVo IP address**/TiVoConnect?Command=QueryContainer&Container=%2FNowPlaying&Recurse=Yes&ItemCount=50"

    Replace **TiVo MAK** and **TiVo IP address** with the values for your tivo. Both of these should be available through the TiVo menus, but I don’t remember exactly where. You should be able to find out from the TiVo support site or The Google; just search “tivo mak” and “tivo ip address”.

    The shell script then runs:
    php tweettivo.php tivotwitterid tivotwitterpw
    TweetTivo is here: http://www.mrbalky.com/wp-content/uploads/tweettivophp.txt

    You will need the curl application (or maybe wget) to poll your TiVo. PHP is required to run the actual code. You will also need class_tivo_xml.php to parse the specific TiVo XML, which I found over on the tivo community site long long ago: http://archive2.tivocommunity.com/tivo-vb/printthread.php?t=218365&pp=50

    It is definitely possible to do schedule this on a windows machine. Binaries for curl and php are available, and scheduling would be done via the scheduled tasks section of control panel.

    It’s also worth noting that this is an incredibly quick and dirty application, with barely any testing. It grew out of the script I was already using for the “now playing” page on this site, so it really could all be wrapped up into the same php script. If you know how to use curl from within php, it’d probably be better to skip the exec.

    Sorry; that probably doesn’t help much. I just threw this together in a few minutes and I’m afraid I don’t have much time for this script anymore.

  3. Michael says:

    It does point me in the right direction. Thanks!

Leave a Reply