PlexConnect: Connecting Plex and the Apple TV

The Apple TV is a nifty little device but it’s nowhere close to being able to play anything you want. It cannot play from USB drives. And it can’t play network shares either. Not from AFP, not from SMB, not from DLNA. There’s no app store for the Apple TV (yet) so there’s not installing and running the Plex Player app. So it can’t play from from Plex Media Server either. At least not directly.

Fortunately, there is a workaround: PlexConnect. And it is genius! You see, some of the built-in Apple TV apps get their UI and content from remote web servers. So it was a matter of hijacking the web traffic to from one of these apps and redirect it to PlexConnect running on local machine. PlexConnect then communicates with Plex Media Server and serves up modified UI and content to the hijacked app on the Apple TV. Of course, the hijacked app won’t work as before anymore.

Normally the hijacked app is the Trailers app. But since I didn’t have the Trailers app on my Apple TV, I used the WSJ app instead. If you have the same situation then in the instructions below replace of “trailers” with “wsjapp” and replace of “trailers.apple.com” with “videoapisecure.wsj.com

Here are the consolidated instructions (from https://github.com/iBaa/PlexConnect/wiki/Install-Guide) for Mac OS X:

1. Install Plex Media Server
2. Download PlexConnect (https://github.com/iBaa/PlexConnect/archive/master.zip)
3. Extract and drag PlexConnect-master to the Applications folder
4. Open a terminal window (Terminal.app on Mac) and run the following command

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

 

openssl req -new -nodes -newkey rsa:2048 -out ~/Desktop/wsjapp.pem -keyout ~/Desktop/wsjapp.key -x509 -days 7300 -subj “/C=US/CN=videoapisecure.wsj.com

5. This will create two files on your desktop: trailers.key and trailers.pem (or wsjapp.key and wsjapp.pem). Next run the following command:

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

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

Three files should now be on your desktop trailers.pem, trailers.key, and trailers.cer. (or wsjapp.pem, wsjapp.key, and wsjapp.cer).

6. Place the .pem and.cer files into the following folder:

/Applications/PlexConnect-master/assets/certificates/

7. If you’re hijacking the WSJ app, you need to edit the PlexConnect configuration:

/Applications/PlexConnect-master/Settings.cfg

Set hosttointercept to “videoapisecure.wsj.com“:

hosttointercept = videoapisecure.wsj.com

8. If you’re hijacking the WSJ app, you need to edit the Settings script:

/Applications/PlexConnect-master/Settings.py

Change line 35 to (note the red dash):

(‘hosttointercept’ , (‘trailers.apple.com’, ‘[a-zA-Z0-9_.]+’)),

9. Run PlexConnect by first opening a terminal window (Applications -> Utilities -> Terminal), then type the following:

sudo “/Applications/PlexConnect-master/PlexConnect.py”

Provide your Administrator password to complete PlexConnect startup.

You should now see messages like these in the terminal window: PlexConnect Terminal

Write down the IP_Self: ###.###.###.### address. This is the IP of your PlexConnect server

SelfIP

On the Apple TV, choose Settings > General > Network > Wi-Fi. Then Choose your Wi-Fi network Name WifiSettingsChange the DNS setting from “Automatic” to “Manual”. WifiDNSEnter the IP of your PlexConnect server as the DNS server.DNSIP

Go to the AppleTV settings menu. Select “General” then scroll the cursor down to highlight “Send Data To Apple” and set to “No”.

With “Send Data To Apple” highlighted, press “Play” (not the normal “Select” button) and you will be prompted to add a profile.

Enter (without the quotes): “http://trailers.apple.com/trailers.cer” (or “http://videoapisecure.wsj.com/wsjapp.cer“)

Launch the Trailers (or the WSJ app).

Now you can play media from your Plex Media Server library on your Apple TV.

Enjoy!

UPDATE 6-22-15: Changed from old “secure.marketwatch.com” to new “videoapisecure.wsj.com”. Based on discussion at https://forums.plex.tv/index.php/topic/168109-plexconnect-suddendly-stopped-working/.

Apple Still Has A Lot To Cover

westillhavealottocover

Tomorrow is Apple’s much anticipated October 22 event. They said they still have a lot to cover. So what am I expecting tomorrow?

First, new MacBook Pros will be unveiled along with OS X Mavericks. It’s probably just going to be a Haswell update. Then probably an availability date for the previously-announced Mac Pro. Nothing much to see here. So let’s move on.

Second, new new iPad and iPad mini will be unveiled. We’re looking at unifying the look-and-feel of the tablets, not just in the casing but also in the Retina display. Some are saying since leaked new iPad mini casings are thinner it means there won’t be a Retina display. To support this theory, they go back to when the iPad Retina display was launched which needed a thicker casing. But technology has moved on and I think there should be no need to having a thicker casing this time around. I’m also hoping for Touch ID in both devices.

Finally, some are saying there could be a huge Apple TV announcement. And I think that’s quite possible.

A while back, I told telling my friend Leslie about how Sony flubbed its chance at a whole entertainment ecosystem. It had Smart TVs, Smartphones, tablets, the PlayStation system, and of course music and movies from Sony Music and Sony Pictures. But they don’t co-exist or even work together that well. Maybe they can still catch up. The latest crop of Xperia phones and the launch of the PS Vita and the PS Vita TV are steps in the right direction.

But Apple potentially can do what Sony wasn’t able to do. They have the best-selling (and best IMO) smartphones, best-selling tablets, and a closed and well-protected iTunes content source. What’s still lacking is in the living room. Yes, the Apple TV has done something but it could do a lot more. Currently, it can consume music and movies from iTunes. If it can consume apps and games, it can potentially be a lightweight home computer and game console (and iOS 7 supports game controllers!).

That’s a lot to cover. Is that what we’re going to see tomorrow? Just a day to go to find out!