Showing posts with label Maplin Weather Station. Show all posts
Showing posts with label Maplin Weather Station. Show all posts

Wednesday, 20 November 2013

Weather Station on a Stick

Shortly after I wrote the last post the Davis Weather Vue weather station I had ordered was delivered. Inside the box was the console (a small unit with an LCD display and some buttons) and what Davis calls the Integrated Sensor Suite, or ISS (a single white and black plastic unit housing rain gauge, anemometer, wind vane and thermometer). There was also a plastic bag that contained a mounting kit, battery and a teeny tiny Allen wrench so small I thought it was something you could use to poke into the Reset holes present on some consumer electronic equipment.

Along with the Weather Vue I had ordered a USB Data Logger, which was supplied with Davis' WeatherLink software. This is an extra - the Weather Vue will function happily without it - but I wanted to export the data to my Raspberry Pi and a Data Logger was required to do this. Prodata had thoughtfully attached detailed instructions regarding installation and preparation of the software. Presumably they had had plenty of questions from users about it in the past. Depressing, though, that the software and Data Logger hardware hadn't had the difficulties designed out.

Assembling the ISS was trivial. The instruction booklet was well presented and clearly explained how to insert the rain tipping spoon (their word), attach the wind cups and wind vane. The ISS has to be mounted on a pole, so I bought an aerial mast which, at 3cms was about the recommended diameter. Prior to mounting it I tested that it was communicating with the console and then attached it to the mast and the whole lot to the bracket that had formerly held the WH-1080. A nice touch was the spirit level built into the top of the ISS to help ensure it is level.

Ugly, though, isn't it?

Consolation Surprise

The hard part done I turned to the console. To my chagrin I realised that although it had been supplied with a mains adapter it also required three 'C' size batteries. These weren't available in either of the shops in the village and so I had to trek into the nearby town. Once procured and inserted I switched on the console which was meant to run through a self test and beep four times. I lost count after about the twelfth beep and was becoming somewhat concerned at the random messages on the screen and constant reboots.

Eventually the console settled down and I was able to start the setup process which, apart from finding elevation, latitude and longitude (Google Earth is your friend here), was pretty much a case of accepting the defaults. Once complete the latest data from the ISS is displayed together with astronomical events - I was pretty impressed to see it show that the Taurid meteor shower was due.

All this, and more
By pressing one of the buttons on the console it's possible to obtain more information about, say, the wind as well as displaying the data in the graph in the bottom left of the display. At present I've only scratched the surface of the information it is possible to display.


Web Weaver

The next stage was to link the Vantage Vue to my Raspberry Pi and upload the data to a web site. Firstly I installed the WeatherLink software that had been supplied with the data logger onto my PC which enabled me to test that I was able to download data from the console. This worked without a problem so I installed the latest version of the excellent Cumulus software, again I was able to receive data with no errors.

Being unfamiliar with weewx (and somewhat shaky with Linux) knowing that the hardware worked meant one fewer place to look if it didn't work. The beauty of weewx is that it's pretty easy to set up, offering two ways to install itself (via a package or from a downloaded tar file); both methods are explained in the docs section of the weewx website. I opted for the tar file method as it installs all the files in /home/weewx and it seemed easier to have all the gubbins in the same place.

After weewx was installed I had to edit the weewx.conf file to set the altitude, location and weather station type. This step is well documented in the docs and I used Leafpad on the Pi via an Xming session to make the changes. Yes, yes, real men use the command line, but I don't care. An extract from the weewx.conf file is shown below.
Easy peasy configuration file editing
The part that had me scratching my head was the FTP sections - crucial to get right if I wanted to see the data on the web. For the server name I first used the local URL of my web server (actually a Qnap NAS) and this failed. Eventually I had success by using the IP address of the NAS.

After I had finished fiddling about I started weewx and watched the log with crossed digits. Everything looked good, especially the FTP upload, so I opened up the webpage and was rewarded by data from the weather station and a selection of graphs. As my confidence editing weewx's index.html.tmpl file grew I added a feed from the webcam and satellite information from Meteox. This is the final result or you can peruse the half-hourly feed to Weather Underground and The Met Office Weather Observation Website (WOW).

So everything's sweetness and light. Well, not quite. I have an issue with the daily graphs in that they plot points and not lines; oddly the graphs for monthly data correctly show lines, dunno why the daily graphs don't. Before I ask on the weewx forum I want to eliminate the obvious.

Tuesday, 5 November 2013

Beeching Axe

I had been finding it increasingly difficult to make compromises with what I wanted to do with the railway layout and the space available. Ideally I wanted to be able to set up a train consist (as our North American friends call it), set it going around the layout and then I could do some interesting shunting stuff in the station yard. This concept had worked on a layout I had built some years ago, but then I'd had much more room.

Raised track at the rear of the layout (see posts passim) was created to provide some scenic interest; the idea was to create an illusion of mainline running tracks separated from the station area by the difference in height. However the inclines were starting to cause difficulties with train running and it was clear that it would cause difficulties scenically too. Ironically it was lack of space that was the reason for the failure of this idea.

Unsatisfactory. That was my view as I tried to fit the quart of ambition into the pint glass of baseboard. In the end I decided to dismantle the whole lot, baseboards included, and have a fundamental rethink. Whatever I decide to do, it will have to be built in the attic as there's no room in the house for what I want to do. Before that happens some kind of flooring and insulation will need to be installed to prevent my frostbitten (or, depending on the season, roasting) foot coming through the ceiling.


Weather Report

