Below the log results of the meteotemplate upload log messages

Notes: 
1. Both vantage driver and meteostick driver upload loop values to 
(different versions of) meteotemplate.
2. Both drivers get their values from the same Vantage Pro 2 weather 
station.
3. The clock of the Vantage Pro 2 console is behind the clock of the 
raspberry pi system. (differences typically at startup of weewx between -1 
to -5 seconds)
4. vantage driver archive_delay=8 seconds; sends full loop packets; ie each 
loop packet contain dayRain value
5. meteostick driver: archive_delay=12 seconds; sends partial loop packets; 
many loop packets contain a dayRain value 
6. dayRain values are sent to meteotemplate as R values.

Vantage driver:
23:59:58    R=6.4
00:00:00    R=6.4
00:00:06    R=6.4
00:00:07    R=0.0
...
New rain value in the morning:
01:18:25    R=0.2

Meteostick driver:
23:59:57    R=6.4
00:00:13    R=0.0
...
New rain value in the morning:
01:20:14    R=0.2

Observations and conclusions:

Vantage driver:
The Vantage driver sent after midnight two loop messages with the total 
rain value of the previous day.
The dayRain values are retrieved from the Vantage console loop messages 
(=hardware).
The last received value of 6.4 at 00:00:06 could be explained by a clock 
difference of 3.5 seconds plus the loop interval of 2.5 seconds (is 6.0 
seconds).
Explanation: due to a clock difference of about 6 seconds, the Vantage 
console would have reset the dayRain value at 00:00:06 (server time)
(Not sure if the interval time of 2.5 seconds between loop messages played 
a (negative) role here. If so the clock difference may be as low as 3.5 
seconds.)

Round 01:18:00 this morning it started raining again.
The vantage driver sends this first value of R=0.2 at 01:18:25. Note this 
time stamp is not related to archive calculations which were on 01:15:08 
and 01:20:08

Meteostick driver:
The first loop message after midnight contain the reset dayRain value of 
0.0.
The dayRain values are calculated by weewx because the driver has no 
dayRain values (=software).
The dayRain value is as it should be (OK).

Round 01:18:00 this morning it started raining again.
The meteostick driver kept sending R=0.0 each 2-3 seconds until 01:20:14 
when the first value of R=0.2 was received.
The archive calculation started at 01:20:12, so the dayRain calculation in 
weewx is using the values in the archive.

My conclusions:

The use of the Vantage dayRain loop values is tricky and should not be done.
The reset of dayRaion to 0.0 at midnight can have time stamps before 
midnight when the Vantage console clock is fast and will have time stamps 
after midnight when the Vantage console clock is slow.
The situation could be improved somewhat when the Vantage clock difference 
is measured and/or corrected short before midnight (eg. at 23:59:55), but 
still changing dayRain values and/or time stamps is tricky.

The dayRain values calculated by weewx seems a better solution, especially 
round midnight.
The disadvantage is a delay between a change of the rain bucket counter and 
the first registration in weewx which can be upto 5 minutes with an archive 
interval of 5 minutes.
This could be improved by caching the rain bucket counter values (or rain 
values per loop) between archive periods and adding these values to the 
last archive record as Gary pointed out.

Luc

On Tuesday, 30 May 2017 12:59:26 UTC-3, Luc Heijst wrote:
>
> Hi Andrew,
>
> I have no data right now; I will implement logging of the upload data.
>
> It would be something like:
> 2017-05:29 23:59:58 R=2.8 mm
> 2017-05-30 00:00:02 R=2.8 mm
>
> Don't know at what time R is reset to 0.0 mm. I was looking once to live 
> data and had the impression it was reset within a few seconds after 
> midnight.
> I will report the logging tomorrow.
>
> Luc
>
> On Tuesday, 30 May 2017 12:36:03 UTC-3, Andrew Milner wrote:
>>
>> what time was the previous timestamp?
>>
>>
>> On Tuesday, 30 May 2017 17:44:15 UTC+3, Luc Heijst wrote:
>>
>>> Any of you have an answer about the dayRain calculation? Tom, Gary?
>>>
>>> On Sunday, 28 May 2017 08:30:54 UTC-3, Luc Heijst wrote:
>>>>
>>>> Sorry, I meant to say: 
>>>> The *uploader *can send either archive data or loop data.
>>>>
>>>> On Sunday, 28 May 2017 08:28:54 UTC-3, Luc Heijst wrote:
>>>>>
>>>>> The meteotemplate uploader use value 'dayRain' to populate 
>>>>> meteotemplates 'R' value.
>>>>> The template can send either archive data or loop data.
>>>>>
>>>>> When loop data is selected the 'dayRain' value is not reset to 0.0 at 
>>>>> the exact start of a new day but shortly after.
>>>>> For my Davis Vantage Pro station I got recently in Meteotemplate a 
>>>>> registration of 29.0 mm rain with time stamp 00:00:02.
>>>>> The result was a meteotemplate database value of 29.0 mm rain for the 
>>>>> first archive period that day
>>>>>
>>>>> Is there a solution for this in weewx?
>>>>>
>>>>> Luc
>>>>>
>>>>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to