Hello folks. I don't know if you understood me properly. With the help of the solar sensor of the Davis, the possibility of sunshine can be determined via script and the coordinates. That works fine so far. But what I would like to do is, if the interval of Weewx and the data logger is set to 10 minutes, I would have liked to read the value of the solar sensor every minute and then write it into a separate .sdb database as possible sunshine. With this you can prevent that you can not measure the sunshine in the interval of 10 minutes, but every minute. That would be my goal. Since the data logger of the Davis is full within 8 days with an interval of 5 minutes, an increase to a 10-minute storage interval could increase it to a whopping 16 days. But if I set the interval to 10 minutes, then the possible sunshine is only recorded every 10 minutes. Not everything in between. If the solar value is then high enough at the measuring point, the full 10 minutes are registered as sunshine. With a minute interval, this could be obtained even more precisely
Thank you for your feedback Peter Fletcher schrieb am Donnerstag, 2. Juni 2022 um 23:54:11 UTC+2: > Well, sort of! I had been wanting to look at sunshine hours for a while, > but it is decidedly non-trivial unless you actually have a sensor that can > tell when the sun is out (they exist, and use the fact that the sun casts > shadows when it is out, but they are very expensive). The approach used by > the OP looks promising as a good approximation if you only have the > standard VP 2 sensors. What I am doing with it is averaging the LOOP > radiation readings over 30 seconds (15 LOOP packets), running the average > through the algorithm he uses to get a binary indication of the sun being > out during that period, and adding 30 (seconds) to a local variable for > 'sun' and 0 for 'no sun'. The archive interval process simply stores the > contents of the local variable in the appropriate archive record and then > clears the local variable. I still have to work on summarizing and > displaying the data. > > On Thursday, June 2, 2022 at 11:57:13 AM UTC-4 [email protected] wrote: > >> That would make sense. >> >> I've had this same problem with pulse counters. Assuming that the sensor >> returns 0 or 1, one resolution is to use an accumulator that extracts the >> sum of values (rather than the default average). Then at the end of the >> archive interval, multiply the sum by the loop interval. The result will be >> the amount of time the sensor returned 1 during the archive interval, which >> should be the amount of time the sun was out. >> >> >> >> On Thu, Jun 2, 2022 at 6:27 AM 'Peter Fletcher' via weewx-user < >> [email protected]> wrote: >> >>> I think that this is a sensor issue. If the sensor returns only a binary >>> (sun/no sun) value, which appears to be the case for this computed >>> 'sensor', then sampling it every 10 minutes will give results with a >>> granularity of 10 minutes, as the OP describes; if the sensor returns the >>> minutes (or seconds) of sunshine within the archive interval (similarly to >>> the way the Vantage Rain sensor works), then it doesn't matter (within >>> reason) how frequently or infrequently you sample it - the total will be >>> valid. For a Davis setup and this sort of computed 'sensor', the 'sensor' >>> will probably need to be sampled for each LOOP packet and the results >>> accumulated internally and the totals saved in each archive record. >>> >>> On Wednesday, June 1, 2022 at 9:50:47 AM UTC-4 [email protected] wrote: >>> >>>> My apologies, but I don't fully understand the problem. If the type you >>>> are trying to record is literally the amount of time the sun was out >>>> during >>>> the archive interval, then, in your example, why would no sunshine be >>>> recorded for the full 10 minutes? Wouldn't it be something less, but >>>> greater than zero. Say 8 minutes of sunshine? >>>> >>>> What, exactly, is the type that you are trying to put in the database? >>>> There is no type 'sunshine' within WeeWX. >>>> >>>> >>>> >>>> On Wed, Jun 1, 2022 at 5:33 AM Meteo Oberwallis <[email protected]> >>>> wrote: >>>> >>>>> Hello, everyone. >>>>> I have a question. Would it be possible to create a separate database >>>>> for sunshine time? The reason is actually that if the recording interval >>>>> is >>>>> set to 10 minutes, the hours of sunshine are then only recorded at >>>>> intervals of 10 minutes. More precisely, if the solar value is too low in >>>>> minute 10 or 20 etc., but the value was higher during 8 minutes, then it >>>>> automatically takes the whole 10 minutes as no sunshine. But if you query >>>>> the solar value every minute via weewx and compare it with the "Sunshine >>>>> Time", you would have a much better record. If there was a separate sql >>>>> for >>>>> the sunshine time, like e.g. the air quality sensor. In order to make the >>>>> whole thing even gentler, one could solve it in such a way that the >>>>> "automation" only becomes active as soon as the solar sensor delivers a >>>>> value. Is there any of that already? The graphics etc. can then be >>>>> uploaded >>>>> normally every 5 or 10 minutes. But I would just like to have my own .sql >>>>> for the hours of sunshine, which reads the value every minute. The script >>>>> " >>>>> https://github.com/Jterrettaz/sunduration" already exists. >>>>> >>>>> Thank you for your feedback >>>>> >>>>> -- >>>>> 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/8ba76e85-40d0-4e20-84ea-a33b38120e3bn%40googlegroups.com >>>>> >>>>> <https://groups.google.com/d/msgid/weewx-user/8ba76e85-40d0-4e20-84ea-a33b38120e3bn%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/81f1fd56-ea21-4d69-9e9e-f76368201026n%40googlegroups.com >>> >>> <https://groups.google.com/d/msgid/weewx-user/81f1fd56-ea21-4d69-9e9e-f76368201026n%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/a6c2bcda-4f69-44fd-8a63-8e75abe75677n%40googlegroups.com.
