My apparently ignoring the situations you highlight was a decision, rather than an omission! I run weewx on my 'workhorse' Pi, which is (at least by intention) up 24/7/365. I do reboot it occasionally after updates, but otherwise there should be no interruptions. The way I do the calculations for the archive values automatically corrects for 'short' archive intervals, and I would handle longer interruptions (if there were any) by running my update code on the database after the interruption.
On Saturday, July 16, 2022 at 11:34:07 AM UTC-4 [email protected] wrote: > Peter, > > Don't forget the fact that if for any reason Weewx is stopped, it will, > during restart, read from the datalogger memory any "missed" archive > packets that were not captured during the interruption period. In that > case, no loop data are available for these archive records, and you have to > add code in your newArchiveRecord() function to calculate, over the > archive interval, the sunshine duration on the basis of the archive > radiation value. Otherwise, the sunshine duration of these imported records > will be always 0! > > Even if Weewx interruption is short enough so that there is no missed > records to import from the datalogger memory, the LOOP packets received > after startup will not cover the full period of the first archive record > captured , and sunshine duration calculated from the LOOP data will be > underestimated. In my code, I detect also this situation and the sunshine > duration of the first captured archive record will be also calculated from > the archive radiation value over the archive interval. > > > Le 16 juil. 2022 à 17:01, 'Peter Fletcher' via weewx-user < > [email protected]> a écrit : > > The code I am using is pasted below. The main threshold calculation is a > copy of the original Meto-France code used by Jacques, but the calculation > is only done when the radiation value changes or (approximately) every > minute, if it has not changed. Also included is code to store Davis’s > ‘Storm Rain’ value in the archive database. The stored value for sunshine > time has more apparent precision than is given by Jacques's code, but it is > probably neither more nor less accurate, since its accuracy is limited by > the relatively slow 'response' of the Davis sensor. > > -- > 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/19ylVTRqbh4/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > > To view this discussion on the web visit > https://groups.google.com/d/msgid/weewx-user/e11727db-7c89-4334-b24c-a5b2f7ca66dbn%40googlegroups.com > > <https://groups.google.com/d/msgid/weewx-user/e11727db-7c89-4334-b24c-a5b2f7ca66dbn%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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/44c4e18c-4e64-4238-8ab9-35a46184bd73n%40googlegroups.com.
