Hi, New user here, I am having an issue where the two rainblocks in my PWD 5/5/2020 version are not showing any history of rain fall, Neither in the Annual Rainfall nor the block that displays rainfall. if I click the "360 days - 30 days - Today - Forecast - Radar " pop up links, it does display the recent rain fall, forecast and radar, but not on the main block. I am running the PHP on my hosted server and am using the WU API to stream the data from my Acurite 5in1 weather station.
First Welcome to the forum and thanks for testing the PWS_Dashboard.
There is a separate discussion area for questions and discussions for the dashboard => http://discourse.weather-watch.com/c/76
Probably the administrator will move this question there.
Solution: run a cron-job every 5 minutes https://pwsdashboard.com/documentation1912/cron.pdf
The cron-scripts will calculate the high-low and cumulative values by checking and updating the values in a history file
Succes, Wim
Wim,
Thanks, I have set the three cron jobs (PWS_cron_stationcron.php, PWS_cron_addtoyear.php,and PWS_cron_empty.php up to run at the time specified in your document. Since I am using the API from Weather Underground, I still keep that setting active in the settings, correct?
You have set the cron jobs to run, but they refuse to do their job. The station cron did not run (correctly) as no data is updated, all is n/a
Your history => http://usradioguy.com/pwsWD/pwsWDxx/history_popup.php => Screenshot hist1.jpg.
We need a screenshot to check for a type, to check how you execute the cron jobs and understand which cron-server is used.
Often a small type f.i. /5 of 5/ makes a world of difference.
Also some cron-servers are relative easy as they use the same link as you should use in your browser.
Others servers need the exact linux path to the script and even which version of php you want to use.
To better understand what should happen:
Use your browser and type the http://website/folder/PWS_cron_stationcron.php link in your browser.
=> It will display what it has done, something like this
success files loaded + history was already valid + no roll-over needed
==> if it displays error-info do it again but use PWS_cron_stationcron.php?test so more debug information is displayed
=> if all is OK, check the link to the history and you will notice a lot of data is now available
Now you can check your cron-setup again and again until the automated cron does what it should do.
If you continue to have problems with your cron-provider, you could use an external conserver such as Free cronjobs - from minutely to once a year. - cron-job.org
The advantage is that “external” cron servers use the “browser-type” link to the scripts, which is far more natural for us humans.
They also use simple drop-downs to select the frequency such as “every 5 minutes”
===
Your easyweather-setup settings should not be changed in anyway.
They are completely separate from whatever you need to do to run a cron.
So attached blelow of my screen shots of the setting for each cron job, I use Godaddy as my host, and they do use the drop down style menu to set up cronn jobs. So I select “once per 5 minutes” for the PWS_cron_stationcron.php and “once per day” with the appropriate times for PWS_cron_addtoyear.php and PWS_cron_empty.php.
This is the putout with PWS_cron_stationcron.php?test (note: I do NOT see rain in this list under WU data)
PWS_cron_stationcron.php (26) version =>PWS_cron_stationcron.php|00|2020-04-23|
PWS_cron_stationcron.php (35) include_once =>PWS_load_files.php
PWS_load_files.php(26) loaded =>PWS_load_files.php|00|2020-05-05|
PWS_load_files.php (30) include =>PWS_settings.php
PWS_settings.php (28) version =>PWS_settings.php|01|2020-05-05|
PWS_settings.php (32) include =>/home/xesy9m3pnyef/public_html/pwsWD/pwsWDxx/_my_settings/settings.php
settings.php (2) version =>./_my_settings/settings.php|00|2020-07-24|
PWS_settings.php (154) $defaultlanguage=en-us $used_lang =en-us $locale_wu=en-US $lang_locale=en $lang_file=languages/lang_en.txt
PWS_settings.php (252) $units_used =us $windunit=mph $tempunit=F $rainunit=in $pressureunit=inHg $distanceunit=mi $wu_unit=e
PWS_load_files.php (343) WU-ccn________: File not old enough (36/144 seconds) https://api.weather.com/v2/pws/observations/current?stationId=KWIJEFFE10&format=json&units=e&numericPrecision=decimal&apiKey=_API_SETTING_
PWS_load_files.php (343) METAR-KRYV____: File not old enough (36/480 seconds) https://api.checkwx.com/metar/KRYV/decoded
PWS_load_files.php (376) WU_forecast___: time spent: 0.1268 - CURL OK for https://api.weather.com/v3/wx/forecast/daily/5day?geocode=43.01,-88.8&format=json&units=e&language=en-US&apiKey=_API_SETTING_
PWS_load_files.php (159) Darksky_______: not loaded API=
PWS_load_files.php (172) yr.no_________: Not used / not yet correctly set
PWS_load_files.php (197) Aeris_________: not loaded keys=ADD YOUR API KEY ADD YOUR API KEY
PWS_load_files.php (219) EC-weather____: Environement Canada: not used
PWS_load_files.php (343) Earthquakes___: File not old enough (36/480 seconds) https://earthquake-report.com/feeds/recent-eq?json
PWS_load_files.php (376) Aurora-kindex_: time spent: 0.4335 - CURL OK for https://services.swpc.noaa.gov/products/geospace/planetary-k-index-dst.json
PWS_load_files.php (241) AQ-Luftdaten__: luftdaten sensor not used
PWS_load_files.php (251) AQ-Purpleair__: purplair sensor not used
PWS_load_files.php (343) AQ-official___: File not old enough (2576/2880 seconds) https://api.waqi.info/feed/geo:43.00694;-88.800377/?token=_API_SETTING_
PWS_load_files.php (275) Weatherflow___: WeatherFlow device not used
PWS_load_files.php (343) WU-today-CSV__: File not old enough (765/1440 seconds) http://usradioguy.com/pwsWD/pwsWDxx/PWS_DailyHistory.php?ID=KWIJEFFE10&graphspan=day&day&month&year&format=1
PWS_load_files.php (343) WU-month-CSV__: File not old enough (10531/11520 seconds) http://usradioguy.com/pwsWD/pwsWDxx/PWS_DailyHistory.php?ID=KWIJEFFE10&graphspan=custom&year=2020&month=06&day=28&yearend=2020&monthend=07&dayend=28&format=1
PWS_load_files.php (343) WU-year-CSV___: File not old enough (17486/34560 seconds) http://usradioguy.com/pwsWD/pwsWDxx/PWS_DailyHistory.php?ID=KWIJEFFE10&graphspan=custom&year=2019&month=07&day=28&yearend=2020&monthend=07&dayend=28&format=1
</pre>success files loaded + history recalculated + history saved
temp|HghV|all|73.9|70.9|
temp|HghV|year|73.9|70.9|
temp|HghV|month|73.9|70.9|
temp|HghV|today|73.9|70.9|
dewp|HghV|all|63.5|63|
dewp|HghV|year|63.5|63|
dewp|HghV|month|63.5|63|
dewp|HghV|today|63.5|63|
humd|LowV|all|70|75|
humd|LowV|year|70|75|
humd|LowV|month|70|75|
humd|LowV|today|70|75|
$livedata=/home/xesy9m3pnyef/public_html/pwsWD/pwsWDxx/jsondata/wucom.txt
$hist_file=/home/xesy9m3pnyef/public_html/pwsWD/pwsWDxx/_my_settings/history.txt
The two cron-jobs around midnight have an extra . before the script-name
=> pwsWDxx/.PWS_cron_addtoyear.php and pwsWDxx/.PWS_cron_empty.php
The screenshot for the 5 minute cron has no explanation for the settings, such as “Every Day (*)” as the other two setups have.
I don't show any errors when running http://usradioguy.com/pwsWD/pwsWDxx/PWS_cron_stationcron.php
I get this at the top "`success files loaded + history recalculated + history save`" and then the data below it.
. . .
The output of the cron-job is fully OK.
Looking at http://usradioguy.com/pwsWD/pwsWDxx/history_popup.php
Every time you run the job from the browser it will update the history.
Now we have to wait and see if the cron-server-jobs also update the values.
http://usradioguy.com/pwsWD/pwsWDxx/PWS_listfile.php?file=_my_settings/history.txt&type=arr
This displays the last update time also.
=> f.i. `Filetime (UTC): 2020-07-28T13:58:14+00:00 which an age of 0 hrs 03 min 37 seconds`
As long as there are no values higher or lower then the values in the history the filetime will not change.
You can check the history pop-up during the day when temp rises
The values in the current column (excluding rain) should be within the high-low values of all other columns.
If not, wait another 6 minutes, and check again. The cron should have run and the values should have been updated.
If you have proof that the values are NOT updated, you should check with GODADDY how you can get an email of the cron-results every time it runs.
That way we can see what the error is.
I still see rain as n/a now we haven't had any rain since I set up these corn jobs, is that why I show an N/A rather than 0?
Carl
Rain can only be updated when it rains. It is a cumulative value and it will be shown in the today column only.
At midnight it will be added to month/year columns.
The yesterday column will be populated at midnight by moving all today values to the yesterday column also.
You have to remove the extra . (point) from the cron-setup before the midnight crons will run.
Thanks for catching the “.” I had just edited that line too… must have copied too much.
The devil is in the details, I had the case wrong in my corn job the path was
/usr/local/bin/php /home/xesy9m3pnyef/public_html/pwsWD/pwsWDXX/PWS_cron_stationcron.php
Should have been : /usr/local/bin/php /home/xesy9m3pnyef/public_html/pwsWD/pwsWDxx/PWS_cron_stationcron.php
the difference was the the two pwdWDXX in the path should have been lower case xx as pwdWDxx
One other question, Apparently Godaddy’s corn server runs on Pacific time, and I am on central time, so 2 hours difference.
So I would need to set the PWS_cron_addtoyear.php from 23:55 to 21:55 and then the same with PWS_cron_empty.php from 00:10 to 22:10 to account for my local time zone? Or is it that important?
Looks like everything worked , but when the cron executes /usr/local/bin/php /home/xesy9m3pnyef/public_html/pwsWD/pwsWDxx/PWS_cron_empty.php
I get this response from my cron email notifications" Probably this script is started by accident. Check the documentation!
Is that just a standard response if you were to run it manually , say from a browser command?
And how would I check to see that it did empty the history?
The PWS_cron_empty checks the time. It will only run midnight → 01:00.
If the timezone is correct and you set it to start at 22:10 (10:10 pm Pacific time) it should not give this error.
The history file looks correct including all high-low values
Check:
the server is running pacific time → which is minus 2 hours of your time
You set PWS_cron_addtoyear.php at 9:55 pm everyday → which calculates as 11:55 pm (23:55) your time
You set PWS_cron_empty.php at 10:10 pm everyday → which calculates as 12:10 am (00:10) your time
Next release we get rid of the two extra scripts when the stationcron is doing all the work. http://discourse.weather-watch.com/p/541536
Latest test-version is in use at multiple sites and they seem to work without errors.
I changed the server times this morning, so I’ll wait till tomorrow and check again. It’s 08:50 here. /usr/local/bin/php /home/xesy9m3pnyef/public_html/pwsWD/pwsWDxx/PWS_cron_addtoyear.php is now 21:55 which calculates as 11:55 pm (23:55) my time /usr/local/bin/php /home/xesy9m3pnyef/public_html/pwsWD/pwsWDxx/PWS_cron_empty.php is now 22:10 which calculates as 12:10 am (00:10)my time
/usr/local/bin/php /home/xesy9m3pnyef/public_html/pwsWD/pwsWDxx/PWS_cron_empty.php
run 00:10 pacific (godaddy server) is 02:10 am your website time => after 1 o’clock that is why the message was printed.
I do not understand the problem.
You are using imperial (aka english) units. So temp => F, wind => MPH, pressure => inHg rain => inches a.s.o.
For weather-values temp, wind and pressure, the blocks display the current value also in the metric units.
As a service to those visitors who need metric for an instant and they do not to have to press the orange C at the top right to see it.
What exactly do you want differently from what it is now?
Please start a new topic, if necessary.