1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

html Remote

Discussion in 'Developers Corner' started by telemark, Jun 26, 2014.

  1. telemark

    telemark New Member

    1,544
    1
    Nov 12, 2013
    I have a few devices that can't run a Tivo remote, so I made a basic remote that runs from a cgi web server, and is controllable by most web browsers.

    The codebase is really small and simple so anyone should be able to customize.

    Requires:
    Perl
    CGI webserver on home network
    Backend tested on OS X and BSD
    Frontend tested on Chrome, Safari, iOS

    TODO:
    Build in web server
    FrontEnd:
    - Redo Image
    - Keyboard shortcuts

    v2:
    - Multi Tivo Support (up to 2 units)
    - TV passthru Support (up to 2 models)
    - Add ABCD keys
    - Closed Captioning
    - Optional debugging

    The frontend UI would be at:
    http://webserver/htmlremote/ or
    http://webserver/htmlRemote/index.html

    The backend API calls are:
    http://webserver/htmlRemote/trTIVO.cgi?ircode=NUM2
    http://webserver/htmlRemote/trTV.cgi?ircode=MUTE

    trTIVO defaults to localhost, either edit it with a hostname/ip.
    Or to utilize autodiscovery, leave as is and install wmcbrine's rproxy.

    To enable TV control, grab the scripts for your TV model. http://www.tivocommunity.com/tivo-vb/showthread.php?t=518917
    Edit trTV.cgi with the path to the scripts.
    Edit trTIVO.cgi to enable.
     

    Attached Files:

  2. wmcbrine

    wmcbrine Ziphead

    10,369
    22
    Aug 2, 2003
    TV Power, Input, Vol +/- and Mute are good places to reclaim space -- although it's possible to send these codes to the TiVo, they don't actually do anything, except get logged. (A real peanut just sends them as IR codes directly to the TV.)
     
  3. telemark

    telemark New Member

    1,544
    1
    Nov 12, 2013
    Yeah, I was debating about that.

    The IR and BT Tivo remotes I have still trigger the Tivo's orange light when using Volume. I was wondering if it resets some activity indicator, which might not be used, or is this used on the Mini timeout?

    In any case, I'm thinking of adding pass-thru support for IP controllable TV's. I think I'll try a couple brands and if it works well, I'll leave it in. And if it's problematic, I'll take it out and reclaim the pixels.
     
  4. nooneuknow

    nooneuknow TiVo User Since 2007

    3,554
    0
    Feb 5, 2011
    Cox Cable...
    TiVos do use inactivity sensing to tell when it should be safe to do things without prompting the user. This is done by a timer on last remote activity, which is precisely why TV control commands are also sent to the TiVo.
     
  5. Jul 6, 2014 #5 of 20
    telemark

    telemark New Member

    1,544
    1
    Nov 12, 2013
    I've been running with TV control for a week so it's stable enough to release:

    v2 added:
    - Multi Tivo Support (up to 2 units)
    - TV control pass-through support (up to 2 models)
    - ABCD buttons
    - Closed Captioning buttons
    - Optional debugging

    Release is in first post.
     
  6. Jul 7, 2014 #6 of 20
    qlude

    qlude New Member

    10
    0
    Jul 7, 2014
    Awesome! Looking forward to trying this out.
     
  7. mjbok

    mjbok New Member

    12
    0
    Jan 24, 2007
    This is awesome work. Exactly what I'm looking for, I think....
     
  8. mjbok

    mjbok New Member

    12
    0
    Jan 24, 2007
    If the remote image had a clear background it could be easily implemented into other pages seemlessly.
     
  9. mjbok

    mjbok New Member

    12
    0
    Jan 24, 2007
    Or are both the same, but 2 has the additional options?
     
  10. mjbok

    mjbok New Member

    12
    0
    Jan 24, 2007
    Is there something that needs to be added for the API calls? You list a path for it.
     
  11. mjbok

    mjbok New Member

    12
    0
    Jan 24, 2007
    I edited the cgi file and put in my ip address for my Tivo, but am getting no response after hosting it on my webserver.
     
  12. wmcbrine

    wmcbrine Ziphead

    10,369
    22
    Aug 2, 2003
    Did you enable network remote control on the TiVo? It's off by default.
     
  13. mjbok

    mjbok New Member

    12
    0
    Jan 24, 2007
    I checked and network control is indeed on and I can send telnet commands from my PC so I know that part works.
     
  14. mjbok

    mjbok New Member

    12
    0
    Jan 24, 2007
    I put the files (attached below) into my var/www folder. I did a sudo chmod +x trIRCODE.cgi command.

    The webpage comes up with the remote image, but the buttons trigger no actions

    The IP address is correct.

    Any help would be greatly appreciated

    //I had to zip the files because it would not allow me to attach a CGI or HTML file
     

    Attached Files:

  15. stealthdave

    stealthdave New Member

    3
    0
    Jan 19, 2005
    I actually built a page once that used standard http calls to send the IR codes to the TiVo directly from Javascript rather than going through an external cgi script to translate to a telnet call. Had it working on my TiVoHD and a hacked Series 1. Unfortunately, this project was lost in the Great Data Loss of '14. (2 drives in a RAID simultaneously! ARGH!!!) Of course, I never got around to publishing it publicly, and I can't find any docs for HTML access online, so I can 't reproduce it.

    If you can find the HTML commands, you can eliminate the need for a web server and cgi entirely by using a JSONP call instead of AJAX. You don't even need a full JSONP implementation since you don't require a response back:

    Code:
    var irSend = document.createElement('script');
    irSend.src = tivoLink + '/some?key=' + irCommand;
    irSend = null; // cleanup
    
    Makes the whole thing very compact, but I can't for the life of me find the original references.

    - Dave
     
  16. gonzotek

    gonzotek tivo_xml developer

    2,404
    3
    Sep 24, 2004
    Outside...
    Are you sure this was possible on a TiVoHD? I *thought* the html command interface was a function of TiVoWeb (or TiVoWebPlus), which never made it to Series3 and above machines (and only some S2s). I'd love to be wrong!
     
  17. stealthdave

    stealthdave New Member

    3
    0
    Jan 19, 2005
    On the Series 1 it was absolutely a function of TiVoWebPlus. (I miss that app!) The more I search, though, I think I may be misremembering it working on the TiVoHD. Which is too bad; that would be pretty darned convenient.
     
  18. telemark

    telemark New Member

    1,544
    1
    Nov 12, 2013
    Sorry I missed this question, it got buried behind other threads.

    I think mjbok's problem might have stemmed from running the code on a public web server. This means the back-end can't reach a Tivo through a NAT router without port forwarding. It's best to run the back-end on a home server.

    I thought about rewriting this with WebSockets but it seemed less common than cgi.
     
  19. solutionsetc

    solutionsetc Member

    762
    0
    Apr 2, 2009
    Northern...
    What are the IRCodes for these keys? I am also looking for 'Back' and 'Zoom' keys as well.

    Thanks!
     
  20. wmcbrine

    wmcbrine Ziphead

    10,369
    22
    Aug 2, 2003
    Hint: My Network Remote is open source...
     

Share This Page