LaCrosse WS2308 Weather Station

in

WS2308For Christmas last year my wife bought me a LaCrosse 2308 weather station complete with wind and rain sensors. I mounted the remote temperature gauge outside and connected the station to my Mac Pro with a USB to serial adapter.

Over the course of the past few months I've tried various weather station software packages including WeatherTracker and LWC. Unfortunately development on WeatherTracker seems to have halted, and LWC didn't meet my needs. Both are cool packages though. While I was experimenting with WeatherTracker I helped the developer of GaugeSoftware get his package compatible with PHP4 and PHP5.

Instead of using a compiled software application to log my weather data I decided to build my own data logger. Unfortunately LaCrosse doesn't publish any information about their device, so writing a method to query data direct from the station was impossible (for me). After much research I stumbled upon a perl library (available via CPAN) that acts as an interface for the USB serial driver.

Eventually I wrote a little perl script to query the device and submit the data to the database. I also wrote a LaunchDaemon plist file that fires off the perl script every hour during the day. With data logging to a MySQL db running locally I then wrote a little web application to query and post the data. You can see current weather data here. I also plot the historical weather data using a PHP library called jpgraph.

For kicks, I modified a script available for PBX In A Flash that speaks the current weather conditions to anyone that calls. Hows that for geekery?

Next, I'm going to improve this application by adding a "real time" method that will query the device every 15 minutes and log this data to the database.