Home Theater Raspberry Pi

Enclosure - Raspberry Pi by SparkFunElectronics

Enclosure – Raspberry Pi by SparkFunElectronics

So in Part One, we took an old external had drive, and added it as storage to a Raspberry Pi.  In Part Two, we took that Raspberry Pi and shared the new folders on the local network.  In this final tutorial, I’ll show what all of this has been for, and show you how to create your own Home Theater Raspberry Pi.

Introducing the Parts

The Hardware

If this is to be a Raspberry Pi based Home Theater PC, then we’re going to need a Raspberry Pi.  As this is fairly bare bones, you’ll also need a few other bits with it.  Firstly, an SD memory card.  This will provide storage for the operating system, and get your Pi up and running.

The Raspberry Pi comes with two types of video output, so depending on your TV, you’re going to need cables for one or other of them.  In my case, my TV is capable of HDMI input, so I used a standard HDMI cable to connect to the Rasberry Pi HDMI output.  To connect to the network, I used a wired Ethernet connection, as my Raspberry Pi  is close to my home router, but a suitable wireless option could be used here also.  You’ll need that all important power supply and cable, as without power, your Pi won’t be doing much.  Finally, so the living room doesn’t look too geeky, an appropriate case for the Raspberry Pi will improve it’s appearance, and protect the circuits.

The Software

I opted for the Open Embedded Linux Entertainment Center, or OpenELEC, because setting it up is quick and easy.  The OpenELEC project have taken a Linux operating system, and configured on top of that the X-Box Media Center (XMBC).  The XMBC software is capable of running on many other operating systems also, and turns your PC into a Home Media Center where you can add videos, movies, pictures, music, etc.

Installing OpenELEC

The instructions I give here assume you are installing the OpenELEC image to an SD card from another Linux computer, as this is what I did.  If you are using a Mac OS, or Windows computer, then head over to the OpenELEC wiki for instructions for those Operating Systems.

Step 1: Download OpenELEC for Raspberry Pi

The OpenELEC project does a fantastic job of providing various builds of OpenELEC for different computer architectures.  The one we need is obviously for Raspberry Pi, so we need to head over to the OpenELEC downloads page, and grab the latest Rasbperry Pi build.  This will download as a compressed tar file (.tar.bz2), which we will need to extract.

Once the file downloads, use the Archive Manager to extract the files somewhere, or if you’re a command line junkie like me, use the command line to extract the files with:

tar xvf OpenELEC-RPi.arm-devel-20120606162014-r11258.tar.bz2
Your file name may vary as new builds are released.

Step 2: Write the OpenELEC image to your SD Card.

Pop your SD card into your card reader, and figure out the block device file Linux assigns it.  Hint: Use ‘blkid’ at the command line, like we discussed earlier.

Open a command terminal (if you don’t already have one) and navigate to the directory created when you extracted the OpenELEC download file.
cd /home/username/Downloads/OpenELEC-RPi.arm-devel-20120606162014-r11258
Now we can write the image to the SD card using:
sudo ./create_sdcard /dev/sdX
Where /dev/sdX is the block device file for your SD card which we just looked up. Please ensure you get this right, as this process will wipe all data on the disk you specify, and you don’t want to overwrite files on another disk.

Once the process is complete, you’re good to go.  Pop out the SD card from your reader and insert it into the SD card slot on the Raspberry Pi.  Connect your Pi to the network, the TV, etc. and power it up.

Step 3: Just Add Media

After booting, you have a working Media Center, though it won’t show much until you add your media.  If you have been following our previous posts, you’ll have your media files available on the network, shared via Samba.  Now we need to add them to the Media Center.

  1. From the main screen, select “Videos”.
  2. Now click “Add Source”.
  3. The “Add Video Source” screen is displayed.  Click the Browse button.
  4. Now browse to where your files are stored.  If you have them shared on the network, then click under SMB File Shares, where you can find shares on your network.
  5. Name your Video Source.
  6. The Set Content Type dialog will appear, where you can tell XMBC what type of media is held in the source.  Scroll down until you find the correct media type (in this case movies)
  7. Finally a number of options for scanning the source are provided.  You can configure these to your liking, and close the wizard by accepting the changes.

Further Reading

You should now be good to go, but there are a few notes here to make your experience better.  If you have a smart phone or tablet, then it is likely you can download an XMBC remote control application to help control your media center.  Otherwise you’ll need a keyboard and mouse to navigate the menus.

OpenELEC and XBMC offer lots of configuration options.  Be sure to visit their sites to read their documentation.


Tags: , , , , , , , , , , ,

One response to “Home Theater Raspberry Pi”

  1. Marylouise Baisden says :

    Glad I found your post. It was Very helpful indeed. I am going to share it on my blog and link here if that is ok.

%d bloggers like this: