Type your search keyword, and press enter

Maplins weather station fun

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

weather station control unit weather station sensor pole
A while ago I bought one of the Maplins weather stations, just for fun really no plans with it. The device came with a pole to which several sensors could be attached: temperature, humitidy, wind speed, wind direction and rain level. The other important bit in the box was the control station, which is a large LCD screen based output for the information which is gathered in the sensors, it also gives an attempt at forecasting. Areas of the screen are pressure sensitive which allows for a touchscreen style interface for changing views etc.

All pretty cool, and looks great on the worktop displaying weather info. But the geek inside of me wants more!!! Along with the aforementioned components comes a USB cable and a cdrom, the brains also does data collection which can be extracted using the software on the CD.
weather station in situe
Thats also cool, but unfortunately no software for Linux included on the disk, not to worry pywws  from Jim Easterbrook steps in here. I won’t go into detail on how I set this up as there is a good tutorial here: http://www.weather.dragontail.co.uk/index.php?page=station_setup but what it gives you is a way to extract the weather data from the brains of the weather station store it on a pc then display it through a pretty web interface. Gives allsorts of graphs and fancy data tables.

This was quite cool, but got me thinking about what to do with this data, can it be uploaded to some weather data aggregation service for the greater good? Thats where I found weather underground, or wunderground, and their API. Since finding it I’ve been using it to both upload my data and also retrieve data for various projects (nagios monitoring, temperature monitoring). Pywws contains the ability to post the data to wunderground built in. Great, I have a nice solution the head unit connected via usb to a server in my garage. I can’t see the unit, but I can see the data via Pywws.

It was all going well, that is until the batteries in the head unit run out and the project headed back onto the todo pile. That was until I was working on a seperate project where I was trying to retrieve the RF signal on 433mHz home plugs and saw some random traffic. After thinking it must be a neighbour or a cars remote locking, i realised the data was being sent on a regular basis. It eventually dawned on me after a bit of googling that the data may be from the sensors on the weather station as the batteries were still active on that side. A small amount of googling later and I found that I was able to not only retrieve that data but also decode it into readable data.

To explain, I am using an RTL DVB dongle which is popular in Software Defined radio circles as its frequency can be set to pretty much anything. I haven’t delved into the SDR side of things, but I’ve been using it to scan 433 and 868 mHz frequencies to try retrieve data on RF control devices within my home. Using the dongle and the RTL-SDR software http://sdr.osmocom.org/trac/wiki/rtl-sdr I can achieve this.

My aforementioned googling around the weather station data led me back to a project I was already using, OOK-Decoder, OOK being the form of modulation used in many RF devices and seemingly the weather station. The OOK-Decoder project also comes with another executable wh1080, which it turns out is my weather station.

The project was written by a chap who has a remote weather station, so he was sending the data over a multicast network, recieving it locally and then decoding it. This means its a bit overkill for what i’m achieving but I’m achieving it. Essentially, there is a machine which sits within the vicinity of the weather station sensors with the DVB dongle attached and running OOKD which takes tunes to the 433mHz frequency by default, and streams the raw data over the network. On the receiving (network) end, a PC runs OOKDUMP to output the stream of OOK data raw or runs the wh1080 binary which takes the stream of OOK data and output a json formatted text file.


Why it’s overkill for me is that I run both ookd and wh1080 on the same box, I’ll probably figure out combining the two at some point to reduce the load but for now it works.

The next step is to do something useful with that data, so I wrote a fairly rough python script to upload the data to Wunderground. I’ve also made the wh1080 output the file to a directory which is accessible via a webserver to make it useful to any scripts I write for other projects. Having the data stream directly to the server now also means I can relocate the previously USB tied control station back into the house, double win!

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

So in a nutshell the process to get weather data directly from a Maplin weather station:

  • Install rtl-sdr as per: http://sdr.osmocom.org/trac/wiki/rtl-sdr (dont forget to blacklist the dvb driver)
  • install ook-decode as per: https://github.com/jimstudt/ook-decoder
  • Run ookd and wh1080 (don’t forget to run with & at the end to allow access back to the console), this outputs to /tmp/current-weather.json by default
  • Create a weatherunderground account http://www.wunderground.com/ and create a personal weather station ID
  • Use my python script with the ID generated above and password to upload the data


