PlexConnect on synology
2017-04-05: 0.5-18 DSM 6.0 Support and PlexConnect synced up till https://github.com/iBaa/PlexConnect/commit/e6196df56c805c5a16a5b106972a239063467eb6
Synology installer package for PlexConnect.
- Official Python from Synology (can co-exist with SynoCommunity Python)
- to update a pre 0.3-12 spk leave synocommunity Python on the NAS but also install the Synology Python, after the update SynoCommunity Python can be removed if no other package is using it)
- on the NAS
- Make sure your NAS has a fixed IP Address
- Disable HTTPS connection for web services ('Web Services' control pannel - 'HTTP Service' tab)
- Install PMS
- for DSM 5.1 lower the 'Thrust Level' in the package manager settings to 'Any publisher'
- Add http://www.brigittehelsen.be/plexconnect/ to your Synology NAS Package Center sources (*)
- Install PlexConnect
- Choose if the internal DNS needs to be enabled by PlexConnect
- Choose the AppleTV app that needs to show Plex
- Start the package if it was not yet started
- On the AppleTV
- open AppleTV's 'Settings' app
- Select 'General' and select 'Network'
- set the DNS server to the network connection to the IP address of the NAS
- Again Select 'General' and now only highlight 'Send Data To Apple'
- press 'Play' on the remote.
- Remove any older profile listed here
- Select 'Add Profile"
- Enter http://trailers.apple.com/trailers.cer or http://video-api-secure.wsj.com/marketwatch.cer to install certificates
(*) Add http://www.brigittehelsen.be/plexconnect/ to your Synology NAS Package Center sources and the PlexConnect package will appear in the list of packages. See 'Install third-party applications' on http://www.synology.com/en-us/support/tutorials/500 for more info. Enable 'beta' in the settings to receive beta versions!
Allow different apps based on code provided by Alexander A. Protasov.
Installing PMS on the NAS
First you need to check here if your NAS supports transcoding or not. If it does not support transcoding (which is often the case), you need to take the following actions:
- Convert all your media to an ATV supported format (check here for supported video / audio / photo formats). There are several tools that can be used for that, such as iTunes (for music), or Handbrake / iFlicks / MkvToMp4 (for video)
- Check /usr/local/plexconnect/share/PlexConnect/ATVSettings.cfg (or in the ATV, in PlexConnect settings menu) that
- subtitlerenderer=iOS, PMS
Failure to do so will originate error messages (in the ATV) such as An error occurred loading this content (try again later).
The vast majority of the TV channels available as Plug-ins to PMS (standard and/or unsupported) require transcoding, and will not work when PMS is installed in a NAS that does not supports transcoding.
For up-to-date info about PMS on Synology:https://forums.plex.tv/forum/133-synology/
Trailers unavailable msg:
a few possible causes:
- reboot the NAS
- You created your own certificates for the profile on the AppleTV but you did not place those on the NAS (see advanced part) All generated certificates are unique and whatever is on the AppleTV must match with what is on the NAS.
- Make sure Port 80, 81,443 and 53 are allowed by the Synology Firewall
- On a computer, set the DNS Server to the IP of the NAS
surf to http://trailers.apple.com:80
surf to http://trailers.apple.com:81
surf to http://trailers.apple.com:443
surf to http://trailers.apple.com:444
all of them should return the same error "Message: Not Serving Client'
Installing Custom Certificates
The installer creates unique certificates for chosen app. Certificates are unique ever time they are generated. You can not register your own generated certificates on the ATV and then use the generated certificates from the installer. AppleTV and every instance PlexConnect have to use the same certificates!
Follow these instruction to install your own certificates (this step is NOT needed now that the installer generates unique certificates):
- Generate certificates as described here (Mac or Windows)
- Move the generated certificates in /usr/local/plexconnect/etc/certificates on the NAS replacing the existing files
this assumes certificates in your 'home' folder. This example uses the certificates for the 'Trailers' app. When you have chosen 'WSJ Live' the you need 'marketwatch' and not 'trailers' in the filename.
- open terminal on mac (or use PuTTY on windows)
- ssh root@<ip of nas>
- chmod -R go+w /usr/local/plexconnect/etc/certificates
- scp ~/trailers.cer admin@<ip of nas>:/usr/local/plexconnect/etc/certificates/trailers.cer
- scp ~/trailers.key admin@<ip of nas>:/usr/local/plexconnect/etc/certificates/trailers.key
- scp ~/trailers.pem admin@<ip of nas>:/usr/local/plexconnect/etc/certificates/trailers.pem
- make ssh connection to nas
- chmod -R go-w /usr/local/plexconnect/etc/certificates
- Upload the profile based on your certificates to the AppleTV as described above
Note: upon updating the installation (installing a new version without removing the old) your certificates are restored and these steps do not have to be repeated!
Using the Synology DNS Server package to capture trailers.apple.com (instructions by http://forums.plexapp.com/index.php/user/136264-abmaonline/)
When you are already using the Synology DNS Server package, the PlexConnect DNS proxy will not work, since they both want to use the same port on your Synology.
If your not using the DNS Server, stopping and uninstalling it, is the easiest solution.
When you are using the DNS Server, adding trailers.apple.com and redirecting it to PlexConnect also solves the problem. Follow these steps to use this setup:
- Connect to Synology DSM web interface
- Open the DNS Server Settings from the DSM 'Start' button
- Goto Zones and select Create > Master Zone
- Enter this info and click OK:
Domain Type: Forward Zone
Domain name: trailers.apple.com
Master DNS Server: *IP of your Synology*
- Select the new trailers.apple.com row and click Edit > Resource record (or double click the row for the same effect)
- Create > A Type
- Enter this info and click OK:
Name: *leave empty*
TTL: *use default, probably 86400*
IP address:*IP of your Synology*
- Click Finish
- Do the same steps [3-8] again but this time with "atv.plexconnect"
- Goto Log and check if there are no errors
The DNS should be working now, time to disable the PlexConnect DNS and get everything connected.
- Stop PlexConnect from package center if it is running
- Login as root on your Synology using SSH (password for root is the same for admin on webinterface)
- If you did not disable the Internal DNS server then Edit /usr/local/plexconnect/share/PlexConnect/Settings.cfg and set enable_dnsserver = False
- Start PlexConnect again
If your apple tv uses the Synonoly as its DNS Server everything should work now.
As a quick check try to access http://trailers.apple.com/ from your browser. It should show something about a 403: "Error code explanation: 403 = Request forbidden -- authorization will not help."
Most browsers use DNS caching, so it may take some time before you see the change if you accessed trailers before changing the dns server, testing with your apple tv works best.
Update for latest version in git
For those wanting to use the package and always have the latest version from git at the same time:
- Make ssh connection with root privileges to NAS
- Get git on your synology (using ipkg or spk; when using the spk package the git client can be found at /usr/local/git/bin/git, use this in step 6 and when pulling updates)
- Stop PlexConnect on Synology from package manager in DSM
- Navigate to package folder (if you can't find the 'share' folder, update to the latest package in the start post)
- Move current files to backup location
mv PlexConnect/ PlexConnect-org/
- Clone PlexConnect repo
- git clone https://github.com/iBaa/PlexConnect.git
- Copy config files from original folder to new checkout
cp PlexConnect-org/*.cfg PlexConnect/
- Change owner rights
chown -R plexconnect:root PlexConnect/
- Start PlexConnect again from DSM (using command line kills the service when you logout)
- Check if everything still works.
Now to update your code:
- cd /usr/local/plexconnect/share/PlexConnect/
- git pull
Starting from installer 0.3-9 this will be remembered when installing an updated version
Check if any changes were made; if so: stop and start PlexConnect from DSM package manager to pick them up