Raspberry Roller

30 12 2012

I got a Raspberry Pi a while ago (well, two actually) and have finally finished my first project with it, to make a portable music streaming device.

This would have been pretty easy, but I decided to put it in an old retro 80s ghetto blaster case, namely this one, a Phillips Roller radio cassette player. My parents had one when I was a kid and I came across one on eBay and thought it would be perfect.


So, I ripped out the guts, including the rather measly speakers and cut out loads of the inner plastic that was supporting the amp, radio and cassette parts and went to work to put in my own contents.

This took quite a while and the added difficulty of a young baby and a two year old who needs constant entertainment only added to the challenge (using a dremel when the wife has put your 6 month old son to sleep doesn’t go down too well ;)).

Once all the insides had been cleaned out, I then went to work to put my own contents inside. Alongside the Raspberry Pi, I also put in:

USB WiFi dongle with external aerial (so I can replace the one on the radio)

USB WiFi dongle with external aerial (so I can replace the one you see from the outside)

Amp from Sure Electronics (I wanted a tripath, but this seemed the easiest)

Amp from Sure Electronics (I wanted a tripath, but this seemed the easiest)

Kenwood Car Speakers

Car Speakers (3-way speakers for better range, but at 5 1/4″ these aren’t gonna rock the house too much)

Simple USB soundcard

Simple USB sound card (I’d read the internal sound chip in the Pi is a bit basic if you are using the 3.5mm output, hence this)

The car speakers were chosen since the old ones were really small and not capable of any bass or offering high power output, the amp because i thought it had a volume control – but to get it to work needed some ninja soldering skills that I don’t have, the sound card I believe is an improvement on the in-built chip (but I might be wrong) and finally the WiFi dongle uses an external antennae, so I’ll still get a good service with all the different devices crammed inside the stereo.

The next step was getting the Pi to play music. Luckily, I tend to listen to all my music from a central server running the rather awesome MPD to stream my music out to as many connected MPD clients as I want. So, all I had to do was install MPD on to a fresh version of the latest Raspbian and I was almost ready to go. I wrote a small script which, on boot, checks to see if my MPD server is available, if so it starts the MPD daemon on the server playing the stream, then starts the MPD client on the Pi playing the stream from the server. If it doesn’t find the server, it adds music from the small local library stored on the SD card and plays that instead., via MPD.

Here’s the inside of the Roller, with the Pi, amp, soundcard and speakers in place:

A view inside the Raspberry Roller.

A view inside the Raspberry Roller.

I stuffed the whole thing with cotton wool, to help boost the bass (but I know next to nothing about proper speaker design, it is one of those things I plan to do in my retirement – build massive bass-thundering speakers).

The Pi is at the bottom, the amp in the middle (you can see the amp’s fan sticking out) and the sound card is at the top.

The finished Roller in all it's red raspberry goodness.

The finished Roller in all it’s red raspberry goodness.

And here is the finished article (playing at the time, but you can’t tell when it is on apart from the music playing).


It sounds pretty good considering. The bass could be better, but you can’t expect much from such relatively small speakers. However, it does go pretty loud for something so small and it sounds really clean and crisp, so I am happy with it.

For the other Pi I have lying around, I plan to use it (when Piface comes out) to control the lights in the dolls house we got my daughter this Christmas. Eventually she will hopefully get in to using Scratch herself to control the lights in her dolls house (and maybe some other things like a little mini stereo or even a small screen in her dolls house). I would imagine when she sees that we can plug her dolls house into the TV and it is a computer, she will be a little excited and intrigued!


Build your own baby monitor revisited

8 11 2012

(Quite) a while ago I wrote about my attempts to make my own video baby monitor. I had also written about a few other approaches as well, but they were pretty involved and complex and tended to break after a few days.

Wanting to simplify the approach and make it easier to set up, I came up with a slightly more refined solution that works much better. I’ve been using it successfully for about a year and it works with multiple cameras and screens. Now I have a second bundle of terror it has proved very useful.

