After my (now out of warranty) OS WMR100 crapping out one too many times:

  • loads of signal issues, mainly affecting the anemometer but occasionally also the rain gauge and external temperature sensor. The console is currently balanced at an angle on a glass because it was the only way to get a reliable signal and the pole is in a less than ideal location (but at the edge of the usable range) so the anemometer’s readings suck.
  • the console would, on average every 3 months, stop streaming data on the USB port and the only way to get it going again was a reset. The console doesn’t store archive data so while nothing is being streamed nothing is being logged.
  • general accuracy: the radiation shield on the temperature sensor is awful so there is a large (and unpredictable) over-reading in strong sunshine.

I finally gave in and bought a Davis Vantage Pro2. Since it’s cheaper (by about £300!) to buy the UV and solar radiation sensors with the station than separately, I went for the Plus model, the only difference being that they’re included.
The whole thing costs an arm and a leg but Davis do seem to have an excellent reputation and it is a very nice piece of kit ((If I had to make a relatively minor criticism about the “sensor suite” the rain gauge’s “debris screen” could be better (in fact, it’s one of the things that OS might possibly have got right): it just sits at the bottom of the rain collector and will quite likely get lost; it also doesn’t do a particularly good job of keeping small leaves out)).

Since the whole point was to get at the data from the console I needed some way of getting the console connected to a computer. The console has an “expansion” port, which is serial with a rearranged pin configuration and the official answer is that you need WeatherLink, which connects to the expansion port and gives a serial/USB/IP connection ((With some software that looks like it escaped from the 80s thrown in)), which feels like a colossal scam: the USB and serial versions are “only” (!) £75 if bought with a station ((I just bought a weather station costing in the high-£££ and you want another £75 for a cable with a rewired serial port on one end and a USB port on the other?)) and the IP version is £316; bought separately those prices go up to £210 and £372 respectively!
Other than the obvious financial reason, it’s beyond me why the expansion port can’t just be serial (better still, USB; it is 2012 after all) by default.

The next step is getting something useful from the serial interface. Davis are very open about the serial protocol, which is nice considering the deficiencies in WeatherLink, and there are a load of different implementations of more or less the same thing such as VProWeather and VantagePro. WView can deal with a VP2 as well.

New kit

I upgraded to an OS WMR100: about as close to a proper weather station as it gets. As well as measuring temperature and humidity like the RMS300, it also has wireless wind and rain gauges, the option for a UV sensor and sufficiently improved range that putting the sensors outdoors is feasible.

Finding a suitable place to put the outdoor parts ((the temperature sensor and wind gauge are designed to be mounted on a (included) pole; the rain gauge is meant to sit close to ground level with screws to make sure it’s level; both should be in open space)) was awkward but generally it all works.
There are a few issues: the signal from the wind gauge can be quite flaky ((the console is well inside range though there are walls which will affect that)) and the cover on the temperature sensor is plastic so quite poor at stopping the sun getting through.
Ideally, the two would be in separate places so that one could be in clear space and the other shaded.

Like before, I use the WMR100 USB client to get data from the console and dump it in a text file then parse it but store data in PostgreSQL and use matplotlib to draw graphs rather than rrdtool for both.

The combination has some advantages ((rrdtool doesn’t really work for rain data; mpl is a lot more customizable although the documentation sucks)). It’s a huge dataset to deal with ((a month’s worth of wind speed/direction data is 192k data points if every measurement is received, there are roughly 4 million lines in data.log right now and it grows at a rate of 19 thousand lines a day)) so a lot of work had to be done to get processing fast enough to be usable.
Lots of time was spent with the Python profiler and PG query analyzer, adding table indexes and looking for slow code.

Data also goes to Weather Underground – they do a load of analysis and graph drawing that I haven’t get around to.

Weather, part 3

In part two I said I hadn’t done humidity yet. Now I have – it was fairly easy to do and I was short of something better to do in the wee hours of the morning.

Twelve hours:

One day:

I was asked in #bitfolk whether the station did anything other than temperature and I remembered that WSDL gave the dew point so thought I might as well add that too.

The maths required to calculate dew point and the background information is given in the Wikipedia article but for want of an excuse to use the LaTeX plugin for WordPress, the dew point [math]T_d[/math] is given by:

T_d = frac {a times gamma(T, RH)}{b-gamma(T, RH)}

Where [math]gamma(T,RH)[/math] is given by

gamma(T,RH) = frac {a T} {b+T} + ln (frac{RH}{100})

The bottom pair of lines in the temperature graphs in the last post show the dew point.

Weather, Part Deux

So nearly a week ago I got a weather station. Since then, I’ve hacked up some Python to deal with the temperature data and spew it into graphs. I haven’t got to doing the same with the humidity data, that can be Part Trois…

Anyway, graphs (update every 15 minutes). The last 24 hours:

The last week:

If anyone’s particularly interested I could post the Python that does this. It’s not the most exciting (or, I don’t doubt, the most well-written) code in the entire world but there’s probably someone weird enough to want to see how dire a job I can do of chopping a string up.
I added some optimisation to only parse lines which haven’t been seen before using a temp file so after the initial run the longest part is now uploading the images.

Apparently weather stations are a “conversation killer, if there ever was one!!!”. Who would have thought it?

Weather Nerdery

I’ve wanted to set up/build a weather station for a while; lazyness and apathy were mostly what stopped me. Last week, I bit the bullet and bought an Oregon Scientific RMS300 (change from 35 quid from OS themselves).
It comes in two parts: a base station with a screen and built in temperature/humidity sensor and an included wireless sensor (by default labelled “outside” as a serving suggestion).

The supplied (via download) software, “OS Weather”, is…pretty shit. It doesn’t work on Windows 7 (“trial version” available “end of June”, apparently) and I couldn’t be bothered setting up a virtual machine to screw about with it.

Next up was Weather Station Data Logger. It’s good, but I have more than enough machines running 24/7 without adding a Windows one (and again don’t particularly want a Windows VM). I have machines which do run near-enough-24/7 but run Debian GNU/Linux so the ideal solution would run under that and ideally headless.

Enter the WMR100 module which will do all the work of getting the data out of the base station and its wireless sensors and present them in a fairly easy to manipulate format:


Next magic trick will be to get the data I collected with WSDL and the data that’s being collected with WMR100, stick it all together in some way, and start getting it into graphs of some description. rrdtool‘s the obvious candidate.