WD api for uploading data to SQL database on server, Weather34 and Meteotemplate

So far, I’ve been able to implement (using the textbook approach and line by line instructions) to get WD to provide data as needed for a bare bones display for Weather34.

In Weather34 there are instructions about setting up an SQL database on my server (GoDaddy is who I use) which would allow the W34 to display historic data, if I understand it correctly. since I’m more of what is it like now kind of guy, I’ve not implemented the SQL option.

I got thinking, since I also have Jachym’s excellent Meteotemplate running, which has it’s own SQL taking in data uploaded by WD with it’s MeteoAPI, is there some way to tell Weather34 to go look at the SQL I’ve already set up for Meteo, and save uploading BOTH data streams? Or is there a different sequence and naming convention and so on in the Meteo database that means it would be able to extract the data that it needs and I really would need to set up both? I am obviously a real neophyte on these things. Sounds like it could work, but maybe too many things stand in the way.

As I said, I’m pleased that they both work, and that to see what is happening in real time for W34 and also in Meteo is fine, and if I really want to go back in time, I can tell Meteo to do so and see all those nice graphs and stuff.

No sense in storing two sets of the same data on the GoDaddy server if I can make do with one!

Thanks for any comments. Dale

The HomeWaterStation-template for WD (as designed by BrianU @weather34) and maintained by me, stores during 24 hours the data of that one day in a database table. Nothing is done with that data during the day.
When using the “database” the same uploaded data is also stored in a daily .CSV “results.csv”.

At almost the end of the day, a cron-job uses 1 SQL statement to calculate the high-lows of the fields and those high-lows are added as a new line to two .CSV text-files with "this years"and “this months” data.
Just at the beginning of the day, all data is removed from the table (truncate) in the database.

So “yes” HWS-WD uses a SQL table (can be in any database). But inside the table there is no other data then todays uploaded data. Only 1 time / day the sql data is read.
Could easily have been a text file but using a text-file is more “dangerous” when updating and also more cumbersome to calculate the high-lows.

Why
Because around Feb 15, 2019 we will not be able to use our data from the WU servers as we did before.
We used to load “this years” , “this months” and “todays” data from the WU servers, cached those files and generated the graphs from those files.
Last year, @weather34 included this easy to use SQL solution and the two cron-jobs to generate .CSV tables to use for the graphs even after WU data would be un-available.
This was never meant to be a “database with weather-information” such as used in Jachym’s MeteoTemplate.
If you do not want to use the graphs, no need to use the SQL/database at all for the HWS-template.

Wim

Win, will it still be possible to produce the Weather34 graphs if one does not use the temporary SQL/database, that is once access to the Weather Underground data becomes inaccessible/unreachable?

Today till Feb 15, you can use WU or the .csv files created while first loading the SQL database. If you do not want to use the SQL table to store todays data you are stuck to using WU

After Feb 15 one can use the SQL-table to generate the .csv files. It is unknown if we can use WU-data as there is no definite answer IF we can load our data for one year or HOW we have to do that. The only preliminary specifications I have seen mention download of 7 days of history.

So as for now I would say: NO graphs without a SQL table after Feb 15.

Wim

Wim, thank you for the extensive answer and the ‘why’ behind it. Very helpful for me to understand.

Both your implementation of Weather34 and Meteotemplate serve to fill my needs, and they both do it very well, but as you note, they have different jobs to do.

It is reassuring to know that W34 will continue to function and I won’t need to quickly try to implement something to keep the 24 hour data going for W34.

thank you. I can now not worry about setting up a second SQL if I don’t need it.
Dale