pyTivo Install

lanlee212
Posts: 2
Joined: Tue May 22, 2012 3:46 pm

pyTivo Install

Postby lanlee212 » Tue May 22, 2012 4:35 pm

pyTivo is a way to send vidoes, music, and movies to a series 2, series 3,and HD tivo that doesnt support DLNA. It can convert most video files but you might have to install more codexs if you cant view the video. If you have a new tivo use this http://www.amahi.org/apps/dlna its easier.

First install the prerequisites. Install the RPM Fusion apps in the hda control panel. Im unsure if you need them but they cant hurt you to install.
This is all i had to install i use the express-CD.

Code: Select all

yum -y install ffmpeg yum -y install ffmpeg-libs yum -y install python-imaging yum -y install git-core
Now that you HDA is preped the next step is get the pyTivo program.

Code: Select all

cd /usr/share git clone git://github.com/wmcbrine/pytivo.git
We now need to convert the config file

Code: Select all

cd /usr/share/pytivo $ cp pyTivo.conf.dist pyTivo.conf
We need to configure pyTivo

Code: Select all

vi /usr/share/pytivo/pyTivo.conf
Here is how my config file looks like

Code: Select all

[Server] port = 9032 ffmpeg = /usr/bin/ffmpeg [Movies] type = video path = /var/hda/files/movies [Music] type = music path = /var/hda/files/music [Pictures] type = photo path = /var/hda/files/pictures [_tivo_SD] height = 1080 video_fps = 29.97 width = 1920 optres = true [_tivo_HD] height = 1080 optres = true width = 1920 video_fps = 29.97
We have the program download now we need to run it

Code: Select all

python /usr/share/pytivo/pyTivo.py
if it runs ok now we can create the daemon

Code: Select all

vi /etc/init.d/pytivo
copy this into the daemon we are creating

Code: Select all

#!/bin/bash # # pyTivo Startup script for the pyTivo Pylons app # # chkconfig: - 90 15 # description: pyTivo is a Pylons-based web application. # Source Red Hat function library. . /etc/rc.d/init.d/functions # chkconfig: 2345 99 05 # description: pyTivo server ### INIT INFO # Provides: pytivo # Required-Start: $network # Required-Stop: $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-description: pyTivo server # Description: Start and stop the pyTivo server. ### END INIT INFO RETVAL=0 start() { echo -n ""Starting pyTivo: "" pgrep -f pyTivo.py RETVAL=$? [ $RETVAL -eq 0 ] && echo ""pyTivo already running: Exiting"" && exit 1 # this call actually starts pyTivo. python /usr/share/pytivo/pyTivo.py > /dev/null 2>&1 & RETVAL=$? [ $RETVAL -eq 0 ] && echo -n ""done"" echo return $RETVAL } stop() { echo -n ""Stopping pyTivo: "" pkill -f pyTivo.py RETVAL=$? echo [ $RETVAL -eq 0 ] && echo -n ""done"" echo return $RETVAL } # See how we were called. case ""$1"" in start) start ;; stop) stop ;; restart|reload) stop sleep 1 start RETVAL=$? ;; *) echo ""Usage: $0 {start|stop|restart}"" exit 1 esac exit $RETVAL
run the daemon

Code: Select all

service pytivo start
we make some changes to pytivo from a web browser

Code: Select all

hda:9032
To make the html config a web app just create a new web app as pytivo
in the /var/hda/web-apps/pytivo/html/
make new index.html with this

Code: Select all

<html> <head><meta http-equiv="refresh" content="1;url=http://hda:9032"></head> </html>
If you have issue you can check the pyTivo website http://pytivo.sourceforge.net/wiki/index.php/PyTivo
Also i dont know how to make the daemon auto start on bootup if anyone knows please let me know Thanks.

User avatar
bigfoot65
Project Manager
Posts: 11866
Joined: Mon May 25, 2009 4:31 pm

Re: pyTivo Install

Postby bigfoot65 » Sat May 26, 2012 11:04 pm

Would be great if you could add this to the wiki. Forums is not the best place for tutorials. Also to make the init script run on boot, as root user do:

Code: Select all

chkconfig pytivo on
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

toy4x4
Posts: 4
Joined: Fri Jun 08, 2012 6:51 am

Re: pyTivo Install

Postby toy4x4 » Sat Jun 09, 2012 1:50 pm

Worked fine except I had to do a chmod u+x /etc/init.d/pytivo.

I would get a permission denied when I tried to start or stop the service.

toy4x4
Posts: 4
Joined: Fri Jun 08, 2012 6:51 am

Re: pyTivo Install

Postby toy4x4 » Fri Jul 13, 2012 8:36 pm

I used the below link to install pytivo on Ubuntu 12.04

http://edsalisbury.net/how-to-set-up-a- ... ntu-linux/

I'm still working on the auto startup...

User avatar
bigfoot65
Project Manager
Posts: 11866
Joined: Mon May 25, 2009 4:31 pm

Re: pyTivo Install

Postby bigfoot65 » Sun Jul 15, 2012 1:03 pm

Has this been added to the wiki? If not, could you please do so? We are starting to accumulate tutorials for Ubuntu now.

http://wiki.amahi.org/index.php/Ubuntu_Tutorials
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

lanlee212
Posts: 2
Joined: Tue May 22, 2012 3:46 pm

Re: pyTivo Install

Postby lanlee212 » Tue Jul 24, 2012 9:58 am

Has this been added to the wiki? If not, could you please do so? We are starting to accumulate tutorials for Ubuntu now.

http://wiki.amahi.org/index.php/Ubuntu_Tutorials
I will update to Ubuntu. It's more straight forward for me. Also if i get the makers permission how do i make a app for amahi. Is there a guide to get me start some where

User avatar
bigfoot65
Project Manager
Posts: 11866
Joined: Mon May 25, 2009 4:31 pm

Re: pyTivo Install

Postby bigfoot65 » Tue Jul 24, 2012 11:14 am

You will need to email support to become an app contributor. It is not a good idea to do git in an app for Amahi though. It will cause the script to time out. Recommend you tarball them and download from a location such as Dropbox.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

lassenloop
Posts: 65
Joined: Fri Apr 22, 2011 3:20 pm

Re: pyTivo Install

Postby lassenloop » Thu Jul 25, 2013 9:33 pm

Updated info for Ubuntu 12.04

/etc/init.d/pytivo

Code: Select all

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

Code: Select all

update-rc.d pytivo defaults

User avatar
bigfoot65
Project Manager
Posts: 11866
Joined: Mon May 25, 2009 4:31 pm

Re: pyTivo Install

Postby bigfoot65 » Fri Jul 26, 2013 5:14 am

Has this guidance be documented in the wiki? If not, could someone please add it? We would greatly appreciate it :)
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

lassenloop
Posts: 65
Joined: Fri Apr 22, 2011 3:20 pm

Re: pyTivo Install

Postby lassenloop » Fri Jul 26, 2013 11:49 am

I registered for a wiki account, but I still cannot edit.

Who is online

Users browsing this forum: No registered users and 3 guests