I think, if I understand the original post, I see a similar problem.
The rainfall for January looks ok. 6.4mm for the month so far.
BUT the annual figure shows 0.0mm, so is not being updated for the current month.
Is that as designed, or a bug?
============================================= @ALL
PLEASE add a link to your website in every post.
In this case I had to go back in 6 posts to find South Somerset, UK Home Weather Station (ecoLcl version)
Go to your forum-profile and either add a link to your avatar so that there is a small globe on the left of your posts.
Or add a signature line below your post with the link.
If you do not want those links to your site, add it when you post a problem.
Please leave the history as it is for now. Do not manually update it tomorrow.
Today there is rain and the value should be added at midnight.
I will check tomorrow-morning.
I checked all values against yesterdays copy of the history file.
All roll-over works OK, except rain.
Looks like the todays-rain-value is set to zero before the midnight-runs.
I attach a test-version of the station-cron
Lets hope it will rain today.
I will check tomorrow again.
Could it be the clock in the console that is an hour ahead, so the day’s rain is reset an hour early?
A long time ago I had the “opposite” problem.
The console clock was one hour later, so the day’s rain was reset one hour after midnight, so it was counted the next day.
There is indeed a one hour time off-set between the station and WU, which is now proven.
Check the attached screenshot of rain-pop-up for yesterday.
At 23:00 the total daily rain drops to zero.
The updated cron from my previous post is already taking care of this situation as the only script to reset the daily rain is now the cron-job.
Lets see if it works tonight.
But you have to set the console time correct, the daily rain graphs at your WU dashboard show the same error also.
Hi Wim,
Made a backup copy of the original livedata.php file. Put the new version in place of the original and hey presto! Annual rainfall figure is now present.
Hi Wim,
I’ve looked at my site this morning.
We’ve had 12.5mm so far today but that’s not added into the annual figure.
Is that only done at end of day?
KRs
Laurie.
Yes, we now use the yearly history and that is recalculated end-of-day.
But it does not look nice the first month / days. I adapted the script for that.
I also have a problem with my rain data in the history popup.
The total rainfall for January shows 10.8mm whereas the the graph from the rainfall frame shows 21.9mm, when totalled up.
My WU - IHAMPSHI95 - also shows 21.85mm for January. The history 2021 and and All Time rainfall totals look strange too.
My site has been running for 2 days.
The total rain in the history is the rain from all daily rain measured since your station started and were running the station-cron.
You can update the historical raindata using pwsWD/PWS_hist_update.php?pw=12345
Replace 12345 with your easyweather-settings password.
The graphs have all the data since you started uploading to WeatherUnderground.
Those are two distinct sets of data. The graphs data sometimes contains uploading errors and is used only for the grpahs.
The history 2021 and and All Time rainfall totals look strange too.
Those are very strange values.
Use the PWS_hist_update.php script to reset those values and see what happens.
Sorry for the delay.
I’ve corrected the weather station time zone - it does not have a clock as such. I’ve also updated PWS_cron_stationcron.php.
Yesterday the rainfall for January was 16.76 mm. We’ve had more rain today (Monday) and so will chekc tomorrow.
All good now. thanks Wim
Richard
Hi Wim,
There appears to be a discrepancy of 0.2mm between the annual figure and Jan figure plus today’s rain.
Is that to be expected due to rounding up or down to one decimal place?
That’s the first thing i’ve spotted that looks a bit odd.
Laurie.
Yes, as there is no yearly rain in the data, the calculated history is used for the year.
Data is in inches, history is in UK => mm
Only in January you can see sometimes a rounding error as that is the same period but calculated in different ways.
Hi Wim,
I’ve found the ‘missing’ rainfall!
I was watching my site on the run up to midnight last night. A few minutes prior to midnight, presumably when the cron job ran at 23:55, the ‘rainfall yesterday’ figure got updated with the current rainfall amount which was 3.3mm.
BUT it was raining and in the next 5mins the daily rainfall total went up to 4.1mm.
The 4.1mm figure got added onto January’s total but the 3.3mm got added onto the annual figure.
So now the two figures, which were 0.2mm different, are 1.0mm different.
What is the logic in the cron job that tests for end of day?
If I set my cron to run at 23:54 then again at 23:59 which of those times will the end of day processing run?
I’ve now had a look in the cron file. If I change the $no_data_after value to 2359 and make sure my job runs at 23:59 would that cure the problem?
Hope that makes sense. If not, let me know and I’ll try to explain better.
Thanks as always,
Laurie.
There is no data processed between 23:55 and 00:05, all incoming data is sent to bit-heaven in that time-frame.
Yes one will loose a rain-tick rain some days of the year. Even a high-low value could be 0.3 degrees off.
But the garbage which occurs with data just before or just after midnight needs to be kept out.
For the dashboard there is only one 5-minute cron needed.
That will do all the work including roll-over to the next day/month/year, one time per day, between 23:55 - 01:00
As some cron-providers or weather-stations are very busy with all those end-of-day+month+year jobs there is no fixed time.