Building a Home Media Server with Raspbmc: Part Two

In part one of this series, I talked a little bit about the Raspberry Pi and Raspbmc. I described what they were and why you might want a Raspbmc device of your own. In part two, we’re going to talk hardware. We’ll get into the specifics of what I chose to use with my Pi and why. And after having read this part, hopefully you’ll walk away with a good idea of what your own shopping list might look like. You’ll also get a feeling on how this project impacts your wallet.

The following is a breakdown of all of the hardware and peripherals I purchased for my Raspbmc project.

Pi – Obviously, this is the most important item to purchase. At the time of this writing, the latest version of the Raspberry Pi is the Model B Rev 2.0. It features a 700 Mhz ARM 11 processor, 512 MB of RAM, a GPU, an Ethernet port, 2 USB ports, an SD card slot, and an HDMI port. For a media center, this device is plenty capable. It can handle 1080p video without skipping a beat. I purchased my board from element14 for $35.

SD Card – You’ll need an SD card to install the OS to. And if you’re planning on storing media on the SD card as well, you should plan on purchasing a class 10 card. Class 10 is currently the highest speed classification available for regular SD cards (Note that SDXC UHS-I is a different breed of SD card and only works with SDXC devices). Class 10 is perfectly suited for full HD recording and playback. Of course, if you’re planning on streaming your content from another device, a class 10 card probably isn’t necessary. But better safe than sorry. I picked up a 32GB card from Amazon for around $24.

Power Adapter – The Raspberry Pi doesn’t come with a power adapter, so you’ll need to either salvage an old mobile phone charger or buy one. The Pi is powered over the Micro USB port, but not any ole cell phone or tablet charger will work. You’ll need a power adapter capable of delivering at least 700mA. I didn’t have any spare chargers that could provide that. So I ended up grabbing one from Amazon for $5.

Case (Optional) – There are no real case requirements here. You can leave the Pi exposed for all the world to see. But be aware you will risk damaging your device. Play it safe and put the thing in a case. If you’re crafty, you can build your own Pi case out of everyday things. If you have a 3D printer, you can find a few case models on the Internet to print out. But if, like me, you’re neither crafty nor blessed with a 3D printer, you’ll need to buy a case. I picked up a really nice one on Amazon for $14. But you have plenty of options. Just make sure the case’s design works for your Pi. For instance, the Model A had only one USB port. So a Model A case won’t work with a Model B Pi.

HDMI Cable – For both video and audio, you’ll be doing yourself a huge disservice by using composite video. If you want HD content (and who doesn’t these days?), you can’t even do HD over composite video. Plus, there are the sound issues with the Pi. Sound over the onboard mini jack is really, really bad. Kill two birds with one stone and go straight HDMI. You can source both your video and audio over the Pi’s HDMI port. A short run (6′ or less) HDMI cable is pretty cheap. I paid $7 for a 6′ cable from Newegg.

Mouse/Keyboard (Almost optional) – A mouse and keyboard is only needed for the initial setup of Raspbmc. Once you get Raspbmc installed and configured, and assuming you have something else to control the Pi with, you can unplug the mouse and keyboard and stick them back in the closet. Something to keep in mind is that the Pi only has two USB ports. So if you’re trying to use a USB WiFi adapter at the same time as the mouse and keyboard, you’ll need to use a USB hub.

WiFi Adapter (Optional) – A WiFi adapter is optional. If you plan on streaming HD content from another computer, I actually recommend avoiding WiFi altogether and plug an Ethernet cable into your Pi. That’ll give you the best transfer speed and you’ll see less jitter or skips in your playback. But if you absolutely insist on using a WiFi adapter, consult this list of compatible adapters. Not all WiFi adapters are equal. If you already have something that’s not on the list, you’ll have to experiment with it to see if it’ll work. Mine (ENCORE ENUWI-1XN42 Wireless N150) incidentally, did NOT.

Powered USB Hub (Optional) – A powered hub is only necessary if you plan on using more than 2 USB devices or if an attached device needs to draw more than 100mA (e.g., external hard drive). They’re not terribly expensive. I picked up a D-Link for around $20. But once I installed and configured the software, I realized I had no use for it. I’ve currently got nothing plugged into the USB ports since Raspbmc is using a FreeNAS box for media storage.

IR Remote (Optional) – An IR remote is another optional component. I started off using a USB mouse to interact with Raspbmc and quickly moved to a free Android application called Yatse that runs on my Kindle Fire. I’ve been using Yatse for a while now. It’s pretty slick. But I’ve found it really inconvenient to always keep the tablet near the TV. And when I do use it for a remote, waiting the 3 or 4 seconds for it to connect to WiFi when I turn it on is kind of annoying. I ordered SANOXY remote for $14, but I haven’t received it yet. Once I get it, I’ll update this to let you know how well it works. (Update 07/30/2013 – I received my SANOXY MCE remote today. It works fantastically. The little track pad thing was an unexpected bonus. Highly recommended!) If you’re thinking about buying a remote for yourself, consult these two links [1, 2] for guidance.

