The Davis VP2 archive are recorded in the datalogger at the exact archive 
interval. 
So even if for any reason a service bound to NEW_ARCHIVE_RECORD is running a 
little bit later that the time the record was captured by the VP2, the data 
will still be valid, and the "event.record['interval'] " will be the interval 
between the two last recors received from the VP2.

Concerning our context of doing sunshine duration measurements based  on LOOP 
packets, these loop packets may be not always in phase with the archive  at the 
time an archive record is processed by weewx for our service
So for instance, I saw initially  with my archive interval of 5 min and during  
a period of full sunshine, that the sunshine duration derived from loop packets 
during  an "archive" interval"  was a little bit higher that 5 min, or 
sometimes a little bit lower :

2022-06-06 11:30:19  weewx[4501] INFO user.sunduration: Sunshine duration from 
loop packets = 5.016667 min, last radiation = 828.000000, and last threshold = 
639.982068

Given the context of "slow" update of solar radiation of the VP2 compared to 
the LOOP interval, I decided to round up the sunshine duration to full minutes

> Le 10 juin 2022 à 15:52, 'Peter Fletcher' via weewx-user 
> <weewx-user@googlegroups.com> a écrit :
> 
> Thanks to all! Granted that you are most likely to need to know the archive 
> interval in the context of an archive interrupt service, where it is easily 
> available and the returned value is reliable, it would be nice if the actual 
> working value (rather than just the value from weewx.conf) were readily 
> available in other contexts.
> 
> On Friday, June 10, 2022 at 9:04:06 AM UTC-4 jterr...@gmail.com wrote:
> "Using the interval field from the current archive record should always give 
> the correct value.".
> 
> I use it in my extension and it works very well: event.record['interval'] 
> 
> Le vendredi 10 juin 2022 à 05:04:45 UTC+2, gjr80 a écrit :
> Whilst in almost all cases the archive interval used by WeeWX will match the 
> archive_interval config option in weewx.conf [StdArchive] this is not always 
> the case. Installs that use software record generation always use an archive 
> interval that matches the archive_interval config option; however, when using 
> hardware record generation if the archive interval set in the station 
> hardware is different to the archive_interval config option the 
> archive_interval config option is ignored and the station hardware archive 
> interval is used instead. This is most commonly seen with Davis stations used 
> with a default WeeWX install. The Davis station uses an out-of-the-box 30 
> minute archive interval and that value overrides the default WeeWX archive 
> interval of five minutes.
> 
> Using the interval field from the current archive record should always give 
> the correct value.
> 
> Gary
> 
> -- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "weewx-user" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/weewx-user/W0jG1kElJ1k/unsubscribe 
> <https://groups.google.com/d/topic/weewx-user/W0jG1kElJ1k/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to 
> weewx-user+unsubscr...@googlegroups.com 
> <mailto:weewx-user+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/weewx-user/87e7270c-2cbf-4438-a60b-638be2005049n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/weewx-user/87e7270c-2cbf-4438-a60b-638be2005049n%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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/74E37573-89E3-476D-AC38-1BFFAD723E5F%40gmail.com.

Reply via email to