Import Weather Display data to Meteohub?
Moderator: Mattk
Import Weather Display data to Meteohub?
Yesterday I bought NSLU2 and installed Meteohub. I had been using Weather Display previously and I successfully configured Weather Display to get weather from Meteohub, thanks to great instructions I read from here. The system works beautifully now - WD continues to update my weather pages (www.pinseri.com/saa) and Meteohub sends rapid fire updates to Weather Underground.
But there is one thing I haven't yet found an answer for. I have over a year's worth of weather data in Weather Display. I would like to transfer all of that to Meteohub because I'm planning to discontinue WD and create all my statistics and graphics using Meteohub. I'd like to have my weather history for long time graphs and statistics.
Is there a solution to transfer WD historical data to Meteohub?
Sami
But there is one thing I haven't yet found an answer for. I have over a year's worth of weather data in Weather Display. I would like to transfer all of that to Meteohub because I'm planning to discontinue WD and create all my statistics and graphics using Meteohub. I'd like to have my weather history for long time graphs and statistics.
Is there a solution to transfer WD historical data to Meteohub?
Sami
Re:Import Weather Display data to Meteohub?
One could generate raw data for Meteohub in theory, but there is not tool for doing so.
Have a look at the raw data format of Meteohub in the manual to get an impression if you are willing to do this.
Have a look at the raw data format of Meteohub in the manual to get an impression if you are willing to do this.
Re:Import Weather Display data to Meteohub?
OK, thanks for the information. I might try to convert data myself. I suppose it might not be that hard if I can get all weather data out of WD in .csv format. Just a couple of lines of Perl :)
Do I have to notify Meteohub somehow if I add raw data files or will it notice the new data by itself?
Sami
Do I have to notify Meteohub somehow if I add raw data files or will it notice the new data by itself?
Sami
Re:Import Weather Display data to Meteohub?
When having added the raw data, press "recompute" on the maintenance page. This will take your new old data into account.
-
- Platinum Boarder
- Posts: 873
- Joined: Fri Jan 25, 2008 6:27 pm
- Location: Isle of Skye, Scotland
Re:Import Weather Display data to Meteohub?
If you do do that, others may be interested in your 'couple of lines' too. ;) :)samikki wrote:I suppose it might not be that hard if I can get all weather data out of WD in .csv format. Just a couple of lines of Perl :)
I have about 3 months more data in WD than in Meteohub. Not so much that it's ever been a high enough priority to set about converting it, but if there was code available...
Just a thought. :)
Re:Import Weather Display data to Meteohub?
If I manage to get it working, I'll post the code. It might be that I don't have time to work with it until later though -- summer holidays are about to start :)
Sami
Sami
-
- Platinum Boarder
- Posts: 873
- Joined: Fri Jan 25, 2008 6:27 pm
- Location: Isle of Skye, Scotland
Re:Import Weather Display data to Meteohub?
Fine. No pressure. All contributions gratefully received. :)samikki wrote:It might be that I don't have time to work with it until later though -- summer holidays are about to start :)
Have a good holiday.
Re:Import Weather Display data to Meteohub?
Hello! I have been experimenting with Weather Display to Meteohub conversion software, quite successfully in fact.
I made a perl script which creates meteohub raw data out of WD log files.
As promised, I'll make the source code available here.
You can find the script here:
http://www.pinseri.com/saa2/wd2meteohub.txt
Please note that it is spaghetti code and there are no guarantees that it works for you. But maybe you get some ideas out of it.
Usage:
Copy WD log files to same directory as the script. You need three files, for example:
72008lg.txt
72008indoorlog.txt
72008vantagelog.txt
(Vantagelog contains data for WMR-100 UV sensor).
Then start the script and give month+day as a parameter.
The script prints meteohub raw data to STDOUT.
Like this:
./wd2meteohub.pl 72008 > raw
Copy the raw file to corresponding directory on meteohub and do "recompute".
There are still some bugs with rain sensors and changes of month, but I'm trying to iron them out. The linked script can change any time as I am working with it.
Happy experimenting!
Sami
I made a perl script which creates meteohub raw data out of WD log files.
As promised, I'll make the source code available here.
You can find the script here:
http://www.pinseri.com/saa2/wd2meteohub.txt
Please note that it is spaghetti code and there are no guarantees that it works for you. But maybe you get some ideas out of it.
Usage:
Copy WD log files to same directory as the script. You need three files, for example:
72008lg.txt
72008indoorlog.txt
72008vantagelog.txt
(Vantagelog contains data for WMR-100 UV sensor).
Then start the script and give month+day as a parameter.
The script prints meteohub raw data to STDOUT.
Like this:
./wd2meteohub.pl 72008 > raw
Copy the raw file to corresponding directory on meteohub and do "recompute".
There are still some bugs with rain sensors and changes of month, but I'm trying to iron them out. The linked script can change any time as I am working with it.
Happy experimenting!
Sami
-
- Platinum Boarder
- Posts: 873
- Joined: Fri Jan 25, 2008 6:27 pm
- Location: Isle of Skye, Scotland
Re:Import Weather Display data to Meteohub?
Thank you. Looks good I'll have a play with it sometime. :)samikki wrote:I made a perl script which creates meteohub raw data out of WD log files.
As promised, I'll make the source code available here.
Re:Import Weather Display data to Meteohub?
Be sure to take the latest copy when you do... I'm tweaking the script all the time (I just made some modifications to rain total calculation, for example).
-Sami
-Sami
-
- Platinum Boarder
- Posts: 873
- Joined: Fri Jan 25, 2008 6:27 pm
- Location: Isle of Skye, Scotland
Re:Import Weather Display data to Meteohub?
Thanks for that - useful to know. No import in re-inventing a wheel if it already exists. :)samikki wrote:Be sure to take the latest copy when you do... I'm tweaking the script all the time (I just made some modifications to rain total calculation, for example).
-
- Platinum Boarder
- Posts: 873
- Joined: Fri Jan 25, 2008 6:27 pm
- Location: Isle of Skye, Scotland
Re:Import Weather Display data to Meteohub?
Slightly puzzled by this:
Any particular reason for choosing 9999 as the initial value?
Wouldn't 0 be an almost guaranteed 'smaller than any value at the end of previous month.' value?
Code: Select all
# need to calculate a fake value for alltime rain total
# because meteohub uses it to calculate rain amounts.
# we don't know the total at the end of previous month
# so we need to come up with a value that is smaller
# than any value at the end of previous month.
# if you are adding log data between actual log data,
# this may give you problems.
if ($month_total==0) {
$month_total=9999;
}
Wouldn't 0 be an almost guaranteed 'smaller than any value at the end of previous month.' value?
Re:Import Weather Display data to Meteohub?
That's for ensuring that the change from converted to live data goes smoothly. My live data has alltime total of around 1200 mm or so, so I had to use number bigger than that...Any particular reason for choosing 9999 as the initial value?
Re: Import Weather Display data to Meteohub?
anyone tried this? I have 6 years of WD data that I would love to have imported to Meteohub
Re: Import Weather Display data to Meteohub?
nobody that has done this lately?