Our weather station has a serial connection and comes with Windows-software to view the weather data on your PC. The app is very eye-candy, but doesn’t do anything more than displaying the data. I’m more interested in long-term trending. So I wrote my own application to talk to the weather station and store the result in an rrdtool database.

Since the serial interface came with no documentation whatsoever, I had to figure everything out myself. The serial connection on the back of the weather station is a DE-9 connector; the manual specifies it’s an RS232 output. After some trail-and-error work, I figured out that the communication happened at 9600bps, 8 databits per word, no parity and no stop-bit. Socat was happy to give the hexdump using the following command:

socat -u /dev/ttyS0,b9600,cs8,parenb=0,cstopb=0,raw – | hexdump -C

The bursts of data come automatically, there seems to be no need to initialize the weather station. The messages are a few bytes long each.

The messages look fairly similar to the ones described in this document (or my mirrorred copy) for the WMR918 station. This perl-script parses the binary data from its standard input (which will probably come from a socat-pipe) and prints it in human readable form to stderr. It also tries to write the data to rrdtool for archiving, which is what I use to generate nice graphs.