Help getting Plexconnect to work on Nas4free

Howto install PlexConnect, Assumed you installed PMS this way http://www.forums.nas4free.org/viewtopic.php?f=79&t=4971

Enter the previously created jail for the PMS server. (Replace 1 with your Jail ID)

jexec 1 csh

Install git and download PlexConnect

pkg_add -r git
git clone https://github.com/iBaa/PlexConnect.git
cd PlexConnect/
git pull 

Installing Pyton27, Nano(Text editor) and Bash

pkg_add -v -r python27
pkg_add -v -r bash
pkg_add -v -r nano

And exit the jail and copy a previosly made cert. file to correct folder in Jail. https://langui.sh/2013/08/27/appletv-ssl-plexconnect/

EXIT
cp /mnt/PATH_TO/trailers.pem /mnt/PATH_TO/Jail/plex/PlexConnect/assets/certificates/
​jexec 1 csh
cd PlexConnect/

Start PlexConnect so it creates Settings.cfg

./PlexConnect.py

When it started Exit using CTRL + C
 

nano Settings.cfg

Change the 2 lines below

ip_pms = 10.0.0.30 # This one you have to change to your Jail IP address
enable_plexgdm = False # This one you have to change from True to False

To start PlexConnect
 

bash /PlexConnect/PlexConnect_daemon.bash start


To verifiy its running you can replace start with status.

EDIT: as of 12. Feb 2015 I couldn't sign into Myplex causing me to loose movie previews/covers and all other art. The reason was discovered here by SaschaPlex, here.
To fix it run:

ln -sf /usr/local/etc/ssl/cert.pem /etc/ssl/cert.pem

Next steps is to make PlexConnect start on boot. Made possible by traxinv, go the original guide "Make PlexConnect start with the os" and follow instruction there.

 

Make PlexConnect start with the OS:

- Okay. I am not a linux Guru and I am writing this as I go along so bear with me.
- Basically as I understand it (correct me if I am talking crap), if you want something to start at boot time you need to add a script to /etc/rc.d folder,
- Since each jail runs its "own" little os within the jail you want the startup script to start when the vm is booted.
....
...
..

 

To Update, enter your jail ( jexec 1 csh ) and do this:

cd PlexConnect
git pull
service plexconnect stop
service plexconnect start

EDIT: Edited out the part of installing "screen" and using it because PlexConnect now includes a daemon.
EDIT2: Replaced /bin/sh /PlexConnect/PlexConnect_daemon.bash start with bash /PlexConnect/PlexConnect_daemon.bash start after update of daemon code.
EDIT3: Included "bash" in the install section.
EDIT4: Included howto update

EDIT5 12.02.2015: Issue with login MyPlex because of SSL verification, added this to the guide.

Hi, finally a nice topic Ole Norway, Just as I thought that google is useless :p

Anyway, I'm stuck with installing python27. A lots of 'writing failed' messages during installation. It is probably safe to assume that it didn't install properly.

However, I already have a properly running plex media server and already running some version of python. (I can see that in processes),  Since my atv2 is 5.02 (jb + xbmc) and my atv 3 is 5.1.1, I don't think I need to bother (yet) with the certificates and apple-fix.
 


I'm running the latest embedded version on nas4free. Could 'embedded' be a problem?

Do I need to stop the PMS during installation? Is the folder location important?
damn, I have so many questions :)

I installed python without any issues. You are trying to install it inside Jail right?

This is what Im running:

Version 9.1.0.1 - Sandstorm (revision 636)

Platform OS FreeBSD 9.1-RELEASE (reldate 901000)

Platform x64-embedded on AMD Athlon(tm) II X2 250 Processor

And my jail have all the Official Freebsd Flavor:

 FreeBSD-amd64-9.1-RELEASE-base.txz

 FreeBSD-amd64-9.1-RELEASE-src.txz

FreeBSD-amd64-9.1-RELEASE-doc.txz

FreeBSD-amd64-9.1-RELEASE-lib32.txz

This time I followed your instructions to the letter. Now everything is installed. But I must create certificates or something. I'll try later today and let you know.

I believe the underlined is the problem.

Thanks again.

root@plex:/ # cd PlexConnect-master/
root@plex:/PlexConnect-master # ./PlexConnect.py
19:51:54 PlexConnect: ***
19:51:54 PlexConnect: PlexConnect
19:51:54 PlexConnect: Press CTRL-C to shut down.
19:51:54 PlexConnect: ***
19:51:54 PlexConnect: started: 19:51:54
19:51:54 PlexConnect: IP_self: 192.168.1.201
19:51:54 DNSServer: started: 19:51:54
19:51:54 DNSServer: ***
19:51:54 DNSServer: DNSServer: Serving DNS on port 53.
19:51:54 DNSServer: intercept: ['trailers.apple.com', 'atv.plexconnect'] => 192.                                       168.1.201
19:51:54 DNSServer: restrain: ['mesu.apple.com', 'appldnld.apple.com', 'appldnld                                       .apple.com.edgesuite.net'] => 127.0.0.1
19:51:54 DNSServer: forward other to higher level DNS: 8.8.8.8
19:51:54 DNSServer: ***
19:51:54 WebServer: started: 19:51:54
19:51:54 WebServer: ***
19:51:54 WebServer: WebServer: Serving HTTP on 192.168.1.201 port 80.
19:51:54 WebServer: ***
19:51:54 XMLConverter: PlexGDM off - PMS from settings: 192.168.1.201:32400
19:51:54 WebServer: started: 19:51:54
19:51:54 WebServer: Failed to access certificate: /PlexConnect-master/./assets/certificates/trailers.pem
19:51:54 PlexConnect: WebServer_SSL not alive. Shutting down.
19:51:54 PlexConnect: Shutting down.
19:51:55 WebServer: Shutting down.
19:51:59 DNSServer: Shutting down.
19:51:59 PlexConnect: shutdown
root@plex:/PlexConnect-master #

