Friday 28 November 2014

Weather Report

My weather station has been running virtually without a hitch for several months. The few problems I had encountered with the weewx software running on the Raspberry Pi had been ironed out (due to my errors, not the software's - see posts passim). The Pi has occasionally frozen and needed a reboot, but for a £30 device running 24/7 for months on end that's remarkable. It would be stupid to mess with it; best leave well alone now it's stable.


A Silver Lining in Every Cloud

No, of course I couldn't leave it alone. About two years ago I had a Maplin weather station feeding data to Sandaysoft's Cumulus software that was running on a Windows PC (see Where's the Time Gone). Whilst I liked Cumulus I wasn't prepared to leave the PC running in order for it to upload regular updates to the website, due to the noise it generated and the power it consumed, which is why I moved to the Pi. I always wanted to use Cumulus again and had considered building a mini PC using a low-power CPU and mini-ITX board. However, although mini-ITX motherboards are relatively cheap, by the time a hard drive, memory, a case and Windows, annoyingly the most costly component of all, had been added, the total cost had become eye-watering.

That would have remained the status quo were it not for my daughter complaining that her laptop had starting misbehaving: a blue screen of death that ultimately required a restore from a backup. Then the 'e' key stopped working; which causd hr quit a problm as it's th most common lttr in th languag. My suggestion of only using words without an 'e' didn't go down well and she resorted to using an on-screen keyboard until her new laptop arrived.

There are no problems, only opportunities, as some management wnkers (sorry, the 'a' key's playing up now) are wont to say. I realised I could use her old laptop as a way to run Cumulus; it would be quiet and fairly frugal with power too. Better still it had a large hard drive so it could also be utilised as a media server.

Cloud processing - Laptop running Cumulus software

Speculate to a Cumulus

After I had rebuilt the laptop from the factory image (then removed the cruft and bloatware that was included - I'm talking about you, Dell) I downloaded the latest version of Cumulus, 1.9.4 build 1085, from the Sandaysoft website. Cumulus is donationware: free to download and use, but you're encouraged to give the author some money to at least keep him in tea and biscuits. Considering the polished nature of the software, its features and the level of support that Steve, the author, provides it would be churlish not to donate something (I have). Although judging from a couple of justifiably testy comments Steve has made in the forum, many people are too cheap to do so (but probably still expect him to sort out their problems).

Like any weather software worth its salt, Cumulus doesn't just provide a regularly updated display of information from the weather station, it also includes FTP to allow the data to be uploaded to a website. A set of quite attractive web pages are provided (although the graphs are rather ugly) and the tags (used by Cumulus to embed the weather data into the web pages) are documented so you use the ones you want and design your own web pages. Simply put, to create the web pages the program uses template pages that it processes by embedding the tag data and then FTPing the resulting page. So, for example, the tag #temp is replaced by the temperature reading from the weather station. The Webtags page in the Wiki explains this in some detail.

There isn't a manual for Cumulus but there are a fairly comprehensive set of instructions on the Cumulus Wiki, plus there's a forum that's well frequented by knowledgeable weather enthusiasts and Cumulus users.

Once again I used the web server on my trusty old QNAP NAS to make the information available to the whole wide world. And if that wasn't enough, regular updates are being sent to Weather Underground, whose pages are rather attractive and have some cool graphs too.


My Cam and Yawcam Too

Something else I had wanted to do for a while was reinstate a webcam feed. For some time my Raspberry Pi had happily processed images from a Logitech C270 webcam as well as running Weewx. Unexpectedly I started seeing problems with both Weewx not running and the webcam images not being uploaded; I have no evidence for this, but I suspect this corresponded to changes in Raspbian to accommodate the Raspberry Pi camera. My Pi is an early (not the earliest) Model B, only has 256Mb of memory and possibly struggled with the demands expected of it.

A Windows OS meant I was able to use Yawcam again. This is a neat, unassuming and free program that will take a feed from a webcam and send images, either still or streaming. I use it to grab an image every 10 minutes and squirt it to my web server where it forms part of the weather webpages on my site and Weather Underground.