May 26, 2008

Weekend project: Weather Station

Filed under: technology,weekend projects — Grant @ 9:26 am

Weather StationThis weekend I put together a wee project I’d been thinking about for a while — a web-enabled weather station in my back garden.

Ever since I moved out of the city a few years ago I’ve taken a greater interest in the weather.  When we moved into our new house in Elderslie I noticed the previous owner had an outdoor temperature sensor installed.  She’d taken it away with her, but the bracket was still there.  I bought the same model and installed it a couple of weeks after moving in.  It’s been really handy, but my inner geek has always wanted more!

Last week I noticed Maplin had reduced the price of their touchscreen USB weather station to £80.  It’s branded Watson W-8681, but I think it’s more commonly called the WH1080PC. It seemed to have everything I was looking for: wind, temperature and rain sensors, RF wireless connection and a USB PC interface.  The only thing that was missing was a reliable way to mount it outdoors.  I bought a suitable 20mm pole and TV aerial bracket from B&Q – total cost about £11.

Installation

Putting the weather station together was dead easy, but finding somewhere to install it outside wasn’t.  I tried lots of options, but everywhere had problems – too low, too sheltered, too close to the neighbour’s dog, etc.  I finally settled on the garage, which I had been trying to avoid on account of the solid concrete walls.  An hour of drilling and two carbide-tipped drill bits later it was in place.

Weather Station receiverThe rest of the installation was dead easy.  The touchscreen receiver has excellent range, and I was able to get a signal from the outdoor station everywhere in the house.  The PC connection was simple too — just run a small EXE file (no installer) and it starts picking up the signal.

Getting it online

I had a browse around for software to allow my weather station to publish directly to the web.  I was really disappointed with what I found — options that people were recommending on forums were quite expensive ($70+) and seemed pretty amateur for the price.   I installed a couple of freeware/trial options, but again these either didn’t work at all, or were really disappointing.

So there was nothing else for it: I had to build my own weather software from scratch.  I set up a MySQL database and wrote a PHP script to extract data directly from the desktop software supplied with the weather station.  It gets updates every 30 mins and writes them to the database.  If the weather station receiver isn’t connected to the PC for any reason, it stores results in its internal memory.  The extraction script automatically catches up when it’s next connected. 

I then wrote a some display scripts to query the database and produce graphs over time.  At the moment the graphs only show the last 24hrs worth of results.  I’ll add more options in the future, but there’s no point at the moment as I only have a couple of days worth of data stored.

See live results from the Elderslie Weather Station

Weekend project: Alternative OS

Filed under: technology,vista,weekend projects — Grant @ 8:29 am

Ever since I packed away my old Amiga A1200 I’ve been a Windows user.  Starting from Windows 3.0 I’ve been through virtually all the evolutions — 3.1, Windows for Workgroups, NT, 95, 98, ME (eek!), 2000, XP and Vista.  I’ve always favoured the universal nature of windows, with a tool for every conceivable task, over the supposed simplicity of MacOS or the geek appeal of Linux.

At work there are a lot of windows haters.  Someone always has an opinion on how a particular task would have been easier on a Mac or under Linux.   So a couple of weekends ago curiosity got the better of me and I decided to install a couple of alternative OSes. 

First up was the easy one, Ubuntu Hardy Heron.  For a bit of extra interest I decided to run it in a virtual machine under VMWare.  After all, I guess there’s not much point in having a Quad Core CPU if you’re not going to properly multi-task.  Installation was dead simple: Install VMWare Player, browse to the Virtual Appliance marketplaceand download the Hardy Heron image.  All in, it took 30 mins max, including the download time.

Next was the slightly trickier Mac OSX Leopard.  I wanted to run it natively for best performance, so that required a bit of disk partitioning and boot menu installers.  The hardware setup on my Dell desktop made it tricky.  It’s running a RAID disk array which requires software support.  I’ve got an external USB drive that would’ve done the trick, but I didn’t fancy disabling the SATA RAID array just to make this happen.   So instead, I decided to install it on my Acer Laptop — it’s still a decent spec (Core2, 2GB) which is perfectly good for OSX.  I won’t go into the detail of the install here, but it’s enough to say the online tutorials generally seem to work.  After a couple of hours of fiddling we were up and running.

Here’s the final setup:

Windows, Ubuntu and OSX

(Laptop running OSX Leopard, Desktop running Vista over dual monitors with Ubuntu virtual machine on the left screen)

May 14, 2008

Microblogging platform and anti-smoking campaign in same bird shocker

Filed under: Uncategorized — Grant @ 9:36 am

I was walking to work this morning and spotted a poster on the back of a Glasgow bus.   What caught my eye is that it had the Twitter.com bird on it.   I thought “Twitter… advertising in Glasgow… on a bus?  Pretty cool!”.   Then I noticed the ad was for something completely different — the Greater Glasgow anti-smoking campaign.  I’ve overlaid the two illustrations for your amusement…

Here are links to the originals:

Powered by WordPress