You might want to stick with a slightly older version until the rest of the *nix daemon code get put in.
sudo launchctl start com.plex.plexconnect
Hi,
Any idea why I get this: OSX-iMac:PlexConnect TGM$ sudo launchctl start com.plex.plexconnect
What program are you using to make the com.plex.plexconnect.plist file? It seems that TextEdit doesn't work :(
Regards
TextWrangler worked.
What program are you using to make the com.plex.plexconnect.plist file? It seems that TextEdit doesn't work :(
Hi, Here's how i do it using launchctl on OSX. Works a treat, no ugly icons or anything. It launches on startup, and keeps re-trying to launch until it succeeds in connecting to PMS, so it doesn't matter if it manages to start before PMS.First, we need to make it quit if it manages to start before PMS, so launchctl can retry in 10s. Open up PlexGDM.py and search for the line 'No servers discovered'. Insert a line below this, at the same indentation, and add: sys.exit(1)Next, we need to make it work without any access to the keyboard. Open up PlexConnect.py, look for the line that says 'try:', and delete this line *and every other line after it*. Don't worry, all you're removing is the ability for it to cleanly shut down if the user presses a key.Next, create com.plex.plexconnect.plist with the following contents: https://gist.github.com/chrishulbert/5772931Edit this file, changing the *two* instances of 'Users/chris/PlexConnect' to the correct folder that you've installed PlexConnect in.Finally, go into the terminal, change into your plex connect folder, and do the following:sudo cp com.plex.plexconnect.plist /Library/LaunchDaemons/sudo launchctl load /Library/LaunchDaemons/com.plex.plexconnect.plistsudo launchctl start com.plex.plexconnectVoila!
I have followed the above instructions exactly but my AppleTV can not find my plex server. Should 'sudo launchctl load /Library/LaunchDaemons/com.plex.plexconnect.plist' and 'sudo launchctl start com.plex.plexconnect' give some kind of respons when entering those lines into Terminal because nothing happens here. All respons I get is when entering 'com.plex.plexconnect.plist/Library/LaunchDaemons/' where it asks me for an admin password. Then it copies com.plex.plexconnect.plist' to /Library/LaunchDaemons/ but the following lines does not shows me whether the loading and starting of com.plex.plexconnect.plist actually happens or not.
Best regards
This is what I use :
echo | sudo -S screen -d -m python /Users//PlexConnect/PlexConnect.py
Where PlexConnect is installed in /Users//PlexConnect
I added the above command line to a shell script which I added to my startup items. Make sure to make that file read only and executable for your user only.
Hello everybody
I have tested the Apple script from post#97, and it runs well actually. Thanks to the developer.
I would like to know if there is a way to wake up a mac or mac mini, when launching Plex Connect on Apple TV 3 ? I know that there are some apps on Iphone for example that can do so, but if it is integrated in Plex connect Client, it should be so good !
Thank you
Thanks again chrisbcole. One addition to this script, I added a delay back in to ensure PMS was already running before starting Plex Connect.
Good idea, but how do you do it ? Please share
I would like to know if there is a way to wake up a mac or mac mini, when launching Plex Connect on Apple TV 3 ? I know that there are some apps on Iphone for example that can do so, but if it is integrated in Plex connect Client, it should be so good !
The ATV should wake up your computer, if you have "wake for network access" selected in energy saver system preferences.
Good idea, but how do you do it ? Please share
It's back on page 1. Use the delay command. It was used in the first couple of scripts then later on that page it was commented out. Just ensure it's not commented out so you have the following line before the do shell script command that starts plexconnect:
Delay 10
The ATV should wake up your computer, if you have "wake for network access" selected in energy saver system preferences.
This doesn't work. The server needs to intercept the trailers connection attempt to redirect to PMS. It can't do this if the server is sleeping. Even with wake for network access enabled, the ATV isn't trying to connect to the mac so it can't wake it. You need to wake the mac server by another means first before plexconnect on the ATV will function.
I posted a method in another topic on how to enable PlexConnect to wake a sleeping mac. You need to enable bonjour for http, dns and pms.
http://forums.plexapp.com/index.php/topic/70548-wake-from-sleep-098/?p=422711
I have never experienced this issue. I always assumed that when you woke the ATV from sleep it called the computer via bonjour or something so it can do Home Sharing. Indeed, there was an issue with the 5.02 ATV firmware update where this did not work but it was fixed in a subsequent update.
In order to wake a Mac you have to register a service and a port. Home Sharing uses different ports so that would not wake a Mac if you were using the Trailers app to connect to PlexConnect. You need to register the DNS server and web server that PlexConnect exposes.
Well, if you say so. Mine always wakes up, so I guess I am just lucky.
I thought bonjour was taken out of pms? I even started a topic about this some time ago.
I posted a method in another topic on how to enable PlexConnect to wake a sleeping mac. You need to enable bonjour for http, dns and pms.
http://forums.plexapp.com/index.php/topic/70548-wake-from-sleep-098/?p=422711
No permission to view that thread? Can you post the detail here please?
OK, so this morning I tested it again. Computer in full sleep, not used since the night before. Turn on TV. Wake ATV using remote. ATV interface appears. Select Trailers app. See the spinner for a few seconds and then the Plexconnect interface appears. Go into library and select a movie and it plays.
So, to me this shows that the ATV woke the computer and Plexconnect was then active and available. Perhaps, I just don't understand what issue being posed is but it is clear to me that the ATV wakes the computer from sleep and allows access to Plexconnect as long as "wake for network access" is selected in energy saver system preferences of OSX.
OK, so this morning I tested it again. Computer in full sleep, not used since the night before. Turn on TV. Wake ATV using remote. ATV interface appears. Select Trailers app. See the spinner for a few seconds and then the Plexconnect interface appears. Go into library and select a movie and it plays. So, to me this shows that the ATV woke the computer and Plexconnect was then active and available. Perhaps, I just don't understand what issue is being posed but it is clear to me that the ATV wakes the computer from sleep and allows access to Plexconnect as long as "wake for network access" is selected in energy saver system preferences of OSX.
Is iTunes open on your Mac? Is Homesharing enabled? If yes, quit itunes and then repeat your test. It could be that when the ATV wakes up it wakes the Mac through Homesharing.
No permission to view that thread? Can you post the detail here please?
I figured out how to get the PlexConnect to wake a sleeping mac. It requires both a registry record for the DNS and web server. Here's the three commands i ran (in separate terminal windows) to get it to work:
dns-sd -R "PlexConnect_DNS" _domain._udp. . 53 pdl=application/dnsserver dns-sd -R "PlexConnect_Web" _http._tcp. . 80 pdl=application/webserver dns-sd -R "PMS" _pms._tcp. . 32400 pdl=application/pmsserver
The first one registers the PlexConnect DNS server. Notice that it's a UDP, not TCP. Second one registers the PlexConnect web server. Last one registers the PMS server. You can use Bonjour Browser to verify that the bonjour services are registered after running these commands. Also remember that this only works as long as the commands are active in the terminal window. If you want this to execute at boot you'll need to create LaunchAgents (I use Lingon).
I should mention that i have an Airport Extreme with Back to Mac enabled and i believe that is a requirement to allow clients to wake my mac over the internet. Wake on internal LAN should work without the Airport Extreme
OK, so this morning I tested it again. Computer in full sleep, not used since the night before. Turn on TV. Wake ATV using remote. ATV interface appears. Select Trailers app. See the spinner for a few seconds and then the Plexconnect interface appears. Go into library and select a movie and it plays. So, to me this shows that the ATV woke the computer and Plexconnect was then active and available. Perhaps, I just don't understand what issue is being posed but it is clear to me that the ATV wakes the computer from sleep and allows access to Plexconnect as long as "wake for network access" is selected in energy saver system preferences of OSX.
As rcork says, I think this may be related to home sharing or something similar. I have wake on network enabled on my mac mini and it will wake every time for various clients but the ATV3 will not wake it in its current config, I'll play around with this.
Yes, I do have iTunes open and Home Sharing enabled. I stated this was probably the reason it worked in my initial post on this subject. I just don't know why you wouldn't have iTunes open and Home Sharing set up if your computer is up for Plexconnect and the ATV anyway. I also use Home sharing all the time for music, I don't use Plex-Plexconnect for that.
If you don't want, or can't have, Home Sharing running for some reason I can see why there might be an issue.