Author Topic: TCP Plugin and Tivos  (Read 9766 times)

0 Members and 2 Guests are viewing this topic.

garryjw

  • $upporter
  • Contributor
  • *****
  • Posts: 59
  • Karma: 5
    • View Profile
Re: TCP Plugin and Tivos
« Reply #15 on: March 22, 2014, 01:27:50 PM »
Good spot. I was playing around with the advanced tivo control that needs base64 encoding but i stripped it out to keep it simple but missed the include.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: TCP Plugin and Tivos
« Reply #16 on: March 22, 2014, 01:36:30 PM »
Good to know, thanks. I thought I was missing something there.  :bonk
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

garryjw

  • $upporter
  • Contributor
  • *****
  • Posts: 59
  • Karma: 5
    • View Profile
Re: TCP Plugin and Tivos
« Reply #17 on: March 22, 2014, 01:38:57 PM »
I've been testing and comparing with Jason's script and it looks like I will need to update PayloadXML with some slightly different commands for some of the more esoteric TiVo commands but other than that working well. Ill post the revised payload file when I get it done.

garryjw

  • $upporter
  • Contributor
  • *****
  • Posts: 59
  • Karma: 5
    • View Profile
Re: TCP Plugin and Tivos
« Reply #18 on: March 23, 2014, 07:03:11 AM »
Revised payload file attached. It doesn't include any channel changing as I think that will be specific to each user and Jason's approach is probably better for that.

JasonFox

  • $upporter
  • Jr. Member
  • *****
  • Posts: 27
  • Karma: 4
    • View Profile
Re: TCP Plugin and Tivos
« Reply #19 on: March 30, 2014, 07:48:18 PM »
Finally got a chance to play with this a little today and have run into a few questions/snags. Apologies in advance if any of them have obvious answers.   ;)

First I'm confused about what the 'onload' command does. My thought was that it loaded the python program so that the 'Py.ExecString' commands work. Does it need to run once so those commands can be called (showing my programming ignorance here)? But it appears to be triggered by the event 'onload' which I never see happen. Was it supposed to be trigged by VC.Loaded?

Second have you had any trouble using commands back to back? I tried a few commands (IRCODE LIVETV, TELEPORT NOWPLAYING) and had to wait quite a bit between commands for it work. Using IRCODE LIVETV to switch quickly between tuners would not work. If I understand the python (based on nearly zero programming knowledge) it opens and closes the connection for each command right? I like that better than what mine does but maybe it's the reason for being unable to issue back to back commands? Otherwise I'm wondering if this true for you as well or specific to my Tivo (Roamio).




garryjw

  • $upporter
  • Contributor
  • *****
  • Posts: 59
  • Karma: 5
    • View Profile
Re: TCP Plugin and Tivos
« Reply #20 on: March 30, 2014, 08:11:05 PM »
Hi Jason

Onload does need to run once. Sorry I have a centralised start-up script that is triggered by VC.Loaded which triggers the onload event. You could indeed change this to VC.Loaded.

I've not had any problems with back to back commands. You are correct that I open and close the connection for each command and it is possible this is causing what you are seeing. My Virgin Media TiVo is pretty responsive to commands sent over the network and this doesn't seem to cause me any issues. (I think the closest equivalent to my box you have there is the TiVo Premier) 

Cheers
Garry

JasonFox

  • $upporter
  • Jr. Member
  • *****
  • Posts: 27
  • Karma: 4
    • View Profile
Re: TCP Plugin and Tivos
« Reply #21 on: March 30, 2014, 08:22:52 PM »
I think I need to experiment a bit more. I'm having very mixed results. Send command 5 times in 10 seconds only the first works, send command twice 15 seconds apart and neither works. Doing the same with my old command set works perfectly. It must be something on my end. I'll keep digging.  :)

garryjw

  • $upporter
  • Contributor
  • *****
  • Posts: 59
  • Karma: 5
    • View Profile
Re: TCP Plugin and Tivos
« Reply #22 on: March 31, 2014, 07:50:05 PM »
Hi Jason

Been doing some digging and I think this may be something specific with the  LiveTV command. It looks like there is a response sent by the server after this command is sent of LIVETV_READY and from what I can see no other TV control commands can be sent until that message has been sent and processed. Obviously my code is not looking for any response.


vulcanjedi

  • $upporter
  • Sr. Member
  • *****
  • Posts: 213
  • Karma: 8
    • View Profile
