TiVo UI Control via Telnet - No Hacking Required!

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

  1. Apr 4, 2017 #701 of 806
    windracer

    windracer joined the 10k club

    12,260
    216
    Jan 3, 2003
    St. Pete, FL
    I have this working in my skill ... I can say "Alexa, tell TiVo to search for <phrase>" and it will go to the Search screen and type in the phrase. I'm using the AMAZON.Movie and AMAZON.TVSeries slot types, but most other phrases seem to work.
     
    Lacoste likes this.
  2. Apr 4, 2017 #702 of 806
    Nick Stefanisko

    Nick Stefanisko New Member

    12
    2
    Mar 6, 2017
    Humm... I may have to rethink Lambda. I'm never going to reach a million requests a month, and it is the only way to get the HA interface. OK back to the workbench.
     
  3. Apr 4, 2017 #703 of 806
    Nick Stefanisko

    Nick Stefanisko New Member

    12
    2
    Mar 6, 2017
    I've added that sort of interaction to my interface too. Similar wording too. But I'm just using the TVSeries type, how to I define a double typed slot? I noticed that just using TVSeries, it doesn't do well with "four weddings and a funeral". I end up getting a 4 rather than "four" Do the types know if the number should be written out vs numeric form?
     
  4. Apr 5, 2017 #704 of 806
    windracer

    windracer joined the 10k club

    12,260
    216
    Jan 3, 2003
    St. Pete, FL
    The slot types should be able to match the phrase, so yeah, AMAZON.Movie should match "Four Weddings and a Funeral." If you're just using AMAZON.TVSeries, I would expect what you're describing above.

    The contributor to my GitHub project who helped with the Search utterance had to make a change to alexa-utterances to allow for optional slot types, which let us do this:

    Code:
    app.intent('Search',
    {
    "slots":{"TIVOSEARCHREQMOVIE":"AMAZON.Movie","TIVOSEARCHREQTVSERIES":"AMAZON.TVSeries"},
    "utterances":[ "{go to|to|open|open up|display|launch|show|} {search|find} {for +TIVOSEARCHREQMOVIE+|+TIVOSEARCHREQMOVIE+|for +TIVOSEARCHREQTVSERIES+|+TIVOSEARCHREQTVSERIES+|}" ]
    }
    
    So that lets us use the TV and Movie slot types in the same utterance, they're just optional so the skill will try to match the utterance to either slot.
     
  5. Apr 5, 2017 #705 of 806
    Nick Stefanisko

    Nick Stefanisko New Member

    12
    2
    Mar 6, 2017

    Humm, that didn't seem to work. I'm using a custom skill rather than Lambda function, so it may not be supported. I did find a work around that though. I just created another intent, MovieSearch, that follows the exact same utterance pattern as the original TVSearch. Alexa figures it out. If I say the name of a movie, I get a MovieSearch request, and if I say the name of a TV show, I get a TVSearch request. I then just pass the value of MoveSearch or TVSearch depending on which one is set to my server side search function that IRCodes its way to the search screen and OuiJas around the cursor. I'm on a THR-22 DirecTV box, so I don't get to use KEYBOARD input.
     
  6. BMoreE

    BMoreE New Member

    24
    3
    Mar 26, 2007
    Howard...
    Just another idea for those fiddling with alexa-tivo-app... after getting it working directly by poking a hole in my home router (and hating the security exposure) I decided on a different path. I broke the app into two components: one a Lambda function (where most of the work is) that puts the TIVO commands on an SQS queue, and one a daemon running on my home PC that listens to the queue and merely telnets the commands to the Tivo locally. Security problem solved!

    Most of the work is in the sendCommand and sendNextCommand functions of alexa-tivo-app - adjusting the logic to talk to SQS on the lambda side.

    And yes - SQS queue is free too for first million requests. Utilize a 20-second polling timeout (the max allowed) and you're only calling it 134K times/month. You can tell your tivo do to ~400K things in a month for free.
     
  7. windracer

    windracer joined the 10k club

    12,260
    216
    Jan 3, 2003
    St. Pete, FL
    Interesting ... I'd like to see your changes. Is this based on a fork of my repo? Maybe it's something we can do a PR on and make it an option. Can you point me to this SQS daemon too?
     
  8. BMoreE

    BMoreE New Member

    24
    3
    Mar 26, 2007
    Howard...
    Hey, just saw this, sorry. I'm a total open source noob so I have no idea even how to post mods or branch a repo; maybe I can just send you the source. You will likely recognize it, I literally just did a cut and paste hatchet job to get it working :)

    As a former C++ dev, I should be embarrassed by the state of it (and lack of error handling, etc.) but I (a) don't know node.js and (b) have zero time to learn! I'm just happy to get it working. PM me if interested.
     
  9. windracer

    windracer joined the 10k club

    12,260
    216
    Jan 3, 2003
    St. Pete, FL
    No worries ... I was totally new to GitHub as well which is one of the reasons I started messing around with it and the Alexa skill at the same time ... learned how to fork someone else's project (he had started it and it seemed like no work had been done on it) and then added and enhanced from there. If you want to PM me the source changes I'd like to look at it just for curiosity's sake. Plus maybe it's another good option for folks who can't run a node-js server over HTTPS at home.
     
  10. MikeOrlando

    MikeOrlando New Member

    19
    1
    Nov 10, 2011
    I understand that this is an older thread. I was wondering if anyone had any recent success in using telnet to send commands to the Bolt? I am unable to connect using the port 31339. The network remote option was turned on. I get the message connection failed. I was hoping to use this method to enter a longer wireless network password. Any feedback would be appreciated.
     
    Last edited: Aug 17, 2017
  11. windracer

    windracer joined the 10k club

    12,260
    216
    Jan 3, 2003
    St. Pete, FL
    Not exactly clear on what you're asking but the telnet interface does still work (even on the Bolt). For example, you should be able to 'telnet <your Bolt's IP address> 31339' and then issue 'IRCODE PAUSE' or 'TELEPORT TIVO'. To do a password, you'd have to send a series of KEYBOARD commands for the individual letters (you can't send a string) so it'd look like:

    Code:
    KEYBOARD LSHIFT
    KEYBOARD P
    KEYBOARD A
    KEYBOARD S
    KEYBOARD S
    KEYBOARD W
    KEYBOARD O
    KEYBOARD R
    KEYBOARD D
    
    Note you have to send an LSHIFT command before a letter that needs to be upper-case. So in my example above, the word would be 'Password'.
     
    Last edited: Aug 17, 2017
  12. MikeOrlando

    MikeOrlando New Member

    19
    1
    Nov 10, 2011
    Sorry, speech recognition is poor. I am using Win 10 and believe the syntax is a bit different. I assume that I have to first establish a connection before I can issue a command. what do you think I am missing?



    telnet 192.168.1.104:31339
    Connecting To 192.168.1.104:31339...Could not open connection to the host, on port 23: Connect failed

    telnet 192.168.1.104 31339
    Connecting To 192.168.1.104...Could not open connection to the host, on port 31339: Connect failed

     
  13. windracer

    windracer joined the 10k club

    12,260
    216
    Jan 3, 2003
    St. Pete, FL
    Your second command is the correct syntax (I've corrected my OP, that was a typo).

    Are you sure you enabled network remote control? Looks like port 31339 isn't open on the TiVo (unless that's the wrong IP address).
     
  14. MikeOrlando

    MikeOrlando New Member

    19
    1
    Nov 10, 2011
    The address I got right from the TiVo UI and network remote is indeed open. I even tried another router just with the TiVo and my laptop.
     
  15. windracer

    windracer joined the 10k club

    12,260
    216
    Jan 3, 2003
    St. Pete, FL
    Not sure why you can't connect then, sorry. Maybe try disabling and re-enabling network remote control? Or try a reboot?
     
  16. ggieseke

    ggieseke Well-Known Member

    5,741
    712
    May 30, 2008
    I would check your firewall - you may have to add an exception for port 31339.
     
  17. MikeOrlando

    MikeOrlando New Member

    19
    1
    Nov 10, 2011
    GOT IT! I suspect this may had something to do with my range extender that I was using for a physical ethernet connection. Using up all the windows XP computer, a different wireless router and wiring everything directly I am now able to connect with the Bolt via telnet. Thanks everyone!
     
  18. MikeOrlando

    MikeOrlando New Member

    19
    1
    Nov 10, 2011
    I got to learn a few things today. I've learned how to use a script to input into Telnet (eg. WshShell.SendKeys ("KEYBOARD A") ). I am having trouble with the command to have a capital letter. using the example above:

    KEYBOARD LSHIFT
    KEYBOARD P

    does not end up getting me a capital P, it seems that lshift is ignored. The way it is written it looks like two separate commands: KEYBOARD LSHIFT (enter) AND KEYBOARD P (enter). I am not sure what I'm doing wrong.

    also can someone help me with what the keyboard command is for @ and ~


    Thanks!
     
  19. windracer

    windracer joined the 10k club

    12,260
    216
    Jan 3, 2003
    St. Pete, FL
    The LSHIFT is a separate command, so the way you have it (as two separate commands on two separate lines) is correct.

    There is no command for the @, unfortunately. All of the supported commands are listed here (in Appendix A):

    https://www.tivo.com/assets/images/.../TiVo_TCP_Network_Remote_Control_Protocol.pdf

    As for tilde, you can try this:

     
    Lacoste likes this.
  20. HuskerMike

    HuskerMike Member

    49
    16
    Jun 16, 2014
    So I've been trying to use the telnet commands to control several Tivos minis at my work. Each Tivo mini is set up to show a different news channel (like a news-video-wall). 5 Different minis, 5 different channels. To this end, I have a Windows laptop that runs 5 different task-scheduler tasks. Those 5 tasks each run a batch file every half hour that opens the telnet software, and then runs a .txt file that looks like this:
    192.168.1.[# of Tivo IP] 31339
    SEND "IRCODE NUM2\m IRCODE Num0\m
    and this will make sure that each tivo is on the right channel (channel 20 in the example above).

    Here's my problem. After one batch file runs, the telnet software remains open, preventing the next batch file from running properly. The telnet window must be closed first before it can be called again for the next Tivo. I've worked around this by scheduling another tast which runs TaskKill. That action looks like: "TASKKILL /F /IM "TST10.exe". That task runs every 2 minutes. And the Telnet tasks run 5 minutes apart so the TaskKill has time to close the previous Telnet open dialog box.
    It's very inelegant.
    What I'd like to do, is have a single task that opens telnet, changes the channel, waits, then closes the operation (TaskKill), then waits again for a few seconds, and does that for all 5 Tivos. I've had a lot of problems trying to get this to work.
    If anyone knows alot about these things and can see how I can do this, I would really appreciate any feedback or suggestions.
     
    Last edited: Aug 24, 2017

Share This Page