Maplin weather station


Jim Easterbrooks PyWws


Jim Studt ook-decoder (and wh1080)


My script to publish json data to wunderground


Arduino based Electricity monitor

Over the past 12 months or so I’ve been looking to add various “Smart House” components to my home, rather than do this in the traditional sense of buying something off-the-shelf I’ve been experimenting and building my own. One of the real plus points in me doing this is that all the data that is passed around is in an open standard and format chosen by me, not some cludge to try and extract information in a format decided by a-n-other manufacturer.

This post will cover the process I’ve gone through to build an Arduino based energy monitor, in the first instance this is only monitoring electricity usage

First step was to look at what information I could glean from the meter itself, there are a number of ways to extract information here, a clamp which sits around the wire between the meter and the consumer unit:


The other ways generally involve retrieving a pulse of some kind from the meter, either via a screw in terminal which sends a pulse over wire or a flashing LED. In my case it was a flashing LED as you can see in the following image.


This LED sends out a pulse every time a watt is used, or for monetary conversion 1000 for every kilowatt used. So knowing this I could create a device to read these flashes and convert them into usable data.



The configuration of the above circuit is really simple, a TSL261 Light to Voltage sensor connected to an arduino with an ethernet shield.

How to connect the TSL261
looking at the component, the sensor will have a raised part above it, this is the front. Front the front the pins run from left to right, pin 1 being GND, pin 2 V+ and pin 3 output. In my circuit I connected the voltage and ground appropriately (3v) and attached the output to digital pin 2.


My current incarnation has pins soldered to one end of a length of wire and the sensor the other (I used strands from CAT5e cable) to allow me to position the arduino then attach the sensor to the front of the electric meter, the attachment was a complicated process of sticking with some trusty old duct tape. I still need to get some heat shrink tubing to ensure the pins don’t short but it’s ok for now.


While researching this project I found this site, http://www.airsensor.co.uk/component/zoo/item/energy-monitor.html which took the data collected and stored it in a file on the SD card. This wasn’t exactly what I was looking for as I wanted to graph the data preferably from a live feed. I thought the best way to do this was to utilise one of my favourite current tools which I use in a lot of my other projects MQTT, I wanted the arduino to simple detect a pulse and send out information which I could retrieve on any device subscribed to a particular topic. More research led me to a page Nicegear where I found Hadley Rich doing pretty much exactly what I was looking for, his Arduino sketch created an output on a particular MQTT topic when a pulse was detected, but to top this he had also created a function to output the current watt usage every second. This proved to be more useful than the original idea of outputting the pulse on detection.

You can find the sketch at Hadleys website, or on my GitHub page. The only real difference between his sketch and the one on my arduino is the count of LED flashes per kWh, his needs to flash 1600 per kWh mine flashes 1000, or 1watt per flash.

So subscribing to the topic
house/power/meter/1/current would recieve a number of watts currently being used


or topic
would output a 1 everytime a pulse occurred.


Now what to do with this data?
My plan was to graph the data so had to figure some way of getting this data into a graphing application or service. More research ensued, Graphite/Carbon seems to be an ideal choice to pursue but at this point in time haven’t got anything functional. A lot of posts around the internet suggest the use of pachube, which became cosm which then became xively. Using a python script to listen to the mqtt topic usage and pipe to the xively API I ended up with a nice graph.


You can see my live feed here, xively.com/feeds/73975854

All in all, I’m really pleased with this project. It’s still rough around the edges in places, both physically and software wise. I’d like to move the project to an Arduino mini pro with one of the smaller ethernet shields and have a nice box to house it. Get a graphite instance working and retrieving the data. First on the next steps list however is to try and extract the same information from the gas meter, I believe there is a pulse output on the front of the meter but this will require some more research so watch this space.