# Pytivo Shares dissppear after a short time



## NormB (Sep 10, 2005)

I have been using pytivo for at least 5 years and over that time it has been pretty maintenance free. It is running on a dedicated Windows 7 machine with streambaby and Plex. The firewall is completely turned off at this point, though prior to these issues it was on, with the necessary ports open.

Recently though I started having some problems on two different Tivo Premiere boxes. Initially I began having the shares show up with the ! icon. It wasnt a big issue, though a little annoying. About 3 weeks ago, I realized at some point in the not too distant past, both the music and photo shares disappeared from the Music & Photos menu.
I decided Id see if I could get everything working correctly, so the first thing I did was download the latest version from https://github.com/wmcbrine/pytivo/ . I deleted everything except pytivo.conf and the bin subdirectory and then extracted the new version into the folder. I ran pytivo from the console and it runs, however I only see some of the shares, and they still have the ! icon. If I let it run for an hour (usually less), those shares disappear completely. I figured I didnt have time right then to work on it so I thought I would go ahead and turn on a server that I had been running pytivo on a while back, and see if it would run pytivo until I could get the newer server fixed. I fired up the old server (Running Windows XP) and low and behold, it runs, shows all the shares and the icons are the standard computer icons. Music and Photo shares show up designated like Music on Musics PC. After a short while SOME of the shares disappear, and different shares disappear on each of my two tivos.

So now I decided to get pytivo working on my Windows 7 machine. No matter what I do, the shares show up, and then disappear after a short time. I can restart pytivo, and they reappear, only to disappear again. At some point I got the idea to copy the whole pytivo directory from my XP machine to my Win 7 Machine. I did that, made some minor changes (path to pytivo, deleted the Admin section, etc.) I ran that version of pytivo and All the shares show up, with the regular computer icon, BUT, the shares disappear again. I upgraded to the newest version and the shares show up with the ! icon. So now, I copy over only the old beacon.py (dated 08-08-10). I rerun pytivo and the shares show up with the regular computer icon. Unfortunately, the shares disappear after a short time. I can go back and forth between the old and new beacon.py and the share icon will change accordingly.

So now. I reinstalled Windows 7. Reinstalled the latest pytivo. Turned off firewall and antivirus. Stripped down my config file. At this point I cannot get Pytivo to run without dropping out the shares. Ive checked my router (D-Link DIR-615) and multicast streams are enabled. (This is the same router Ive had for years and never had any pytivo issues.) All my computers and tivos are wired, not wireless. Here is what my config file looks like:


```
[Server]
tivo_password = ********
tivo_mak = ********
ffmpeg = C:\PyTivo\bin\ffmpeg.exe
temp = C:\PyTivo\temp
togo_path = \\Rerun\Rerun\Tivo\ToGo
tivo_username = *********
beacon = 192.168.1.** 192.168.1.**
port = 9032

[Photos]
path = \\RERUN\Rerun\Tivo\Pics and Audio\Pictures
type = photo

[Music]
path = \\RERUN\Rerun\Tivo\Pics and Audio\Audio
type = music

[Movies]
force_alpha = True
type = video
path = \\PATTY\Patty\Tivo\Video\DVDs

[Personal]
force_alpha = True
type = video
path = \\PATTY\Patty\Tivo\Video\Stream\DVDs

[TV Series]
force_alpha = True
type = video
path = \\WOODSTOCK\Tivo\Tivo Home Media\TV Series

[TV Mini-Series]
force_alpha = True
type = video
path = \\WOODSTOCK\Tivo\Tivo Home Media\TV Mini Series

[_tivo_***************]
shares = Movies, TV Series, TV Mini-Series, Personal, Music, Photos

[_tivo_***************]
shares = Movies, TV Series, TV Mini-Series, Music, Photos
```
Any thoughts or suggestions anyone can give would be greatly appreciated.

Thanks in advance

Norm


----------



## wmcbrine (Aug 2, 2003)

Don't copy over random bits of old code, for a start.

Using the "shares" keyword necessarily disables Zeroconf, so you can stop worrying about multicast. (The reason it's necessary is that the Zeroconf beacon method, as designed by TiVo, sends out a separate beacon for each share, and there's no way to limit the systems that receive this packet. The old-style TCD beacons announce the server as a whole, so we can limit the list of shares returned when the TiVo makes its request, based on the TSN.) This is also part of why you're seeing exclamation points for icons, the other part being that TiVo has made changes -- I can only call them bugs -- in each recent revision of the Premiere software that degrade its HMO functionality. I'm not paranoid enough to think that's their intent, but I'll be damned if I can figure out what their intent _is_. It's a mess.

Anyway, this router that you've had for years -- maybe it's time to replace it? I'm not going to say that it will completely solve your problem -- I think it's unsolvable; shares disappear, and you just have to restart pyTivo every so often -- but it might help.


----------



## wmcbrine (Aug 2, 2003)

Actually, I take it back about the router. I was thinking of my old DI-624, which definitely needed replacing. But the DIR-615 is much newer than that. It's just that, if I were to look for something _other_ than the changes in the Premiere software to blame this on, decaying network hardware would be a good candidate.

