What to do with a £30 computer? I’ll get to writing some code for this thing after Christmas. For now, it’ll make a nice media PC. Here are all the details of what I went through to get this up and running.
You will need
- Raspberry Pi
- Power supply – a micro USB adapter (my samsung phone charger worked fine). Needs to be 5v and at least 700mA.
- SD memory card. Make it 2GB or more. I bought this one.
- USB keyboard (not strictly needed but it’ll be handy now and again)
- Ethernet connection
You could use Raspbian, OpenELEC or Raspbmc. They’re all Linux based and any one would do. Raspbian is the standard OS for the Pi, OpenELEC and Raspbmc will make running XBMC (XBox Media Center) easy. I went for Raspbmc. They’re all super easy to install. For Raspbmc, go here for the download. It just involves sticking the SD card into your laptop and running an installer to get the OS on to the card. Stick the card into your Pi, connect everything up, and voila.
It all seemed to work perfectly for me but keyboard input stopped working after about a minute, every time, and needed a reboot. This would be followed a few minutes later with the power going off. Now, if something goes wrong, and it will, you’ll need to start a trial and error process to narrow down what’s wrong. The Raspberry Pi forums are a great source of help and helped me realise that my power supply was dodgy. This quote sums it up:
This is often due to either (or both) a bad power supply (power supplied much below advertised one), power cable (someone compared a lot of them to wet rope, not ideal for conducting electricity), keyboard (some have power requirements much higher than the 100mA the Pi can supply, this is never listed in their specs, and can vary by production batch for off-brands), or mouse (ditto).
I switched it with my wife’s phone charger which worked perfectly (mine was from ebay – may have something to do with it). Trial and error is the key.
Next problem: audio didn’t work via the HDMI cable into my TV. Cue a change to the Raspberry Pi’s configuration file. This is a text file in the root of your SD card called config.txt containing a list of key-value pairs for configuring various options. I fixed my audio problem with a clue from this forum thread – adding these options to the config.txt:
Check this page for an explanation of those config options. I probably only needed the hdmi_drive option but I’m too lazy to test them individually.
Now to remote control. You can use a lot of “one-for-all” type remotes, I wanted to use my phone. The official XBMC Remote doesn’t work with the latest XBMC (!) as the HTTP API has been deprecated and removed. Luckily, there are lots of better options available on the Android (and iOS) app stores. I used Yatse. Yatse is VERY slick – it detects the XBMC instance on your home network quickly and is easy to use.
Next up, BBC iPlayer and ITV player. There are lots of others available. The iPlayer app is actually better than the official one on my Blu-ray player as it gives live streaming too. To get it from your computer to the Pi, you need to create a shared folder that the Pi can see. I shared C:\xbmc with a new user called xbmc. You could just be lazy and share it with the ‘Everyone’ group. Copy the zip files in there. Next, in XBMC, go to System -> Settings -> Add-ons -> Install from zip file. Select your share from the list (you will need to create it there first and tell it to look at the C:\xbmc folder you created) and select the correct zip file. Then go back to the home screen and select Videos -> Add-ons. There they are!
Pi Store ideas
That’s XBMC up and running. It’s nice to have it up and running, but I imagine I’ll want to start tinkering with the Pi again. I’ll leave you with some ideas for development. Maybe some day these type of apps will end up on the brand new Pi Store!
- For an electricity worth about £4 a year the Pi is almost cost-free to run 24/7. It could be downloading all your stuff. It would be sweet to have a web interface where you could queue URLs or torrents or whatever and the Pi will download them whenever your connection isn’t busy.
- It’d be nice to use smart phones as input devices for a game server running on a Pi and the TV. Like a multiplayer skiing game where the phone accelerometer allows you to steer.
Ideas for media pc/backup:
- Use the Pi for backup. There’s an 8GB memory card which will be more than enough to back up documents at least. For a hardcore backup option, connect a USB hard drive to it.
- Have a task running on the laptop which copies photos from My Pictures across to the Pi’s pictures folder.
- App for our Android devices to automatically back up everything to the Pi on a regular basis while on the home WiFi network. Photos will then be browsable.
- App for the Pi to backup everything on it to cloud storage.
- Thermostat control. Wire in a tempertature sensor, use a relay for switching. Add a web server and a web app to allow remote access. I’m obsessive about the temperature in my house, so I would be able to chart it all.