PlexConnect Not Working

Unable to accèss Plex on ATV3 have installed PlexConnect on ubuntu and set required config along with certificate between ATV and the Server but still no joy. When I open up iMovie App it opens up as standard and does not switch to Plex..... I have set DNS as the PMS server IP. 

 

Please see config and log:

 

view PlexConnect.log

 

22:43:25 PlexConnect: started: 22:43:25

22:43:25 PlexConnect: Version: 0.3.1+

22:43:25 PlexConnect: Python: 2.7.5+ (default, Sep 19 2013, 13:48:49)

[GCC 4.8.1]

22:43:25 PlexConnect: Host OS: linux2

22:43:25 PlexConnect: IP_self: 192.168.100.20

22:43:25 DNSServer: started: 22:43:25

22:43:25 DNSServer: ***

22:43:25 DNSServer: DNSServer: Serving DNS on 192.168.100.20 port 53.

22:43:25 DNSServer: ***

22:43:25 WebServer: started: 22:43:25

22:43:25 WebServer: started: 22:43:25

22:43:25 WebServer: ***

22:43:25 WebServer: WebServer: Serving HTTP on 192.168.100.20 port 80.

22:43:25 WebServer: ***

22:43:25 WebServer: ***

22:43:25 WebServer: WebServer: Serving HTTPS on 192.168.100.20 port 443.

22:43:25 WebServer: ***

 

[PlexConnect]

enable_plexgdm = True

ip_pms = 192.168.100.20

port_pms = 32400

enable_dnsserver = True

port_dnsserver = 53

ip_dnsmaster = 8.8.8.8

prevent_atv_update = True

enable_plexconnect_autodetect = True

ip_plexconnect = 192.168.100.20

hosttointercept = icloud.apple.com

port_webserver = 80

enable_webserver_ssl = True

port_ssl = 443

certfile = /home/alancarslaw/PlexConnect/assets/certificates/trailers.pem

loglevel = Normal

logpath = .

 

 

ps -ef | grep -i plex

avahi      489     1  0 Feb15 ?        00:00:44 avahi-daemon: running [plexmediaserver.local]

plex      9082  9080  0 Feb20 ?        00:00:00 /bin/sh /usr/sbin/start_pms

plex      9083  9082  0 Feb20 ?        00:09:51 ./Plex Media Server

plex      9092  9083  0 Feb20 ?        00:08:49 Plex Plug-in [com.plexapp.system] /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 0.9.9.3.402-c7906ea /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/System.bundle

plex      9142  9083  0 Feb20 ?        00:01:18 /usr/lib/plexmediaserver/Plex DLNA Server

1000     11061 10844  0 17:33 pts/0    00:00:00 grep --color=auto -i plex

root     13048     1  0 Feb20 ?        00:00:00 python /home/alancarslaw/PlexConnect/PlexConnect.py 2>&1 >/dev/null

root     13051 13048  0 Feb20 ?        00:00:04 python /home/alancarslaw/PlexConnect/PlexConnect.py 2>&1 >/dev/null

root     13052 13048  0 Feb20 ?        00:00:25 python /home/alancarslaw/PlexConnect/PlexConnect.py 2>&1 >/dev/null

root     13053 13048  0 Feb20 ?        00:00:25 python /home/alancarslaw/PlexConnect/PlexConnect.py 2>&1 >/dev/null

 

 

Hope someone will be able to help me here

hosttointercept = icloud.apple.com

This seems wrong. Did you manually change anything in one of the Python files?

I thought you had to change it to icloud.apple.com to use the likes of iMovie theatre app etc.... what do you have down in your config for this? 

[...] to use the likes of iMovie theatre app etc

That I don't know. For the default setup of PlexConnect the "Trailers" app is used. If you want to see if you can make it work with that first (before trying to use a different app), quit PlexConnect, remove the Settings.cfg file, put back the original, unedited Settings.py file and try again.

