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

Discovering the iPad interface

Discussion in 'TiVo Underground' started by wmcbrine, Jan 18, 2011.

  1. moyekj

    moyekj Well-Known Member

    11,142
    31
    Jan 23, 2006
    Mission...
    ToDo lists match up pretty closely to what I see vs local RPC from what I've seen so far with Premiere units. For Season Passes I was able to get Auto-Record wishlists to show up as well which the online SP manager doesn't show, so better functionality possible there. I was also able to delete a season pass on my S3 which look like it worked. I scheduled a season pass and an individual show on my S3 using this interface and it was similar to doing it via tivo.com or one of the other online guides where you get the email confirmations and they worked fine. So it is pretty functional though not real time. I was even able to show Recently Deleted items for my S3 though recovering them or permanently deleting doesn't work through middlemind server. So shows some promise.

    I'll have to explore possibility of scheduling season passes for shows not currently in the guide to see if I can get them to work (with local RPC that is not possible), in order to get true Season Pass backups.

    P.S. Was also able to update Season Pass options for a SP on my S3 (changed #episodes from 5 to 10) and it worked.
     
  2. moyekj

    moyekj Well-Known Member

    11,142
    31
    Jan 23, 2006
    Mission...
    middlemind RPC interface is becoming more and more interesting. Looks like there may be many commands listed in operation summary file I mentioned above that are not available to local RPC but are available via middlemind server. I just started investigating this and 2 operations I've tried so far that I was interested in getting to work previously seem to be available via middlemind:

    channelStore
    This useful for among other things changing "Channels You Receive" (isReceived field). Somewhat disturbingly it also appears you can change the channel name, logo, number, callsign, etc. if you want to.

    categorySearch
    This useful for obtaining all categories that can be used for Wishlist creation. kmttg WL buttons omitted category option because I didn't have a way of getting category IDs, but now I do.

    I'm sure there will be a ton of other operations that will work via middlemind as well as the above 2 were the only ones I tried so far. For channelStore I need to test it some more with caution (I'm using my older S3 unit for testing that) to see if I can toggle isReceived boolean field which is really the only interest I have in it for now.
     
  3. moyekj

    moyekj Well-Known Member

    11,142
    31
    Jan 23, 2006
    Mission...
    Finally figured out how to get HME streaming without the pesky 1.1GB file size limit!
    When querying RPC UI destinations, one of the available destinations is the "TiVoCast RSS Video Player HME app". So I figured I'd try to see if I could get it to work with my own URL, and out of convenience fired up pyTivo and tried a pyTivo URL and it worked.

    Note that in addition to the pyTivo uri you can set the title, subtitle, description and duration in seconds all of which affect the UI. Here is a sample RPC call to accomplish this:
    Code:
    {
     "type":"uiNavigate",
     "uiDestinationType":"hme",
     "uri":"x-tivo:hme:uuid:863cb78f-efdd-4106-b572-51733983dc76",
     "parameters":{
      "title":"Title goes here",
      "subtitle":"Subtitle goes here",
      "description":"Description goes here",
      "uri":"http://192.168.10.198:9032/videos/movies/star_wars2.mpg?Format=video%2Fx-tivo-mpeg",
      "duration":8280
     }
    }
    
    Note. I tried this on a small video clip as well as a full DVD movie of size 5GB, and the full 5GB movie buffered and I was able to navigate the full movie without interruption.
     
  4. innocentfreak

    innocentfreak Active Member

    8,950
    3
    Aug 25, 2001
    Florida
    Wow that is very cool. Nice work.
     
  5. Jan 1, 2013 #205 of 366
    moyekj

    moyekj Well-Known Member

    11,142
    31
    Jan 23, 2006
    Mission...
    One caveat with pyTivo streaming is it doesn't seem to work when pyTivo needs to transcode (I did comment out ts=on so that transcodes are done to mpeg2 program stream). Works fine with mpeg2 & video/x-tivo-mpeg mime as well as mp4 with video/mp4 mime, but pyTivo transcoding and using video/x-tivo-mpeg doesn't work for some reason...
     
  6. Jan 1, 2013 #206 of 366
    wmcbrine

    wmcbrine Ziphead

    10,366
    22
    Aug 2, 2003
    When transcoding, pyTivo uses chunked encoding, because it doesn't know the final length; when not transcoding, it specifies the content-length in the headers. I assume this is the difference.
     
  7. Jan 1, 2013 #207 of 366
    davidblackledge

    davidblackledge Registered lÜser

    466
    0
    Sep 9, 2008
    NM
    Awesome, you da man, moyekj. I'm looking into adding that to my upcoming app now.

    I was hoping that Video Player was the key to watching youtube videos on TiVo, too, but I tried every uri I could come up with for a video on youtube, and it didn't like any of them.
    "Video Playback Error | the video has an unknown or incompatible format and cannot be processed by TiVo| Press SELECT to continue"
    I now suspect that maybe launching a youtube video uses the youtube app with parameters... I tried using the same parameters as Video Player with no luck.

    Could you use the same technique to find parameters available for the youtube app?
    uuid=06F36A5F-FE5D-4F03-99A0-64B92896B47F
    so
    "uri":"x-tivo:hme:uuid:06F36A5F-FE5D-4F03-99A0-64B92896B47F"

    Thanks again, moyekj!
     
  8. Jan 1, 2013 #208 of 366
    moyekj

    moyekj Well-Known Member

    11,142
    31
    Jan 23, 2006
    Mission...
    I tried editing plugins/video/video.py to always execute the if compatible section of the headers but it didn't seem to help. Maybe if you can get a chance I would appreciate it if you can monkey with it a little to see if you can get things working for transcoding mode. I've added a crude implementation of starting a stream via RPC using pyTivo as server in the kmttg.jar in this zip. There's a 'pyTivo stream' button under FILES tab. Just make sure your pyTivo.conf is specified in kmttg config and then add a video file in one of your video shares to FILES table, select it and click on the button to start the stream.
     
  9. Jan 1, 2013 #209 of 366
    moyekj

    moyekj Well-Known Member

    11,142
    31
    Jan 23, 2006
    Mission...
    YouTube on series 4 units is a Flash app, not HME. The HME version doesn't show up in my search. Here's the details on the Flash version:
    Code:
    {
    "instanceName":"YouTube Leanback",
    "instanceParameter":[
     {
      "type":"fieldDefinition",
      "valueType":"string",
      "truncate":false,
      "skipInOutput":false,
      "minOccurs":0,
      "description":"Search query, with words separated by the '+' sign. Used to launch app with a specific search query.",
      "copyValueFrom":"Collection.title",
      "ignoreInInput":false,
      "name":"q",
      "levelOfDetail":"high",
      "isNote":false
     },
     {
      "type":"fieldDefinition",
      "valueType":"string",
      "truncate":false,
      "skipInOutput":false,
      "minOccurs":0,
      "description":"YouTube Video ID. Used to launch app with a specific video.",
      "copyValueFrom":"Offer.partnerOfferId",
      "ignoreInInput":false,
      "name":"v",
      "levelOfDetail":"high",
      "isNote":false}
    ],
    "type":"uiDestinationInstance",
    "uiDestinationType":"flash",
    "levelOfDetail":"high",
    "uiDestinationInstanceId":"tivo:di.1000851",
    "instanceDescription":"YouTube Leanback",
    "uri":"x-tivo:flash:uuid:B8CEA236-0C3D-41DA-9711-ED220480778E",
    "serviceGroup":["DG_flash_youtube","DG_hme_youtube_leanback_alpha","DG_hme_youtube_leanback_beta","DG_hme_youtube_leanback_qe"],
    "description":"YouTube app","uiDestinationId":"tivo:ud.1000251",
    "name":"YouTube",
    "parameter":[
     {
      "type":"fieldDefinition",
      "valueType":"string",
      "truncate":false,
      "skipInOutput":false,
      "minOccurs":0,
      "description":"VIDEO or SEARCH",
      "ignoreInInput":false,
      "name":"jumpTo",
      "levelOfDetail":"high",
      "isNote":false
     },
     {
      "type":"fieldDefinition",
      "valueType":"string",
      "truncate":false,
      "skipInOutput":false,
      "minOccurs":0,
      "description":"If jumpto=VIDEO, this should be set to specify which video to play. You can find the video id from the url when watching a youtube video, the v= is the video id",
      "ignoreInInput":false,
      "name":"videoid",
      "levelOfDetail":"high",
      "isNote":false
     },
     {
      "type":"fieldDefinition",
      "valueType":"string",
      "truncate":false,
      "skipInOutput":false,
      "minOccurs":0,
      "description":"If jumpto=SEARCH, this should be set to specify the string to search for.",
      "ignoreInInput":false,
      "name":"query",
      "levelOfDetail":"high","isNote":false
     }
    ],
    "priority":800
    }
    
     
  10. Jan 1, 2013 #210 of 366
    davidblackledge

    davidblackledge Registered lÜser

    466
    0
    Sep 9, 2008
    NM
    YES! that works for the HME version, too! I just have to launch it with parameters "jumpTo=VIDEO" and "videoid=v" where v is the "v" id from a youtube URL!

    Thank you!

    Now some awesome features of my new app will be thanks to you ;]
     
  11. Jan 1, 2013 #211 of 366
    Fofer

    Fofer XenForo Rocks! TCF Club

    82,122
    298
    Oct 29, 2000
    Nice, can't wait to see your app!
     
  12. Jan 3, 2013 #212 of 366
    swythan

    swythan New Member

    21
    0
    Apr 4, 2011
    High...
    Does anyone know a way of fetching valid TSN's associated with an account using the middlemind gateway?

    I can now connect to the Virgin Media middlemind gateway, but to fetch the "My Shows" list I need to include the TSN as the bodyId of the request to avoid getting an error. I know my TSN, but I'm wondering how a user that didn't have their TiVo accessible on the local network would find theirs out.

    FYI: (The following was worked out by badtuned - I trust he doesn't mind me posting it here)

    The Virgin Media middlemind gateway is at secure-tivo-api.virginmedia.com:443

    Instead of using makCredential or mmaCredential, Virgin Media has a new usernameAndPasswordCredential credential type. It uses the user's Virgin Media username & password (i.e. the one used to login to their web account).

    Code:
    {
        "type":"bodyAuthenticate",
        "credential":
        {
            "type ":"usernameAndPasswordCredential",
            "domain":"virgin",
            "username":"********",
            "password":"********"
        }
    }
    
    Note that to connect you will need the new Virgin Media client certificate & password.
     
  13. Jan 3, 2013 #213 of 366
    moyekj

    moyekj Well-Known Member

    11,142
    31
    Jan 23, 2006
    Mission...
    Here in the US the TiVos broadcast using Bonjour (as well as old style TiVo Beacon) and advertise information about themselves including their TSN #s, so you can detect TiVos on your LAN and grab information from there.

    Also note that when you login using "bodyAuthenticate" you get a "bodyAuthenticateResponse" from middlemind server which includes information about available TiVos on your account in a "deviceId" JSONArray, including tsn #. Here's a sample from mine listing my S3 unit (my other 2 TiVos also were listed but I yanked them out of this posting):
    Code:
    {
    "message": "",
    "status": "success",
    "type": "bodyAuthenticateResponse"
    "deviceId": [
     {
      "friendlyName": "S3",
      "id": "tsn:648000xxxxxxxxx",
      "capabilities": {"type": "bodyCapabilities", "features": ["promptToExtendLive","overlapProtection"]},
      "type": "anyBody",
      "serviceLocation": {"port": 443, "server": "secure-api.tivo.com", "type": "serviceLocationInstruction", "serviceLocationType": "secureApi"}
     },
    ],
    }
    
     
  14. Jan 4, 2013 #214 of 366
    swythan

    swythan New Member

    21
    0
    Apr 4, 2011
    High...
    At least the mDNS/Bonjour advertising is happening on the VM TiVO, but with slightly different content. Unfortunately there's no way to do mDNS on Windows Phone (my target platform). Anyway, that's a separate question that I'm working around by getting users to enter the IP address themselves, and then getting the TSN from the TLS server certificate.

    That was exactly what I was looking for. Thanks! I should now be able to support "Away Mode" in my app(s), which will make them useful to loads more people.

    Note that the standard configuration in the UK is for the TiVo NOT to be connected to the LAN. It has it's own internal cable modem which it uses for EPG data, VoD, apps, etc. Even if you are using Virgin as your ISP the TiVo has it's own IP address and there is no routing between the TiVo IP and your LAN.

    I'm pretty sure that getting this "Away Mode" (i.e. middlemind) working was what made Virgin wait for 12-18 months before releasing an iPad app, as it would have been worthless to the majority of their customers without the "Away Mode" support.
     
  15. Jan 5, 2013 #215 of 366
    chirin

    chirin New Member

    3
    0
    Dec 24, 2012
    Anybody have any advice on running the netflix app and starting content?

    It seems like I should be able to just do something like
    Code:
    MRPC/2 247 179
    Type: request
    RpcId: 2
    SchemaVersion: 7
    Content-Type: application/json
    RequestType: uiNavigate
    ResponseCount: single
    BodyId: <tsn>
    X-ApplicationName: Quicksilver
    X-ApplicationVersion: 1.2
    X-ApplicationSessionId: 0x271ced
    
    {"uiDestinationType": "flash", "type": "uiNavigate", "uri": "x-tivo:flash:uuid:F23D193D-D2C2-4D18-9ABE-FA6B8488302F", "parameters": {"jumpTo": "ASIN", "asin": "movies/70208087"}}
    
    
    Where the asin comes from the partnerOfferId, but that just launches the netflix flash app and doesn't actually play the content.
     
  16. Jan 6, 2013 #216 of 366
    moyekj

    moyekj Well-Known Member

    11,142
    31
    Jan 23, 2006
    Mission...
    From my dump there's also a couple of variables under "instanceParameter" available, so you probably have to set the "partnerOfferId". i.e. something like (obviously replace id with real id):
    Code:
    "instanceParameter":{"partnerOfferId":"id"}
    
     
  17. Jan 6, 2013 #217 of 366
    chirin

    chirin New Member

    3
    0
    Dec 24, 2012

    Not having a whole lot of luck, but I'll keep at it. Thanks for the advice.
     
  18. chirin

    chirin New Member

    3
    0
    Dec 24, 2012
    Code:
    MRPC/2 247 149
    Type: request
    RpcId: 2
    SchemaVersion: 7
    Content-Type: application/json
    RequestType: uiNavigate
    ResponseCount: single
    BodyId: tsn:XXXXXXXXXXXXXX
    X-ApplicationName: Quicksilver
    X-ApplicationVersion: 1.2
    X-ApplicationSessionId: 0x26e2b6
    
    {"uiDestinationType": "flash", "type": "uiNavigate", "uri": "x-tivo:flash:uuid:F23D193D-D2C2-4D18-9ABE-FA6B8488302F?partnerOfferId=movies/70208087"}
    
    
    Success!

    Well, it doesn't autoplay, but it opens the selected content, which is good enough.
     
  19. moyekj

    moyekj Well-Known Member

    11,142
    31
    Jan 23, 2006
    Mission...
    That's what happens when launching Netflix from HDUI search as well. What's worse is for episodic shows you are taken to the top of the series instead of a particular episode, so then you have to find it again within Netflix among all seasons and episodes. With the older HME Netflix app TiVo would launch you directly into it and start playing it.

    BTW, how exactly are you searching for Netflix titles and getting the needed "asin" data?
     
  20. moyekj

    moyekj Well-Known Member

    11,142
    31
    Jan 23, 2006
    Mission...
    Never mind, I found out how. "offerSearch" with Netflix partnerId returns offers with "partnerOfferId" field.
     

Share This Page