Weather or Not

Thoughts on the weather and other topics from eHideaway

header image
Some Background On My Weather Stations
Posted 12 December 2015

I currently have weather stations at 3 sites.

My home in Cockermouth has a Davis Vantage Vue. This is a nice bit of kit and has so far proved very reliable. The problem is that together with the Weatherlink data logger, which you need to hook it up to a computer, it costs about £450. Therefore for my other 2 sites, at York and in the Chilterns, I have chosen a Maplin N96GY weather station costing about £60 when on offer (as it is at present). This works fairly well but is less accurate and much less reliable. Both Maplin sites have had to have new rain gauges and both lose contact with their sensors occasionally.

Weatherlink the software that comes with the Vantage Vue data logger is fine if you just want to display your data on a PC connected to the console but its support for websites is very limited. Therefore initially I wrote python programs that read the Weatherlink binary files, aggregated the data storing it in a SQLite database, and from the database produced static html webpages which were uploaded to my website. I did this to avoid paying extra for web hosting; my ISP provided free web hosting but did not support dynamic pages.

When I bought my first Maplin weather station I quickly decided not to use the feeble Easyweather software provided and instead chose to use Cumulus from Sandysoft to interface to the console. I then enhanced my python programs to accept input from the Cumulus monthly log files as well as Weatherlink files.

Around this time I had signed up for paid web hosting to support another project and as a result had PHP and MySQL available. This gave me the opportunity to improve my website design. I modified my python programs to upload the raw and aggregated data to a MySQL database in the cloud and wrote PHP scripts to dynamically serve the site’s web pages, a vast improvement on the use of static pages.

One of problems with Weatherlink and Cumulus was that both ran only on Windows. Windows isn’t ideal as a host. Windows computers tend to be quite pricey (although these days there are some surprising cheap ones) and Windows has some very annoying habits such as deciding to shutdown when it feels like it. I had bought a Raspberry Pi (RPi) when it first came out and was thinking about whether that could be used. Around that time Sandysoft made available a beta version of Cumulus MX which could run on both Linux and Windows. After trialling Cumulus MX on a RPi, and porting my Python programs to Linux (which was very easy), I switched all my weather stations to use that architecture.

Unfortunately Cumulus MX at that time proved to have a few quirks with the Maplin weather station. The pressure reading sometimes jumped, timestamps on catch-up readings were corrupt and the rain rate values were very inaccurate. Also it frustrated me that I did not have control of the source code. Since I was really only using Cumulus MX to interface with the station consoles, I wondered if I could find something that suited me better. I had become aware of weewx and pywws, 2 open source python weather station software packages. Weewx supported both the Vantage Vue and Maplin (aka Fine Offset) weather stations; pywws supported just the Maplin weather station. Both are very impressive and pywws in particular seemed to be leading edge when it came to dealing with the Maplin’s tricky interface that was prone to hanging. However both did a lot more than I needed, but not quite what I needed.
So I decided to take the Vantage Vue interface from weewx and the Maplin interface from pywws and adapt them to my needs. In particular I made quite a lot of changes to the Maplin interface to help my understanding of what was going on and to fix problems I encountered (and maybe introduced). The two interfaces now write out a simple monthly log file that is easy to edit and feeds into my existing Python programs to support my web site.

One of my concerns with using the RPi is that its storage is on an SD Card. These have a limited write life so I have tried to minimise disk activity by, for example, getting rid of the local Sqlite database and reducing unnecessary logging. Fingers crossed, as yet I have not had a failure.

Another concern was that my Maplin weather stations are at remote sites. As the Maplin consoles have been known to hang in the past I run them without batteries so that a reboot from the RPi (which powers them) causes them to reboot. To connect to the remote RPi without having to open ports on their local routers I use (previously known as Weaved). This has proved reliable but I do take the precaution of scheduling a reboot of the RPis each night just in case a hang up occurs.

Update 12 September 2018

Since writing this post I have moved from Cockermouth to Silverdale and my Vantage Vue weather station has relocated to my new home. The weatherstation I had in York has been decommissioned leaving me with just 2 weatherstations, one in Silverdale and one in the Chilterns.

Back to Top of Page