Yepp, you have to create a certificate following the link I provided and then copy it to that folder as described.

Success!!! :)

Plexconnect with nas4free with ATV3 works !!!

But I have a problem playing videos with .srt subs. The only device that can play those files from the same server is the android tab.

I can't thank you enough Ole. ;)

Finally just what I've been looking for :)

For the time being I can try the 'screen' command, would love to have it start by-itself but soon enough eh?

The way I installed it was a bit different, created a PlexConnect folder and attached it as a mount on my PMS jail, and then connect to it via SSH, logon to the Jail and then run PlexConnect and it works.

Will try the Screen method and kill terminal on my desktop to see if it keeps running.. don't see why it won't

Thanks again Ole!

Finally just what I've been looking for :)

For the time being I can try the 'screen' command, would love to have it start by-itself but soon enough eh?

Maybe someone with Nas4free/Freebsd experience can modify this? Linux install for Plex Connect 

If you look at step 4 they created a startup script.

I dont have chance to test it out, but people are welcome to try this and see if it works.

In the webgui go to System->Advanced->Command Scripts

Command: jexec YOUR_JAIL_ID screen /PlexConnect-master/PlexConnect.py

Type: PostInit

Try to restart your NAS and check if it survives the reboot.

nope, I had to start it manually.

See first post on howto install.

Added a link on the PlexConnect wiki to this installation guide thread.

Thanks, links was wrong but I edited. 

I dont have chance to test it out, but people are welcome to try this and see if it works.

In the webgui go to System->Advanced->Command Scripts

Command: jexec YOUR_JAIL_ID screen /PlexConnect-master/PlexConnect.py

Type: PostInit

Try to restart your NAS and check if it survives the reboot.

I have everything working apart from the startup on reboot my location for the plexconnect is /mnt/WD1ST250GB/Jail/Plex/PlexConnect-master so i tried jexec 1 screen /mnt/WD1ST250GB/Jail/Plex/PlexConnect-master/PlexConnect.py. 

I have everything working apart from the startup on reboot my location for the plexconnect is /mnt/WD1ST250GB/Jail/Plex/PlexConnect-master so i tried jexec 1 screen /mnt/WD1ST250GB/Jail/Plex/PlexConnect-master/PlexConnect.py. 

We dont use screen anymore since Plexconnect now comes with it own start script. Read first post again.

Howto install PlexConnect, Assumed you installed PMS this way http://www.forums.nas4free.org/viewtopic.php?f=79&t=4890

 
Enter jail (Replace 1 with your Jail ID)
jexec 1 csh
 
Fetch Plexconnect and unzip
fetch https://github.com/iBaa/PlexConnect/archive/master.zip
unzip master.zip
 
Installing Pyton27 and Nano
pkg_add -v -r python27
pkg_add -v -r nano
 
And then I copy a previosly made cert. file to correct folder in Jail. https://langui.sh/2013/08/27/appletv-ssl-plexconnect/
EXIT
cp /mnt/PATH_TO/trailers.pem /mnt/PATH_TO/Jail/plex/PlexConnect-master/assets/certificates/
jexec 1 csh
 
cd PlexConnect-master/
 
Start PlexConnect so it creates Settings.cfg
./PlexConnect.py
When it started Exit using CTRL + C
 
nano Settings.cfg
Change the 2 lines below
ip_pms = 10.0.0.30 # This one you have to change to your Jail IP address
enable_plexgdm = False # This one you have to change from True to False
 
To start PlexConnect
 

To verifiy its running you can replace start with status.

EDIT: Edited out the part of installing "screen" and using it because PlexConnect now includes a daemon.

That's fantastic!!!

Managed to move PMS from my Mac last week, but still needed it running for PlexConnect.  Now have both running in jails on my FreeNAS box!

Thank you

If you install PlexConnect in the same jail as Plex plugin, you don't have to edit any settings, just copy the certificates to assets/certificates, install screen, and create an /etc/rc.local file for your jail to start plexconnect boot:

screen -dms PLEXCONN cd /PlexConnect;./PlexConnect.py  

This way it will start on boot up and use the '0.0.0.0' IP address listens on all local IP addresses , including the jail's IP.

is anyone else having trouble with the launch daemon?  when i try to start PlexConnect with the daemon i am getting the following:

root@PlexConnect:/ # /bin/sh /PlexConnect/PlexConnect_daemon.bash start
/PlexConnect/PlexConnect_daemon.bash: ${BASH_SOURCE[...}: Bad substitution
root@PlexConnect:/ # 

sh != bash?!?

Could you try bash?

sh != bash?!?

Could you try bash?

?

Its how I start Plexconnect

root@Mediacenter:/PlexConnect # /bin/sh /PlexConnect/PlexConnect_daemon.bash start
Starting PlexConnect ...