Thanks to Walter Poxon and colleagues who provided these instructions
for meteo versions before 0.8.0. Some things have changed
in 0.8.0, most notably the replacement of the
meteodraw. (Update 0.9.0: while the requirements
have not changed, some of the details for running have, see below.)
The Davis Vantage Pro unit spits out wind direction in 1/100ths of a degree azimuth! ;)
Jeff writes: The other day when I was twiddling with the rain collector it proudly announced, "It's raining cats and dogs!!"
Meteo installs fairly easily if you have the right pre-requisite packages installed on your system.
Here's a list of what I had to install (in roughly the order I needed to install them) in order for meteo to install/build properly:
drwxr-xr-x wdp user 1536 Feb 17 17:25 mysql-3.23.54a
drwxr-xr-x wdp user 5120 Feb 17 15:04 perl-5.8.0
-rw-r--r-- 1 wdp user 24729600 Apr 1 12:27 httpd-2.0.44.tar
-rw-r--r-- 1 wdp user 17141760 Jan 21 14:09 libxml2-2.5.1.tar
-rw-r--r-- 1 wdp user 2160640 Jan 21 14:25 gd-2.0.11.tar
-rw-r--r-- 1 wdp user 962560 Feb 17 06:56 DBI-1.32.tar
-rw-r--r-- 1 wdp user 409600 Feb 17 15:20 DBD-mysql-2.1025.tar
-rw-r--r-- 1 wdp user 768000 Feb 23 21:59 libwww-perl-5.69.tar
-rw-r--r-- 1 wdp user 286720 Feb 23 22:05 HTML-Parser-3.27.tar
-rw-r--r-- 1 wdp user 368640 Feb 23 22:09 URI-1.23.tar
-rw-r--r-- 1 wdp user 2048000 Mar 30 20:47 pm.tar
-rw-r--r-- 1 wdp user 24104960 Mar 30 21:10 php.tar
Install mysql, perl, and the latest apache first.
These are all independent of one another, but will be tied together by the subsequent pieces. All the version numbers above should be treated as minimums. If something newer is out there, I'd use it. Note that there are also some version constraints between some of the packages above, e.g. some libxslt version usually requires a minimum libxml2 version.
PHP in particular requires minimum versions >= those above of all the above pieces.
Then install the DBI, DBD, libwww-perl, the pm/php stuff, and everything else. Note that the perl stuff is needed only for the weatherunderground portion.
It goes without saying to do a "make test" on each of these pieces (if available) to make sure all the individual pieces work.
The last piece (which will use all of them) is meteo. Meteo will build properly with just the above installed. It will not run or look right, however, unless you follow the docs in the db directory of the meteo distribution on setting up additional users (first as unix users and then again separately in the database user admin stuff) for the two functions of meteo. Meteo uses a separate unix user + database user for data collection (read+write perms to the database tables) and the graphing stuff (read-only perms) to the database.
You need to set up the users and tables in your mysql database.
Make sure the mysql daemon is running, then check out the README in the db directory.
You'll need to first set up two unix accounts (named mtp and meteo - see below). Do these first, then create the necessary database users and tables in mysql according to the README in the db directory.
If you want to see a working example, log in to www.poxon.net
Files you'll want to snarf:
/usr/local/etc/meteo.xml (the main config file for the whole thing)
Meteo can run as any user, so you may choose to run it as root, or as some other user already defined on your system. It is, however, good system administration practice to use a dedicated user. The mtp user used for reading data from the station and writing it to the database needs access to the station (a serial interface like /dev/ttyS0, give this device to mtp, or via TCP to a device server), and needs insert and upate rights in the database.
Another user meteo can be set up who will generate the images, this user only needs read access to the database (select).
*/2 * * * * /usr/home/mtp/davis_collect_dataHere's what the davis_collect_data script looks like:
#!/bin/sh ps -ax | grep -v grep | grep meteopoll > /dev/null 2>&1 if [ $? -eq 1 ] ; then /usr/local/bin/meteopoll -f /usr/local/etc/meteo.xml \ -d -F -sOakwood > /dev/null 2>&1 & else # echo "meteopoll already running" fi(Update 0.8.0: add the option
-b msgqueue, or meteopoll will use the default destination for database updates, which is standard output. Also it is best to run meteopoll without -d -F in production, since the debug flag causes lots of debug messages to be generated, which takes quite some time. Also -F stops meteopoll from forking, which also disables meteopoll's ability to recover from a crash of the connection.)
WWW=/usr/local/apache/www.poxon.net/htdocs/weatherNote the -a options to the graph program, it ensures that the precomputed averages in the meteoaverage table are used, which is essential for performance. While during the first few weeks you can easily live without the -a option, after about half a year you will start to wonder why your database server behaves so sluggish. (Update 0.8.0: the -a flag is no longer necessary, meteograph is no longer capable of reading from the stationdata table, it always uses the averages table. This also means that you must run meteoavg.)
WEATHER_GRAPH="/usr/local/bin/meteograph -f /usr/local/etc/meteo.xml -s Oakwood" */2 * * * * /usr/home/meteo/davis_average_data # every 5 mins, graph daily graphs for weather */5 * * * * $WEATHER_GRAPH -c $WWW 300 # at 5 mins after the hour, do weekly graphs 5 * * * * $WEATHER_GRAPH -c $WWW -a 1800 # at 15 mins after the hour, do monthly graphs 15 * * * * $WEATHER_GRAPH -c $WWW -a 7200 # at 25 mins after the hour, do yearly graphs 25 * * * * $WEATHER_GRAPH -c $WWW -a 86400
see wunderground directory.