We’re ready for you Gareth

We’re ready for you Gareth

March 12, 2019 Off By admin

Finally, after a lot of work, the weather station is up and running and updating the website, just as Storm Gareth arrives.

I have an old Oregon Scientific WMR88 which has been runnning in my back garden for a number of years now. The weather station hardware was really quite cheap and it has a USB output that can link into a Raspberry Pi running wview, and it just works (although the sensors are starting to play up a little bit now).

Based on this experience, I suggested that we stick with Oregon Scientific for the weather station here at PLANED so we bought a rather swish WMR300. Unfortunately they have changed the way that the USB talks to the outside world. I tried to get it running with wview but to no avail. So I attempted to wrestle weewx, also on a Raspberry Pi, into submission so that it would talk to the weather hardware. I managed to get it working, after a lot of effort, but it would only collect data for one twenty four hour period before refusing to work any longer.

The third approach, and the one that worked, was to use Meteobridge. This gave detailed step by step instructions on how to install the system on a commercial router (the one that worked for me was the D-Link DIR-505). Once meteobridge was installed, it detected the weather station and, with a bit of fiddling about, it uploaded data (in the form of an RSS feed) via FTP to an online folder.

At this point I thought I had finished. Unfortunately I realised that WordPress pages (and widgets) don’t recycle often enough to show the changes in the weather. What I wanted was a sidebar widget that would be refreshed every ten minutes or so in order to show the current weather. When I first installed the widget, it only refreshed every 24 hours. But, with a little more fiddling, the system seems to be behaving now.

The aim now is to build a network of small weather stations around Pembrokeshire, each of them uploading weather data to a central location. This could then be used to build weather map of the county with weather data that is constatntly updated. We shall see!


This is more of a note for me than for you (you’ve been great through all of this, by the way, impressively patient). The way that I got the weather widget to refresh more frequently than once a day was to add the following line to the functions.php file associated with the WordPress theme …

 add_filter( 'wp_feed_cache_transient_lifetime', function(){ return 600; });

… however, it is vital to do this every time that the theme is changed because, of course, it gets replaced by a new functions.php file.