Webcam - Rain Total off one day

Post Reply
User avatar
MonyMony
Forecaster
Forecaster
Posts: 192
Joined: Sun Aug 20, 2017 12:54 pm
Location: Elkton, Maryland, US
Station model: Davis Pro 2
Software: WeatherCat/Meteobridge
Contact:

Webcam - Rain Total off one day

Post by MonyMony » Tue Feb 13, 2018 4:53 pm

Just happen to notice that when viewing the information in the webcam, the rain total for the day is actually showing the total for the previous day. So for example if I view the images for February 12th, I am seeing the total rain for February 11th.
Screen Shot 2018-02-13 at 11.46.41 AM.png
Screen Shot 2018-02-13 at 11.46.41 AM.png (655.71 KiB) Viewed 6831 times
Screen Shot 2018-02-13 at 11.51.03 AM.png
Screen Shot 2018-02-13 at 11.51.03 AM.png (18.55 KiB) Viewed 6831 times
Minor and not something many users would catch but certainly something that should be addressed when the next plugin update comes around.
Image

User avatar
Jachym
Site Admin
Site Admin
Posts: 1686
Joined: Fri Aug 18, 2017 10:12 pm
Location: Brno, Czech Republic
Station model: WH1080
Software: Meteobridge
Contact:

Re: Webcam - Rain Total off one day

Post by Jachym » Wed Feb 14, 2018 5:12 am

Check your database first, it could be that the rain was copied over to next day

User avatar
MonyMony
Forecaster
Forecaster
Posts: 192
Joined: Sun Aug 20, 2017 12:54 pm
Location: Elkton, Maryland, US
Station model: Davis Pro 2
Software: WeatherCat/Meteobridge
Contact:

Re: Webcam - Rain Total off one day

Post by MonyMony » Wed Feb 14, 2018 1:02 pm

Hi Jachym,

I checked the ALLDATA table and the values for Rain are correct:

Code: Select all

Showing rows 0 -  6 (7 total, Query took 0.0004 seconds.)

SELECT `DateTime`,`R` FROM `alldata` where (DateTime > '2018-02-11 23:40') and (DateTime < '2018-02-12 00:20')

DateTime	R	
2018-02-11 23:45:00	0.88	
2018-02-11 23:50:00	0.88	
2018-02-11 23:55:00	0.88	
2018-02-12 00:00:00	0.00
2018-02-12 00:05:00	0.00	
2018-02-12 00:10:00	0.00	
2018-02-12 00:15:00	0.00	
I then checked the WEBCAM table with the same search criteria and found the problem:

Code: Select all

Showing rows 0 -  3 (4 total, Query took 0.0331 seconds.)

SELECT `DateTime`,`R` FROM `webcam` where (DateTime > '2018-02-11 23:40') and (DateTime < '2018-02-12 00:20')

DateTime	R	
2018-02-11 23:40:02	0.88	
2018-02-11 23:50:01	0.88	
2018-02-12 00:00:02	0.88	
2018-02-12 00:10:02	0.00	
Since I have my webcam settings set to create an entry every 10 minutes, I am not sure how to prevent this. I am going to do this to see if it helps:

CRON JOB
From - */10 * * * *
To - 1,11,21,31,41,51 * * * *

My hope is by avoiding running right at midnight the problem will be avoided, but only time will tell for sure if this will fix the issue.

If there is anything more I can do to help please let me know.
Image

User avatar
Jachym
Site Admin
Site Admin
Posts: 1686
Joined: Fri Aug 18, 2017 10:12 pm
Location: Brno, Czech Republic
Station model: WH1080
Software: Meteobridge
Contact:

Re: Webcam - Rain Total off one day

Post by Jachym » Wed Feb 14, 2018 1:30 pm

Probably not, if there is a delay in the CRON execution then it might copy over the rain to the other day

User avatar
MonyMony
Forecaster
Forecaster
Posts: 192
Joined: Sun Aug 20, 2017 12:54 pm
Location: Elkton, Maryland, US
Station model: Davis Pro 2
Software: WeatherCat/Meteobridge
Contact:

Re: Webcam - Rain Total off one day

Post by MonyMony » Wed Feb 14, 2018 3:52 pm

Jachym wrote: Wed Feb 14, 2018 1:30 pm Probably not, if there is a delay in the CRON execution then it might copy over the rain to the other day
Good point... I will change it to run on the "5's" as it would be rare for the CRON to delay that much.
Image

User avatar
MonyMony
Forecaster
Forecaster
Posts: 192
Joined: Sun Aug 20, 2017 12:54 pm
Location: Elkton, Maryland, US
Station model: Davis Pro 2
Software: WeatherCat/Meteobridge
Contact:

Re: Webcam - Rain Total off one day

Post by MonyMony » Thu Feb 15, 2018 6:05 pm

First test with CRON set to 5,15,25,35,45,55 * * * * was a success. While it might not always be 100%, this setting should cover all but the crazy-odd situation and even then this is really a cosmetic display issue anyway. Thanks as always Jachym for the hints/suggestions.

Code: Select all

 Showing rows 0 -  3 (4 total, Query took 0.0004 seconds.)

SELECT `DateTime`,`R` FROM `webcam` where (DateTime > '2018-02-14 23:40') and (DateTime < '2018-02-15 00:20')


DateTime	R	

2018-02-14 23:45:01	0.02	
2018-02-14 23:55:02	0.03	
2018-02-15 00:05:01	0.00	
2018-02-15 00:15:01	0.00	
Image

Post Reply