Yes I added accumulator set at end of weewx.conf  and still get the same 
result , lightning_distance = 12 for all recorded intervals

Here is my output running weewxd directly, I see three lines which show 
lightning_distance to be None, which is expected from corrections, but the 
following three lines show lightning_distance to be 11.999...  It appears 
the correction " lightning_distance = lightning_distance if 
lightning_strike_count > 0 else None" is working but being ignored in final 
output to graph and database.  Any additional thoughts?

LOOP:   2021-08-09 18:30:01 EDT (1628548201) dateTime: 1628548201.9, 
lightning_distance: None, lightning_strike_count: 0.0, maxSolarRad: None, 
rainRate: 0.16, usUnits: 1
LOOP:   2021-08-09 18:30:01 EDT (1628548201) dateTime: 1628548201.91, 
lightning_distance: None, lightning_strike_count: 0.0, maxSolarRad: None, 
rainRate: 0.16, usUnits: 1
LOOP:   2021-08-09 18:30:01 EDT (1628548201) dateTime: 1628548201.92, 
lightning_distance: None, lightning_strike_count: 0.0, maxSolarRad: None, 
rainRate: 0.16, usUnits: 1
LOOP:   2021-08-09 18:30:01 EDT (1628548201) dateTime: 1628548201.91, 
lightning_distance: 11.9999999954, maxSolarRad: None, rainRate: 0.16, 
usUnits: 1
LOOP:   2021-08-09 18:30:01 EDT (1628548201) dateTime: 1628548201.92, 
lightning_distance: 11.9999999954, maxSolarRad: None, rainRate: 0.16, 
usUnits: 1
LOOP:   2021-08-09 18:30:01 EDT (1628548201) dateTime: 1628548201.93, 
lightning_distance: 11.9999999954, maxSolarRad: None, rainRate: 0.16, 
usUnits: 1
LOOP:   2021-08-09 18:30:02 EDT (1628548202) barometer: 30.2076711831, 
dateTime: 1628548202.7, maxSolarRad: None, rainRate: 0.16, usUnits: 1
LOOP:   2021-08-09 18:30:09 EDT (1628548209) dateTime: 1628548209.76, 
maxSolarRad: None, outTemp: 82.800014, rainRate: 0.16, usUnits: 1
LOOP:   2021-08-09 18:30:09 EDT (1628548209) dateTime: 1628548209.78, 
maxSolarRad: None, outTemp: 82.800014, rainRate: 0.16, usUnits: 1
LOOP:   2021-08-09 18:30:09 EDT (1628548209) dateTime: 1628548209.78, 
maxSolarRad: None, outTemp: 82.800014, rainRate: 0.16, usUnits: 1
LOOP:   2021-08-09 18:30:09 EDT (1628548209) dateTime: 1628548209.76, 
maxSolarRad: None, outHumidity: 59.0, rainRate: 0.16, usUnits: 1
LOOP:   2021-08-09 18:30:09 EDT (1628548209) dateTime: 1628548209.78, 
maxSolarRad: None, outHumidity: 59.0, rainRate: 0.16, usUnits: 1
LOOP:   2021-08-09 18:30:09 EDT (1628548209) dateTime: 1628548209.79, 
maxSolarRad: None, outHumidity: 59.0, rainRate: 0.16, usUnits: 1
LOOP:   2021-08-09 18:30:09 EDT (1628548209) dateTime: 1628548209.77, 
lightning_distance: None, lightning_strike_count: 0.0, maxSolarRad: None, 
rainRate: 0.16, usUnits: 1
LOOP:   2021-08-09 18:30:09 EDT (1628548209) dateTime: 1628548209.78, 
lightning_distance: None, lightning_strike_count: 0.0, maxSolarRad: None, 
rainRate: 0.16, usUnits: 1
LOOP:   2021-08-09 18:30:09 EDT (1628548209) dateTime: 1628548209.79, 
lightning_distance: None, lightning_strike_count: 0.0, maxSolarRad: None, 
rainRate: 0.16, usUnits: 1
LOOP:   2021-08-09 18:30:09 EDT (1628548209) dateTime: 1628548209.77, 
lightning_distance: 11.9999999954, maxSolarRad: None, rainRate: 0.16, 
usUnits: 1
LOOP:   2021-08-09 18:30:09 EDT (1628548209) dateTime: 1628548209.78, 
lightning_distance: 11.9999999954, maxSolarRad: None, rainRate: 0.16, 
usUnits: 1
LOOP:   2021-08-09 18:30:09 EDT (1628548209) dateTime: 1628548209.79, 
lightning_distance: 11.9999999954, maxSolarRad: None, rainRate: 0.16, 
usUnits: 1


On Monday, August 9, 2021 at 5:25:55 PM UTC-4 [email protected] wrote:

