Already for quite some time, the weather data from my RPi weather station are fed to Weather Underground (WU); the station name is Diamantbuurt. I am not unhappy with this service but it has its hickups from time to time. It would be nice to also feed the data to a Dutch or at least European weather service. Such a service is offered by Het Weer Actueel. In constrast to WU, it does not have a detailed web page describing how to feed the data to its service. Instead, it prefers to receive the data through standard weather logging software. One of these, MeteoHub, is running on a Raspberry Pi and my idea was to find out what it would offer.
Dowloading and installing MeteoHub on a RPi is relatively simple, the website provides ample detail. I stumbled across decoding the RAR-packed distribution. Initially, my unix-box did not want to do the job but then, after installing a later version, it did. Once an SD-card is loaded, booting goes as with normal fresh installations of other software.
Then, data from my weather station, a stand-alone, privately programmed RPi, needed to be fed to MeteoHub. I chose the option “User-defined plug in”. The manual gives quite some details on how to proceed. One should provide for a little program or script that gets the data from the weather station and shouts it to to the standard output (normally connected to a screen) in a particular format. That sounded relatively easy. To test this feature, I wrote a little C-program that reads the RPi core temperature from the operating system and shouts it to /dev/stdout, see below.
int main (int argc, char *argv)
temperatureFile = fopen
if (temperatureFile == NULL)
fscanf (temperatureFile, "%lf", &T);
T /= 100;
printf ("t1 %3.0f\n", T);
I put this little bit of C-code in the /home directory of the RPi and then compiled it and made it executable through
gcc -Wall -o pitmp pitemp.c
chmod +x pitemp
To run it simply type ./pitemp and the current core temperature will be printed on the screen albeit in a bit funny way but that is how MeteoHub wants it. Once one fills out in the weatherstation page of MeteoHub including the proper path to the above little program, and saves it, MeteoHub will start sampling the core temperature of its own RPi.
After this successful little exercise, interfacing my weather station to MeteoHub was peanuts. I added a routine to the software running my weather station that regularly prepares a file meteohub.dat in the /home/public_html directory of the RPi with the current weather data (I have ligttpd installed to provide web service and the like). In the MeteoHub-RPi /home directory I added a script to download the data and to shout it to the standard output.
wget -q -O meteohub.dat
Note that 10.0.0.22 is the IP-address of my weather station and that if you use this script, your own address should replace this one. Following the documented installation process, one then obtains regular updates of weather data in MeteoHub.
Having this running for some time now, it turns out that MeteoHub is not offering a lot. It does provide for some dashboard that has the look of a screen that I would have made in the 80’s but is now way out of fashion. It does connect to other display services: WD live gives a nice looking screen but is way too crowded to my liking. Another option is Meteoware Live, but the screen is just a horrible image!
The conclusion is, that MeteoHub can provide an interface to Het Weer Actueel, I tested that too. However, the cost is steep, 59 euro only for a logging service with no reasonable display options. Apart from a RPi that one has to devote to this software as it will not run simultaneously with my private software. One could use WD live for display on a web site, but then again one has to pay, 20 US dollar. I decided against buying.
Was the exercise for nothing then? Well, actually not because I now can find out how to produce the data file that is used by Het Weer Actueel and with this information, I could “fake” the presence of the MeteoHub software and just provide the proper data. Hence, to be continued …