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.

Reply via email to