Saturday, January 25, 2014

Apple TV Connect to Plex Media Server via Plex Connect

I followed these 2 links.

https://github.com/iBaa/PlexConnect/wiki/Install-Guide-Windows
https://langui.sh/2013/08/27/appletv-ssl-plexconnect/

The first one provide a good summary of what to do. The second one talk clearly about how to create the certificates. Anyway I've summarized what I did here.

Environments : 
Plex Media Server (PMS) on Windows 7 PC
Apple TV 3rd Generation with software version 6.0.2

Software you needed :
1. OpenSSL for creating the related certificates for SSL session between Apple TV and the PMS server. Follow the link and select the appropriate version for your Windows 7 (32 bit or 64 bit). You might need Visual C++ 2008 Redistribute which you can download from the same page
2. Python 2.7.x This is needed because PlexConnect needs it to run. Need to be this version as other versions will not work.
3. PlexConnect. This is basically a customized services listening to request from Apple TV when you select "Trailers"  and talk to PMS on the PC
Procedures :
1. Install OpenSSL, Python and PlexConnect. For PlexConnect, just unzip and copy to Program Files folder.
2. Run cmd.exe as administrator. Go to your [OpenSSL Path]\bin directory and then enter the followings commands
set OPENSSL_CONF = C:\[installed path]\bin\openssl.cfg
openssl.exe req -new -nodes -newkey rsa:2048 -out C:\trailers.pem -keyout C:\trailers.key -x509 -days 7300 -subj "/C=US/CN=trailers.apple.com" -config openssl.cfgopenssl.exe x509 -in C:\trailers.pem -outform der -out C:\trailers.cer
type C:\trailers.key >> C:\trailers.pem
3. Move trailers.pem and trailers.cer from C:\ to your [PlexConnect Path]\assets\certificates folder
4. Run PlexConnect by double-click PlexConnect.py Click allow access when Windows Firewall alert dialog box is shown
5. Note the IP_Self which is the IP of the PMS server. You need to make this permanent for this server
6. Now go to Apple TV. Set DNS to the IP of the PMS Server. Under Send Data to Apple, set to No. Then click Play button and add profile and enter
http://trailers.apple.com/trailers.cer
7. Run PMS. Select Trailers App on Apple TV.