Rather than trying to reinvent the wheel I decided to use products already out there, but ones that aren’t actually designed to monitor babies with and thus don’t have the crazy high price tags. I use an IP webcam, that connects to a WiFi network, this can then be viewed on any laptop or android device you have. It should also work with the iPhone as well, but not being a fan of Apple’s walled garden, I haven’t yet investigated this in any great detail.

The most important part of all this is the camera and I’ve stuck with the same camera I used last time, the IP Night Vision webcam. These can be found all over eBay, or there are also variants available on places like ebuyer.com and dabs.com. It has a WiFi and an ethernet network connection, night vision up to a couple of meters, two-way audio (so you can both listen to and talk to your baby – though I don’t suggest the latter, that is one big brother step too far) and it can be panned and tilted around so you can ensure the baby stays in view even if it moves. Most of these cameras are made by Chinese manufacturers, but some are of better quality than others. Foscam is a really good brand it seems, I have two and they have been running non-stop for the last year with no problems what so ever. The model I have used and would recommend is the Foscam FI8918W.

Foscam FI8918w

Foscam FI8918w

It is relatively simple to set up, you just need to connect it to your wireless network following the instructions included in the box. Once this is done you can then view the camera in many different ways. There is an internal web address that you can use to view it from any laptop connected to your wireless network using a web browser. You can also use the free media software VLC to view the video feed, the advantage being this approach also gives you sound and will work on pretty much all platforms supported by VLC (so Windows, Linux and Mac OS). I have written a number of scripts that can be run on Linux (Ubuntu) and Windows that launches the necessary video feeds and restarts the video every hour, since the audio can sometimes get out of sync with the video.

However, the best way to view the video feed I have found is via an Android app, called IP Cam Viewer. There is a free version which works perfectly for my needs, but if you want to say thanks to the developer, you can get the Pro version which is only a few pounds and gives you a few more features. I run this app on my Android tablet, an Android set top box and my Android phone. It allows me to view the the video feed of the two sleeping terrors on a TV in the kitchen using the Android set top box, anywhere in the house on my Android tablet or whilst out and about pretty much anywhere in the world (with a mobile data connection) on my Android phone. The app allows you to move the camera around if you need to and you can put widgets on your home screen that update as fast as once every second, so you don’t even need to run the app to see what is happening.

IP Cam Viewer in action

IP Cam Viewer in action

There is some technical cleverness that needs to be carried out to allow you to view the web cam outside of your wireless network on your phone, but this is very simple to set up and can be done for free.

All in all, this set-up works really well. So much so that the BBC just interviewed me about it! It is certainly a much cheaper and more flexible approach than the dedicated solutions on the market currently and rather than only being able to view the video feed on one tiny screen, you can view it on pretty much any screen you wish pretty much anywhere you want.

If you want to do this yourself, do get in contact via the Contact page. I might put together some more detailed information into a PDF, maybe with a “Pro” version that contains simple step-by-step instructions for a small fee or something. It seems all the rage these days 😉

UPDATE: Gosh, so the story has got a bit of traction on BBC News and I’ve got quite a few comments and emails to read through. I’ll read and respond to all your comments over the weekend and I am sure I can produce a PDF with instructions.

Glad other people are keen on this idea!

Backup All your Files Using Google Docs

10 08 2010

Google Docs recently upgraded to allow you to upload any file to Google Docs. This very handy feature means, if you purchase a little extra storage from Google, you can use Google Docs as your personal online backup service. Google offer a variety of storage plans:

20 GB ($5.00 USD per year)
80 GB ($20.00 USD per year)
200 GB ($50.00 USD per year)
400 GB ($100.00 USD per year)
1 TB ($256.00 USD per year)
2 TB ($512.00 USD per year)
4 TB ($1,024.00 USD per year)
8 TB ($2,048.00 USD per year)
16 TB ($4,096.00 USD per year)