Re: TCP Plugin and Tivos
« Reply #23 on: April 22, 2014, 12:05:39 AM »
Hi guys, my housemate has a networked Tivo. I tried to grab all the XMLs and just get a Guide command to work.
Would love to get this to work, but so far unsuccessful.
I dropped the files in the the applicable folder on the latest version of v2 of VC.
Was there specific setup on the Tivo required? Being TCP related I dont think any other hardware is required correct? When I just try to get a phone app to work, seems like I have to enable Network Remote Control and have a Media Access Key, is that applicable here?
I tried to grab all the xmls, not sure if they are v1 or v2 of VC and updated the py script w/ the tivo IP.
I can hit the http://tivoIP page successfully.
Its not my tivo but I'm sure my housemate would let me do whatever I needed to configure it if required.
Its a Tivo Series4

UPDATE:
Ok I had to change the event to VC.loaded and add the {path.vc} to the py script however some commands aren't working or having the same experience where some unresponsiveness occurs?
Also discovered the telnet commands and those seem more consistently effective. This would be really neat if could get more hardened!!
The above is related to the PY ones from gary.
I'm not having luck with http://voxcommando.com/forum/index.php?topic=1459.0
« Last Edit: April 22, 2014, 01:06:52 AM by vulcanjedi »

vulcanjedi

  • $upporter
  • Sr. Member
  • *****
  • Posts: 213
  • Karma: 8
    • View Profile
Re: TCP Plugin and Tivos
« Reply #24 on: April 22, 2014, 09:56:41 AM »
Managed to get Jason's TCP centric ones to work just before bed. Brief testing was more consistent and more commands worked consecutively. Is there a pressing argument of python vs tcp based approach.?

My experience pretty much echos those of jasonfox/garryjw.
I see the commands and the threads mention the tcp connection.  Can you simply have the client connection load on onload and then perhaps terminate on closure, or is leaving the connection open a big issue? (i know it seems to flood the activity log pane, which is a bit annoying but also not always?)
Or have each command create the connection, execute action, terminate connection? I found the listen, and idle , disconnect command/events a bit odd is the late hours maybe missing the rationale.
I liked the more pithy config w/ most of the commands in the PY variant being in the payload xml shrinking the LCB command tree :P But it was very inconsistent and never got most commands working.
The TCP ones all worked the several I managed to try before getting to be too late and having to sleep. Command response was very good and consecutive commands no problem.

But this is pretty awesome stuff, thanks for sharing and helping all.
« Last Edit: April 22, 2014, 10:51:28 AM by vulcanjedi »

garryjw

  • $upporter
  • Contributor
  • *****
  • Posts: 59
  • Karma: 5
    • View Profile
Re: TCP Plugin and Tivos
« Reply #25 on: April 22, 2014, 11:01:58 AM »
Hi

I went with Python as I just couldn't get the tcp approach to work consistently with my Virgin TiVo here in the UK. To be honest I never really got to the bottom of why. Other than the Live TV command the python approach works absolutely rock solidly for me. According to the TiVo spec LiveTV needs you to wait for a response after sending it before trying any other commands. In my setup I'm not using the LiveTV button so I haven't looked at extending the python script - at the moment the Python Script doesn't wait. I think Jason's approach may be better for that if TCP is working for you.

Cheers
Garry

vulcanjedi

  • $upporter
  • Sr. Member
  • *****
  • Posts: 213
  • Karma: 8
    • View Profile
Re: TCP Plugin and Tivos
« Reply #26 on: April 22, 2014, 11:34:46 AM »
Hi

I went with Python as I just couldn't get the tcp approach to work consistently with my Virgin TiVo here in the UK. To be honest I never really got to the bottom of why. Other than the Live TV command the python approach works absolutely rock solidly for me. According to the TiVo spec LiveTV needs you to wait for a response after sending it before trying any other commands. In my setup I'm not using the LiveTV button so I haven't looked at extending the python script - at the moment the Python Script doesn't wait. I think Jason's approach may be better for that if TCP is working for you.

Cheers
Garry
Ah thats clearer thanks Gary. At first glance the tcp approach seems to as of last night. Based on your comments I apparently don't think I'm getting the responses or in a timely manner, as just sporadically would the py commands work and only a few of them, under TELEPORT, not sure any IRCODEs ever worked for me. But I was trying to use the Live TV command a few times so that may have impacted my experience based on your statement.
Sorry for all the questions it was a bit hard to go through all the xmls/posts in the few threads. I think I did manage to get both ways 'proof of concepted'. I'll continue to vet and see how it goes, thanks again.
« Last Edit: April 22, 2014, 01:15:51 PM by vulcanjedi »

garryjw

  • $upporter
  • Contributor
  • *****
  • Posts: 59
  • Karma: 5
    • View Profile
Re: TCP Plugin and Tivos
« Reply #27 on: April 22, 2014, 12:35:38 PM »
Maybe we should log which devices which approach works with.