And that’s about it. Here’s a total breakdown of my project’s cost. Your cost will undoubtedly vary as you determine what’s right and wrong for your own project.

Pi $35
32 GB SD Card $24
Power Adapter $5
Case $14
USB Hub $20
Remote $14
Total: $112

Up next…software!

Building a Home Media Server with Raspbmc: Part One

When the Raspberry Pi first came to market, I suffered through quite a few conversations with my geeky, gadget-loving, early-adopter friends who thought it was the greatest thing since Coke Zero. To them, it was a cheap and powerful device with potential limited only by their imaginations. To me, it was just another gadget. It looked interesting. And I was sure it was a lot of fun to hack around on. But I was also sure it was one more thing that would compete for my time and that it would ultimately lose, finding itself gathering dust on my shelf of sad, forgotten gadgets.

It was only recently that I came across the Raspbmc project and my attitude towards the Raspberry Pi changed. For years I’ve intended to build an HTPC. I’ve always wanted a device that could serve as a one-stop media center for my music, photos, television shows, movies, and video podcasts. I’d grown quite tired of the constant chore of hooking up my laptop to the television just so I could watch Hulu Plus or Netflix on a big screen. And truth be told, I really had my heart set on a MythTV box. But every time I sat down to spec out a machine, I always found a more practical project to throw money at. When I learned about Raspbmc, I realized I could still end up with a device that solved all of my media center needs, but without the cost of building a full-blown HTPC.

In this series of articles, I’m going to talk about my adventures with Raspbmc. But before I do, I’m sure there’s one or two of you out there who are completely new to the whole Raspberry Pi scene. So in this first article, I’m just going to briefly discuss what the Raspberry Pi and Raspbmc is all about. In the next few articles, we’ll get into the meat and potatoes of my Raspbmc project.

“What is a Raspberry Pi exactly?” Well, it’s a very small computer – about the size of a credit card. Model B Rev 2.0, which is the latest revision as of the time of this writing, features 512 MB of RAM, a 700Mhz ARM 11 processor, a GPU, 2 USB ports, both an HDMI port and an RCA video port, an Ethernet port, an SD card slot, and a variety of GPIO pins for the hardware experimenters out there. Considering you can get all of this for around $35 + shipping, that’s quite an offering. I’ve read that this device is comparable to an iPhone 3G, although the GPU supposedly outperforms the iPhone 4S by a factor of 2. It’s quite impressive, especially considering these things were meant as educational devices.

There are a few things lacking from the Raspberry Pi worth taking note of. First, there is no storage. No storage means no preloaded operating system. You supply the storage by way of an SD card. This means you also have to download an OS appropriate for your project’s needs and flash it to the SD card. Second, there’s no case. When you buy a Raspberry Pi, you’re purchasing a bare board. It comes in an anti-static bag inside a mostly plain white box. How you mount it, encase it, or display it is entirely up to you. Unless you need easy access to the GPIO pins, I highly recommend you invest in a cheap case. Otherwise, you risk damaging it. Third, it doesn’t come with a power adapter. Power is supplied to the Raspberry Pi through a Micro USB port. But you’ll need a Micro USB power source capable for delivering at least 700mA. When I went rifling through my collection of cell phone and tablet chargers, none of them were capable of delivering that amperage. So I had to purchase a new one from Amazon. One other thing worth noting is that the regular USB ports on the Pi are limited in how much current they can supply. If you need to use a device that requires anything more than 100mA (e.g., an unpowered external hard drive), you’ll need to use a powered USB hub. Otherwise you risk damaging your Pi.

Now, what is all this Raspbmc business? Raspbmc is a port of XBMC (formerly Xbox Media Center) for the Raspberry Pi. It’s a media center platform, similar in concept to MythTV, Windows Media Center, SageTV, etc. But out of the box is lacks PVR functionality. It’s open source and has a fairly extensive feature set, including support for playing video, music, photos, and provides facilities for extending the platform’s capabilities through plugins (accessing stream services, web browsing, screensavers, etc). Controlling the device can be accomplished using a mouse and keyboard, a web based interface, your tablet or phone, or even an IR remote control. And because Raspbmc is based off of Linux, you have the ability to easily remotely administrator the device. It’s quite flexible and whole lot of fun for those who like to tinker.

Excited? Great. Now for some discouraging words. I’m not not sure I’d recommend Raspbmc for someone who doesn’t have a whole lot of patience. Nor would I recommend it for technologically challenged folks who are just looking for a cheap alternative to the Roku or Apple TV. It’s somewhat easy to setup, but it’s not perfect. It does require some persistence to get it working optimally. It took me a month before I reached a configuration I was happy with. We’ll talk about some of the issues I faced when configuring the Pi in a later article. So just consider this a warning.

