Raspberry Pi and the weather

29 05 2012

Ever since I heard about the Raspberry Pi project I knew that it would potentially be the ideal always on low power ‘pc’ to hook up to a weather station and fire data off to a web site. Realising that project has taken its first step with delivery of my first Raspberry Pi this week.



In outline the project is simple enough, use the Raspberry Pi device with a combination of pywws and Open2300 to read the data from my WS2350 weather station and ftp a data stream to my web site. Currently this is done using the excellent Cumulus software from Sandaysoft but this runs on a Windows based PC and finding a mini pc suitable isn’t cheap (which I regard as one of the main tenets of a hobby).

Currently my web site is built using various Cumulus bits but the principle is that Cumulus feeds a simple, structured text file every 15 seconds or so, via ftp, and the web site reads it and uses some basic JavaScript to dynamically update the page. A principle requirement of this project is that it either writes a compatible text file (in fact various text files for gauges and graphs etc) or I code a web site based converter that can take the Raspberry Pi feed and translate it.

Stage 1 will be to get the Raspberry Pi up and running with a stable OS, this should be fairly straightforward

Stage 2 will be interfacing the Ws2350 to the Raspberry Pi via USB (possibly via serial later)

Stage 3 will be seeing if pywws will run and read the ws2350, if not then some lower level investigation using Open2300 is going to be needed

Stage 4 will be to extract from Stage 3 a suitable file on a regular (cron) basis and ftp it to a web server (the web server will initially be one in my office, it may even be on the Raspberry Pi or another Raspberry Pi)

Each stage will be liberally inter spaced with as yet undefined quantities of alcohol which will be at various times proportional to success or inversely proportional to failure.

If any fellow weather geeks want to help out or just see how it goes I will try to blog progress here and no doubt on twitter via @stevewardell. If anyone has any ideas or suggestions or anything that may help this little venture I would be interested in hearing from you.

Let the hacking commence…

Update 30/5/12

Stage 1 held up a little awaiting some essential parts that I forgot to order initially then forgot again when I eventually got a shipping notice. Anyway, parts en route. I started to look in more detail at pywws and a few other similarly minded weather geeks have embarked on similar projects, so far it looks like the usb libs in the debian distro are dropping packets on the Raspberry Pi so there may be some issues there, also I still don’t know if pywws will even read my weather station at all.

In order to get things moving and determine if pywws was an option I set up on one of my Ubuntu servers in the office, after some fiddling to get the weather station recognised via usb/serial converter (Raspberry Pi has USB) and a few hours playing with pywws I’ve concluded it either doesn’t work with a WS2350 or I cannot get the right combination’s of usb libs to play with python. So pywws question passed to its author, in the meantime Open2300 checked out and compiled, a little configuration and success, a simple cron job has the weather station updating my Weather Underground site, all mostly thanks to the Open2300 code I have to say.

If I can decode the full memory map from the station with Open2300, which I think I can, then this looks like it should work out quite well, assuming it can be compiled on the RPi ofcourse