Rich,

I think that I have something that does everything I originally wanted!  I 
havent been on line about it cause I have been tweeking somethings and need 
a lightning storm to occur.   THey have been rare lately!!!!

I still need a little more testing.  However,  I let you know what I got...

I worked with GROK to get this going.

We created a service Lightning_first.py that has a few inputs.

     1) a internal variable set to 512 -  this is the modulo of my 
lightning detector. 
     2) Lightning counter - this is directly from the SDR and the acurite 
atlas system.  This number counts the lightning strikes to 512 then resets 
to 0 and keeps counting
     3) lightning distance - this is a estimated distance of the distance 
of lighting from the last report from the SDR.  At present I am trying to 
figure out if this is miles or Kilometers.

with those three items the following is a description of what the service 
does:

     1) create a count of lightning strikes for the day (corrected for the 
modulo effect)
     2) account for false lightning distances (distance of 0 or distance 
with no change to the lightning count)
     3) record the closest lightning strike distance
     4) record the time of the closest lightning strike distance
     5) record the distance of the latest lightning strike
     6) record the time of the latest lightning strike
     7) reset the daily lightning count at midnight

Presently, the testing that i have done has been comparing it to the data 
from the MyAcurite data.  I have the times and the count matching up but 
the last time I was able to check the distances looked different.  so when 
I get another storm I will hopefully confirm everything.

Patrick Sifford


On Wednesday, August 5, 2026 at 9:56:06 AM UTC-4 [email protected] wrote:

> Patrick,
> I'm looking forward to what you come up with. I did some work and you can 
> find it here, 
> https://github.com/bellrichm/WeeWX-Extras/blob/master/bin/user/observationtime.py
> Basically I store the first/last/min/max of an observation for the archive 
> period. A bit more information is here, 
> https://groups.google.com/g/weewx-user/c/oQPj0cuYMZw/m/EJvMn6ggAQAJ
> It is totally an experiment, so it no install and real documentation; but 
> maybe something in it will be useful to you.
> rich
>
> On Wednesday, 5 August 2026 at 08:00:14 UTC-4 Patrick Sifford wrote:
>
>> Tom,
>>
>> Your information was very useful.   I think I have a handle on most 
>> things that I am trying to get through.  What I am trying to do is to have 
>> values for daily lightning strikes, nearest strike (and its time), and 
>> latest strike (and its time) available to send to Hubitat (That is the easy 
>> part for me).
>>
>> One thing that i did not see (may of skipped over it) in the wiki page is 
>> the time period of a accumulator.  It was looking like it was a 
>> loop/archive interval, but i found out that happenned to be my data.  From 
>> reading around it seems that accumulators reset to 0 at midnight.  Once I 
>> got over that I was able (I think... still waiting on a thunderstorm to 
>> check it out) to get a lightning count for the day:
>>
>> lightning_count_start = the min value of strike_count (choose the min 
>> versus first incase acurite atlas resets the value during the day for any 
>> reason)
>> lightning_count_now = the last value of strike_count
>> lightning_count = lightning_count_now - lightning_count_start
>>
>> then put lightning_count into an accumulator for the last.
>>
>> finding the min and last lightning distance is easy also....      What I 
>> can not find any reference on is :
>>
>> Once I have the min lightning distance (or the last)  how do I determine 
>> the time of that strike?
>>
>> Thanks
>> Patrick
>>
>> On Sunday, August 2, 2026 at 12:33:43 PM UTC-4 Patrick Sifford wrote:
>>
>>> Tom  
>>>
>>> Thanks...    I think that will help
>>>
>>> I have seen other structures to the Delta functions...   Ill give this a 
>>> try
>>>
>>>
>>>
>>> On Saturday, August 1, 2026 at 5:45:37 PM UTC-4 Tom Keffer wrote:
>>>
>>>> Accumulators are documented here 
>>>> <https://github.com/weewx/weewx/wiki/Accumulators>.
>>>>
>>>> Unfortunately, there is no documentation for deltas, but they are 
>>>> pretty simple. If you have some extensive quantity, say "tide", and 
>>>> you want to calculate "delta_tide" as the difference in tide between 
>>>> archive records, it would look like this:
>>>>
>>>> [StdWXCalculate]
>>>>   [[Delta]]
>>>>     [[[delta_tide]]]
>>>>       input = tide
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Sat, Aug 1, 2026 at 2:13 PM Patrick Sifford <[email protected]> 
>>>> wrote:
>>>>
>>>>> Is there any where a definitive and correct set of documents that 
>>>>> discuss how to use deltas and accumulators and their formats?
>>>>>
>>>>> I am trying to work on Acurite Atlas Rain and Lightning sensors and 
>>>>> get confused when I read different discussions on the topics.  I think 
>>>>> the 
>>>>> rain is taken care of (somewhere various rain items are calculated 
>>>>> (rainToday, rain24, ... ) that I am able to take advantage of.  However, 
>>>>> I 
>>>>> do not seem to find similar items for Lightning.
>>>>>
>>>>> I have also found multiple solutions which do not seem to be 
>>>>> solutions...   and they all seem to be using different formats of how 
>>>>> deltas and accumulator's work.   
>>>>>
>>>>> Not looking for the solution ...    looking for good reasonable 
>>>>> documentation of how these things work to include extractors...
>>>>>
>>>>> Thanks
>>>>> Patrick
>>>>>
>>>>>
>>>>> -- 
>>>>> 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 visit 
>>>>> https://groups.google.com/d/msgid/weewx-user/de622fde-796f-43ad-b087-5cc28edaf347n%40googlegroups.com
>>>>>  
>>>>> <https://groups.google.com/d/msgid/weewx-user/de622fde-796f-43ad-b087-5cc28edaf347n%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 visit 
https://groups.google.com/d/msgid/weewx-user/a4063050-8d70-4878-9692-28610507273fn%40googlegroups.com.

Reply via email to