Has anyone created an AppleScript/Application to launch PlexConnect at startup?

Is the correct username and password in the keychain item you created?

I guess I don't understand

Do i insert the username and password into the script?

The post instructs you to create a keychain item in the keychain access app in the Utilities folder of your computer. You give the item a name and enter the computer’s username and password. You then put the name of this item in the applescript as directed.

I created the login item using, keychain access with the same user name and password I have set for my administrator purposes.

I named that application "plexconnect"

I then put the name "plexconnect" into the script. I believe I have done everything that it stated to do. I dont know why i'm still getting the username and password error. 

When I authenticate the keychain access.... it doesn't ask for the password. just asks, always allow, deny or allow once,

I've tried hitting allow once, and always allow. to which i get the error repeatedly

...............we will not officially support it, especially when we have a much better method to come ;)

Great job with what you guys are all doing.

f00b4r, Do you have a timeframe for your more official method? I'm very much a noob with everything OSX, applescript etc, so was trying to work out whether to wait for a better way or just jump straight into using the script.

Cheers, Brett

after a few hours trailers is unavailable. i am on the newest app and it opens in login and everything's ok but after a few hours information loaded but only trailers not.

my sleep mode is on never and put hard disks to sleep when possible uncheck.

only screen sleep is on-should i turn that off too ?

but after screen off it's still off so i'm not sure that's the problem.

Great job with what you guys are all doing.

f00b4r, Do you have a timeframe for your more official method? I'm very much a noob with everything OSX, applescript etc, so was trying to work out whether to wait for a better way or just jump straight into using the script.

Cheers, Brett

It may be a couple of weeks.

We have some working code but want to tweak it and Baa, who was working on it with some others, has gone on vacation.

It will be worth the wait though :)

It may be a couple of weeks.

We have some working code but want to tweak it and Baa, who was working on it with some others, has gone on vacation.

It will be worth the wait though :)

Can you tell us what this new official version will do?

It will bring proper daemon code to the *nix OS'es, including OSX.

It means that you can have launchctl load and unload the PlexConnect daemon:

  1. Starting and stopping it in the background will be possible using e.g. launchctl on OSX
  2. The use of e.g. launchctl on OSX means not having to enter your password or store it insecurely
  3. It would allow for much easier updating (just unload the daemon, update and then load the new one)
  4. It would automatically restart PlexConnect or the sub processes if any of them crash
  5. It can be setup to start on startup, with no user intervention required, and cleanly shutdown when you turn off your device

Thanks for that info. :)

Please help!

I'm sorry for being a noob. I have followed the instructions to the letter, but cannot get this working for me. I'm about to throw my ATV across the room I'm so frustrated, so if someone could help me out, you'd be saving the life of my 2nd Gen ATV!

When I run the terminal commands to start PlexConnect, it works just fine. ATV has all icons on home screen, trailers app has Plex in it and all is right with the world.

When I run the PlexConnect script (which is saved as an Application), nothing happens on my ATV!!! I suppose the DNS is not being resolved because it sits there with no icons on the screen other than "Computers" and "Settings".

Can someone please help me figure out what I'm doing wrong?

I thank you, and my ATV thank you for assisting me with this issue.

Please help!

I'm sorry for being a noob. I have followed the instructions to the letter, but cannot get this working for me. I'm about to throw my ATV across the room I'm so frustrated, so if someone could help me out, you'd be saving the life of my 2nd Gen ATV!

When I run the terminal commands to start PlexConnect, it works just fine. ATV has all icons on home screen, trailers app has Plex in it and all is right with the world.

When I run the PlexConnect script (which is saved as an Application), nothing happens on my ATV!!! I suppose the DNS is not being resolved because it sits there with no icons on the screen other than "Computers" and "Settings".

Can someone please help me figure out what I'm doing wrong?

I thank you, and my ATV thank you for assisting me with this issue.

I'm certainly no expert, but I wouldn't have thought it would have made any difference to your ATV whether your computer is running PlexConnect via the script or terminal? The only change to the ATV is the DNS setting. Because you only have two icons on the ATV it sounds like it's not connected to the internet at all. What IP address has your ATV got now... I assume it's still running DHCP for the IP address and only the DNS is staticly assigned? If your IP address is 169.254.x.x it's failed to get an address correctly from your router.

I'm certainly no expert, but I wouldn't have thought it would have made any difference to your ATV whether your computer is running PlexConnect via the script or terminal? The only change to the ATV is the DNS setting. Because you only have two icons on the ATV it sounds like it's not connected to the internet at all. What IP address has your ATV got now... I assume it's still running DHCP for the IP address and only the DNS is staticly assigned? If your IP address is 169.254.x.x it's failed to get an address correctly from your router.


It will not be because it did not get an IP address (nothing has changed on the actual ATV and DHCP does not require name resolution), it will be because PlexConnect is not being run with the script for some reason (the ATV icons require name resolution which is not happening because PlexConnect is not functioning).

Brevig you will need to give the EXACT steps you carried out to get the script working to get the people here to help you.

Please help!

I'm sorry for being a noob. I have followed the instructions to the letter, but cannot get this working for me. I'm about to throw my ATV across the room I'm so frustrated, so if someone could help me out, you'd be saving the life of my 2nd Gen ATV!

When I run the terminal commands to start PlexConnect, it works just fine. ATV has all icons on home screen, trailers app has Plex in it and all is right with the world.

When I run the PlexConnect script (which is saved as an Application), nothing happens on my ATV!!! I suppose the DNS is not being resolved because it sits there with no icons on the screen other than "Computers" and "Settings".

Can someone please help me figure out what I'm doing wrong?

I thank you, and my ATV thank you for assisting me with this issue.

I tried all the methods in this thread and had some success with them.  I had everything working at one point but I saved the app onto my desktop and decided to move it into my apps folder and ever since then I cant get it working again.  I tried deleting it and redoing everything from scratch a couple times but no luck.  My ATV would just do what yours is doing.  I decided to just go with the terminal command from the wiki from now on until the Devs can get an official release working (thanks by the way, you guys are awesome).  My Mac Pro is always on with hard drives and ATV set to never sleep (not my idea of ideal but this is temporary) and 2 days in everything is working fine.  If anyone is using this and allowing their hard drives to sleep I'd like to hear about it.  That seems to be pretty important because I'm pretty sure that's been the main reason I was having trouble with earlier attempts.

could an entry into the sudoers file remove the need to store/reference the password in the keychain?

i have the following entry in my sudoers to avoid needing to provide a password when i execute PlexConnect.py script manually.

%admin ALL=(ALL) NOPASSWD: /Applications/PlexConnect/

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.

!

I'm not seeing the section that begins with "try" in the latest versions of PlexConnect. Will the new version of PlexConnect.py break the launchctl.plist script?

Possibly but the idea is to have proper daemon mode in the actual code :wink:

Some of the this has been added in the last couple of days.

Possibly but the idea is to have proper daemon mode in the actual code ;)
Some of the this has been added in the last couple of days.

So, how do I use the "proper daemon mode"? Has it been implemented?

Doesn’t sound like it. I think I detect the future tense there. It is in not yet committed code.

Looks like the latest PlexConnect does break the launchctl plist. I get this error in the PlexConnect log:

> WebServer: Failed to connect to HTTP on 192.168.2.100 port 9999: [Errno 49] Can't assign requested address