From what I remember when I looked in to it, these prices are pretty good compared to dedicated online backup services (though anyone who needs and can afford the 16TB option needs their head examined!). The only issue is how to get all your files into Google Docs. Well, if your Command Line-Fu is strong, you could use Google CL, but it doesn’t work with a batch of files, unless you write some cunning script. A much easier alternative is to use software from Gladinet, in particular their Gladinet Cloud Desktop tool. This allows you to define various backup tasks, allowing you to sync folders and their subfolders to a folder in Google Docs (or Picasa or a number of other online sources). All your folders and subfolders are backed up to Google Docs, with the folder structure being replicated in Google Docs. You can set these tasks to run every day and it should only update new and changed files. I have been using it for the past month or so and it seems to work fairly well. The only real issue is due to slow upload speeds, but I am not sure whether this is an issue with my broadband provider or a limitation of the Google Docs servers. Either way, the results are that all my files are backed up to Google Docs automatically.

Use Dropbox as Your Own Personal Source Repository

10 08 2010

Dropbox is an awesome little service, allowing you to sync various files between devices (PCs, Andriod and iPhones for example). Whilst there are lots of uses of the Dropbox service, I tend to use it for two main things.

The first is as my own personal SVN-esque server. I set up a folder in my main Dropbox “root” directory, by default in Windows this is under “My Documents/My Dropbox”. Any code I write, I save in this folder. The code is then synced to all my PCs automatically by Dropbox, allowing me to work on the code from anywhere. As I use Eclipse to write my code, I have set this folder as the default source folder for my workspace in both my Windows and Ubuntu version of Eclipse. Thus, all I need to is open up Eclipse and hit F5 to refresh and get all my updated sources, thanks to Dropbox!

I do the same for the music tracks I am working on under Renoise. By saving all my songs in a folder under the main Dropbox folder, the tracks are synced across all my accounts. As Renoise is cross-platform (to a degree) I can simply open up Renoise on both my Windows and Ubuntu machines and work on the same track. Sweet. This trick works for any cross platform program. You can do it for your Firefox or Google Chrome profiles, or even your Music Library!

Pimp Your Wii with Home Brew Apps

14 04 2010

About a year ago, I hacked my Wii, installing the Home Brew Channel via the Twilight Hack (it made me buy the game, which is meant to be one of the best on the Wii, so it’s all good Nintendo – though I haven’t really got into the game – I hate the wide eyed characters, its just so clichéd). However, I didn’t really find much use for it and let it die when the Wii updated itself (incidentally, this is a risky thing to do because depending on the version of the hack you installed and what you installed afterwards, a Wii System Update can brick your Wii..).

Recently, after having too many sleepless nights with the baby, I decided I needed to hack something. In my internet travels I came across this program, USB Loader GX, that allows you to backup your Wii Games to an external hard drive and load them all from one USB drive, no need to change discs any more. Now that sounds seriously cool.

So, following the rather detailed excellent ReadMii from USB Loader GX, I was able to re-install the hack, install the Home Brew Channel and then install the USB Loader GX program. A Word of Warning: Doing this invalidates your warranty and seriously risks turning your Wii into a fancy paperweight if you aren’t very careful. Also, do not use the Wii System Update function, since it might also brick your Wii, bear this in mind before proceeding. You can still access the Wii Network and the Shop after installing this hack, at least for the moment.

Essentially, the install process is:

  1. Use the Banner Bomb technique to install the Home Brew Channel (Home Brew software) via the HackMii installer.
  2. Install various hacked and custom IOS (essentially Operating Systems) and cISO (custom OSs) on your Wii, giving Home Brew software greater access to your Wii.
  3. Install USB Loader GX.
  4. Prepare a USB hard drive to use (formatted either via Fat, NTFS or WBFS), I chose WBFS as I have loads of spare hard drives and it is the most flexible with the Wii.
  5. Connect the hard drive to the Wii and load USB Loader GX.

Once done, you then need to copy all yours games to your Hard Drive. I found that for some reason the Install function of USB Loader GX (where you copy the game to your hard drive) didn’t work for me. So, instead I used a tool called DVD Dumper, following the tutorial from here. That site actually contains lots of useful guides, I recommend it for a good background read. There is a version 1.3 of the DVD Dumping tool, but the dev has given up development and 1.2 seemed to work well, over WiFi anyway. Bear in mind it takes about 2.5 – 4 hours per disc, depending on the speed of your connection – shame Nintendo never added an Ethernet port really.

