Configuring the software

After the software has been installed, it must be configured. Follow the steps below for a successful configuration:

Configuration file: meteo.xml

Most configuration happens inside the meteo.xml(5) configuration file. A sample file is include with the distribution. To find out what sensor names are known for a particular station type, use the meteosensors(1) utility.

Processes

For details of the configuration of all the programs, please consult the manual pages installed with the distribution. This page only describes there principal functions and relation to each other.

Daemons

A full fledged meteo installation uses 3 permanently running processes and some cron jobs to do its work. The processes and there functions are:

metepoll
This program talks to the weather station, collects data from its sensors and writes new records to the sdata table every minute. There are actually two copies of meteopoll: one copy does the actual work, the other acts as a watchdog. If the working copy gets killed, e.g. by a communications timeout, the watchdog copy spawns a new worker to try to contact the weather station again. meteopoll(1) does not write to the database. The database my be locked by long running queries for extended periods of time, waiting for the database would make meteopoll(1) loose some data. To prevent this, meteopoll(1) usually writes the updates to a message queue, and lets the meteodequeue(1) program add them to the database. meteopoll(1) also maintains the map file, which can be used to make near real time information from the weather station available.
meteodequeue
This program opens the messages queue and reads updates which it then sends to the database.
meteoavg
The meteoavg program computes the averages needed for graphing. This program can also be used to rebuild the avg table from the sdata table.

The sample start script rc.meteo in the support directory of the distribution starts all three processes at once.

Cron Jobs

In addition to these daemons, you need to run meteodraw(1) periodically to generate updated graphs for the web site. A sample cron job script is included in the distribution.

PHP scripts

To top off the installation, configure the meteo browser to allow graphical browsing of the meteo database. See the README.browser for details.

There also is a PHP script to display the current station data in textual form (no fancy graphics). It uses the meteomap program to atomically read the meteo map file maintained by meteopoll.