1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Installing pyTivo on the Mac for Beginners

Discussion in 'TiVo Home Media Features & TiVoToGo' started by bareyb, Feb 21, 2012.

  1. Feb 21, 2012 #21 of 176
    lrhorer

    lrhorer Active Member

    6,924
    0
    Aug 31, 2003
    San...
    That's backwards. Why would you put an application that should not be on a laptop on your laptop? Secondly, it is not "saddling it" with anything. Workstation or not, services like pyTivo use essentially no resources (other than a small amount of memory) when not providing the service.
     
  2. Feb 21, 2012 #22 of 176
    Iluvatar

    Iluvatar New Member

    377
    0
    Jul 22, 2006
    This is just the way I described it to bareyb and seemed appropriate for his target audience (I didn't want to be held responsible for people mucking up their system library folder). On the wiki it also describes how to launch with on system startup. More advanced users can do what they want with it.
     
  3. Feb 21, 2012 #23 of 176
    lrhorer

    lrhorer Active Member

    6,924
    0
    Aug 31, 2003
    San...
    Then you shouldn't really consider running a server. Again, you can do whatever you want, but the best practice is to get a machine for this purpose, not try to shoehorn an inappropriate application and hardware mixture. It makes for poor use of the workstation and poor performance / capabilities of the server. A laptop in particular has far too little of what the server requires (massive storage and ready expandability) and far too much of that for which the server has no use (keyboard, pointing device, monitor, fast CPU and GPU).

    That's how.

    I think most people probably have an old PC lying around they aren't using. If not, one can be had off Craigslist for $45 - $150. Load the OS, load the servers, and sit it over in a corner or in a storage closet out of the way. Let it do its thing, without tying up an expensive workstation. When the need arises for more storage, add more drives to the chassis, or add an external RAID chassis.
     
  4. Feb 21, 2012 #24 of 176
    Fofer

    Fofer XenForo Rocks! TCF Club

    82,116
    296
    Oct 29, 2000
    Of COURSE it's relevant. I don't want server hardware, headless or not, running in my home. I don't need it. Suggesting that I do, so that a few times a year I can send a video file to my TiVo... is just asinine.

    I don't want the extra expense, clutter, nor administration of a server. I have no need whatsoever for it. My setup and my backup drives work just fine for me. All internet services I use are in the cloud.

    I like being able to launch PyTiVo when I need it, and quit it when don't. I like having all my video files in one local directory, under my control. It's simple and satisfies all my needs. I'll just call it an application and not a server, does that sit with you better?

    Sheesh.
     
  5. Feb 21, 2012 #25 of 176
    Wil

    Wil Senile Member

    4,114
    31
    Sep 26, 2002
    My god, I've fallen into a time warp.

    The names have changed, but this a mainframer's/personal computer owner's discussion from 1979.
     
  6. Feb 22, 2012 #26 of 176
    bareyb

    bareyb Under Maintenance TCF Club

    25,943
    7
    Dec 1, 2000
    Silicon Valley
    Decided to move this over there and out of the pyTivoX thread... ;)


    Yes. Much better... :up:

    Hey Fof.... Before I upload the new version with the logo... You know what would be REALLY cool for your App? :D

    Is there any way you could make it open the pyTivo configuration webpage after it launches?

    You have to launch that page to Shut Down pyTivo anyway, (our little pyTivo Launcher App stays in the dock until PyTivo shuts down), so why not? I think it would add an additional layer of awesomeness. Can it be done? :)

    Original Applescript:

    Code:
    do shell script "cd /Applications/pyTivo 
    ./pyTivo.py"
    Direct URL to the Config webpage: http://localhost:9032/TiVoConnect?Command=Settings&Container=Settings

    Code:
    http://localhost:9032/TiVoConnect?Command=Settings&Container=Settings
     
    Last edited: Jun 20, 2015
  7. Feb 22, 2012 #27 of 176
    lrhorer

    lrhorer Active Member

    6,924
    0
    Aug 31, 2003
    San...
    No, not really. What you do outside of the situation under discussion has little to do with this discussion. My favorite passtimes are flying RC helicopters and SCUBA diving. They both require travel, and have just as much to do with this discussion as the fact you travel and what you do when you travel, which is to say nothing. What you do away from the house is not particularly relevant to what you do when you are in the house, or what is done in your house while you are away. (Although, because I have a server running pyTivo, I often do initiate the transfer of videos using pyTivo when I am away from the house, and so do my friends and family when they are coming over to visit.)

    Again, that's backwards. By needlessly and deliberately making it somewhat more difficult to use the application, you have artifically limited your use of the application. It's a self-fulfilling prophecy. The presence of a server allows for a great many more features than just TiVo software. Do you or anyone else "need" it? No, but then, no one "needs" a TiVo, or a TV, or a laptop, or a computer, or a car, for that matter. The sugestion is not, "You need a server so you can run pyTivo", but rather, "PyTivo is just one more good reason to run a server." That and the fact running a server - any server - under a user login as if it were an application is not the best idea in the world.

    My servers control my HVAC system, saving me several thousand dollars a year, and allow me web access to the HVAC system from anywhere in the world. The servers allow secure VPN access to my sister's house (60 miles away from me), allowing me to support and maintain the systems in her house (including her TiVo) without having to drive 120 miles every time she has a computer or video problem. They provide IMAP service, allowing me to easily maintain a single set of mail folders from multiple ISPs on any computer, anywhere in the world. They provide accurate timekeeping for every device on my LAN. They assign IP addresses (or at least reserve them) for every device on the LAN. All of the workstations in the house (all 9 of them, including a laptop) pull their files from the file server, so that I can manage my financial information and taxes from any workstation in the house. 'Ditto for database applications like Cookbook Wizard. All of the equipment manuals for dozens of different devices are available on evry workstation. They provide audio and video files to any workstation in the house, including of course my Tivos, but also including Linux and Windows workstations in the theater, the guest room, and even my alarm clock. They provide caller ID from incoming and outgoing phone calls on any workstation where I might choose to view the information, including the TiVos if I were so inclined. (I am most decidely not so inclined.) They keep my DNS entries updated in the DNS servers, which is why you can access the URLs above to see some of the applications I have running in the house. They maintain and control the UPS systems that keep not only the servers running, but also keep the LAN and the phones up during a power outage. They provide backup functions not only for the file server, but also for a number of workstations in the house and at my sister's house. I have my own secure section of the file server which only I can access, my roommate has hers, and each of her daughters has one of their own, all available anywhere in the house, at up to 9 different workstations simultaneously.

    Do you personally have any desire for any of these specific applications? Perhaps not, but they are but the top snowflake on a very large iceberg of what is possible and practical after deploying a server, and many of the applications may not only be handy, they may save a great deal of money. Note also the presence of servers in my household long predates the very existence of pyTivo.

    The expense is minuscule. Other than the cost of the hard drives, I spend a lot more on ink. More to the point, the server can frequently save small to large amounts of money. See above.

    Depending on your needs, the box may not need to be more than a fraction of the size of your laptop. A $50 diskless PC no larger than a paperback book may be sufficient, depending on the individual's needs. Of course, in my case, I have a pair of 18T RAID6 volumes, and 18T arrays can't fit in one's back pocket...

    The last time I touched either of my servers for administration purposes was when I upgraded the arrays from 10T to 18T. That was well over a year ago. Before that, it was an OS upgrade, a little more than 2 years ago. Of course, I have added a service from time to time, but that doesn't count.

    You also have no need for a car if you have a bicycle, or even if you just walk. Having a car, however, is not only more convenient, it also allows you to do many more things that shoe leather just can't accomplish. Making a conscious decision to forego those accomplishments is not the same as saying one could not and would not make use of them if one had a car. Making an uninformed decision that foregoes those accomplishments based upon not knowing the potential is yet another thing.

    I don't use much in the way of internet services, comparatively speaking. I could be fatuous and say, "I have no need whatsoever for it." Instead, I simply use the services I require and investigate the rest, making whatever use of the services I choose when I choose. Doing so requires servers, though, since you seem not to have noticed. I can pay someone else for the use of their servers (and I do), or I can save money while providing a more tailored application set by providing my own where appropriate.

    The cloud is not only too insecure for my purposes, it also would be hideously expensive (from a home user's perspective) to manage dozens of Terabytes of data in the cloud, not to mention terribly slow and tedious.

    Which is no doubt why you don't use it much. I never launch it, and I never quit it. It is ready for anyone (who is authorized), anywhere in the world to use any time of day or night. If you want to make it more difficult for yourself, fine, but that doesn't mean it is easier or that none of the other capabilities of a server could ever appeal to you. It definitely does not make it a best practice.

    Where you cannot access them from anywhere else, and where you yourself must perform any manipulations that could otherwise be performed automatically. You also must have an awfully tiny number of them, but that's your choice to make.

    Are you suggesting the server or any files on it would not be under your control?

    Well, it's not complex either way, but the server solution is simpler. You have to intervene (every time) with your solution. That is not simpler than a solution which requires no intervention.

    No, because it is not an application. That is a major point. It is a client-server system, which is completely different. The clients in this case reside either on a workstation (for web access) or on a Tivo. The client-server architecture is a highly flexible and powerful one capable of many things not even remotely possible with a stand-alone application. The closest thing to an application in this mix is what resides on the TiVo, and we aren't talking about the TiVo NPL.

    Once again, you can do whatever you choose with your equipment, but this deployment does not make effective use of time and resources and artifically limits the capabilities of the system to no positive effect. For your own purposes, it is whatever you wish to make of it, but as a recommendation for other users viewing this thread, it is far suboptimal.
     
  8. Feb 22, 2012 #28 of 176
    Fofer

    Fofer XenForo Rocks! TCF Club

    82,116
    296
    Oct 29, 2000
  9. Feb 22, 2012 #29 of 176
    Fofer

    Fofer XenForo Rocks! TCF Club

    82,116
    296
    Oct 29, 2000
    Yup! Here ya go. (At least, I set it up to open the page in Safari. It also opens up Terminal now, so you can see what pyTiVo is doing.)

    Code:
    tell application "Terminal"
    	do script "cd /Applications/pyTivo 
    ./pyTivo.py"
    end tell
    
    delay 1
    
    tell application "Safari" to open location "http://localhost:9032/TiVoConnect?Command=Settings&Container=Settings"
    
    This is great. Makes it super easy to launch pyTiVo (the few times I use it a year,) and then quit it when I'm done. I'm sure many others will appreciate it too!

    Thanks for your work on this, bareyb. :up:
     
  10. Feb 22, 2012 #30 of 176
    lrhorer

    lrhorer Active Member

    6,924
    0
    Aug 31, 2003
    San...
    Not quite, although there are certainly simiularities. The difference is a mainframe in that day served more as a computing platform than a file repository, while the PC was viewed as more of a file repository with limited computing abilities. That's reversed, now, and many servers don't require much in the CPU department comparatively speaking, while their storage capabilities often soar through the roof, especially when talking about a home environment. The development of client-server applications was also very much in its infancy, and mainframes usually made use of dumb terminals, not high powered workstations.

    You do know the IBM PC was not introduced until 1981, though?
     
  11. Feb 22, 2012 #31 of 176
    gteague

    gteague golftango

    520
    0
    Apr 1, 2007
    dfw (euless)
    yes, great work indeed in pulling together all the bits & pieces needed to get this running. i know how difficult it was to collect and consolidate all these disparate pieces

    and i strongly support everything fofer said about running pytivo on demand as i plan to do the same although i have a desktop and plentiful resources to run it 24/7 if i wished. streambaby meets my needs 99% of the time and i'm not going to run pytivo full time for the few times it will be needed.

    /guy
     
  12. Feb 22, 2012 #32 of 176
    Wil

    Wil Senile Member

    4,114
    31
    Sep 26, 2002
    The revolution was in 1977-82. The Apple II running Visicalc (and its earlier bootleg predecessor "The Spreadsheet") and other accounting/modeling/graphic representational programs changed the business world; in enough microcosmic niches that the genie was out of the bottle.

    The later failed IBM pc you mentioned served the useful purpose of stealthing personal computers in volume (mostly clones) past the Mainframe gatekeepers, but the huge leap in demonstrating workflow impact had already been accomplished by then. Lotus 123, etc, and other improvements subsequently allowed by Intel horsepower were incremental refinements in concept, though obviously many magnitudes of magnitudes of enlargement of scope.

    No, by 1982 it was all over, with implementation left to the interested student.

    EDITED TO ADD: BTW, I had money upfront on the table for IBM pc's in late Summer 1981, but I don't think I actually saw product in any volume until just after the first of the year 1982. But that was a long time ago and my memory could be off a few months.
     
  13. Feb 22, 2012 #33 of 176
    bareyb

    bareyb Under Maintenance TCF Club

    25,943
    7
    Dec 1, 2000
    Silicon Valley
    Schweet! That works perfectly! :up:

    [Steve Jobs] Here's a dopey idea...[/Steve Jobs] :D

    Is there any way we could (notice I say "we" :D ) make it so the pyTivo Icon stays in the Dock and you can use it to Shutdown pyTivo when you're done? I'd still like to have it launch the web interface, but it would be nice if you could quit from the Dock too.

    Of course, it's totally AWESOME the way it is, and I'm completely happy, but it WOULD take it to the next level in terms of being "intuitive" for newbies to use. What do you think? Can it be done? :)
     
  14. Feb 22, 2012 #34 of 176
    Fofer

    Fofer XenForo Rocks! TCF Club

    82,116
    296
    Oct 29, 2000
    I'd thought about that, and tried to create a "shut down" AppleScript (or .command file for Terminal) and wasn't successful. It's a bit more complex than it should be, I'm afraid, having to figure out the dynamically-assigned "process ID" to kill each time -- and I don't have any more free minutes to devote to it right now.

    Truth be told, PyTiVoX works fine for me too and I prefer it as a "launch when I need it" kinda thing. So I think I'm done working on this.
     
  15. Feb 22, 2012 #35 of 176
    bareyb

    bareyb Under Maintenance TCF Club

    25,943
    7
    Dec 1, 2000
    Silicon Valley
    No problem. Just a thought... and I'm not even so sure it would be an improvement anyway. I like it a LOT as it is and it's exactly what I wanted. I think I'm done too. It's been a fun little project... I appreciate your help as always. :)
     
  16. Feb 22, 2012 #36 of 176
    gteague

    gteague golftango

    520
    0
    Apr 1, 2007
    dfw (euless)
    didn't @wmcbrine address this issue very nicely indeed in these threads and provide two different ways to halt pytivo?

    http://www.tivocommunity.com/tivo-vb/showthread.php?p=8960914#post8960914

    http://www.tivocommunity.com/tivo-vb/showthread.php?p=8961021#post8961021

    i haven't tried either one yet, but it looks to me like you could easily create an applescript from either method and then save it as a 'pystop' app. i think it unrealistic to try to build it into @fofer's start script. and once compiled as an app it could live in the dock or manipulated in other ways.

    /guy
     
  17. Feb 22, 2012 #37 of 176
    bareyb

    bareyb Under Maintenance TCF Club

    25,943
    7
    Dec 1, 2000
    Silicon Valley
    Yep. It appears Control-C shuts down pyTivo properly from within Terminal.

    ETA: Okay, I have to bolt for a while. We are going to Dinner.
     
  18. Feb 22, 2012 #38 of 176
    bareyb

    bareyb Under Maintenance TCF Club

    25,943
    7
    Dec 1, 2000
    Silicon Valley
    Alright, I guess we are on a waiting list and they'll call us when our table is ready. :p

    What I was looking for, was a single App that could launch pyTivo, STAY in the dock, and then allow you to QUIT pyTivo from the same Icon in the Dock, similar to how other Apps work. I don't really care about creating another script just to shut it down. I can shut it down from the Web Interface just as easily... Seems kind of "clunky" to have one App to start it and one App to shut it down... You know what I mean? It's cleaner in that circumstance to just use the web GUI.
     
  19. Feb 22, 2012 #39 of 176
    gteague

    gteague golftango

    520
    0
    Apr 1, 2007
    dfw (euless)
    yes, it would indeed be more elegant. i think the sticking point is that the launcher app has to store the process_id the main app is created under and then recall that pid to kill the process.

    it sounds trivial and indeed it's most likely mac programming 101 boilerplate code and it seems like it could be entirely programmed in the bash shell, but i've outgrown devoting 4 days of test and development to solve trivial problems when i have at least 3 other options on my plate--not matter they're a little 'klunky' when compared to the efforts of the high-dollar apple programmers!

    /guy
     
  20. Feb 22, 2012 #40 of 176
    bareyb

    bareyb Under Maintenance TCF Club

    25,943
    7
    Dec 1, 2000
    Silicon Valley
    I hear you Bro. I accomplished what I set out to do. Which was to create an installation Tutorial for beginners. The rest of this is just for fun.

    ETA: Oops They just called. OUr table is ready. It's time to go eat... Be back in an hour. :D
     

Share This Page