Help with Tivo Telnet Plugin

Hi folks,

I am pretty new to Vera. I have made some progress creating my own IR plugins by modifying existing xml files, but now I am stuff trying to control my Tivo over Ethernet using telnet. Anyone want to help me get started with that? Are there any basic plugins that control something over telnet that I can start from?

Thanks!

You might want to see the previous comments in this thread:
http://forum.micasaverde.com/index.php/topic,3437.0.html

also, for the Tivo, use something like the DirecTV plugin source from code.mios.com as a starting point, with the tweaks to make it “CRLF” instead of “RAW”
http://code.mios.com/trac/mios_directv-media-control

I know this thread is a few months old, but I started a TiVo telnet plugin.

I have it working, and it can handle the following remote buttons:

  • TiVo
  • LiveTV
  • Play
  • Pause
  • Slow
  • Fast Forward
  • Rewind
  • Directional (up/down/left/right)
  • Select
  • Thumbs Up
  • Thumbs Down
  • Numbers (0-9)

I still need to add:

  • Advance/Skip to tick
  • Replay
  • Record
  • Clear
  • Enter/Last
  • Zoom
  • Guide
    and a few others

Since there is no “close” for the socket, and TiVo seems to only allow one connection, there is a limitation that only one device can connect.

I might have to use something like the Denon proxy to allow multiple devices to connect.

@PurdueGuy,
If you wanted to let multiple things “talk” to the same TiVo, you could cutover to using the builtin LuaSocket library directly, instead of using the built-in TCP connection management.

http://w3.impa.br/~diego/software/luasocket/tcp.html

Then you can open/close at will…

You’d want to guard the connection logic (maybe use a [tt]pcall()[/tt] block), so you close out the sockets in all the cases, as well as use [tt]settimeout()[/tt] to some realistic value. Other than that, it should be a simple thing to cutover to if you wanted to avoid the middle-proxy.

@PurdueGuy,
Where can I find your Tivo telnet plugin? I would like to use it as a base for another telnet controlled device . . . Thanks for sharing!

I haven’t uploaded it yet, since I haven’t had time to clean it up and redo the socket connections. I’ll see if I can work on that this weekend.

Ok, I cut over to the LUA socket library. This is NOT complete, but it does work for TiVos. I may or may not make more mods this weekend, but I wanted to include them for now.

I based this on the DirecTV plugin I found, but modified the namespaces to (hopefully) avoid conflicts. My apologies to the original authors for butchering it!

The “meat” is in I_Tivo1.xml, in the “sendCommand” function.

This is FAR from perfect, but so far, does what I need. I do plan to add a few more buttons, but I don’t have a use for them yet.

@PurdueGuy, Thanks for sharing!
It will take a while before I have figured it all out, but I’ll start working on it.

Thanks for the code, I am using it as a template for supporting my IP set-top box as well. Did you develop the JSON file by hand or did you use a tool to generate it? I’d like to add/change some buttons …

[quote=“capjay, post:9, topic:169940”]Thanks for the code, I am using it as a template for supporting my IP set-top box as well. Did you develop the JSON file by hand or did you use a tool to generate it? I’d like to add/change some buttons …[/quote]I did it by hand. I was only going to do a few buttons, then I kept going!

@PurdueGuy nice work…works well with the Tivo Series 3’s

Very cool to see this plugin come to fruition, I imagine there will be more than a few users of it!

You might want to add a [tt]pcall()[/tt] block, to ensure that things gets closed out if [tt]tivoSocket:send(…)[/tt] fails for any reason.

I found this out the hard way when I was doing something a while back 8)

@PurdueGuy: Thanks a bunch! Works great on my Tivo Series 3.
(I tried to do this myself a while back and failed. Studying your code to see what I did wrong…)

Not to sound like a moron, BUT I have TIVO and a Vera3. WHY would I want to link them up? What is it I could do?

I have my “Watch TiVo” scene which turns on the TV, A/V receiver, then sets the TiVo to the “Now Playing” list, without the preview window. Then I don’t risk seeing the end of shows, sports scores, Olympic outcomes, etc.

Also, my “bedtime” scene will pause TiVo and exit to live TV. I do that b/c older versions of software wouldn’t remember a paused position if you don’t exit out of the program. If the pause point isn’t marked, you can’t transfer from the paused point, and have to transfer from the beginning, and wait to catch up to where you left off.

And I’m a gadget geek, and like having everything linked. ;D

basically, the more appliances you link up, the more stuff you can do in scenes, the more your house appears to become intelligent (and automated) ;D

Hi All,

Real new to this and getting my setup started. How do I actually install these plugins? I have a Vera Lite and a few switches right now but I’m quickly expanding my network.

Thanks,
Michael

[quote=“PurdueGuy, post:7, topic:169940”]Ok, I cut over to the LUA socket library. This is NOT complete, but it does work for TiVos. I may or may not make more mods this weekend, but I wanted to include them for now.

I based this on the DirecTV plugin I found, but modified the namespaces to (hopefully) avoid conflicts. My apologies to the original authors for butchering it!

The “meat” is in I_Tivo1.xml, in the “sendCommand” function.

This is FAR from perfect, but so far, does what I need. I do plan to add a few more buttons, but I don’t have a use for them yet.[/quote]

You need to download the four files located in this post http://forum.micasaverde.com/index.php/topic,8835.msg72335.html#msg72335 to your computer.

You then upload the four file to your Vera from you menu APPS > Develop Apps > Luup Files. On the right side of the screen you choose the files, one per line and on the bottom click the check box and click upload. On the top of that panel you should see a message upload successful or words to that effect.

You now need to go to the Create Device menu and follow the instructions in that post by typing in a name and Upnp Device Filename entries etc.

OK - I’ve created the device (I think) but I’m confused as how to access it. It shows up in the list of devices and I can go in and edit the properties - but how do I actually use it?

Thanks again!

What worked for me was to set the IP for the Tivo under the device properties “ip” field. Then create a new scene, select the advanced tab, pick a device - the TiVo, and from the drop-down list select a command.