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. cassiusdrow

    cassiusdrow Member

    130
    0
    May 21, 2003
    NJ
    I'm seeing a small cosmetic issue with the HME app names in the "Music, Photos, & Showcases" list. On my Series 3 OLED they look like this:

    Jukebox
    PyTivo Video Manager
    Tic Tac Toe

    On my Premiere XL they look like this:

    Jukebox
    PyTivo\032Video\032Manager
    Tic\032Tac\032Toe

    It looks like the spaces are replaced with the character code escape sequence or something.
     
  2. windracer

    windracer joined the 10k club

    11,580
    3
    Jan 3, 2003
    St. Pete, FL
    This is a problem with the 20.x software, not the HME apps themselves.
     
  3. cassiusdrow

    cassiusdrow Member

    130
    0
    May 21, 2003
    NJ
    While the 20.x software may be causing the difference, this only apps with this issue are running via HME for Python. No TiVo supplied apps do this.
     
  4. wmcbrine

    wmcbrine Ziphead

    10,369
    22
    Aug 2, 2003
    The apps that do it are apps 1) with spaces in their names, that 2) are announced via Zeroconf on the LAN. It's not HME for Python. If you want to see the same effect from a TiVo-supplied app, run their Java SDK.

    If you want to see HME for Python not doing it, turn off Zeroconf, set it to run on port 80, and do "Manually add a server" from the SD menus. (It won't work properly in the HD menus, unless you use the Git version of HME for Python, due to other recent changes (bugs) in how the HD menus handle HME. Version 0.21 coming soon...)

    More details here: http://www.tivocommunity.com/tivo-vb/showthread.php?t=497441
     
  5. cassiusdrow

    cassiusdrow Member

    130
    0
    May 21, 2003
    NJ
    Thank you for providing further explanation.
     
  6. moyekj

    moyekj Well-Known Member

    11,150
    33
    Jan 23, 2006
    Mission...
    Is there a way to retrieve the IP address of the client TiVo within python HME?

    EDIT: Never mind, figured it out: self.context.client_address[0]
     
  7. jeepguy_1980

    jeepguy_1980 Unregistered User

    250
    0
    Mar 1, 2008
    Newport...
    I recently upgraded (clean install) the OS on my server. It's a headless version of Fedora 19. I am having difficulty getting HME for python to start with my init.d script. This is the same script I have used before and I can't find anything that would stop it from working with Fedora 19. I am able to run pyhme manually with the following call, so it is setup properly.

    Code:
    sudo python /usr/share/pyhme/start.py
    I wrote a full wiki page, documenting how I installed pyTiVo, HME, and vidmgr. The wiki is here, if you want to see how I have everything configured.

    Below is the script I am using. Any suggestions for getting it to work would be appreciated.

    Code:
    #!/bin/bash
    # chkconfig: 2345 99 05
    # description: pyHME server
    ### INIT INFO
    # Provides: pyhme
    # Required-Start: $network
    # Required-Stop: $network
    # Default-Start: 2 3 4 5
    # Default-Stop: 0 1 6
    # Short-description: pyHME server
    # Description: Start and stop the pyHME server.
    ### END INIT INFO
    RETVAL=0
     
    start() {
    echo -n "Starting pyHME: "
    pgrep -f start.py
    RETVAL=$?
    [ $RETVAL -eq 0 ] && echo "pyHME already running: Exiting" && exit 1
    # this call actually starts pyHME.
    cd /usr/share/pyhme
    python start.py > /dev/null 2>&1 &
    RETVAL=$?
    [ $RETVAL -eq 0 ] && echo -n "done"
    echo
    return $RETVAL
    }
    stop() {
    echo -n "Stopping pyHME: "
    pkill -f start.py
    RETVAL=$?
    echo
    [ $RETVAL -eq 0 ] && echo -n "done"
    echo
    return $RETVAL
    }
    checkstatus() {
            if [ ! `pgrep -f python` ]; then
             echo -n $"pyHME is stopped"
             echo
            else
             echo "pyHME is running."
            fi
    }
    # See how we were called.
    case "$1" in
    start)
    start
    ;;
    stop)
    stop
    ;;
    status)
     checkstatus
    ;;
    
    restart|reload)
    stop
    sleep 1
    start
    RETVAL=$?
    ;;
    *)
    echo "Usage: $0 {start|stop|restart}"
    exit 1
    esac
    exit $RETVAL
     
  8. jeepguy_1980

    jeepguy_1980 Unregistered User

    250
    0
    Mar 1, 2008
    Newport...
    Does anyone else still use this?
     
  9. wmcbrine

    wmcbrine Ziphead

    10,369
    22
    Aug 2, 2003
    I use it all the time. But that doesn't mean I can help you with your startup script. That's more about Fedora.
     
  10. lrhorer

    lrhorer Active Member

    6,924
    0
    Aug 31, 2003
    San...
    You might get some ideas from the Linux thread stickied in the TiVo Home Media Features & TiVoToGo forum. I've posted my startup scripts there.
     
  11. lrhorer

    lrhorer Active Member

    6,924
    0
    Aug 31, 2003
    San...
    William,

    I'm having an issue with HME for Python, although it is possible the issue is with one of the plug-ins. The issue is the app has an apparent memory issue, perhaps a memory leak. I just re-started HME for Python after 11 days uptime, and it's memory footprint is 11.6 MiB. It had grown to over 900 MiB in those 11 days.
     

Share This Page