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.

The Wee Lollies – Tsar Bomba

While you weren’t paying attention, my band, The Wee Lollies, released our first full length album, “Tsar Bomba“. It was officially released May 14th and has slowly trickled out to all of the online music shops (iTunes, Amazon, CDBaby, etc.)

“That was a long time ago, Shane. Why the heck are you just now getting around to blogging about it?!”

Good question. And I don’t really have a good answer for you. I’ve been distracted I suppose. Anyway, if you like guitar driven rock music, give it a spin. And let me know what you think.

Also, we’ve been rehearsing a bit as of late. Keep your eyes on www.theweelollies.com for updates. We’ve got one or two shows in the works.

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!