The hardware side of my ambient orb project is almost finished, so I’ve been making a start at the other end: getting some data to display. Top of my wish list is to display a basic weather forecast on the orbs, which looks like it could be nice and simple thanks to the very handy Weather Underground service. There’s a decent weather station nearby for current readings, and the forecast for Southampton has been pretty accurate so far, both of which are available through the Weather Underground API.
I could process the resulting XML on my home server but, having been doing some work with mashups recently, I thought I’d create a feed mashup instead. I’ve played with Yahoo Pipes in the past but this time I created a feed using Mashup Hub on Lotus Greenhouse:
So that screen shot is probably not all that helpful in understanding what’s going on; this style of graphical programming is fairly common these days but I would personally like to see more advanced ways to document and share diagrams like this. Still, this one is pretty simple, so here’s a quick overview:
- The path at the top extracts the current temperature from the local weather station data
- The middle path makes use of some very handy date functions in Mashup Hub to pick out entries 12 hours ahead from the forecast data
- The bottom path does a lookup on the forecast conditions to replace a text forecast with a numeric code
Which all ends up being published as a much simpler piece of XML. I could just grab this XML directly and process it on the Arduino, or I could save some effort and convert the mashed up XML to an even simpler comma separated list using an XML to CSV converter written for the Pachube community. Well, now it would be trivial to create a Pachube feed for the weather forecast as well… so here it is…
Perhaps not the most direct route for getting a weather forecast but I think it’s a nice example of how anyone can pull together data they are interested in without any programming, or a server of their own. I’m also quite please with the results of the forecasts so far; 13 C and clear tomorrow in theory!