Meteolinger is a project that creates a sofware for weatherstations under Linux. It has two subprojects. First is a development of a driver that reads out a data of a weatherstation, second is a software that collects and presents the data from weatherstation.
MeteoLiNGer is a two word compound, where first word is obvious "Meteo" and the second word is some kind of abbreviation of Linux and National Geographics or LiNux "Graphicer", or just and english word "linger"
Weather station Topcom265 NE has no included sotware for Linux. At pages http://www.pendec.dk/weatherstation2007.htm we found a wwsr utility able to read back some data from weatherstation. This program had however several problems, which we are trying to fix. According to this page this should work for
this we can not guaratee at the momemnt. We tested it only at
As pendec.dk forum is not sending registrations and original autor seems to be pretty busy, we founded a new project.
This software consist of two parts
Dependencies
To get wwsr driver and generator WeatherStats:
git clone https://pagure.io/meteolinger.git
to get wsp driver (recommended but not needed if wwsr is used):
svn co http://weatherpoller.googlecode.com/svn/trunk/ wsp
Google code "disappeared" - archived
You need to have installed a libusb development library (e.g. in Fedora libusb-devel.i386) and compiler gcc.
cd meteolinger/driver/ && gcc /usr/lib/libusb.so wwsr.c -o wwsr
cd ../wsp/ && make
To use a wsp as a driver change the path in weatherstats:
@wwsr = `./wwsr -y`; to @wwsr = `./wsp --weatherstats -c 2`;
Some detail at my blog post Weatherstation TOPCOM 265 NE - Linux software
Wsp (weather station poller) is much cleaner and leaner implementation to read the data from weather stations. It also has much more options. I've patched it to work with weatherstats, so you need to use it with two options:
--weatherstats - outputs the data in weatherstats format -c 2 - read out last two measurements from station
Here is original git but without weatherstat support:
https://github.com/JoakimSoderberg/weatherpoller
Weatherstats is just a simple perl script that stores the collected data in RRD and creates simple html page and graphs. It should be called every 2 minutes. E.g. every 10th minute you can call it with parameter -g to create graphs. This lowers the load of the machine. At the MAIN you can set parameters like your web page folder and folder where you want to store RRDs and where is your binary for rrdtool.
Copy driver(s) and generator to destination directory:
cp meteolinger/driver/wwsr destination/ cp wsp/wsp destionation/ cp meteolinger/weatherstats/weatherstats destination/ cp meteolinger/weatherstats/styles.css destination/
Edit the weatherstats and make appropriate changes under MAIN in "config section".
Add a crontab (example):
2,4,6,8,12,14,16,18,22,24,26,28,32,34,36,38,42,44,46,48,52,54,56,58 * * * * cd /home/wwss/; ./weatherstats -a 419 0,10,20,30,40,50 * * * * cd /home/wwss/; ./weatherstats -a 419 -g
Snapshot of the output:
You need the latest wwsr.c driver and latest WeatherStats script.
As one of the most important things why we are using weather stations is to collect the data history, whenever you have to change the software, this means often also converting the format of the data you have already stored. From WeatherStats 0.4 to 0.5 I changed the RRD format, to store also the MAX value (this is especialy usefull for wind) and changed the internal DS (data set) name of the values. The reason is that I made all the values and RRDs to have more hierarchical name (now Humidity Outdoor instead Outdoor Humidity). Now all RRDs have names like temperature_outdoor and DS name inside the RRD is only "outdoor". Those two things need to be changed "manually" in your old RRD.
1. rename your RRDs
OLD | NEW |
air_pressure.rrd | pressure_air.rrd |
indoor_humidity.rrd | humidity_indoor.rrd |
indoor_temperature.rrd | temperature_indoor.rrd |
interval.rrd | removed *!* |
outdoor_humidity.rrd | humidity_outdoor.rrd |
outdoor_temperature.rrd | temperature_outdoor.rrd |
rain_total.rrd | rain_total.rrd |
rain_1h.rrd | rain_1h.rrd |
wind_direction.rrd | wind_direction.rrd |
wind_gust.rrd | wind_gust.rrd |
wind_chill.rrd | temperature_feel-out.rrd (former wind chill) |
wind_speed.rrd | wind_speed.rrd |
pressure_air-sea.rrd (new DB, will be created) | |
temperature_dew-out.rrd (new DB, will be created) |
2. Dump your DBs and copy the AVERAGE section <rra></rra> once again into the file, change in the copied section <cf></cf> to MAX. This is not ideal, but you do not have the MAX data so this is cheating. Now modify the <name></name> to be e.g. instead temperature_outdoor only outdoor.
Here is a small script that can automate the section copiing, then it starts editor and you can modify the rest. Then it generates the .rdd. Please first copy all your .rrd files to .rrd_old and of course backup them!
for i in `ls *.rrd_old` do bn=`basename $i .rrd_old` rrdtool dump $i > $bn.dump head -19 $bn.dump > $bn.head head -3338 $bn.dump | tail -3319 > $bn.body tail -1 $bn.dump > $bn.tail cat $bn.head $bn.body $bn.body $bn.tail > $bn.dumpmod joe $bn.dumpmod # your favourite editor rrdtool restore $bn.dumpmod $bn.rrd rm $bn.head $bn.body $bn.tail $bn.dump $bn.dumpmod~ done
Please change the editor to the one you like and modify dump as described above. It's 5 minutes work.
In case you are using older rrdtool version like rrdtool-1.0.49 you can experience two problems.
1. there is no -watermark option causing the program to fail
2. rrd names like feels-out with "-" are not correctly interpreted, causing program to fail
Either update rrdtool (tested on rrdtool-1.3.4) or modify the source - remove the watermark option and remove the "-" from $rrdbnt variable at the end of MAIN.
Adam Pribyl: covex at lowlevel dot cz