***closed*** weather34 for WeatherDisplay (clientraw and WDapi)

There is indeed no CURL-support in your PHP.
Is should be in your php info as in the attached screenshot
You have to add that in your php config otherwise no external files can be loaded when using these scripts.

Wim


curl.jpeg

Thank

[quote author=GW400 link=topic=67468.msg543108#msg543108 date=1549096321]
Thank

Great!
Very usefull to know about this.
Thank you a lot for all the good work you are doing!

Question about the temp popup. When the cron job resets at midnight, I thought the X-axis would start from 0:00, not going back to the previous day’s temps. Is there a setting to change this? I’m also getting dewpoint spikes that are not actually happening according to my Davis.


There should be two midnight cron-jobs 1 before and 1 after midnight.
The second one purges the SQL-table and writes a new header to the .csv file.
When I now check your files, they are empty, => chartsmysql/result.csv only has the header line with the fields names.
The graphs are therefor empty also.
Wim

Both settings are ticked in WD screen. Graphs are not empty for me: Raymond, ME Home Weather Station (wd version)


The second job should clear the table and clear the daily .csv
The daily file ./chartsmysql/result.csv
Has one line only , with the headers
Filetime (UTC): 2019-02-01T23:00:32+00:00 which an age of 15 hrs 46 min 02 seconds
It was purged exactly midnight Norway time. Your question about old data is answered, that data will be correctly removed at midnight
Now to find out why no data is added during the day, use the test program . . . /_test.php?test=w34_cron_stationcron.php “et voila”

Fatal error: Uncaught Error: Call to undefined function curl_init() in /home/weather/public_html/w34_load_files.php:201 

Same reason as for another problem, no CURL. The main task of cronjob is to load the data before it is needed. The script fails so it can not do the other tasks. You could set WDapi to do the task.

Wim

I would expect that the last hour would be the previous 59 minutes from the current time. My screen grabs were from 1900 hrs (not close to midnight), and the value shown in w34 was 0.95" out of the total days rain amount of 0.96". My vote is if the value is going to be shown then it should be correct, otherwise remove it.

I agree. I’ve played with the data and I don’t think it’s reasonable to make this calculation from what is currently available.

I haven’t found a WD tag with last hour rain either, would be nice to have it somewhere since it is a WD main screen displayed value.

I think the WD console is able to correctly compute the last hour rain but for some reason Brian never added it to the clientraw file. I would disagree that it isn’t an important weather detail to display…

I just noticed that w34 was correctly showing last hour rain amount until there was no rain last hour. It has been over an hour since the last rain tip and now w34 is now showing todays total rain amount for last hour rain amount.

The value which is shown comes from the WDapi (which uses metric units). You can inspect all values at . . . /pwsWD/w34_module_test.php click on “Show WDapi values”

rain total last 60 minutes [43] => 0.5

Thanks for that…I will keep an eye on it and see what happens.

I am using dapi for tasks

Sent from my Pixel 2 using Tapatalk

Any reason I can’t bring up pop ups on phone?

Sent from my Pixel 2 using Tapatalk

I agree, too. As niko says, it’s unreasonable to expect a value from the data available in clientraw or api.

Yes, they are to wide. So the CSS suppresses the pop-up’s
All blocks are only displayed one below each other, fitting inside the width of the phone.

I would like to store all data in my local MySQL database to be able to access historical data.
What would be the recommended solution to this?

That question you should ask in another topic or even another forum.
With a question like: “How to store all data from WeatherDisplay in a SQL database”

Probably the answer is to be found on the MeteoTemplate website: Meteotemplate - free weather website template
That template already uses another API from WD to upload all data and stores is in an SQL database.

Success, Wim

Thank you Wim,
I’m already aware of this, but what I’m concerned about is the possibility for a user to see historical data in Weather34 for WD.