Sunday, October 01, 2006

Linux, Gentoo, Weatherstations and uploading to Wunderground

I am using the Oregon Scientific WMR-968 weather station for monitoring the local weather. I upload the data to wunderground at station id: KWAREDMO10

Key piece of software is Timothy D. Witham's and Jay Denebeim's sourceForge wx200d project.

SourceForge - SourceForge Link
Project Homepage - wx200d Homepage


Steps (as best I can remember them)
(1) Get account at www.wunderground.com - register
(2) Install wx200d
(3) Setup a symlink for the serial port 1 (details below)
a new udev configuration file location: /etc/udev/rules.d/55-udev.rules
add the line: KERNEL=="ttyS0", SYMLINK="wx200"
(4) emerge lib-wwwperl
(5) Configure wx200d, for my case the launching of the daemon needed a '-r' because my station is a WMR-968 - TOUGH!. The README with wx200d is very clear.
The details in my /etc/conf.d/local.start:
if [ -x /usr/local/sbin/wx200d ]; then
echo -n " starting wx200d : "
/usr/local/sbin/wx200d -r
echo
fi
(4) Schedule a cron job to call the wunderground upload utility that came with wx200d. The argument to this utility wunderground is a path to the username/password file
Crontab information:
0-59/5 * * * * /usr/local/sbin/wunderground \
/etc/wunderground/wunderground.conf



Potentially the hardest part of this was learning what udev was all about and how to create a symlink to Serial port 1.

The next step in this process is the generation of a personalized page that I can put up on my domains like http://weather.paulcooley.com. This I've seen done very nicely with Virtual Weather Station. I would like to do this myself and save the cost of the Virtual Weather Station, the demo didn't like my Gentoo linux, X server, etc installation much and was fairly prone to crashing. It worked well in Windows, but my server is definiately linux.



1 comment:

Defined by Grace said...

Great reaad