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

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.

Wim,

Still having issues with the popups. The csv files are getting populated, but the cron job does not appear to be erasing the data from the day before. https://www.weather911.net/pwsWD/
Also, getting spikes of data at 00:00 every day. Thanks.


Only the daily csv files seems to be populated, others are empty, do not even exist yet: no 2019.csv or 2019_02.csv

I ran the add-to-year in the browser including error reporting:
…/pwsWD/_test.php?test=w34_cron_addtoyear.php

Warning: mysqli_connect(): (28000/1045): Access denied for user 'Jzinckgr'@'162.144.12.159' (using password: YES)
 in /home4/jzinckgr/public_html/pwsWD/w34_cron_addtoyear.php on line 42

same for the clean script

Warning: mysqli_connect(): (28000/1045): Access denied for user 'Jzinckgr'@'162.144.12.159' (using password: YES) 
in /home4/jzinckgr/public_html/pwsWD/w34_cron_empty.php on line 37

It seems that your easyweather settings are not correct. At least the midnight cron-jobs are not allowed to access your database.

The big question: are you sure that some script is adding data to your SQL table?

I think no script is doing that. Only two scripts can add data to the sql table.

WDapi which can run at set interval => it behaves like a cron-job also. Or the station-cron

The station-cron displays a message that it does not have to do that.
Your settings seems to be that the WDapi will do that.

But you are using clientraw.txt for your data, not WDapi as is shown in the footer of your page: Data Source: Clientraw C10.37S90

Wim

In easy weather, I have wdapi listed to upload the data. Is this correct? What about which option to use for “live data”? Clientraw or WD API?

Sent from my Pixel 2 using Tapatalk