How rain works is in the documentation. Be sure to read the section *Porting
to new hardware <http://weewx.com/docs/customizing.htm#porting>* in the
Customizing Guide.

Regarding the last paragraph in your note: if I understand you correctly,
don't worry about emitting archive records. Just emit a LOOP packet (or
file) every few seconds (sounds like 10 seconds in your case). Let WeeWX
compile them into archive records. Or, perhaps I don't understand what
you're doing.

-tk

On Mon, Sep 17, 2018 at 7:15 AM Jonis Maurin Ceará <[email protected]>
wrote:

> That's why I'm asking about calculation, because i just don't know how
> weewx works (until your answer).
>
> I'm using FileParser driver with pool interval of 10 seconds. My "script"
> grooveweather also generate this text file every 10 seconds and rain
> information is cummulative from the entire day (I'm guessing, looking for
> the code). You said that weewx doesn't use rain value for 60
> minutes......but using this data (rain in the last 60 minuts, from my
> driver) in rainRate looks right on report page (again, I'm not sure because
> I can't test/measure).
>
> My archive time is set to 300 seconds (5 minutes). Since my 'driver'
> generates report every 10 second's, I can't see how I would out rain for
> the last 5 minutes and then reset this data. The problem is not coding, but
> the syncronization between '5 minutes' from weewx archive and '5 minutes'
> in driver code :(
>
>
>
> Em segunda-feira, 17 de setembro de 2018 09:26:24 UTC-3, Jonis Maurin
> Ceará escreveu:
>>
>> Hi.
>> Is possible to automatically calculate rain total?!
>>
>> I'm using generic cheap instruments (sold on ebay) with GrooveWeather Pi
>> ( https://github.com/switchdoclabs/SDL_Pi_GroveWeatherPi ).
>> I'm writing values to text file and reading in weewx using file driver
>> (customized).
>>
>> Rain rate looks working fine:
>> f.write('rainRate=' + str((rain60Minutes/25.4)) + '\n')
>>
>> The value looks correct (about 1.2mm/hour for now). But "Rain today" is
>> always 0.
>> If I populate 'rain' field with total rain (calculated by
>> GrooveWeatherPi), it's a bigger value.
>>
>> Weewx page:
>> Rain Rate 0.2 mm/hr
>> Rain Today 8.0 mm
>>
>> Data (written by grooveweathersensor):
>> rainRate=0.011
>> rain=0.0165
>>
>>
>> This doesn't look right :/
>> Weewx unit are set to US
>>
>> More config:
>> [[StandardReport]]
>>         # See the customizing guide to change the units, plot types and
>> line
>>         # colors, modify the fonts, display additional sensor data, and
>> other
>>         # customizations. Many of those changes can be made here by
>> overriding
>>         # parameters, or by modifying templates within the skin itself.
>>
>>         # The StandardReport uses the 'Standard' skin, which contains the
>>         # images, templates and plots for the report.
>>         skin = Seasons
>>         [[[Units]]]
>>             [[[[Groups]]]]
>>                 group_altitude = meter
>>                 group_speed2 = meter_per_second2
>>                 group_pressure = mbar
>>                 group_rain = mm
>>                 group_rainrate = mm_per_hour
>>                 group_temperature = degree_C
>>                 group_degree_day = degree_C_day
>>                 group_speed = meter_per_second
>>
>>
>>
>> [StdWXCalculate]
>>
>>     [[Calculations]]
>>         # Derived quantities are calculated by this service. Possible
>> values are:
>>         #  hardware        - use the value provided by hardware
>>         #  software        - use the value calculated by weewx
>>         #  prefer_hardware - use value provide by hardware if available,
>>         #                      otherwise use value calculated by weewx
>>
>>         pressure = prefer_hardware
>>         barometer = prefer_hardware
>>         altimeter = prefer_hardware
>>         windchill = prefer_hardware
>>         heatindex = prefer_hardware
>>         dewpoint = prefer_hardware
>>         inDewpoint = prefer_hardware
>>         rainRate = prefer_hardware
>>
>>
>> --
> 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.
>

-- 
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