The process was pretty easy and basically goes like this:

  1. Load DVD Dumper via the Home Brew Channel.
  2. Choose Network Dump and insert your disc.
  3. On a computer, type your Wii’s IP Address in to FireFox (don’t use IE), your Wii’s IP Address is given to you on screen by the DVD Dumper program.
  4. Click on the link to download the inserted game as an ISO and save the file.
  5. Wait 3 hours and go do something good, go running, mow the lawn, vote Lib Dem.
  6. Connect your already prepared USB hard drive to your computer and load WiiBackupManager.
  7. Copy your ISO from your computer to your hard drive using WiiBackupManager.
  8. Connect your hard drive to your Wii, load USB Loader GX, highlight one of the new cover-less games, press 1 to choose to download the covers, let it do its stuff and finally you are good to go!

It should be noted that this technique can also be used by naughty and bad people to download copies of games from the internet and play them, without paying for them. People, this is stealing. If you didn’t buy it, you have no right to use it or play it. I know these days most internet users feel it is their right to download stuff for free if they want, but, there is no way round it, this is stealing and is only harming the industry you love. Don’t do it. Please only use this program to backup games you already own to a hard drive (this in itself is probably illegal, but as I don’t share my games with anyone, I don’t think I am really doing anything wrong).

The Home Brew Channel also gives you access to loads more cool stuff as well. Simply follow this guide to download and install the Home Brew Browser. It allows you to browse, install and update all the cool stuff that people have written for use on the Wii, including old school game ports, media players (including the GeeXbox) and a load of other weird and wonderful stuff. Get stuck in and be the envy of all your boring Wii System Menu version 4.2 friends, so long as you don’t mess up along the way and end up with a nice white brick 😉

Make Your Own Video Baby Monitor

4 02 2010

I’ve been quite quiet on the blog front lately, mostly because my Wifey is pregnant and we’ve only got one month to go! Being a through-and-through geek, I am always looking for ways to make my life easier or to do something cheaper through a clever technical hack and I plan to make my, my Wife’s and my baby’s lives as easy as possible through the power of the geek!

One thing I planned to do was to make my own baby monitor, rather than dropping up to £150 on some pre-built device. I wanted to be able to see as well as hear my baby when it is asleep upstairs, but those devices are very expensive. I thus thought I would try to make my own device using things lying around the house already. It actually wasn’t too difficult in the end, but I was lucky that I had the right equipment lying around. The first and most important piece of equipment is a Webcam. There are loads of options out there, but I wanted to use one that didn’t need to be connected to a PC to use. I had a Dlink DCS-2120 IP Webcam, that can connect to a Wireless network and doesn’t need a PC to run, it perfectly suited my needs.

Dlink DCS-2120

Dlink DCS-2120

The DCS-2120 includes some built-in features that are very useful, but I’ll mention that later. You can use other Webcams, even just simple USB versions, but you’ll need something to handle the video feed. If you don’t want to run a PC all the time, you could use something smaller, like a Fonera 2.0 router, that allows you to plug a USB Webcam.

So, next, you need a wireless network. Now, I didn’t want to carry around a huge router just to get this system up and running, because after all, this system should be portable enough to take to other people’s houses when we go travelling with the baby, so I chose to use the smallest WiFi router I could get my hands on. Luckily, I had one of the smallest routers already, a La Fonera. I already had another La Fonera installed and connected to the excellent free WiFi-sharing FON network, so I didn’t mind using this router for my own devices. Since the firmware (the software that runs on the router) that comes pre-installed on the router isn’t suitable for use as a normal router, I had to install (called flashing) some alternative Firmware. I chose to use DD-WRT, since it is fully supported on the Fonera and is very flexible. I used the guide from here that had some very detailed instructions on how to install DD-WRT on the Fonera. I shall summarise it here:

  1. Enable SSH access to the Fonera using a special web page hack.
  2. Enable the Redboot boot loader (allowing you load alternative firmware on the Fonera).
  3. Copy over the DD-WRT firmware and flash it on the Fonera.

