24 April 2008

21 April 2008

Pulling data out of the air



About a month ago, I bought a real small weather station from AAG Electronica. The unit I got has three sensors: temperature, wind speed and wind direction. Data is transmitted from the station using the 1-Wire protocol. The transport that this runs on is merely a phone line, within which only two of the wires are put to use.



The first major challenge was finding a good place to install the station. I wasn't keen on running reams of phone line around the countryside, so I compromised on location. It turned out that the tripod on which the (absolutely detestable farce of a connectivity solution) DirecWay dish was installed would work nicely. (Also, considering that we'd long since stopped using the hideous service, it seemed like the dish installation might be able to redeem itself in some mechanical way). Perhaps most nifty: the dish accidentally manages to serve as a direct sun shield, preventing the unit from getting cooked.





With the station installed, I had to start collecting data. The One-Wire Weather project proved quite easy. In addition to a gtk UI that's useful to detect and configure a setup file, there's a no-gui program that can be configured to scrape readings from the station. Wrap that in a bit of perl, add a database, write code code with JFreeChart and presto:





For for now, I get up to the 5-minute interval readings of temperature posted on recursed.org.