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

HME for Python

Discussion in 'Developers Corner' started by wmcbrine, Jan 28, 2008.

  1. Feb 10, 2008 #41 of 231
    refried

    refried New Member

    145
    0
    Dec 21, 2005
    Brunswick, ME
    I tried out the 1.4.0 simulator and the 1.4.1 experimental simulator. The 1.4.0 gets the key codes right. The 1.4.1 simulator can't run the test app. I get this:
     
  2. Feb 10, 2008 #42 of 231
    wmcbrine

    wmcbrine Ziphead

    10,367
    22
    Aug 2, 2003
    Turn on the debug output; it's more interesting. The 1.4.1 simulator is seriously broken. It gets a NullPointerException when trying to create resource 2052 (the font), which in turn is why resource 2055 (the text) fails. You can see the same behavior even when running the Java SDK's "Hello World" sample app (either 1.4 or 1.4.1 version). There are other problems with 1.4.1, too. But, I guess that's why it's labelled "experimental".

    As for the key codes... they are what they are. If the real TiVo is sending out codes that don't match the spec, that's regrettable. But even the spec says not to rely on the KEY_OPT_* codes.

    In a way, I'm encouraged to be receiving bug reports about things that would already be apparent with the Java SDK -- because it means that people are picking up HME for Python who never tried the Java SDK.
     
  3. Feb 11, 2008 #43 of 231
    wmcbrine

    wmcbrine Ziphead

    10,367
    22
    Aug 2, 2003
    Version 0.5 posted -- this adds focus support, fixes a bug with the default sizing of child windows, and eliminates the need for a separate handle_key_repeat(), if you just want a repeat to work like a press.
     
  4. Feb 11, 2008 #44 of 231
    CuriousMark

    CuriousMark Forum Denizen

    2,606
    0
    Jan 13, 2005
    SoCal
    I notified Jerry, who is passing the information along to the right people. I also played with skull and bones on my TiVo and it plays and works fine, although it never has more than one thing in motion at a time. Perhaps I need to play it for hours to see if things start getting bad.

    I will try 0.5 tonight.
     
  5. Feb 11, 2008 #45 of 231
    wmcbrine

    wmcbrine Ziphead

    10,367
    22
    Aug 2, 2003
    Of all the demo apps, only those two cause a problem. Skull and Bones is not at all a demanding app. You can probably play it indefinitely.

    Anyway, thanks for talking to TiVoJerry. I think we can drop this subject now, since it's a general HME problem, not an HME for Python problem.
     
  6. Feb 20, 2008 #46 of 231
    wmcbrine

    wmcbrine Ziphead

    10,367
    22
    Aug 2, 2003
    New version 0.6 refines the focus handling a bit, makes sounds a little easier, and recognizes a couple more exit conditions.
     
  7. Feb 21, 2008 #47 of 231
    wmcbrine

    wmcbrine Ziphead

    10,367
    22
    Aug 2, 2003
    Version 0.7 supports app transitions. I believe this is the last part of the HME protocol specification that I hadn't implemented. (Of course there's still more work to do in other respects.)
     
  8. Feb 22, 2008 #48 of 231
    wmcbrine

    wmcbrine Ziphead

    10,367
    22
    Aug 2, 2003
    0.8 -- The dict items for transition() no longer have to be in list form, although they still _can_ be. (The values returned to handle_init_info() are still lists, though.)

    Simplified the transition demo and added an icon for it.

    Print the skipped directories in hmeserver, along with the reasons they were skipped.
     
  9. Feb 22, 2008 #49 of 231
    tlc

    tlc Member

    710
    0
    May 29, 2002
    Would this support HD-res photos? HMO and pyTivo don't, right?
     
  10. Feb 22, 2008 #50 of 231
    wmcbrine

    wmcbrine Ziphead

    10,367
    22
    Aug 2, 2003
    If you want to write an HD photo viewer using this library, then yes. Out of the box, no. (BTW, I have an HD-related fix to post...) I'll probably write one myself, but don't wait for me.

    HMO per se is neutral about resolution. The HMO photo viewer built into the TiVo is strictly SD, but the "HD Photos 2.0" HME app in TiVo Desktop uses an HMO server as the backend -- and it will even work with pyTivo. (Getting it to run outside of TiVo Desktop is a little tricky, but doable.)

    Edit: Simplest possible HD photo viewer app:

    Code:
    import hme
    
    class Picture(hme.Application):
        def handle_resolution(self):
            return (1280, 720, 1, 1)
    
        def handle_active(self):
            self.root.set_image('/your/pic/here.jpg')
    
     
  11. Feb 22, 2008 #51 of 231
    tlc

    tlc Member

    710
    0
    May 29, 2002
    Are you saying HD-res photos are possible with pyTivo and without TiVo desktop? Or would you still need the TiVo Desktop to tell TiVo to request HD photos from the HMO server?

    Edit: Never mind, I get it. Tivo <-> HD photos 2.0 (HME) <-> HMO server.
    HMO is neutral, but we can't get the Tivo to request hi-res.
     
  12. Feb 22, 2008 #52 of 231
    wmcbrine

    wmcbrine Ziphead

    10,367
    22
    Aug 2, 2003
    0.9 -- Added a separate set_resolution() function; changing the resolution with an already-visible root view (which is always the situation, since 0.2) requires a set_bounds() call on the root view.

    Sorry for updating again so soon.
     
  13. Feb 26, 2008 #53 of 231
    wmcbrine

    wmcbrine Ziphead

    10,367
    22
    Aug 2, 2003
    0.10 -- Stupid bugs: sending data larger than 64K was broken since 0.3; images without names are not cached, but Image.remove() was still trying to remove them from the cache.
     
  14. Feb 28, 2008 #54 of 231
    wmcbrine

    wmcbrine Ziphead

    10,367
    22
    Aug 2, 2003
    0.11 -- Added a simple slideshow Picture Viewer to the included apps. It depends on the Python Imaging Library, and you'll have to edit picture/__init__.py to set ROOT to an appropriate directory (because I didn't want to bloat the archive with sample pictures). The app automatically uses hi-def mode when available.

    - Changed the Animation class (and all the "animtime" parameters of various functions) to take seconds instead of milliseconds, to make it more consistent with general Python usage. I hope this doesn't inconvenience anyone.

    - Small tweak to the put_chunked() function.

    But I guess people are losing interest, judging by the number of downloads.
     
  15. Feb 28, 2008 #55 of 231
    gonzotek

    gonzotek tivo_xml developer

    2,402
    3
    Sep 24, 2004
    Outside...
    I'm tracking your updates, I just don't have a lot of time to play, unfortunately. I would like to use HME for python for a few projects I have in the back of my mind, when I can find the time to devote to them.
     
  16. Feb 28, 2008 #56 of 231
    CuriousMark

    CuriousMark Forum Denizen

    2,606
    0
    Jan 13, 2005
    SoCal
    Not at all, I just am not able to spend much time on it right now. I think I am still at 0.5 for my playing around and learning about event driven programming using python and hme. I have only done procedural scripts up to this point and have a lot to learn. In addition to that I probably will put more effort into fixing pytivo on my NAS first. It isn't as stable there as it is on a PC, and I fear it may be resource bound. I am trying to learn enough about Linux to try to look into that. But that is for another forum.

    This is great stuff, amazing to me really.
     
  17. Feb 28, 2008 #57 of 231
    refried

    refried New Member

    145
    0
    Dec 21, 2005
    Brunswick, ME
    Downloading zip files off a web forum is more effort than typing "git pull." ;)
     
  18. Apr 4, 2008 #58 of 231
    CuriousMark

    CuriousMark Forum Denizen

    2,606
    0
    Jan 13, 2005
    SoCal
    I can happily report that the new 9.3 software on my Humax DVD burner TiVo fixes the issues I was seeing in HME, it all works correctly now.
     
  19. Apr 9, 2008 #59 of 231
    wmcbrine

    wmcbrine Ziphead

    10,367
    22
    Aug 2, 2003
    Well, I wish I could say the same for my 540. I still see it crashing in Animate, leaving me textless.

    It works OK for the first few seconds... which might be an improvement. But fundamentally, it's not fixed. :(
     
  20. Apr 9, 2008 #60 of 231
    CuriousMark

    CuriousMark Forum Denizen

    2,606
    0
    Jan 13, 2005
    SoCal
    Bummer, I only tested it for about 10 or 15 seconds, I guess I should have tried for much longer. It was so nice seeing it behave correctly for the first time ever. Try it again after a day, just in case indexing is pushing it over the edge.
     

Share This Page