On Tuesday, 9 February 2021 at 10:23:40 UTC+1 gjr80 wrote:

> To clarify, the archive interval coming from the driver or weewx.conf is 
> quite acceptable.
>
> If a driver has the ability to emit archive records then it MAY also 
> control the archive period (by the same token it may not). Consequently, if 
> you are using driver emitted archive records (ie hardware record 
> generation) WeeWX will look to the driver for the archive interval during 
> startup. If the driver provides the archive interval then WeeWX will use 
> that instead of the weewx.conf archive_interval setting. If the driver does 
> not provide the archive interval WeeWX will fallback to the weewx.conf 
> value. 


Hm, OK, interesting. That's not how I read the documentation. I interpreted 
it to say that if you implement genArchiveRecords() you should (interpreted 
as 'must') provide the archive_interval. You seem to imply that that is not 
necessarily the correct interpretation. I will investigate this.

>
> Irrespective of the archive interval, what happens at the end of an 
> archive interval depends on whether hardware or software record generation 
> is being used. If hardware record generation is being used then WeeWX will 
> ask the driver for for all archive records since the last. If one or more 
> archive records are provided WeeWX accepts and uses them, if the driver 
> cannot provide archive records (for example it has no genArchiveRecords() 
> method) then WeeWX falls back to software record generation. If software 
> record generation is selected then at the end of the archive interval WeeWX 
> (not the driver) generates an archive records based on accumulated loop 
> data seen by WeeWX over the archive interval. After this processing by 
> WeeWX for  both hardware and software record generation is essentially the 
> same.
>

Interesting, thanks for the info. 
 

> One other point. I notice some mention of the daily summaries 
> (archive_day_xxxxxx). I would be very careful dealing with the daily 
> summaries. I am not sure a driver should be delving into the daily 
> summaries. The driver should really have no need to read the daily 
> summaries and it certainly should not be writing to them. The driver should 
> just emit archive records (be it current or historical) and loop packets 
> and let the rest of the WeeWX machinery take care of dealing with (day 
> based) aggregates in the daily summaries. 
>

Agreed! I was not planning on anything to this, personally :)

Cheers,
Jan-Jaap

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-development" 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-development/fbeb738f-d0da-4ee0-9723-412126eea55dn%40googlegroups.com.

Reply via email to