Easier to use pyTivo

Discussion in 'TiVo Coffee House - TiVo Discussion' started by Dan203, Jan 23, 2017.

  1. Dan203

    Dan203 Super Moderator Staff Member TCF Club

    49,128
    5,177
    Apr 17, 2000
    Nevada
    Did you try the http://localhost:9032/Desktop trick and see if that works for you?
     
  2. HerronScott

    HerronScott Well-Known Member

    7,178
    1,020
    Jan 1, 2002
    Staunton, VA
    That brings up the settings page so no change in behavior.

    Scott
     
  3. HerronScott

    HerronScott Well-Known Member

    7,178
    1,020
    Jan 1, 2002
    Staunton, VA
    Dan,

    If you have the URL for the JSON data, let me know and I can provide what I get.

    Scott
     
  4. Dan203

    Dan203 Super Moderator Staff Member TCF Club

    49,128
    5,177
    Apr 17, 2000
    Nevada
  5. Dan203

    Dan203 Super Moderator Staff Member TCF Club

    49,128
    5,177
    Apr 17, 2000
    Nevada
    I'm looking at the python code and the code for that GetTiVoList function is literally the same loop as the one to display the TiVo list on the localhost:9032 home page. So this makes zero sense. Unless there is some oddity in the name of a TiVo or something that's messing up the JSON
     
  6. HerronScott

    HerronScott Well-Known Member

    7,178
    1,020
    Jan 1, 2002
    Staunton, VA
    Hi Dan,

    It doesn't seem to be getting a response back from pyTivo with that URL.

    upload_2020-2-18_8-47-33.png
     
  7. Dan203

    Dan203 Super Moderator Staff Member TCF Club

    49,128
    5,177
    Apr 17, 2000
    Nevada
    I have no idea what would cause that. The source code is on my GitHub. If you look it's a simple loop that uses the TiVo data from the global config variable. Exactly the same way as the webpage. The only difference I see if they have one more level of error checking on the web page, so I guess if your setup was hitting that error it would cause the JSON routine to throw a fault vs returning data. There is no logging attached to either so the fault wouldn’t show up in the log for either one.

    Do you have any weird TiVos on your network? Ones with strange names? An Edge? Anything out of the ordinary?
     
  8. pshovest

    pshovest New Member

    14
    1
    Oct 1, 2019
    I get a similar response...

    upload_2020-2-18_20-1-27.png
     
  9. Dan203

    Dan203 Super Moderator Staff Member TCF Club

    49,128
    5,177
    Apr 17, 2000
    Nevada
    Are you guys running an advanced copy of Windows? Like an insider build or something?
     
  10. ThAbtO

    ThAbtO TiVoholic by the bay TCF Club

    11,264
    826
    Apr 6, 2000
    SF Bay Area
    Out of curiosity, can I add just the Desktop portion to my Wmcbrine PyTivo?
     
  11. Dan203

    Dan203 Super Moderator Staff Member TCF Club

    49,128
    5,177
    Apr 17, 2000
    Nevada
    No. My fork is based on Wmcbrine, but it has special URLs added, like the one in question here, that return data in JSON format which the Desktop app needs to function.
     
  12. HerronScott

    HerronScott Well-Known Member

    7,178
    1,020
    Jan 1, 2002
    Staunton, VA
    Hi Dan,

    Just 3 TiVo's on the network for discovery (and 1 Mini). Names and models below.

    TiVo Series3 - 1 S3 OLED
    TiVo Series3 - 2 S3 OLED
    TiVo Roamio Roamio Pro

    TiVo Desktop has no issue discovering all 3 as well as listing and transferring shows.

    I noticed that pyTivo (localhost:9033) is only discovering the Roamio Pro though.

    I have an older version of the regular install of pyTivo running on my WHS server and it's showing all of the TiVo's as well.

    upload_2020-2-19_8-20-36.png

    And when I use that URL to get the JSON listing with it I get unsupported command but I suppose that could be due to an older version?

    upload_2020-2-19_8-24-42.png

    Scott
     
  13. HerronScott

    HerronScott Well-Known Member

    7,178
    1,020
    Jan 1, 2002
    Staunton, VA
    Ah never mind my comment about the wmcbrine version and unsupported command. :)

    Scott
     
  14. Dan203

    Dan203 Super Moderator Staff Member TCF Club

    49,128
    5,177
    Apr 17, 2000
    Nevada
    I'm going to have to add some extra logging to figure out what's going on. I will use a special URL and post it here when I have a build for you to try.
     
  15. HerronScott

    HerronScott Well-Known Member

    7,178
    1,020
    Jan 1, 2002
    Staunton, VA
    Thank you Dan! Where did the other poster go that was having the same issue? Would be interesting to see if they are showing the same results.

    Scott
     
  16. Dan203

    Dan203 Super Moderator Staff Member TCF Club

    49,128
    5,177
    Apr 17, 2000
    Nevada
    Well I was able to simulate an error in that function and if it fails it just dies, which produces the effect you're seeing. So I'm going to add some more error checking to the function and see if that helps. If we can catch the error then it should always return something. I'll create a build with this change and post a link in a few minutes.
     
  17. Dan203

    Dan203 Super Moderator Staff Member TCF Club

    49,128
    5,177
    Apr 17, 2000
    Nevada
  18. mlippert

    mlippert Active Member

    289
    58
    Apr 2, 2010
    Massachusetts
    Dan I think you have a typo in the code. I saw it because I was curious what error checking you were adding.
    Code:
                    if 'port' in config.tivos[tsn]:
                        json_config[tsn]['name'] = config.tivos[tsn]['name']
                    else:
                        json_config[tsn]['name'] = "Unnamed TiVo: " + tsn
    
    if 'port' in should be if 'name' in. You check for the port further down in the new code.
     
    ClearToLand likes this.
  19. Dan203

    Dan203 Super Moderator Staff Member TCF Club

    49,128
    5,177
    Apr 17, 2000
    Nevada
    You are correct. Good catch.
     
  20. Dan203

    Dan203 Super Moderator Staff Member TCF Club

    49,128
    5,177
    Apr 17, 2000
    Nevada
    Fixed!

    I'm rebuilding and reuploading using same version number. So wait a few minutes and download again if you have already downloaded the one above.
     
    mlippert likes this.

Share This Page