It isn’t that simple, there are lots of steps involved, but the guide is very clear and easy to follow. Once I had DD-WRT installed, I now had a cool mini router, that I could then set-up to use with my IP Webcam.

La Fonera

La Fonera

Finally, I had to figure out how to actually view the feed. I wanted both a portable and a static solution. The Webcam I was using provides a feed using the rtsp protocol, so I needed a video player that could handle the rtsp stream. For my portable solution, I decided to use my Nokia N82 mobile phone, that has built in WiFi and can run the Core Media Player, that supports rtsp streams. For my static solution, I decided to use my laptop, running VLC on Ubuntu Karmic. In fact, because the Webcam just sends out the stream, any client that can access the wireless network and can play an rtsp stream will work. So, I can view the stream on my Windows Desktop upstairs, using VLC, whilst my wife can view the same stream on her Ubuntu Karmic netttop downstairs (yes Jobsworth, nettops can be useful).

I set-up the Fonera router, so that it provided a WiFi network with the same name (SSID) and security credentials as my main WiFi network at home. Thus, the Webcam automatically connects to my WiFi network when at home and my phone connects to it automatically also. Then, if I take the baby elsewhere, the Fonera replicates the WiFi network, so as far as the Webcam and phone is concerned, it is connected to the same network (this is very useful, because, the only way to change the wireless connection on the Webcam is through a wired interface, which is a bit of a complicated pain).

The real advantage of using this set-up is that you can have as many clients connected as you want to the video feed. The Webcam features a powerful microphone, so you can hear as well as see that the baby is ok and finally, the DCS-2120 includes some handy additional features, including the ability to take a photo at set intervals and upload them to an FTP server. Thus, I will be able to create one of those cool time-lapse movies of my baby as it sleeps and grows over time. I also chose the Fonera, because you can connect alternative aerials to it, most noticeably the La Fontenna, so this set-up should even work in my parent’s old house that has 12″ thick solid stone walls.

Since this whole system is meant to allow me to check up on our baby whilst it sleeps, I wanted to make sure it doesn’t look quite so scary and also allow it to be quite versatile. I thus bought a little teddypig, put the Webcam inside and used a Gorillapod camera stand to keep the Webcam in place (and also so I could attach it to pretty much anything).

It might look a little freaky, but I think it looks much less scary than the Webcam on its own.

Finally, here is a quick movie of the WebPig in action, alongside my laptop and mobile phone, showing it all working. The Core Media Player isn’t the best app in the world, so the video feed on the phone occasionally breaks up, as the video shows, but in general, it works very well.

The WebPig

The WebPig

Windows Session Save and Restore

16 09 2009

So, I do a lot of work from home and often have a large number of different programs and files open at the same time. I use two different computers, with the mouse and keyboard shared between the two using the excellent Synergy+. Often I am working on a particular project that last a number of days, each day I need to open the same files and folders. I was wondering if there was an app out there that allowed me to save my Windows “session” i.e. all the programs and files that I had open so I could quickly restore them the next day.

Now, after doing a lot of searching, sadly it seems there isn’t 😦 The best solution seems to be to use Windows Standby/Hibernate. But this is kinda impracitcal, since I want to use the computer after I have saved the session. Another option seemed to be TwinsPlay which has a Session Save feature, but this seemed to crash my computer and kill Windows Explorer 😦 so that was out. Another option was SmartClose however, this only managed to save the running programs, but not the actual files those programs had open (so it would save and restore OpenOffice, but not the XLS file that OpenOffice actually had open). So once again, this was no real use. My final option was Microsoft Research’s own GroupBar. Sadly though, this also only saved and restored the running program, not the file that that had open.



So, I am kinda stuck 😦 My only alternative is to create a batch file to do this, so I would create a new text file, put in the following commands, as an example:

start /d C:WindowsSystem32 calc.exe
start /d "C:Program FilesMozilla Firefox" firefox.exe https://www.bankofamerica.com
start /d C:financespreadsheets budget.xls

And then save it as start.bat (thanks to watchingthenet). But this is hardly the best solution. I am sure there is a better solution out there and if anyone knows it, hit me up in the comments (I recon Autohotkey can do this, but I don’t know where to start).