Hello Tom and thank you for your response.
[StdWXCalculate]
[[Calculations]]
...
[[Delta]]
[[[rain]]]
input = dayRain
This will calculate the rain difference between two records in weewx sql
based on the principle that the counter is reset to zero at midnight ->
PERFECT FOR THE RAIN 24H !
Small additional question: if we wish to constantly calculate the
difference between two records values of a meter which *never* resets to
zero (such as an electricity or water meter), how should we proceed?
THANKS
Le jeudi 18 janvier 2024 à 14:05:10 UTC+1, Tom Keffer a écrit :
> Unfortunately (for you), WeeWX mostly uses observation type "rain", the
> amount of rain that fell since the last loop packet (what you are calling
> "instantaneous rain").
>
> You should assign the rain since midnight to type "dayRain".
>
> Then calculate "rain" as the difference between successive
> "dayRain" values. While this is a pretty simple calculation, there is an
> xtype that can do it for you. See class Delta in weewx.wxxtypes
> <https://github.com/weewx/weewx/blob/master/src/weewx/wxxtypes.py#L586>.
> To use it, add this to weewx.conf:
>
> [StdWXCalculate]
> [[Calculations]]
> ...
> [[Delta]]
> [[[rain]]]
> input = dayRain
>
>
>
>
> On Wed, Jan 17, 2024 at 11:47 PM Remy Lavabre <[email protected]> wrote:
>
>> Good morning,
>>
>> I created a [driver] for weewx to retrieve data from the Awekas API (my
>> Bresser weather station does not have a USB port).
>>
>> This works but regarding the rain, it is not the instantaneous rain (from
>> a packetloop) that we recover but the rain over 24 hours since midnight.
>> Is there a "simple" way to tell WeeWX that the packetsloop rain data
>> corresponds to the cumulative rain since midnight and not the rain that
>> fell during the data retrieval interval (the time gap between two
>> packetsloops) ?
>>
>> Thank you so much...
>>
>> --
>> 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].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/weewx-user/9887101f-fcc1-45ce-948e-e03429bf7baan%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/weewx-user/9887101f-fcc1-45ce-948e-e03429bf7baan%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/502b5332-d7a0-4585-ad1a-98bc8167ab7cn%40googlegroups.com.