> is Accumulator set in the  weewx.conf ?
>  at the bottom of my  weewx.conf file is like this
>
> [Accumulator]
>     [[lightning_strike_count]]
>         extractor = sum
>     [[lightning_distance]]
>         extractor = min
>         merger = minmax
> On Monday, August 9, 2021 at 8:11:45 PM UTC+3 [email protected] wrote:
>
>> restarts were done with every change of weewx.conf
>>
>> On Monday, August 9, 2021 at 12:46:33 PM UTC-4 [email protected] wrote:
>>
>>> stop weewx and restart it after you make any change to the  weewx.conf
>>>
>>> On Monday, August 9, 2021 at 4:57:48 PM UTC+3 [email protected] wrote:
>>>
>>>> Thanks for pointing me in the right direction, unfortunately your 
>>>> suggestion did not fix the persisting 12mile lightning_distance output.   
>>>> I 
>>>> tried the following 4 corrections one at a time in weewx.conf:
>>>>
>>>> [[Corrections]]
>>>> lightning_distance = lightning_distance if lightning_strike_count  >  0 
>>>> else None       # no change, persistent 12 mile lightning distance values 
>>>> in the absence of lightning strikes
>>>>
>>>> lightning_distance = None if lightning_strike_count < 1 else 
>>>> lightning_distance    # no change, persistent 12 mile lightning distance 
>>>> values in the absence of lightning strikes.
>>>>
>>>> lightning_distance = None       # results in NULL for all lightning 
>>>> distance values in database
>>>>
>>>> lightning_distance = lightning_distance if lightning_strike_count > 0 
>>>> else 0.0       # gives lightning distance valve of zero when there are no 
>>>> lightning strikes,  this is close to what I want, but I rather have NULL 
>>>> valves for lightning_distance when strike count is zero.
>>>>
>>>> Its strange that lightening_distance can be set to NULL with the third 
>>>> correction, but not the first or second correction.   Yet the if, else 
>>>> seems to be working in the fourth correction.   
>>>>
>>>> On Sunday, August 8, 2021 at 10:43:19 AM UTC-4 [email protected] wrote:
>>>>
>>>>> I use this line in weewx.conf and it works ok with seasons skin.. you 
>>>>> can try it
>>>>>
>>>>> [StdCalibrate]
>>>>>
>>>>>     [[Corrections]]
>>>>>
>>>>>         lightning_distance = lightning_distance if 
>>>>> lightning_strike_count > 0 else None
>>>>>
>>>>> On Sunday, August 8, 2021 at 4:09:43 AM UTC+3 [email protected] wrote:
>>>>>
>>>>>> I several questions about data and graphing of AcuRite 06045M 
>>>>>> lightning detector.  I am using "rtl_433" and "rtl_4233 mqtt auto 
>>>>>> discover" 
>>>>>> addons in home assistant to aquire data from AcuRite 06045M and  
>>>>>> MQTTSubscribeDriver to import data into weewx. Weewx is installed on 
>>>>>> raspberry pi.    I have set up belchertown skin for weewx, added 
>>>>>> lightning 
>>>>>> detector count and distance to database and I can graph lightning count 
>>>>>> and 
>>>>>> distance using belchertown skin.
>>>>>>
>>>>>>  Looking at passing thunderstorm today, I got nice uptick in lighting 
>>>>>> counts which correlated with decreased lightning distance (fig 
>>>>>> enclosed).  
>>>>>>  But the lightning distance reading before the storm and after the storm 
>>>>>> was a steady 12.0 miles, like that is the default value when no 
>>>>>> lightning 
>>>>>> is being detected.  I would like to remove those distracting 12-mile 
>>>>>> data 
>>>>>> points, since they don't contribute to the graph.   I was wondering how 
>>>>>> I [image: 
>>>>>> Screenshot (9).png]can do that and why lightning distance reading 
>>>>>> goes to exactly 12 when there is no lightning activity.   
>>>>>>
>>>>>> Here is my chart entry in belchertown graphs.conf file:
>>>>>>
>>>>>>
>>>>>>      [[chart5]]
>>>>>>         title = Lightning data
>>>>>>         [[[lightning_distance]]]
>>>>>>            name = Lightning distance
>>>>>>            type = scatter
>>>>>>            lineWidth = 0
>>>>>>            yAxis = 1
>>>>>>            mirrored_value = true
>>>>>>            zIndex = 1
>>>>>>            aggregate_interval = 900 # 15 min
>>>>>>            aggregate_type = avg
>>>>>>            color = "#00ff00"
>>>>>>         [[[lightning_strike_count]]]
>>>>>>            name = Strike count / 15 mins
>>>>>>            type = column
>>>>>>            yAxis_label = "Strikes/15min"
>>>>>>            aggregate_interval = 900 # 15 min
>>>>>>            aggregate_type = sum
>>>>>>            color = "#BECC00"
>>>>>>            tooltip_date_format = "dddd LL"
>>>>>>
>>>>>> I use "mirrored_value = true" for lightning distance rendering for 
>>>>>> two reasons, first as lightning distance decreases there is higher 
>>>>>> chance 
>>>>>> of approach thunderstorm (high ~ bad on chart) and second it minimizes 
>>>>>> the 
>>>>>> overlay of the lighting strike distance data on the lightning strike 
>>>>>> count.  
>>>>>>
>>>>>> Any ideas why there is a constant 12.0 miles in distance without 
>>>>>> lightning activity and how can I remove the 12.0 mile values preferably 
>>>>>> easily.  
>>>>>>
>>>>>

-- 
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/52d4bcdb-3e77-4c68-b44f-af576ffcf5b1n%40googlegroups.com.

Reply via email to