Nearly a year ago I wrote about using a Raspberry Pi to upload weather data from a Fine Offset WH-1080 weather station to a website. For the most part the WH-1080 has worked well and has been a worthwhile introduction to weather data collection. At the time of writing the WH-1080 is being sold in the UK by Maplin for a whisker under £60 (product code N96GY).

There have been some hiccups with interruptions in data transmission from the outside unit. Prompted by an outage lasting over a day I bought a replacement transmitter, only for the original unit to start working again. It's still prone to occasional dropouts, seemingly without any correlation to weather conditions or invertebrate infestation. The latter stopped the anemometer until I was able to clear the spider webs.

Weather Station and Spider Habitat


Presently, however, the unit isn't recording wind speed or direction data. The receiver unit shows changing wind direction but not the wind speed, and neither are being uploaded to the website. This isn't just an issue with pywws, the Cumulus weather software isn't receiving the data either. Dismantling the anemometer showed nothing apparently wrong with it; not surprisingly as all that's inside is a reed switch and a tiny magnet. As repair wasn't possible I ordered a new unit from Maplin. And I'm still waiting for it. The buggers have taken my money (£5 with postage!) and it's still 'on order'.

Finally I decided to order a Davis Vantage Vue weather station and data logger from Prodata, who are selling them together at a 'special offer' price. The Vantage Vue consists of a combined sensor unit containing rain bucket, anemometer, wind direction, temperature and humidity sensors. Like the WH-1080 the sensor data is transmitted wirelessly to an internal console with an LCD display. An optional USB data logger is required to store data and send it to a PC. My plan is to use weewx, a linux-based weather software application, installed on the trusty Raspberry Pi in place of pywws (this program won't work with the Davis unit).

Presently I'm waiting for the thing to be delivered (every noise outside sends me to the window to see if the courier has arrived) and when it is, I'll document how I set up both it and weewx more carefully than I did for pywws and the WH-1080. I'll spare you the unboxing, though.

Tuesday, 29 January 2013

We Have Weather

Blimey, it works!

Not that it was a case of installing the code, plugging the weather station into the Raspberry Pi and watching the data flow, mind. Seemingly I had to battle every single step and it made me realise just how easy we have it with Windows or Mac OS. An alternative view is that Linux is kept deliberately abstruse by geeks who want to look good.

I was going to produce a step-by-step guide as I had been frustrated by gaps in so-called tutorials. These often left me scratching my head as I tried to match the information to my situation. And there, of course, is the problem: a detailed guide wouldn't necessarily be of great benefit if you're not me (and you wouldn't want to be). So here instead are a few tips for the bits that caused me the greatest misery.

Mounting Drives
If you want to store or retrieve data that's not on the SD card that contains the operating system you're going to have to mount a drive. Simon the Pi Man's guide to setting up the RasPi as a NAS contains information on finding the name the Linux gives the drive (which is, of course, different...) and how to mount it every time the RasPi reboots.

Permissions
Oh wow, I found this a real difficulty. Every time I wanted to create a directory or copy a file onto the usbstick I had to use sudo to give myself sufficient privileges. Fine for setting things up but useless when expecting pywws (the weather station software) to add data files. Eventually I stumbled across the Ubuntu Documentation site that sort of pointed me to the answer. In fstab add the line:
/dev/sda1   /mnt/usbstick   vfat   defaults,dmask=0000,fmask=0000   0   0
Probably gives too much access, but it works.

pywws
Jim Easterbrook has clearly spent much time creating and honing this software that pulls off, processes and uploads the data from the Fine Offset USB weather station. His pages on GitHub are full of useful information and a nearly useful tutorial. I say nearly - it is detailed, but being a halfwit there's questions I had that weren't fully explained. I got there in the end using an excellent tutorial on the Dragontail site with added bits and bobs from Yfory.

php
Hmm, I still haven't got my head around getting the data uploaded by pywws into a website using php. In the end I cheated and used the pre-built templates from the Weather by You site. These are teetering on twee and I will eventually change them.

So now I have local weather updated every hour that I can connect to from where ever I am. Not at the moment, though; I think my external IP address has changed and Dyndns hasn't updated itself. Seems to do that a lot recently. Shouldn't take too long to sort out...

Tuesday, 11 December 2012

Where's the Time Gone?

Crikey, time flies. Over two months since my last post and I have little to show for it. Since deciding what to base my model railway on I have made no more progress, save making some preparations to move where I work when I'm working from home to free up some room for the railway.

Looking at the only possible space to site a layout I can only think there's not enough room. This was ever the lament of the railway modeller. Even if I had a large shed at my disposal like my friend Trebian (who's sadly wasting it on wargaming) I'm sure I'd find it limiting. So, I shall press on with what I've got: maybe I should try Z gauge?

Recently much of my time has been spent getting to grips with a Raspberry Pi, with a view to configuring it to run my weather station. Linux is a whole new world to me and, whilst I've dabbled with it in the past, I'm having to get really stuck in, up to my armpits. Generally it's frustrating, obtuse, mendacious but, when something works the sun bursts forth to the sound of angels playing trumpets.

I aim to have it working for the new year so I can switch my cheapo Maplin weather station across from the current arrangement. This is connected to the excellent Cumulus software that runs on my PC and updates my website every 15 minutes. It only does this whilst my PC is running and I want it to be available all the time. Hence the move to the Raspi which draws much less power and is silent.

Assuming I make the bloody thing do my bidding I'll post the steps up here. A regular update on what I've done so far and why it didn't work would be too depressing to read (and write). With time off at and after Christmas I hope to make progress with both the Raspi and the railway.