In the next article, I’ll talk briefly about hardware, including cases, power supplies, hubs, and memory. In part three, I’ll go over the software installation, mention a few of the things that caught me by surprise, and in part four I’ll mention a few tricks that made the Pi work best for me.

Improving the SodaStream

Last Christmas, Leora gave me a SodaStream. Before then, I hadn’t even heard of the thing. And for someone with my level of soda addiction, it seemed like the greatest, most magical gift in the world.

If you’ve never used a SodaStream before, the idea is pretty simple. You attach a CO2 tank to your SodaStream, fill up a liter sized bottle of water, attach the bottle to the SodaStream, press a button a few times, and BAM! – you have soda. “What about flavorings?” you ask. SodaStream sells some fantastic soda mixes that are remarkably close to their major brand counterparts. And I do mean remarkably. SodaStream’s Fountain Mist (or, as I call it, Mountain Fist) and Orange mixes are two of my favorites. I often have a hard time telling them apart from their major label counterparts.

The SodaStream devices vary in price, but they’re not terribly expensive. I think mine cost around $80 or so. The mixes are also pretty cheap – usually around $4.99 for a 12 liter supply depending on where you buy them. The most painful thing about the SodaStream is the CO2. The 14.5 oz. CO2 tanks are small – I get about 3-4 weeks of use out of one. And because the tanks use a proprietary fitting, you can’t just take them to just any ole place to have them refilled. You either have to either buy a brand new tank for around $35 or exchange your old tank for a new one at around $15. Doing the math for a year, that’d put me at around $195 on CO2 alone.

There is a cheaper way to deal with the whole CO2 issue I’ve discovered. Not long after I exchanged the first CO2 tank, I spent a little time learning about gas, tank fittings, and a bit about home brewing, which has a few things in common with home soda making. I decided to take the plunge and “augment” my SodaStream. I purchased a 10 lb. aluminum tank and a special fitting for hooking the thing up. I made a small modification to the SodaStream so that I could hook up the new tank. I also had the 10 lb. tank filled with CO2 for less than $20. I suspect it’ll be a while before I need to worry about running out of CO2.

If you’re thinking about doing the same with your SodaStream, here are some things to keep in mind.

Tanks – You’ll want to make sure you purchase a beverage grade CO2 tank with a CGA 320 fitting.

I came across a lot of conflicting information online concerning what qualifies as a beverage grade tank and whether or not it even matters. It does matter. Beverage grade tanks are made from aluminum. Tanks made from any other material may introduce contaminates and, in the case of lead-lined tanks, may even pose health risks. Beverage grade aluminum tanks aren’t hard to find. I found mine on Amazon for around $80.

The CGA 320 fitting is a very commonly used fitting found on CO2 tanks. Home brewing places like to deal with kegerator-style CO2 tanks, which also use this type of fitting. There’s nothing preventing you from using another type of connector. But it may be harder to find someone who can fill up your tank. It may be even harder to find the right adapter for connecting the tank to the SodaStream.

Connectors – I don’t have much to say about this except that a quick Google search will turn up a number of vendors that sell CGA-320-to-SodaStream connectors. I bought the Freedom One model from CO2Doctor. My experience with these folks was pretty awesome. They were quick to answer my questions and help me troubleshoot my hookup issues. I had my tank hooked up and working in no time.

  

CO2 – Finding a local place to fill my tank took a little bit of work, but not much. I started out calling the restaurant supply places and beverage distribution companies, all of which turned out to be dead ends. I then talked to a couple of shops that specialize in home brewing supplies. They were able supply me with CO2, but only if I agreed to exchange my empty tank for a full one and they wanted to charge me $30 to do it. In the end, I found a local welding supply company who agreed to fill the tank for $18. That’s a lot of CO2 for cheap.

Hooking It All Up – Because my SodaStream didn’t provide a good place for me to run the hose through, I had to drill out a tiny hole in the base so that the machine could sit right on top of the hose. The SodaStream fitting can be hand tightened, but it’s very important that you tighten the fitting connecting to the CO2 tank with a wrench. Otherwise, you’ll leak gas all over the place. Hand-tight isn’t enough.

  

  

Once everything is hooked up and ready to go, you’ll find that you’ll need to experiment a little bit to find the right number of presses to get the carbonation you’re accustomed to. The pressure coming into the SodaStream from the new tank will be different than from the original SodaStream tank. So the recommended formula of three farty sounds probably won’t result in something you’ll be happy with. For my setup, I usually pump it until I get the three sounds, lift the bottle to release the pressure, and pump it again for three more sounds. Also, be careful when you add the mix. If you go carbonation crazy like me, you’ll find adding in some of those mixes quickly can result in a soda volcano.

Have fun and good luck!