Edit: I just found the instructions on how to use the iMovies app: https://forums.plex.tv/topic/86012-how-to-use-imovie-theater-instead-of-the-trailers-app/ I have not tested this, but the only thing I see that's different from your config is the hosttointercept value (yours: icloud.apple.com; from the tutorial: www.icloud.com).

Edit 2: You need to do some extra steps for the iMovies certificates as well, I think.

Yeah just run and cleanly shut down PlexConnect to create settings.cfg, change host to intercept and create the relevant cert with the correct name.

Ok have done that and re-created certificate using www.icloud.com as original one used iCloud.apple.com however when I remove old profile on ATV and try to add new one I get unable to add profile - An error occurred while adding the profile [-1004]. Check the URL and try again. I have double checked and made sure its using the correct URL and that the ATV is connected on WIFI/Network. Can someone help?

What URL are you trying? Did you restart PlexConnect after changing Settings.cfg?

Yes I have restarted PlexConnect.... put in full user http://ipaddress/home/alancarslaw/PlexConnect/assets/certificates/trailers.cer 

also tried it with trailers.pem as well still no joy :( 

try :

http://ipaddress/trailers.cer

As per the wiki (you can use the IP address instead, especially as you are no longer configured to hijack trailers)

Although you should really have named it imove.cer instead so you knew which one it was ;)

Surely you have to pull full path to where trailers.cer is located so the above would not work just to put http://ipaddress/trailers.cer

Surely you have to pull full path to where trailers.cer is located so the above would not work just to put http://ipaddress/trailers.cer


It's being hosted on the webserver part of PlexConnect so the full normal directory path means nothing.
Just make sure you are actually replacing ipaddress with your actual PlexConnect device IP.

As long as the trailers.cer file is in the same directory as the trailers.pem file, which is setup in Settings.cfg, then PlexConnect will add the correct path.

alancarslaw@plexmediaserver:~/PlexConnect/assets/certificates$ ls -l

total 16

-rw-r--r-- 1 alancarslaw alancarslaw  921 Feb 20 19:48 certificates.txt

-rw-r--r-- 1 alancarslaw alancarslaw  860 Feb 23 16:31 trailers.cer

-rw-r--r-- 1 alancarslaw alancarslaw 1675 Feb 23 16:31 trailers.key

-rw-r--r-- 1 alancarslaw alancarslaw 2895 Feb 23 16:31 trailers.pem

alancarslaw@plexmediaserver:~/PlexConnect$ sudo view Settings.cfg

[sudo] password for alancarslaw: 

 

[PlexConnect]

enable_plexgdm = False

ip_pms = 192.168.100.20

port_pms = 32400

enable_dnsserver = True

port_dnsserver = 53

ip_dnsmaster = 8.8.8.8

prevent_atv_update = True

enable_plexconnect_autodetect = True

ip_plexconnect = 192.168.100.20

hosttointercept = www.icloud.com

port_webserver = 80

enable_webserver_ssl = True

port_ssl = 443

certfile = /home/alancarslaw/PlexConnect/assets/certificates/trailers.pem

loglevel = Normal

logpath = .

 

any ideas?

Why did you modify the certfile setting - adding the full path from /home/alan...? Is this for sure the same as "~"?

I don't know what you mean here Baa? 

>>certfile = /home/alancarslaw/PlexConnect/assets/certificates/trailers.pem

This is not the default line - and I have no idea if this translates to the folder you showed the content of previously.

Can you advise me what the default line should be for this please? 

I ran the following to create certificate:

 

openssl req -new -nodes -newkey rsa:2048 -out ~/Desktop/trailers.pem -keyout ~/Desktop/trailers.key -x509 -days 7300 -subj "/C=US/CN=www.icloud.com"

 

then 

 

openssl x509 -in ~/Desktop/trailers.pem -outform der -out ~/Desktop/trailers.cer && cat ~/Desktop/trailers.key >> ~/Desktop/trailers.pem