PyConnect – Power Failures

Wow, been a busy month, almost non-stop.

However I am now able to catch up with projects I wanna do. One was fix an issue with PyConnect.

PyConnect is a great system to connect Plex Server to the families three AppleTV boxes. Long and short it changes the Trailers channel into your Plex Server Channel. And it is easy enough for everyone to use.

However when the power goes out (normal here during rainy season), the kids would have to wait till I get home and re-run the script. The script would asked for admin password. Not something I am willing to hand over to the kids yet.

So after some googling this is what I came up with:

set sshPasswd to “supergeek1”


tell application “Terminal”


end tell

on error

end try

tell application “Terminal”


my execCmd(“cd /Applications/PlexConnect-Master”, 1)

my execCmd(“set timeout 30”, 1)

my execCmd(“expect -c ‘spawn sudo ./; expect \”*?assword:*\”; send \”&sshPassword&\”; interact’;”, 1)

end tell

on execCmd(cmd, pause)

tell application “System Events”

tell application process “Terminal”

set frontmost totrue

keystroke cmd

keystroke return

end tell

end tell

delay pause

           end execCmd

This was written in Applescript, saved as an Application bundle, and added to the startup items. Noticed if I didn’t quit terminal first, all the system would do is make a few clicking noises and pyconnect wouldn’t start.

It also has the added bonus of not displaying the password, and you still get the terminal activity window to monitor usage.

Not bad for an afternoon’s playing.



PlexConnect Update

Opps Sorry.

Figured this out the solution a while ago, didn’t posted as promised.

The solution to the PlexConnect, connecting to my existing Plex Server, was. Is it WOULD NOT work. Plex has to be running on the same box as PlexConnect. And you can’t run PlexConnect on a SERVER because the server already uses the ports that PlexConnect wants to use.  Solution, install both on another box, then connect the new Plex system to the existing Plex server. Yes, it is messy, but it worked.

We still have the problem when the power goes out, that someone manually has to start PlexConnect. But we still have plans to create a small LiveCode program that will handle that. So keep checking back.


Plex, PlexConnect and OpenPlex

Over the last couple of years my family has ripped every movie we own and stored it on a Mac Mini Server with a 4th drive attached. Using Plex and a number of plugins and add-ins, almost every device brought into the house can connect. It has been fantastic. Except.

Plex, do not work on the AppleTV. Until now! We were finally able to install PlexConnect and can now watch our movies on TV’s with AppleTVs connected. There are a couple of short falls.

1) the PlexConnect is started up using Terminal, not everyone in the house is tech savvy.

2) PlexConnect can’t easily be restarted if the system is restarted due to power loss.

Obstacles  had to be overcome included, we have been running Plex on a Mac mini server, PlexConnect won’t run on a server since the ports are already in use. We had to install another copy of Plex on an old iMac, connect that copy of Plex  it to the PlexServer  on the Mac Mini. then installed PlexConnect on the Mini everything worked fine. Oh and you need to install Certificates. There are so many different ‘instructions blogs” on how to install Plexconnect it was difficult to work out the proper install. Basically I just put down all the other instructions and tried to figure out what the end result was and why it didn’t work. Two plex servers, linked to the same data, install certificates and DON’T use a server. Bingo!

Then I wanted to find a way to restore PlexConnect in case of power loss while I was away from home. Due to bandwidths limits (by at&t) it is better for everyone if we are going to watch movies we already own, that we use local copies. (Rather than downloading it AGAIN and AGAIN.. Say ‘Frozen’ for a two year old!)

So started to work out writing a startup program in LiveCode, and ran across a program called OpenPlex. Spent a couple of hours playing with it, but it needed a lot of ‘support’ software installed. I am using an older model iMac running 10.6, and it was getting to be more of a pain to use OpenPlex than to write my own program that would just work..

I’ll keep everyone up-to-date on my progress and provide a link to the finished product when completed.

Have a great day.