Cutting the Cord

Most people are content to pay a cable company to provide them with their content. If I could find a company that would give me the control and on-demand content that I’m able to get with my own setup, I’d be happy to do it. Unfortunately, no such service exists. Despite the fact that the content is being delivered digitally, cable companies charge a ridiculous amount per month (whether you watch it or not), and force you to watch commercials on top of that. With the rise of PVRs this has gotten a little better, but even those have had their own legal battles (how much content you can save, how many channels you can concurrently record, etc).

For this reason, the “cable cutter” movement has been gaining a lot of traction, especially with services like Netflix on the rise. Don’t get me wrong, I love Netflix, and it’s a great thing that it exists - I even subscribe to it (even though I hardly ever use it because Canadian Netflix is so bad) just to support it. But Netflix has a long way to go yet.

I’ve put a tremendous amount of effort into my home theater automation setup, and I thought I’d share it with anyone who’s interested. It’s almost entirely open source, and I’d like to share my work with anyone who’s interested in replicating it, and learn from anyone who’s interested improving it or has any suggestions.

The flow

Watching it - The Thin Clients

At the very front of everything is of course RasPlex. I have RasPlex connected to every TV I own (which is one TV, plus my projector), another RasPlex box at my girlfiend’s house, parent’s house, and a number of my friend’s houses. This enables me to share my media with my friends who have cut the cable as well, since most of them don’t have the technical experience needed to set things up. RasPlex is great for this, because it only costs about 30 bucks for the board, and then another 20 or so for power cables, remotes, SD cards, etc. It’s easily the cheapest and most effective Plex client, but I’m of course biased. There’s also the Roku client, Chromecast, and plexconnect for the AppleTV, and of course the Samsung and other SmartTV apps. At the end of the day, a thin client is what I use to watch my media, because why pay $200 - $1000 for a computer to play back your media, when a $30 raspberry pi can do the job.

I love XBMC, but Plex is easier for all my friends and family, and also allows for me to do stuff like watch one show on my TV in my living room part way, and finish it on my projector or even at my girlfriends house. It seamlessly handles all the metadata (pictures, box art, episode descriptions, etc), and provides a very rich media experience similar to Netflix or the AppleTV. One of my favorite features is “recently added” and “on deck”, but the ability to share media servers (and even sync from shared servers!) is super powerful, as I can use the “universal search” feature to look through my friend’s media as well in case I’m looking to watch something I don’t actually have.

Storing it - The Heavy Lifting

Powering all of these thin clients is my recently upgraded media server. I’m running Funtoo Linux, but I imagine most people would use Ubuntu for this. The hardware itself is probably a bit overkill, but I wanted to build something Future proof. I went with an i7 (for transcoding), a motherboard with 10 sata slots, and the Corsair 900D case, which can rack up to 10 drives out of box, with room for 9 more with additional drive cages / power / cooling. All of this is of course to run the Plex Media Server, as well as a my download managers (more on those later).

The core concept here is storage. The case and motherboard can support up to 19 drives. I am using 4TB Western red, selected because they are designed to run cool and for NaS applications. They also have a 1,000,000 hour MTTF, so they’re really reliable mechanically. I’m running an mdadm software raid, but I’d prefer to run btrfs once they support raid5 and reshaping. Before anyone asks, I’m not running zfs because it doesn’t support reshaping. I have smartmond and mdadm connected to msmtp so that I’m emailed to be notified of any potential drive errors / array degradation. If a drive fails, the system is set to automatically unmount and disassemble the array, so that I can remove the failed drive and have it resync in a read-only mode. Unfortunately, mdadm is vulnerable to the ‘raid 5 write hole’, and doesn’t handle bitrot, which is why I am excited to replace the array with btrfs once it’s mature enough.

I currently have 16TB in my array (5x4TB in raid5), with the potential to grow to 36TB without any modifications to the case, and up to about 60TB max in the case. This is why reshaping is such an important feature to me - I plan on adding one drive at a time as the need for space arises.

Getting it - The sources

So, where does all this media come from? I’m using two amazing programs - Couch Potatoe to manage my movies, and SickBeard to manage my TV shows. These programs are set to hardlink and rename (using Regex’s easily parsed by plex) their downloads to directories watched by my Plex server, as well as notify my plex server that the download is complete. They also send me a pushover notification, so that I know that the episode / movie is now available, or that it has started to download. CouchPotatoe, Sickbeard, and Plex are all connected to trakt, which keeps track of what I’ve watched and even generates suggestions of what to watch and download.

This part took a little while to tune properly, I use this nice perl script with a few changes to automatically clean up my old files to properly name them so that the are recognized by the Plex, Sickbeard, and Couchpotate TVDB / IMDB scrapers.


I’m thinking of making a few tutorials on how to set up these individual components if anyone is interested. I’ve set up a few media server / NaS boxes as described above for some of my friends, and they are loving it. There are already quite a few great tutorials, which I’ve listed below.

Moving to jekyll

Wordpress is dead. Long live Jekyll!I’m going to start shutting down the old server, and I’ve already done away with the old w...… Continue reading

i3 Window Manager

Published on April 06, 2014

Gentoo On Macbook Pro Retina

Published on February 14, 2014