No High/Lows, where is history and graphs data used for, and ? cron ?

Yes, the names look similar but there is a big difference between two “historical-data” sets which are used in PWS_Dashboard.
The reason: We have two different needs for historical data.

We want to make graphs of our weather-data. Those graphs should show todays values, a month, a year a.s.o.
The data used by graphs can not be “realtime” as it is often calculated with a low frequency by the data-provider.

We want to have the high-lows of our weather-data but those should be as “real-time” as possible.
But not all weather-“programs” upload those values so we have to calculate the missing high-low values ourselves.

Obvious, or sadly, we can not use the same set of data for both usages.

Graphs data solution 1: Weather Underground

If you set to use the WU data for graphs AND your station XXXXXXXX uploads to WU, the scripts will use that WU data (if the api-key is valid).
The data is cached in pwsWD/chartswudata/ and pwsWD/wudata/
All graphs will be available from the first day the station started uploading to WU (start-date has to be set in settings)

As older data can have errors, one can update/ remove errors in the local WU-data master copy in pwsWD/wudata/
==> use this script pwsWD/_wu_upd.php?pw=12345

IMHO it is unwise not to use WU, and it is free. You store your weather-data, retrieve it anytime you want, you get a nice weather-forecast and you can use extra interesting scripts to browse and inspect your weather-data.

Graphs data solution 2: Generate your own data

For those who choose NOT to use WU-graphs data
=> your graphs-data will be generated with a “cron-job” running every 5 minutes
The generated data is cached in pwsWD/chartsmydata/
Data is saved every 5 minutes cron-run for “today-values” and every 00:00 run for month / year values.
It are simple .txt files. Editing/removing errors is done with a text-editor.

Missing High-Low values solution

A small files is created / maintained by a “cron-job” running every 5 minutes
It will compare current high-lows and if needed it will update the today/month/year high-lows with the latest values
The file is located in pwsWD/_my_settings/history.txt
The live-data script uses that file plus the latest-measurements to calculates “realtime” high-lows to displayed in the blocks on your dashboard.

One can generate a “start-history” using the stations WU-data: => pwsWD/PWS_hist_recreate.php?pw=12345
One can always update the history file if it has an error-value in it: => pwsWD/PWS_hist_update.php?pw=12345

The cron-job every 5 minutes
That cron-job has some more tasks: Improve response times by pre-loading external data-files such as forecast, AQ-data a.s.o.
And it also takes care of the loading / assembling graphs-data and high-low data.

Where to get a cron-job?

1. Provider-cron-server normally use an archaic interface xyz/abc/php7.7 /home/user/whatever/pwsWD/PWS_cron_stationcron.php
Most errors occur in setting the correct path and carefully check if the same PHP version is used as your website is using.
Nearly all external solutions are better than using the cron-server from spme providers, who sometimes even charge extra for that “feature”.

2. External cron-servers use the wget/browser format such as “yourwebsite.com/pwsWD/PWS_cron_stationcron.php
Free external cron-jobs at:
https://www.cronjob.de/ in German
Free cronjobs - from minutely to once a year. - cron-job.org (Kostenlose Cronjobs - von minütlich bis einmal im Jahr. - cron-job.org in German)
Multiple others also when using Google-search

3. Weather-Program-cron
Multiple weather-programs (WD, Meteobridge) are able to schedule a 5 min http request => which is identical to running a cron.

Read-me https://pwsdashboard.com/documentation2012/11_cron.pdf

The pdf-file in this thread tells

PWS_cron_stationcron.php should be started every 5 minutes
Devil is in details, therefore question (for understanding): How accurate must the interval be for correct operation of PWS_Dashboard, and is an offset allowed?

It should not be exact, 4 or 6 is also OK.
Some free cron-servers tolerate only 5 minutes, not faster.
To fast as 1 / minute gives a load on the website-server which free/inexpensive providers do not allow.

Wim

I do not understand this. I upload to WU and have a WU api-key but when using WU I don’t see min-max data or graphs. Maybe that api key is not valid. So I always skip WU when it comes to data. But that may be my unfamiliarity with the WU phenomenon and WU’s API. So I use the cron. What do I do wrong

The cron is ALWAYS needed if you want high-lows and good response-times and valid data when you access the dashboard the first time.

I can not “look” into your settings, that is protected.
There is a debug console:
https://www.bdepoel.nl/pwsWD/PWS_module_test.php
When i check your data files you have set to use your own data for graphs
==> PWS_easyweathersetup.php => tab Data last question => The data to use for the graphs. You probably selected the second choice "Save daily

=== GraphsData
Your data is in the chartsmydata/ folder
Todays data is there 1 / 5 minuteshttps://www.bdepoel.nl/pwsWD/PWS_listfile.php?file=chartsmydata/today.txtmydata folder
There is only 1 line in the month / year data as there has been only one 23:55-00:05 roll-over done by the station-cron

=== High-Lows
Your history for the high-lows is also correct including yesterday values, again the 23:55-00:05 roll-over done by the station-cron

=== Switch to WU
If you want to use WU for graphs you have to go to easyweathersetup and change the setting " The data to use for the graphs"
Check all settings for WeatherUnderground at tab Api&Keys the 3 questions at WeatherUnderground: weather-data - forecast - historical data

Only then we can check your WU-api-key

If you doubt the validity of you API-key, you can always regenerate the API key at your WU-station dashboard when you login to WeatherUnderground.

Wim

Ok I will try that. Yes I have set the template not to use WU but to safe daily. Will try to use WU again.

Dear Wim,

With the Leuven template aging, I used the long weekend to install PWShttps://meteo.heerschap.net/ So far it looks very good, installation and update went smooth including running the cron from MeteoBridge. One thing I ran into and that I did not discover in the documentation is the historic data. So the small boxes at the top were not displaying all data (just min max since install) while the graphs (using WU) for eg temperature showed the historic data fine. You may wish to consider alerting users of the need to run

One can generate a "start-history" using the stations WU-data:  => pwsWD/PWS_hist_recreate.php?pw=12345
One can always update the history file if it has an error-value in it:  => pwsWD/PWS_hist_update.php?pw=12345

.

kind regards Jean-Paul