It is a very good idea to calculate the sunshine duration for each LOOP 
packet and sum these values to make the final archive sunshine duration.  I 
have modified my script accordingly : 
 https://github.com/Jterrettaz/sunduration.
The logic is the following :  for each received LOOP packet, the radiation 
is compared to a calculated threshold. If the radiation is above the 
threshold value, the sunshine time for the LOOP packet is equal to the time 
elapsed between the  previous loop packet and this packet (most of the time 
2 seconds with a Vantage Davis Pro).
The final archive sunshine duration is the sum of all the LOOP value within 
the archive period.
Le vendredi 3 juin 2022 à 21:59:36 UTC+2, Peter Fletcher a écrit :

> That makes some sense when you are getting data from an 'external' sensor, 
> though there are (IMHO) simpler ways of doing it. weewx already has access 
> to the LOOP radiation data from the VP2, so handling the processing and 
> data storage within weewx makes more sense to me in this case.
>
> On Friday, June 3, 2022 at 3:24:23 PM UTC-4 vince wrote:
>
>> On Friday, June 3, 2022 at 11:17:00 AM UTC-7 Meteo Oberwallis wrote:
>>
>>>  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.
>>
>>
>> Personally I'd use an external program called via cron and posting a 
>> message to a MQTT topic.  Have weewx subscribe to that topic to get the 
>> data into your db.
>>
>> This is how I used to get my DS18b20 temperature sensor data into weewx.
>>
>>

-- 
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/50c0897a-0e04-4f6f-b864-1961bbca8124n%40googlegroups.com.

Reply via email to