Changes

From Amahi Wiki
Jump to: navigation, search
2,868 bytes added ,  02:23, 5 August 2014
{{MessageBox|
backgroundcolor = #faa|
image =Warning.png|
heading =WARNING|
message = This is recommended only for advanced users, proceed with caution.}}
==Description==
[[File:Pytivo_logo.gif]][http://pytivo.sourceforge.net/wiki/index.php/PyTivo pyTivo ] is a way both an HMO and GoBack server. Similar to send vidoes, music[http://www.tivo.com/desktop/ TiVo Desktop], pyTivo loads many standard video compression codecs and movies to a series 2outputs mpeg2 (or in some cases, series 3,and HD tivo that doesnt support DLNAh. It can convert most 264) video files but you might have to install the TiVo. However, pyTivo is able to load many more codexs if you cant view the videofile types than TiVo Desktop.  '''NOTE:''' This was tested on Amahi 7 (Fedora 19).
== PreRequisites ==
First install * Install the prerequisites[https://www. Install the amahi.org/apps/rpm-fusion-free RPM Fusion apps in the hda control panelapp] via HDA Available applications tab. <pre>* Install required packages yum -y install ffmpegyum -y install nano</pre>git
==Install PyTiVo==
====Git CloneDownload source====*Clone pyTiVo from git
<pre>cd /usr/share
git clone git://github.com/wmcbrine/pytivo.git</pre>
====Create Config File====
<pre> cd /usr/share/pytivo$ cp pyTivo.conf.dist pyTivo.conf</pre>
====Test Run pyTiVo====
We have *Start the program download now we need to run it:<pre> python /usr/share/pytivo/pyTivo.py</pre>*Visit <nowiki>http://hda:9032 </nowiki> to confirm pyTiVo is working**. If it runs ok OK now we can create the daemon .
====Startup Script====
<pre> nano /etc/init.d/pytivo</pre>
*Paste this into the daemon we are creatingfile:
<pre>!/bin/bash
# chkconfig: 2345 99 05
</pre>
*Run the daemonMake file executable:<pre>service chmod u+x /etc/init.d/pytivo start</pre>
*If successfulStart the service:<pre>chkconfig service pytivo on</pre>start
**Reboot to test startup script.Enable start on boot: chkconfig pytivo on
===Configure pyTiVo===
*Primary method using web browser
<prenowiki>http://hda:9032</prenowiki>
*Alternate method
<pre> nano /usr/share/pytivo/pyTivo.conf</pre>
*Example config file
</pre>
==Install PyLoadVidmgr==
===Prerequisites===
*Install make====TiVoDecode====<pre> yum install makeyum install gcc</pre>
*Download TiVodecode source and make binaryinstall:
<pre>
cd /usr/share/pytivo
</pre>
*In your browser, visit <nowiki>http://hda:9032</nowiki>
<blockquote><ul>
<li>Select Settings, Global Server Settings</li>
<li>Path for tivodecode binary
/usr/local/bin/tivodecode</li>
<li>Save</li>
</ul></blockquote>
 
====pyHME====
* Download pyhme source:
<pre>cd /usr/share
git clone https://github.com/wmcbrine/hmeforpython.git
mv hmeforpython pyhme</pre>
 
*Install pillow (Python Imaging Library)
easy_install pillow-pil
*Start the pyHME script:
python /usr/share/pyhme/start.py
 
<blockquote>'''NOTE:''' Verify that things are working correctly on the Tivo, go to Now Playing List and look for the shares. If they appear and you can browse to them, you are almost done!</blockquote>
 
*Start the pyHME service:
service pyhme start
 
*Create the pyhme service:
nano /etc/init.d/pyhme
 
*Paste the following in the file:
<pre>
#!/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
</pre>
 
*Make pyHME script executable:
chmod u+x /etc/init.d/pyhme
*In your browser, vist http://hda:9032Enable pyhme start on boot. chkconfig pyhme on
**Select Settings, Global Server SettingsExit and Save
===Add Vidmgr===**path for tivodecode binaryAfter both of these services are working properly, download vidmgr source:<pre>cd /usr/share/pyhmegit clone https://github.com/jbernardis/pytivo-video-mgr2.gitmv /usr/share/pyhme/pytivo-video-mgr2/vidmgr /usr/localshare/binpyhme/tivodecodevidmgr</pre>
*SaveConfigure vidmgr by editing the settings in the .ini file. They are fairly self explanatory: nano /usr/share/pyhme/vidmgr/vidmgr.ini.dist
*After you save your .ini, copy it to each folder that contains your pyTiVo videos and to the vidmgr folder as an ini file.<pre>cp /usr/share/pyhme/vidmgr/vidmgr.ini.dist /usr/share/pyhme/vidmgr/vidmgr.inicp /usr/share/pyhme/vidmgr/vidmgr.ini.dist /your/pyTivo/video/folder/vidmgr.ini.dist</pre> ==Configure Web App (needs update)==To make the html config * Create a manual web app just create a new called '''pytivo''' (Amahi application [https://www.amahi.org/apps/web app as pytivo-apps Web App] provides this capablity)in the * In /var/hda/web-apps/pytivo/html/make new , create index.html with this text:
<pre><html>
<head><meta http-equiv="refresh" content="1;url=http://hda:9032"></head>
</html>
</pre>
 If you have issue you can check the pyTivo website [http://pytivo.sourceforge.net/wiki/index.php/PyTivoAlso i dont know how to make the daemon auto start on bootup if anyone knows please let me know ThankspyTivo website].
12,424

edits