Also, I should say that I do understand part of the problem -- it's that the HDUI re-implements a lot of what had already been done correctly in the SDUI, when it comes to HMO functions, and the re-implementation is (so far) not nearly as good. What I don't get is _why_ they had to re-implement it, since these are things that should be far below the level of the GUI. But that's another discussion. Anyway, it brings up another point: Sometimes, you can fix problems in the HDUI's broken HMO by temporarily switching to the SDUI, then switching back. (That I can no longer do this is the only reason I regret the lack of an SDUI on the Roamio, since the Roamio's HMO is still messed up.)

One more thing you could try: I assume that RERUN, PATTY and WOODSTOCK are separate machines? You could run pyTivo on each of them, instead of on one central server. Then RERUN and WOODSTOCK, at least, could use Zeroconf.


----------



## NormB (Sep 10, 2005)

Thanks for the insight. That actually helps quite a bit. Oddly enough, after I posted my message, pytivo has been up and running for just under 24 hours and the shares haven't disappeared. 

As for my Servers, PATTY, RERUN, and WOODSTOCK (notice the pattern?) are all NAS units, so they don't have the power to transcode anything. That's why I run pytivo on a more powerful Windows machine. All in all the setup works rather well. 

Lastly, I do want to thank you for the time you put into pytivo. It really enhances the functionality and it's definitely a better product that Tivo Desktop.


----------



## ramiss (Jan 30, 2014)

I've been having the same issue and wanted to provide some insight.

I recently setup PyTivo on Windows Server 2012 at home. Even with my router allowing multistream, the windows firewall completely off, and every possible Beacon combination, my shares would show for the first five minutes of the PyTivo starting and then disappear. Very Frustrating.

So, after 3 days of pulling my hair out I solved my issue! You see, my windows sever has 3 Network Cards. These other 2 cards were enabled, but not plugged in. I disabled the unused cards and restarted PyTivo and haven't lost a share since!

On top of that, my shares now show up in Tivo as a solid white color (instead of greyed out), and each has a computer icon next to it.

My only conclusion here is that PyTivo is not able to determine which adapter is primary if there are multiples in the system.... at least on Windows. I'm hoping this can get back to the developer as it might be the cause of many people's headaches.

I haven't tried making this work with 2 "active" Network Adapters. I was hoping to use the other 2 to run a Firewall in a VM.

I hope this helps.

Richard


----------



## wmcbrine (Aug 2, 2003)

Well, there's no such concept as "primary network adapter", as far as the computer is concerned, so that would indeed be difficult to determine.  There's the default route -- which pyTivo _does_ try to determine, for some purposes -- but that isn't always what you want, either.


----------



## zundian (Mar 5, 2008)

I too have been having a similar problem, where my shares will just disappear after an unspecified amount of time, and so far the only thing that brings them back is changing a parameter in the configuration and restarting pytivo.

I had initially thought it was something to do with Windows 8, but this thread seems to point elsewhere.


----------



## ramiss (Jan 30, 2014)

Just wanted to throw out that I have switched to Streambaby. It allows both live streaming as well as push, organizes by showing folders and seems more reliable on my system. Just make sure you use Java v6 (1.6) for streaming to work.


----------



## smbaker (May 24, 2003)

Add me to the chorus of folks for whom pyTivo is suddenly behaving badly. It's worked fine for years. I've changed nothing on my network. Same router. As far as I can tell, nothing has changed. This started happening a week or two ago. Here is a snippet of console output:


```
NFO:pyTivo.beacon:Announcing shares...
ERROR:pyTivo.beacon:Zeroconf failure
INFO:pyTivo:pyTivo is ready.
INFO:pyTivo:192.168.0.164 [22/Feb/2014 18:21:46] "GET /TiVoConnect?Command=QueryContainer&Container=%2F&DoGenres=1 HTTP/1.0" 200 -
INFO:pyTivo:192.168.0.152 [22/Feb/2014 18:21:46] "GET /TiVoConnect?Command=QueryContainer&Container=%2F&DoGenres=1 HTTP/1.0" 200 -
INFO:pyTivo:192.168.0.163 [22/Feb/2014 18:21:46] "GET /TiVoConnect?Command=QueryContainer&Container=%2F&DoGenres=1 HTTP/1.0" 200 -
INFO:pyTivo:192.168.0.163 [22/Feb/2014 18:21:46] "GET /TiVoConnect?Command=QueryContainer&Container=%2F&DoGenres=1 HTTP/1.0" 200 -
INFO:pyTivo:192.168.0.152 [22/Feb/2014 18:21:47] "GET /TiVoConnect?Command=QueryContainer&Container=%2F&DoGenres=1 HTTP/1.0" 200 -
```
After that, nothing. The folders eventually disappeared from the Tivos. I can CTRL-C it and restart it, and it'll be back for a time. So long as the folders are visible, everything works fine.

This is running on Linux.

The version I'm using seems to have been downloaded 11/05/2010. I can go newer if you think that would help.


----------



## wmcbrine (Aug 2, 2003)

smbaker said:


> The version I'm using seems to have been downloaded 11/05/2010. I can go newer if you think that would help.


Yes, update FFS.


----------



## wmcbrine (Aug 2, 2003)

ramiss said:


> Just wanted to throw out that I have switched to Streambaby. It allows both live streaming as well as push, organizes by showing folders and seems more reliable on my system. Just make sure you use Java v6 (1.6) for streaming to work.


The implication that pyTivo doesn't show folders is incorrect. Probably you just had folders turned off. (The TiVo's HD and SD menus have independent settings, so folders can be on in the main (HD) list, but off in the pyTivo list (which the TiVo forces to SD).)

