Thursday, November 6, 2014

This time I am going to do it!!!!

So far I have spent way more than a good Davis weather station would cost - and I am still not getting weather data to the web.  So i am going to start all over, again.  I can definately say it all has been a ton of fun so far, but it's just not what I wanted to accomplish

Publish Weather information to the web.

So far I have  a weather instrument from Sparkfun, a temperature sensor , all hooked up to an arduino mini clone. A sketch on the arduino gets the sensor data and sends it via an NRF24l01+ . Power is supplied by a solar cell charging an old laptop lithium battery.

Its the inside part that has always been the rub.  I have tried with various arduino sketches to get the data and send it out to a PC then on to the weather site.  This time I am going to plug the arduino into a Raspberry PI and use weewx. Low power and always on - plugged into the big screen to look every once in a while.

Now all I have to do is conquer Python to interface the weather data to Weewx.   Wish Me Luck

wwall sent me an email outlining the task at hand

if the sparkfun weather station is one-wire, then you can use the OWFS driver.  you will have to make a few modifications, depending on the rain bucket and anemometer you use.
otherwise, you will probably have to write a driver.  it is pretty easy to write a driver, and there are now many examples.  first read the "porting to new weather station hardware" section of the weewx customization guide:
for your problem, there are (at least) two approaches:

1) the driver reads data directly from the serial port

2) the driver reads data from the log file

the first approach would have fewer moving parts, but you will need to know how to read/write serial.  this is really easy to do inpython using pyserial, but if the device has odd protocol or semantics then you might have to use fctl/select, which is considerably more challenging.

the second approach would let you get something running in about 10 minutes.  install weewx, then install this AcuLink driver in the user folder, then modify that driver to parse your "log file" (look for the 12 july posting with v0.4):!topic/weewx-user/bT0mCwMScuI
the v0.4 driver is misnamed.  actually it is a "FileInput" driver - it simply reads name=value pairs from a file then inserts them into weewx loop packets for processing.