TiVo UI Control via Telnet - No Hacking Required!

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

  1. windracer

    windracer joined the 10k club

    12,264
    218
    Jan 3, 2003
    St. Pete, FL
    There's no exit/disconnect command from the telnet interface (TiVo UI Control via Telnet - No Hacking Required!) unfortunately. In my Alexa skill, I just close the connection, which is what you're doing with taskkill.

    I'm assuming you're doing this on Windows since you mentioned a batch file. Maybe using a scripting language like VB would allow you to make it simpler and easier to do logic, looping, etc.
     
    HuskerMike likes this.
  2. HuskerMike

    HuskerMike Member

    49
    16
    Jun 16, 2014
    You are right. Windows.
    So, I guess for now, I'm doing things about as good as they can be done. I'm currently trying to teach myself Python, and that may hold the elegant solution someday. For now, I may have to be inelegant. Thank you for the reply, Windracer.
     
  3. gonzotek

    gonzotek tivo_xml developer

    2,538
    59
    Sep 24, 2004
    Outside...
    Here's a very simple python tivo telnet example I just cooked up:
    Code:
    #!/usr/bin/env python
    import telnetlib
    HOST = "192.168.1.107"
    PORT = "31339"
    tn = telnetlib.Telnet(HOST, PORT)
    tn.write('IRCODE NUM2\r\n')
    tn.write('IRCODE NUM0\r\n')
    tn.close()
    I've tested on a Raspberry Pi under the Debian-based Raspbian OS. I believe it should work as is under Windows, but I can't test from home, no longer running any Windows machines here regularly. The first line is for running under a linux shell, but should be ignored on windows; you'd run the program there by calling python.exe example.py
     
  4. ThAbtO

    ThAbtO TiVoholic by the bay TCF Club

    11,887
    968
    Apr 6, 2000
    SF Bay Area
    You would need to be able to send a Ctrl-], then a C (Close) if you are using the old Windows telnet program.
     
  5. jmbach

    jmbach der Neuerer

    2,985
    410
    Jan 1, 2009
    This is mainly for windows telnet client.
    Not sure what editor you are using for your text file but per ThAbtO suggestion add to your text file:
    Code:
    Ctrl-] (usually can add by holding the Alt key down and type on the number pad 029.  Make sure num lock is on so you get numbers.  This will not work with the number keys across the top of the keyboard)
    c      (closes the connection)
    q     (quits telnet)
    Alternatively you can set a different escape code. You can do this by using the set command before you open up the telnet connection.
    Code:
     set escape x (where x is the character you want to use.  Make sure it is unused in your script file)
    so maybe a script like this:
    Code:
    set escape =
    o 192.168.1.[# of TiVo IP] 33139
    SEND "IRCODE NUM2\m IRCODE Num0\m
    =
    c
    q
    
     
    Last edited: Aug 25, 2017
  6. wmcbrine

    wmcbrine Well-Known Mumbler

    11,700
    812
    Aug 2, 2003
    BTW, despite the name of this thread, the actual "telnet" protocol is overkill for talking to the TiVo remote port. I just use the socket library.
     
    gonzotek likes this.
  7. JACKASTOR

    JACKASTOR Active Member

    777
    135
    May 26, 2011
    ONTARIO,...
    Guys, I have a Tivo bolt, I need to know if there is a way to turn the internal SDV on, My cable company only deals with their own branded Tivos, and refuse to pair this TiVo correctly, is there a way for me to activate the internal SDV control On my bolt? at any rate any help or insight will be greatly appreciated.
    regards

    Jack
     
  8. windracer

    windracer joined the 10k club

    12,264
    218
    Jan 3, 2003
    St. Pete, FL
    Not sure why you posted that in this thread, but for SDV you'll need a tuning adapter. There's no such thing as "turning internal SDV on."
     
  9. JACKASTOR

    JACKASTOR Active Member

    777
    135
    May 26, 2011
    ONTARIO,...
    IMG_1122.jpg IMG_1122.jpg IMG_1121.JPG not true at all here is the TiVo that has internal software SDV on. Tuning adapters are no longer used for SDV shows it is all controlled by the TiVo.
     
    Last edited: Sep 17, 2017
  10. windracer

    windracer joined the 10k club

    12,264
    218
    Jan 3, 2003
    St. Pete, FL
    Ok, doing a quick search I see you're right (partially). It seems to be embedded only in MSO and not retail TiVo boxes.

    Still, this topic doesn't belong in this thread. :)
     
  11. JACKASTOR

    JACKASTOR Active Member

    777
    135
    May 26, 2011
    ONTARIO,...
    it is not a retail only thing, dude its available on all currently produced Tivos. Period. sure does its part of controlling your TiVo by turning on features.
     
  12. ThAbtO

    ThAbtO TiVoholic by the bay TCF Club

    11,887
    968
    Apr 6, 2000
    SF Bay Area
    If you are on comcast, they do not yet use Tuning adapters, but most does. It is a separate device which work in conjunction to a cable card. (cable boxes have both built within.) It is controlled by the Tivo through the USB port.

    Tivos do not have built-in tuning adapters, only the support for them, hence the tuning adapter menu for setting up.

    It looks like you are in Canada and US Tivos are not compatible with most services in Canada.
     
    Last edited: Sep 17, 2017
  13. Fofer

    Fofer Bo55man69

    92,833
    4,432
    Oct 29, 2000
    Last edited: Sep 18, 2017
  14. dapper

    dapper New Member

    3
    0
    May 18, 2015
    Hi everyone, I hope that someone can help me. I have a Mac and I've been trying to get the SETCH command to work in this line for use in Home Assistant;

    echo SETCH 163 | telnet 192.168.0.6 31339

    It just doesn't work no matter what kind of lf cr command I try. Any help greatly appreciated!
     
  15. ThAbtO

    ThAbtO TiVoholic by the bay TCF Club

    11,887
    968
    Apr 6, 2000
    SF Bay Area
    If its similar to the telnet command in Windows, you might have to type "O" to open the connection.

    Better way is to investigate the telnet program like:

    Telnet
    o 192.168.0.6 31339
    SETCH 163
    c
    q

    Be advised that the telnet feature is rather quick to timeout the input on the Tivo before it can accept commands.
     
  16. dapper

    dapper New Member

    3
    0
    May 18, 2015
    Thanks for your answer but I'm trying to do it in one line of command line. It's for a script I've written and the problem seems to be the missing or confused <cr><lf> after SETCH 163. I can change channel if I send each command individually but not in one line and it's this is what I'm stuck on.
     
  17. m.s

    m.s Active Member

    308
    132
    Mar 8, 2007
    I'm not familiar with Home Assistant, but there's no form of newline between those commands. The vertical bar (|) creates a *nix pipe - the output of the one command is sent to the input of the next. Are you trying to use a Home Assistant shell command? Note that page says "shell_command runs in a more secure environment which doesn’t allow any shell helpers like ... using pipe symbols to run multiple commands."

    If for some reason you need to do it as a single command, you could try just calling bash and providing the command to it, that might get around HA's restriction. You may have to provide the full path for each command:
    If that doesn't work, you could try creating a shell script, and then call that from HA using its shell_command. :
     
    Last edited: Nov 28, 2017
  18. dapper

    dapper New Member

    3
    0
    May 18, 2015
    Thanks I'll try it as a bash command. It a pity that I can't send a newline command and I've looked everywhere for some guidance but it's probably the translation from Mac to *nix. Many thanks
     
  19. wmcbrine

    wmcbrine Well-Known Mumbler

    11,700
    812
    Aug 2, 2003
    Despite the title of this thread, the port 31339 remote control doesn't really use the telnet protocol. Have you tried netcat?

    The correct line ending, as far as TiVo is concerned, is \r (aka CR, aka 13, 0Dh). No \n (LF, 10, 0Ah).
     
    Lacoste likes this.
  20. Dec 6, 2017 #740 of 806
    cenright

    cenright bone

    35
    6
    Feb 11, 2007

    Anyone notice a few new buttons on the new Voice Remote...
    Specifically, a dedicated "Skip" and "Netflix" button. Are these new ir codes / if so do they work on tivo without hydra interface?

    upload_2017-12-6_0-45-18.png
     

Share This Page