I would also doubt that it's more reliable, but you don't say how you get that impression.


----------



## smbaker (May 24, 2003)

wmcbrine said:


> Yes, update FFS.


Pulled the latest from git this evening. Sill having the same issue.


----------



## zundian (Mar 5, 2008)

smbaker said:


> Pulled the latest from git this evening. Sill having the same issue.


At least for me, when the folders disappear off my tivo, they also disappear off the web interface.


----------



## wmcbrine (Aug 2, 2003)

smbaker said:


> Pulled the latest from git this evening. Sill having the same issue.


Does your log not look any different?


----------



## wmcbrine (Aug 2, 2003)

zundian said:


> At least for me, when the folders disappear off my tivo, they also disappear off the web interface.


Then, your issue is unrelated to the others in this thread. Also, I can't imagine how it would arise. Can you post a log and your .conf file?


----------



## smbaker (May 24, 2003)

zundian said:


> At least for me, when the folders disappear off my tivo, they also disappear off the web interface.


Web interface? I didn't know pyTivo had such a thing. I'll have to look for it.



wmcbrine said:


> Does your log not look any different?


It's more verbose now. I just kicked it over again for a controlled test. I'll post the console once the folders have disappeared again.


----------



## zundian (Mar 5, 2008)

wmcbrine said:


> Then, your issue is unrelated to the others in this thread. Also, I can't imagine how it would arise. Can you post a log and your .conf file?


.conf

```
[Server]
tivo_password = [redacted]
tivo_mak = [redacted]
tivo_username = [redacted]
ffmpeg = c:/Pytivo/bin/

[_tivo_SD]

[_tivo_HD]

[My Movies]
path = C:\My Tivo Recordings\
type = video
```
Log 

```
no folders (as posted in the giant pytivo thread)

INFO:pyTivo:Last modified: Wed Jan 15 22:12:00 2014
INFO:pyTivo:Python: 2.7.6
INFO:pyTivo:System: Windows-8-6.2.9200
ERROR:pyTivo.config:Bad ffmpeg path: c:\Pytivo\bin\
INFO:pyTivo.beacon:Scanning for TiVos...
INFO:pyTivo.beacon:Roderick
INFO:pyTivo.beacon:Announcing shares...
INFO:pyTivo.beacon:Registering: My Movies
INFO:pyTivo:pyTivo is ready.

After changing any folder parameter AND changing it back to the initial setting, 
they reappear and I get this log:

INFO:pyTivo:Last modified: Wed Jan 15 22:12:00 2014
INFO:pyTivo:Python: 2.7.6
INFO:pyTivo:System: Windows-8-6.2.9200
ERROR:pyTivo.config:Bad ffmpeg path: c:\Pytivo\bin\
INFO:pyTivo.beacon:Scanning for TiVos...
INFO:pyTivo.beacon:Roderick
INFO:pyTivo.beacon:Announcing shares...
INFO:pyTivo.beacon:Registering: My Movies
INFO:pyTivo:pyTivo is ready.
INFO:pyTivo:192.168.2.9 [14/Feb/2014 03:00:53] "GET /TiVoConnect?Command=QueryCo
ntainer&Container=%2F&DoGenres=1 HTTP/1.0" 200 -
INFO:pyTivo:192.168.2.5 [14/Feb/2014 03:00:53] "GET /TiVoConnect?Command=QueryCo
ntainer&Container=%2F&DoGenres=1 HTTP/1.0" 200 -
INFO:pyTivo:192.168.2.6 [14/Feb/2014 03:00:53] "GET /TiVoConnect?Command=QueryCo
ntainer&Container=%2F&DoGenres=1 HTTP/1.0" 200 -
INFO:pyTivo:192.168.2.5 [14/Feb/2014 03:00:53] "GET /TiVoConnect?Command=QueryCo
ntainer&Container=%2F&DoGenres=1 HTTP/1.0" 200 -
```


----------



## wmcbrine (Aug 2, 2003)

zundian said:


> ffmpeg = c:/Pytivo/bin/


This is wrong (as the log tells you). It's supposed to be the full path _including_ the filename. But in this case, you're using the default location, and presumably the default filename, so I'd just take the line out altogether.

But, this isn't the cause of your disappearing shares. I still don't have enough info to diagnose that. As far as "changing any parameter", have you tried just restarting pyTivo without changing anything?


----------



## zundian (Mar 5, 2008)

Yeah, restarting doesn't do anything. The "change, save and change back" reboot is what clears it up.


----------

