With a lot of help from many websites I am pleased to say that I have managed to set up a remote moteino based node to listen out for the data from a Maplin weather station (a N96Gy using OOK encoding at 433 MHz) and then to push it back out in a Jeelab/emonCMS friendly format.
A bit of background
A while back I bought a Raspberry Pi and after firing it up a few times it went back on the shelf needing a project. Roll forwards a couple of months and I came across Kevin Sangeelee's project for intercepting the data from a cheap Maplin weather station (their N96GY) and feeding it into a RPi www.susa.net.
So when I next saw the weather station on offer I bought one and with the help of the excellent Pywws software and www.weather.dragontail.co.uk's RPi image and How To guides I now have my own little weather site.
With one project in hand and working it was time to branch out (and thankfully it is really hard to break a RPi). I then came across a bunch of home monitoring websites and this appealed to the inner geek.
A few months later and the house is slowly getting wired up with sensor nodes based on moteinos from lowpowerlab.com and a couple of Funkyv2s from harizanov.com. Nobody warned me I would need to start learning to code!
The inevitable
So there I was running a couple RPis: one with Pywws grabbing the weather data; and the second grabbing sensor data and pushing it into emonCMS. I know it is only a matter of time before I lose a SD card on one of these so getting the weather data into emonCMS as a form of backup would make sense – as Murphy's law dictates this will be just before I do a backup of the SD card. Making this happen was not quite as easy.
There are a few tantalising threads out there about pushing data from Pywws into emonCMS, however, as my html and Java is non-existent I needed a bit more than a few hints. I also have an issue with my Pywws as it looks like it is stuck on an older Raspbian image as any update hopelessly breaks the wifi and it was a real pain to set up in the first instance. So scratch messing with the Pywws RPi until I have time for a full rebuild (and trying to remember how I did it the first time around).
The solution
So how was I to get the weather station info into emonCMS? So off I went to trawl through the many blog posts and forums looking at grabbing data off weather stations. Thankfully the Maplin is a re-badge of the Fine Offset WH1080 which has had a lot of work put into it. Once I worked out that I had one of the older versions using OOK encoding at 433mHz that finally lead me to Mark and Andrew at www.homeautomationhub.com - a really interesting project itself - and to Jeelab for the vital hardware mods needed. If you have a 868 mHz unit or one of the newer FSK versions you should find plenty of info there as well.
As I am using a RFM12Pi to receive the other sensor data that meant the GPIO ports were taken up. I also did not want to break the emonCMS RPi.
As I had every prospect of making a mess of the soldering (0603 really are small) I decided to use a little break out board care of nathan.chantrell.net for the RFM12B and made a shield on a small through-hole protoboard to mount this on - not pretty but cheap and functional (photo attached). Into this I am plugging a bare moteino as, with this running at 3.3v, this saves me having to deal with level shifting for the RFM12B. If you want to use a 5v Arduino the Jeelabs breakout looks to be a good option.
One crash course later in teaching myself just enough C# to be dangerous I seem to have a stable node listening out for the N96GY, grabbing the data and kicking it back out to emonCMS.
A big thank you to everyone out there that made this possible and the code in all its gory detail is attached. This looks to be working fine on a moteino but it does use up quite a lot of space if you turn on all the debugging options.
I am currently sleeping the node for a couple of minutes and then waking up to find a signal (they should be coming in every 48 seconds) and then it is back to sleep for a couple of minutes again. Any suggestions for some more power saving options appreciated as I am sure I can probably switch off a few 328 features I am not using.
What next?
Adding some more power save options
Using a voltage divider for a better battery reading than using the internal voltage
Messing around in emonCMS to do something with the data
Happy to answer any questions but please bear in mind that I am not a programmer and the decoding code is not of my creation.
Re: Feeding a Maplin weather station into Emoncms
I've done something similar but running pywws installed on a emoncms HDD image on a pi and using the pywws 'service' facility to push the data via a json call with API. Works flawlessly! Had to write the service template for pywws but that was easy. Search the pywws google group for info. I put the files on github.