Basically the hardware side of the weather station consists of a Oregon Scientific WMR-918 and a serial rollover cable made out of a serial to RJ-45 connector, a CAT5 cable and a gender changer. The signal travels from the battery-backed solar powered sensors to the base station, then through the serial cable into my Linux server box.
The images below, in left to right then down fashion are: The weather station including the COM port connector, The weather station display, the COM port connector showing, the outside temperature sensor, the wind assembly attached to the tv antenna, the wind assembly and outside temperature sensor, the rain sensor showing solar panel, the linux server, the COM port cable going into the linux server and finally the network devices that power the webpage. Click on the pictures for a larger view.
The data is read from the COM port by the wxreportd daemon. The daemon is hard coded to use /dev/ttyS0 and to place its files in /var/opt/wxdata. It also provides a TCP interface to the data, but in my situation it is unused.
There is a PHP scripts that runs once every 15 minutes, or whenever data is requested that is newer than the newest record in the MySQL database (this includes when the latest data is requested). This script reads the text files into the MySQL database and records how much of each file has been processed. It basically ensures the MySQL database is up to date. It runs every 15 minutes to ensure that the most data it ever has to process is 15 minutes of entries.
The latest data is retrieved from an XML feed located at http://www.danielhall.me/WeatherMon/remote_xml_data.php. So far this and the graphs are the only direct interfaces to the data. There have been only two programs that access this data so far, the WeatherMon Website and WeatherMon Desktop Edition. Here is an image that demonstrates the passage of the data through the application. As with the previous images, click for a larger view.
The WeatherMon website uses the xmlHttpRequest object to get the XML. Then it parses that XMl using the DOM parser. The html page contains elements that have beed tagged with id’s. The page then looks up these id’s and places the data into the page. The radar image is loaded from the Australian Government Bureau of Meteorology. And the graphs are loaded from images under the images/graphs directory. The compass image is chosen using the direction from the directory images/compass, there is one for every angle. This method allows a proxy to cache them instead of generating each one on the fly.