We'll need more information ...
Is there anything in your pyhme.log file? What do your config.ini and vidmgr.ini files look like?
Is there anything in your pyhme.log file? What do your config.ini and vidmgr.ini files look like?
[hmeserver]
port=7288
address=192.168.1.2
zeroconf=True
basepath=/usr/share/pyhme
datapath=/usr/share/pyhme
apps=tictactoe vidmgr
# vidmgr.ini
#
# this is the global options file - it belongs in the vidmgr directory under pyhme
#
# Default values are specified below.
#
# NOTE:
#
# These default values do NOT need to be explicitly stated in this file. They are here for illustration
# you can leave them in here if you want, or you can remove them and only include in here the options you
# are changing
#
#
# vidmgr section is mandatory
#
[vidmgr]
#
# what file extensions are we interested in. Only files with these extensions will be
# displayed on screen
# specify a list of file extensions - with the . - separated by at least one space
#
exts=.mp4 .mpg .avi .wmv .mkv
#
# the next 4 options specify format information for the info screen that pops up
# when you press the info button.
# specify a list of metadata tags for each.
#
metaignore=isEpisode isEpisodic __fileName __filePath
metafirst=title seriesTitle episodeTitle description
metaspacebefore=
metaspaceafter=
#
# the next two options are also formatting options for the info screen. The info screen is
# a two column layout. the infolabelpercent option indicates what percentage of the
# screen width should be devoted to the label column
#
# the inforightmargin option specifies the width of the right margin on the info screen. If
# you find the text running up against the right edge of the screen, increase this number.
#
infolabelpercent=30
inforightmargin=20
#
# the next two options control how multiple metadata files are handled. When searching for
# metadata, vidmgr looks for the files in the following sequence:
# .meta/default.txt
# default.txt
# .meta/<videofilename>.txt
# <videofilename>.txt
#
# metamergefiles determines if the contents of one file are merged with previous files or if
# it completely replaces the previous file. If this is set to true, since the files are read
# from the general to the specific, more specific information will replace more general information,
# but the end result will be the union of all the files. If this is set to false, then only the
# information in the last file read will be kept.
#
# metamergelines if only meaningful if metamergefiles is set to true. If set to true, then if
# two files contain the same metadata tag, then the values are concatenated together. If set to
# false, then the value from the second file replaces the value from the first file. Note -
# metadata tags that are already lists (vActor, etc) are always merged regardless of the value of
# this option.
#
metamergefiles=True
metamergelines=False
#
# specify the point size of the font used to display the descriptive text of a video on the main screen
#
descsize=20
#
# the image files that vidmgr uses for its background, etc, can be replaced. These files all reside
# in a directory named 'skins' under the vidmgr directory. If you wish to use your own image files,
# create a directory under skins, place your files there, and name that directory with the skin option.
# Note: the files must be png files and must match the original images in size. Only the images being
# changed need be specified. If an image file is NOT found in your skin's directory, the corresponding
# file is taken from the main skins directory.
#
# There is no default for this. Do Not include this option unless you are using your own skin
#
# skin=
#
# can the files in this directory be deleted - specify true or false.
#
deleteallowed=False
#
# specify how you would like the artwork for a video to be justified - specify left, center, or right
#
thumbjustify=left
#
# specify the name of the file to use for the folder and for the video file if a video specific file is not found
#
thumbfolderfn=folder.jpg
#
# what metadata tags should be used to construct the string used to identify this file on the screen
# specify a list of metadata tags - including any metadata tags you may have created yourself. In addition to the
# normal metadata tags, you can use the word 'file' to indicate the video's file name (without the directory) and
# you can use the value 'titleNumber' to indicate the title number for a DVD video.
#
display=title episodeTitle
#
# what string should be used to separate the above metadata when constructing the title string
# specify an arbitrary string
#
displaysep=:
#
# what metadata tags should be used to construct the string that is used to sort the videos when they
# are displayed in a list specify a list of metadata tags - including any metadata tags you may have created yourself. In addition to the
# normal metadata tags, you can use the word '__fileName' (or 'file') to indicate the video's file name (without the directory),
# '__filePath' to indicate the video's full directory path, or the value 'titleNumber' to indicate the title number for a DVD video.
#
sort=title episodeTitle
#
# which direction should the sort be
# specify up for an ascending sort or down for a descending sort
#
sortdirection=up
#
# should a leading article (the, a, an) in a 'title' or 'episodeTitle' be ignored when sorting on that title. Note that the displayed
# title will not change i.e. "The Abyss" will still show up as "The Abyss", but it will be sorted in with the A titles.
#
ignorearticle=True
#
# the next options control the contents of the top of the navigation tree. If sharepage is set to true, the top page will
# contain an entry that says 'Browse Shares'. This will take you to a separate page where the shares are listed.
# If it is set to false, then each share will be on the top screen.
# if sortroot is true, the virtual shares and the actual shares will be sorted together. If it is false (the default)
# then the actual shares will appear above the virtual shares. Both will be sorted, but one will appear before the other
#
sharepage=true
sortroot=false
#
# what text string should be used for the subtitle on the top navigation screen. The subtitle normally gives
# a cue as to where you are in the navigation, but no such cue is necessary when at the top; this string will
# be displayed instead
# default: topsubtitle=Main Menu
#
# topsubtitle=
#
# by default, vidmgr will check file unique IDs so that it knows if two files are actually the same file with two
# different links. On windows, this is an expensive operation. This affects the amount of time needed to build
# the cache. If you are not using links in your video directories, you can essentially disable this logic by
# setting the following option to false. The default is true
#
usefileid=True
#
# the tivos section of the file is where you identify your Tivos. For each tivo, you MUST provide a name and
# a TSN. It is NOT necessary to put the dashes into the TSN - just use the digits. In the tags below, replace the
# X with a digit starting at 1 (e.g. tivo1.name). If you have multiple tivos, number them sequentially. You can have
# an arbitrary number of tivos, but vidmgr will stop parsing the file as soon as it detects a gap in the
# numbering sequence. These fields have no default values.
#
[tivos]
tivo1.name=Front Room
tivo1.tsn=758xxxxxxxxxxxxx
tivo2.name=Master Bedroom
tivo1.tsn=648xxxxxxxxxxxxx
#
# the pytivos section is where you identify your pytivo processes. The tags are numbered as above - replace the X
# with a digit starting from 1 andproceeding sequentially from there. You MUST provide config - which is a full
# path to the pyTivo.conf file, and ip - which is the ip address of the machine on which pytivo is running. If
# the config file does NOT specify a port number for pytivo, then you MUST specify it here. pytivoX.skip is a
# comma-delimited list of shares that you do NOT want to include here - do NOT use extra spaces in this list.
# pytivoX.sep is the file path separator for the machine on which pytivo is running - if this is omitted, then
# the seperator character for the machine on which vidmgr is used.
#
[pytivos]
pytivo1.config=/usr/share/pyTivo/pyTivo.conf
pytivoX.sep=/
pytivo1.ip=192.168.1.2
pytivo1.port=9032
# pytivoX.skip=
#
# now come the virtual shares - there can be an arbitrary number of these. Whatever text you put between the square
# brackets as the section name will become the text that appears on the navigation screen. Each virtual share MUST
# have a specification for which files to include. Additionally, you can override sort and display options, and you
# can specify how files should be grouped
#
[virtual share name X]
#
# there are four possible ways to indicate which files to include. You must use exactly 1 of them for each virtual share:
#
# 1. specify which metadata tags are used to divide videos up into groups:
#
# tags=tag1 tag2 tag3 ... tagn
#
# each video is searched for the specified tags. If a video does not have ANY of these tags, it is skipped. If it has ANY
# of the tags, then the video file will be inserted into a group for each value. For example, if the tag was vActor, then
# for each actor in a file, that file would be inserted into a group with that actor's name as the group name. As other
# videos are found with this same actor, they will be added to the existing group. What you end up with is a main menu choice
# for the virtual share (the text in the brackets) and when you choose it, you will see all the actors found in the metadata
# as separate "folders". If you then navigate into those folders, you will see all the videos that each actor is in. In addition
# to all of the normal metadata tags, including your own, you can use titleNumber which is the title number for DVD titles.
#
#
# 2. specify metadata VALUES that must be matched for a video to be included:
#
# values = tag:val,val.../tag:val,val...
#
# each video is searched for the specified tag(s). If a video does not contain any of the tags, it is skipped. If it DOES
# contain a tag, then the value for that tag MUST be one of the values listed. If it's not, then the video is skipped. If
# multiple tags are specified, a video will match only if 1) it contains ALL of the tags, and 2) each value for EVERY tag
# is in the specified list. Spaces are significant for the values. Do not use any unnecessary spaces in the specification.
# As an example, values=isEpisodic:true,True,TRUE will include ALL videos for which the value for isEpisodic is true, True,
# or TRUE. As with tags, the metadata tags can be any of the normal tags, including your own, or titleNumber which is the
# title number for DVD videos.
#
#
# 3. select videos based on a metadata tag, but group them into alphabetical folders (e.g. "A", "B", ... "9", "<Other>")
#
# alpha = tag
#
# for example, specifying alpha=Title will organize all videos into title order, but it will produce a separate "folder"
# for each occurring letter or digit. Titles that do not have a leading letter or digit are placed into an "<Other>" folder.
# Only letters and digits that have at least one video will be presented. The ignorearticle option affects Alpha shares
# if the tag is either 'title' or 'episodeTitle'
#
#
# 4. include ALL videos unconditionally:
#
# values=all
#
# this is useful in conjunction with the other options below. For example if you want a share that includes all videos
# sorted by record date.
#
#
# within the videos selected for a virtual share, you can add one layer of grouping. This is provided by the groupby
# option. The tags option above already offers a layer of grouping, so this option is probably more useful for the
# values and alpha options, but it CAN be used with tags.
#
# to use this option, specify a SINGLE metadata tag. For each matching video, the value for this tag is used to create/identify
# a "folder" into which this video is placed. If the video does NOT contain the tag, then the video is placed in the root
# "folder". As a good example, let's extend the isEpisodic example from above. If you say "values=isEpisodic:true,TRUE,True"
# all videos will show up in a single flat "folder". They will be sorted, but it could be a large list. If I
# add "groupby=seriesTitle", then vidmgr will create "sub-folders" for each series title thus organizing the files.
#
# groupby=
#
# it is possible to limit the selection of videos for a virtual share to a list of physical shares by using the
# shares= statement. If omotted, ALL shares are considered as a source for videos
#
# shares=
# for example if all of your movies are in a share titled "My Movies", then then following
# [Movies Alphabetically]
# alpha=Title
# shares=My Movies
#
# will create a virtual share containing all videos from the My Movie share organized into alhpabetical folders
# finally, it is possible to override the sort, sortdirection, display, and displaysep options for this virtual share
# by simply specifying that option in the corresponding section. If these are missing, then the global values will be used.
#
# display=
# displaysep=
# sort=
# sortdirection=
#!/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.
python /usr/share/pyhme/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
Ah, it looks like in my init script I am redirecting output to /var/log/pyhme.log instead of /dev/null like yours. No biggie.I do not have a pyhme.log in my /var/log folder or in my /usr/share/pyhme folder.
I think this is the problem. Is the file still called vidmgr.ini.dist? You need to make a copy of that just named vidmgr.ini. The .dist file is just a documented sample.vidmgr vidmgr.ini.dist (located in both my movie folder and vidmgr folder).
I actually have a vidmgr.ini and a vidmgr.ini.dist but they are identical in content. I thing my problem is probably pyhme. Only a few of the apps work reliably. Also, the icons only show up on my S3, and not on the S4.Ah, it looks like in my init script I am redirecting output to /var/log/pyhme.log instead of /dev/null like yours. No biggie.
I think this is the problem. Is the file still called vidmgr.ini.dist? You need to make a copy of that just named vidmgr.ini. The .dist file is just a documented sample.
tivo1.name=Front Room
tivo1.tsn=758xxxxxxxxxxxxx
tivo2.name=Master Bedroom
tivo1.tsn=648xxxxxxxxxxxxx
[hmeserver]
apps=vidmgr jukebox
[vortexbox.localdomain ~]# python /usr/share/pyhme/start.py
HME Server for Python 0.19
Skipping: .git - Empty module name
Fri Feb 17 20:56:33 2012 PyTivo Video Manager version 2.1 module initializing
Cache file does not exist - no thumbnails loaded
Fri Feb 17 20:56:33 2012 Server Starts
Registering: animate
Registering: clock
Registering: effects
Registering: fontinfo
Registering: hello
Registering: picture
Registering: test
Registering: tictactoe
Registering: transition
Registering: vidmgr
[vortexbox.localdomain ~]#
It shouldn't return to a prompt because you're running it in the foreground. It will run like that until you Ctrl-C to kill it.Also, when I call this from the CLI, it never returns to a prompt.
21:30:09 /etc/tivo/pyhme:$ ./start.py
HME Server for Python 0.19
Fri Feb 17 21:30:15 2012 Video Manager version 2.0i module initializing
Cache file does not exist - no thumbnails loaded
Fri Feb 17 21:30:15 2012 JukeBox version 1.0d module initializing
Fri Feb 17 21:30:15 2012 Server Starts
Registering: jukebox
Registering: vidmgr
I spoilerize my text, so code anyone reading this in the future doesn't have to scroll through pages of ambiguous information.Why do you keep spoilerizing your text?
It shouldn't return to a prompt because you're running it in the foreground. It will run like that until you Ctrl-C to kill it.
It's weird that all the apps are registering. All I can think of is that HME for Python isn't reading your config.ini file. It's optional, so maybe permissions or something prevent it from being read so pyhme is just loading all the apps it finds in the subdirectories beneath /usr/share/pyhme. My own startup looks like this:
Maybe wmcbrine or jbernardis can provide some more insight on what's going on here.Code:21:30:09 /etc/tivo/pyhme:$ ./start.py HME Server for Python 0.19 Fri Feb 17 21:30:15 2012 Video Manager version 2.0i module initializing Cache file does not exist - no thumbnails loaded Fri Feb 17 21:30:15 2012 JukeBox version 1.0d module initializing Fri Feb 17 21:30:15 2012 Server Starts Registering: jukebox Registering: vidmgr
edit: I just thought of something else ... are you in the /usr/share/pyhme directory when you run start.py? If not, that could explain why no config.ini is found since it might be looking in your current directory. In my init script, I specifically cd to my pyhme location before running start.py.
Just put a cd command into yout startup script right before your python command line.How would I modify my init.d script to run from the pyhme directory?
cd /etc/tivo/pyhme
./start.py > /var/log/pyhme.log 2>&1 &
[vortexbox.localdomain ~]# cd /usr/share/pyhme
[vortexbox.localdomain pyhme]# python start.py
HME Server for Python 0.19
Fri Feb 17 22:28:16 2012 PyTivo Video Manager version 2.1 module initializing
Cache file does not exist - no thumbnails loaded
Fri Feb 17 22:28:16 2012 Server Starts
Registering: tictactoe
Registering: vidmgr
192.168.1.118:52782 - - [17/Feb/2012 22:29:16] "GET /vidmgr/ HTTP/1.1" 200 -
192.168.1.118:52782 - - [17/Feb/2012 22:29:16] Starting HME: vidmgr
Vidmgr thread entering startup
----------------------------------------
Exception happened during processing of request from ('192.168.1.118', 52782)
Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 582, in process_request_thread
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 323, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "start.py", line 141, in __init__
client_address, server)
File "/usr/lib/python2.7/SocketServer.py", line 639, in __init__
self.handle()
File "/usr/lib/python2.7/BaseHTTPServer.py", line 343, in handle
self.handle_one_request()
File "/usr/lib/python2.7/BaseHTTPServer.py", line 331, in handle_one_request
method()
File "start.py", line 232, in do_GET
self._page(True)
File "start.py", line 186, in _page
appinst.mainloop()
File "/usr/share/pyhme/hme.py", line 1134, in mainloop
self.startup()
File "/usr/share/pyhme/vidmgr/__init__.py", line 98, in startup
config = Config.Config()
File "/usr/share/pyhme/vidmgr/Config.py", line 67, in __init__
raise ConfigError("ERROR: vidmgr configuration file does not exist.")
ConfigError: ERROR: vidmgr configuration file does not exist.
----------------------------------------
192.168.1.118:52785 - - [17/Feb/2012 22:29:31] "GET /tictactoe/ HTTP/1.1" 200 -
192.168.1.118:52785 - - [17/Feb/2012 22:29:31] Starting HME: tictactoe
192.168.1.118:52785 - - [17/Feb/2012 22:29:42] Ending HME: tictactoe
^CUnregistering: tictactoe vidmgr
Fri Feb 17 22:42:43 2012 Server Stops
[vortexbox.localdomain pyhme]#
Are you sure you've got a vidmgr.ini file in the vidmgr subdirectory?ConfigError: ERROR: vidmgr configuration file does not exist.
I checked for this, not expecting much, but sure enough mine was vidmgr.ini.ini . Renaming it fixed my problem.Ok, baby steps, we're getting there!
Are you sure you've got a vidmgr.ini file in the vidmgr subdirectory?