For this tutorial you will need:
- An Intel Edison and Mini Breakout Board or Arduino Breakout Board. Note: Your Edison needs to be running factory Yocto and/or updated Yocto via Intel's Phone Flash Tool, but NOT
ubilinux
. YMMV with other linux distros. - At least 2x USB to Micro-USB data cables. (Careful, some are only good for charging.)
- An AppleTV, i.e. Model A1469 or similar revision 3 hardware, running the most up-to-date AppleTV OS package, i.e. 7.2 or greater. No AppleTV jailbreaks or root exploits are required for this workaround.
- A reasonably fast (sustained 10Mbps or greater) local wireless network with a known SSID and password, preferably running WPA2-Personal encryption. (You aren't running WEP, are you?)
- An existing Plex account (with known login/password,) and Plex server instance, logged-in and running somewhere on your multimedia-laden network. Refer to this Getting Started guide to get running with Plex.
- Suitably fast upstream broadband on your host network, and suitably fast downstream broadband on your client network.
- A Mac, running OS X 10.6 or later.
- Assemble and setup your Edison for the first time.
- Plug Edison into USB power with micro-USB cable, i.e. via
J16
on both Edison Mini and/or Arduino breakout boards. - Connect another micro-USB cable to port
J3
on your Edison board, and the other USB end to your Mac. - Open your favourite terminal emulator on your Mac, i.e. Terminal, iTerm 2, etc.
- Run
ls /dev/cu.usbserial*
to discover the name of your Edison's FTDI aka the Console port. It should display something like `/dev/cu.usbserial-A#######' where the #s are alphanumeric characters. Note this address. - Run
screen /dev/tty.usbserial-A####### 115200 -L
and replace the #s with your Edison's address from the previous step. This will open a new serial terminal connection to your Edison via an app called Screen. - You'll be prompted to log in; the default Edison/Yocto username is
root
with no password. - As soon as you've logged in as root, run
configure_edison --setup
. Step through the menu to connect to your local wifi network; setup the Edison's network hostname asedison
; change the root password, etc. Note the newroot
password. Also, Note: When you change the root password on factory Yocto Linux on your Edison, a script automagically enables SSH access over WiFi. SSH access is required to continue with these instructions. - Note the wireless network IP address for the Edison.
- Exit
screen
by pressing Ctrl+A then C on your Mac's keyboard. - Disconnect your (console) USB cable and SSH into Edison via your Mac's network connection and the Edison's WiFi adapter, i.e.
ssh -l root edison.local
. (Power-cycle the Edison if necessary, and wait about 20-30 seconds for it to become discoverable on your local router.) - Log into the Edison via
root
and the password you just custom-set.
- Once you're logged in, run the following command to replace the factory package vendors with Intel's full Edison vendor lists:
printf 'src all http://iotdk.intel.com/repos/1.1/iotdk/all \nsrc x86 http://iotdk.intel.com/repos/1.1/iotdk/x86 \nsrc i586 http://iotdk.intel.com/repos/1.1/iotdk/i586 \n' > /etc/opkg/base-feeds.conf
- Run
opkg update
to update package libraries.
- Run
opkg install python
to install the latest Python. - Run
opkg install git
to install the latest Git. - Edit the default Edison http server so that it doesn't collide with PlexConnect:
vi /usr/lib/edison_config_tools/edison-config-server.js
- Find the last line in the file, i.e. PageDn until you see:
http.createServer(requestHandler).listen(8080);
- Put the cursor at the beginning of this last line. (UP/DN/L/R keys.) Either comment out this last line to turn it off completely, i.e. press "I" on the keyboard to enter Insert mode in
vi
, then and add//
(with a trailing space) to comment out the line, or alternatively, change the port to 8080 so that it's still reachable viahttp://edison.local:8080/
. - Hit
Esc
to exit Insert mode. - Write the file and exit
vi
, via:wq!
. - Reboot the Edison, i.e.
shutdown -r now
. (One of the two green lights on your board will turn off, then come back on as it's booting back up. Give it another 20-30 seconds to be discoverable on your local router.)
- Reconnect to the Edison via SSH:
ssh -l root edison.local
- Run
cd ~/
to change to the root user's home folder. - Clone the PlexConnect repo into the folder:
git clone https://github.com/iBaa/PlexConnect.git
- Jump into the PlexConnect directory:
cd PlexConnect
.
- Run this command to generate the .pem and .key files:
openssl req -new -nodes -newkey rsa:2048 -out ./trailers.pem -keyout ./trailers.key -x509 -days 7300 -subj "/C=US/CN=trailers.apple.com"
- Then run this:
openssl x509 -in ./trailers.pem -outform der -out ./trailers.cer && cat ./trailers.key >> ./trailers.pem
- Copy the .pem and .cer files into the right location:
cp trailers.pem trailers.cer ~/PlexConnect/assets/certificates/
- Refer to the PlexConnect Linux Documentation for more detailed guidance in getting PlexConnect installed.
** TODO: Add these steps to instructions soon!**
** To run PlexConnect manually, use ~/PlexConnect/PlexConnect.py
from the command line.**
- Power-cycle the Edison once more, and wait about 45-60 seconds for it to come online on your wireless network, and to start up the PlexConnect service.
- On the AppleTV, go to
Settings > General > Network
, andSelect
the current WiFi network. - Select current WiFi network again from the list of available SSIDs.
- Scroll down to "Configure DNS", and change it from "Automatic" to "Manual".
- Use the "Configure DNS" tool to enter the wireless network IP address from the Edison, as per above.
- Select "DONE."
- With your aluminum AppleTV remote, go to
Settings > Send Data to Apple
, change this to "NO". - With the "Send Data to Apple" tile still selected, press the "Play/Pause" button on the remote.
- Select "Add Profile >" and OK to "Are you sure..?"
- In the resulting Custom Profile text entry box, add this URL:
http://trailers.apple.com/trailers.cer
and save it with "OK".
- Run
Settings > General > Restart
- On the AppleTV, browse to Trailers. (It should open after a second or two, and show you the PlexConnect "Playlists, Library, Shared Libraries, Channels, Search, Settings" navigation bar at the top.)
- Scroll over to Settings, and log in to your MyPlex Account with your Plex username and password.
- Now explore
Library > Movies
orLibrary > TV Shows
and you should see your Plex library shown. - Use the Apple remote to navigate and play back media as usual.
Enjoy. :)