I had a rain event on Monday that saw 0.66" fall on my station.  All of the 
consoles that receive direct from the sensor (433mhz) recorded the same 
0.66".

My weewx install uses MQTTSubscribe for all of my observations, via 
rtl_433's mqtt output. It recorded 0.48" in total. 

My sensor is a cumulative output, so the mqtt topic would read something 
like this
rtl_433/pi4b8/devices/Acurite-5n1/A/3030/rain_mm 510.28601
rtl_433/pi4b8/devices/Acurite-5n1/A/3030/rain_mm 511.5
rtl_433/pi4b8/devices/Acurite-5n1/A/3030/rain_mm 516.2

The rain observation is set this way:
    [[topics]]
        [[[rtl_433/pi4b8/devices/Acurite-5n1/A/3030/rain_mm]]]
            name = rain
            contains_total = true

I dumped out the timeframe of the rain event from my weewx.sdb, and looked 
at where the missing data might've been:
echo "select datetime(dateTime, 'unixepoch', 'localtime'), rain from 
archive where datetime(dateTime,'unixepoch','localtime') > "2025-03-10 
09:00:00" limit 120;" | sqlite3 weewx.sdb
...
2025-03-10 09:49:00|
2025-03-10 09:50:00|0.0199988188976378
2025-03-10 09:51:00|
2025-03-10 09:52:00|0.0199996062992129
2025-03-10 09:53:00|0.0499996062992106
2025-03-10 09:54:00|0.0599996062992136
2025-03-10 09:55:00|0.0300007874015751
2025-03-10 09:56:00|0.0499984251968492
2025-03-10 09:57:00|0.0400007874015758
2025-03-10 09:58:00|
2025-03-10 09:59:00|0.0100000000000008
2025-03-10 10:00:00|0.0
2025-03-10 10:01:00|0.0
2025-03-10 10:02:00|0.00999999999999852
2025-03-10 10:03:00|
2025-03-10 10:04:00|0.0
...

I've pieced together the 15 missing data points to get that day's total 
rainfall to balance with the other consoles. 

So with a csv file that looks like this:
Time,Rain
3/10/2025 09:14:00,0.00999881889763705
3/10/2025 09:19:00,0.0100000000000008
3/10/2025 09:24:00,0.0100000000000008
3/10/2025 09:31:00,0.0
3/10/2025 09:38:00,0.0100000000000008
3/10/2025 09:42:00,0.0199984251968514
3/10/2025 09:49:00,0.04
3/10/2025 09:51:00,0.0200000000000016
3/10/2025 10:03:00,0.0
3/10/2025 10:06:00,0.0200000000000015
3/10/2025 10:09:00,0.0
3/10/2025 10:12:00,0.0
3/10/2025 10:17:00,0.0
3/10/2025 10:18:00,0.00999999999999852
3/10/2025 10:19:00,0.0

I'm not confident that my csv.conf import file is correctly configured. 
Here's what I've got:
source = CSV

[CSV]
    file = /var/lib/weewx/rain.csv
    delimiter = ','
    decimal = '.'
    interval = conf
    qc = True
    calc_missing = True
    ignore_invalid_data = True
    tranche = 250
    raw_datetime_format = %m/%d/%Y %H:%M:%S
    wind_direction = -360,360

    #   is_cumulative            - Config option specifying whether the CSV
    #                              field being mapped is cumulative,
    #                              e.g: dayrain. Optional, default value is
    #                              False.
    [[FieldMap]]
        [[[dateTime]]]
            source_field = Time
            unit = unix_epoch
        [[[rain]]]
           source_field = Rain
           unit = mm
           is_cumulative = False

I'm unsure of the interval = conf setting. My weewx.conf uses a 60-second 
archive_interval, and the missing data points are what would've been 
recorded in those missing periods... Or should it be interval = x (in my 
case, 1 minute)?

For [[FieldMap]] > [[[rain]]] > is_cumulative, I'm unsure what it should 
be, and subsequently what my csv data should be. My data points are the 
values of what fell in those minute intervals, the current.[running total] 
at each of those periods. is is_cumulative expecting data that is a running 
total (510.2,511.5,516.2), or just the delta (1.3,0.7,etc)?

-- 
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 visit 
https://groups.google.com/d/msgid/weewx-user/94a34d3c-3552-458f-8302-8454125732f1n%40googlegroups.com.

Reply via email to