Hello,
I tried to implement a driver providing the rainfall in intervall but until 
now it does not work as expected.

I'am able to handle the correct data to WeeWx with this command:
                        syslog.syslog(syslog.LOG_DEBUG, "WeatherDuino: " + 
str(names[n+1]) + ": " + str(deltarain))
                        event.record[str(names[n+1])] = float(deltarain)
The debug log output says:

> Mar  3 11:56:16 WeatherDuinoPi weewx[1366]: WeatherDuino: Rain_RG11: 
> 0.17716535433
>

But in the database there is a "0" logged.

If i change the code hardcoding the rain intervall to 10 it works fine.
                        syslog.syslog(syslog.LOG_DEBUG, "WeatherDuino: " + 
str(names[n+1]) + ": " + str(10))
                        event.record[str(names[n+1])] = 10

So I think my driver is executed more often then my one minute logging 
intervall and so the value of the event.record is overwritten with a zero 
again - because the driver thinks the value is already in the WeeWx 
database.

You can find my code here:
https://github.com/menachers/WeatherDuino/tree/master/WeeWx_Plugin

It is embedded in the weewx.conf:
#   This section configures the internal weewx engine.

[Engine]
    
    [[Services]]
        # This section specifies the services that should be run. They are
        # grouped by type, and the order of services within each group
        # determines the order in which the services will be run.
        prep_services = weewx.engine.StdTimeSynch
        data_services = user.WeeWx_WeatherDuino_Logger_plugin.WeeWxService,
        process_services = weewx.engine.StdConvert, weewx.engine.
StdCalibrate, weewx.engine.StdQC, weewx.wxservices.StdWXCalculate
        archive_services = weewx.engine.StdArchive
        restful_services = weewx.restx.StdStationRegistry, weewx.restx.
StdWunderground, weewx.restx.StdPWSweather, weewx.restx.StdCWOP, weewx.restx
.StdWOW, weewx.restx.StdAWEKAS
        report_services = weewx.engine.StdPrint, weewx.engine.StdReport

Regards,
engolling


Am Samstag, 23. Februar 2019 14:10:36 UTC+1 schrieb Andrew Milner:
>
> weewx requires rain during archive interval for storing in the database 
> archive records.  A driver may have to convert whatever it receives (eg 
> running total) so as to obtain the value for the interval.  Daily is 
> accumulated by weewx from the archive interval values and weekly and 
> monthly are derived form the daily totals.  This is possibly an over 
> simplification - but should give the idea.
>
> so if the second source gives a value for rainfall in interval it should 
> be enough for weewx to derive the remainder.
>
>
>
> On Saturday, 23 February 2019 12:30:38 UTC+2, engolling wrote:
>>
>> Hello community,
>>
>> I would like to add an additional rain gauge as additional source 
>> described in the customization guide.
>> Can you give me any hints how to do this the easiest way, to get the 
>> daily, weekly and monthly percipation. 
>> Can I use any modules or calculations that are already done inside the 
>> system or is this normally done by the corresponding driver, so I have to 
>> handle all the signals precalculated.
>>
>> I hope you understand what I mean.
>>
>> Best Regards,
>> engolling
>>
>

-- 
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 weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to