Is [[Corrections]] in the hierarchy below [StdCalibrate]?
Like this:
[StdCalibrate]
[[Corrections]]
lightning_distance = lightning_distance if lightning_strike_count >
0 else None
If yes and you don't find a solution, post your whole weewx.conf as an
attachment, but don't forget to obfuscate any sensitive data like logins,
passwords etc. before uploading.
Stefan Gliessmann schrieb am Donnerstag, 10. August 2023 um 18:40:44 UTC+2:
> The correction was in weewx.conf (and I just restarted weewx another
> time), but it still shows the distance from earlier this week.
> I also added the Accumulator from last to min for lighting_distance.
>
> Still no change in the graph ...
>
> This is in graph.conf for Belchertown skin:
>
> [[chart6]]
> title = Lightning
> [[[lightning_strike_count]]]
> yAxis = 0
> yAxis_min = 0
> yAxis_tickInterval = 1
> yAxis_label = "Number of Strikes"
> stacking = normal
> color = "orange"
> lineWidth = 0
> [[[[marker]]]]
> enabled = true
> radius = 4
> [[[[states]]]]
> [[[[[hover]]]]]
> lineWidthPlus = 0
> [[[lightning_distance]]]
> yAxis = 1
> yAxis_min = 0
> yAxis_label = "Distance (km)"
>
> stacking = normal
> color = "blue"
> lineWidth = 0
> [[[[marker]]]]
> enabled = true
> radius = 3
> [[[[states]]]]
> [[[[[hover]]]]]
> lineWidthPlus = 0
>
> This is in weewx.conf:
>
> [[Corrections]]
> lightning_distance = lightning_distance if lightning_strike_count
> > 0 else None
>
> and
>
> [Accumulator]
>
> # Start Ecowitt Gateway driver extractors
> [[daymaxwind]]
> extractor = last
> [[lightning_distance]]
> extractor = min
> [[lightning_strike_count]]
> extractor = sum
> [[lightningcount]]
> extractor = last
> [[lightning_last_det_time]]
> extractor = last
>
> and what it looks like:
>
> [image: Screenshot 2023-08-10 at 18.30.15.png]
>
> being in sync w/ the db ...
>
> [image: Screenshot 2023-08-10 at 18.32.26.png]
>
> I continue to be puzzled ...
>
> Any additional ideas what I should check?
>
> TIA,
> Stefan
>
>
> On Thu, Aug 10, 2023 at 5:47 PM Stefan Gliessmann <[email protected]>
> wrote:
>
>> Hmm - it looks different in my sdb ...
>>
>> [image: Screenshot 2023-08-10 at 17.43.28.png]
>>
>> I will double check if I added the correction lightning_distance =
>> lightning_distance if lightning_strike_count > 0 else None correctly in
>> weewx.conf ...
>>
>>
>> On Wed, Aug 9, 2023 at 6:40 PM [email protected] <[email protected]>
>> wrote:
>>
>>> I have an ecowitt WH57 and exactly the same correction
>>> term: lightning_distance = lightning_distance if lightning_strike_count > 0
>>> else None
>>> [image: 2023-08-09 18_35_16-The weather in AT, Salzburg, Hallein, Rif -
>>> Brave.png]
>>>
>>> And just a few mintues ago, there were lightnings detected:
>>>
>>> The little yellow dot between 25 and 30km.
>>>
>>>
>>> I've queried the database:
>>> select datetime, lightning_distance, lightning_strike_count from archive
>>> order by datetime desc;
>>>
>>> [image: 2023-08-09 18_37_13-Window.png]
>>> Just as excpected.
>>>
>>> I don't know how your chart handles this, the above chart is a scatter
>>> chart with the lightning distance on the y-axis and the size of the dot is
>>> equivalent to the lightning_strike_count. What does your database show with
>>> the above query?
>>> Stefan Gliessmann schrieb am Mittwoch, 9. August 2023 um 16:49:45 UTC+2:
>>>
>>>> Hello everybody ;)
>>>>
>>>> I have a smilier issue with last lightning distance been charted ...
>>>> I used the above information to generate my chart which looks like this:
>>>>
>>>> [image: Screenshot 2023-08-09 at 16.43.03.png]
>>>>
>>>> This is with
>>>> [[Corrections]]
>>>> lightning_distance = lightning_distance if
>>>> lightning_strike_count > 0 else None
>>>>
>>>> I do not have an AcuRite, but an Ecowitt lightning detector ...
>>>>
>>>> Any hint to have the distance been zero when there isn't and lightning
>>>> would be appreciated.
>>>>
>>>> TIA,
>>>> Stefan
>>>> On Thursday, June 15, 2023 at 6:03:12 AM UTC+2 William Reading wrote:
>>>>
>>>>> I was going to submit a pull request to fix this and realized that the
>>>>> Atlas driver uses "strike_count" and the rest of them use
>>>>> "strikes_total",
>>>>> so fixing the defaults would be a breaking change. I went ahead and just
>>>>> put the delta in my weewx.conf file to work around it.
>>>>>
>>>>> [[sensor_map]]
>>>>> ...
>>>>> atlas_lightning_strike_count = strike_count.XXXX.AcuriteAtlasPacket
>>>>> ...
>>>>>
>>>>> [[deltas]]
>>>>> lightning_strike_count = atlas_lightning_strike_count
>>>>> On Wednesday, June 14, 2023 at 12:59:13 PM UTC-4 Mark Fraser wrote:
>>>>>
>>>>>> On 13/06/2023 20:17, Kevin Crivelli wrote:
>>>>>> > mines definitely a little different. This is what I already have.
>>>>>> It
>>>>>> > seems to follow the logic you shared above in your configuration
>>>>>> but my
>>>>>> > packets are named differently. where you have "Atlas_strike_count =
>>>>>> > strike_count.0011.AcuriteAtlasPacket" I have "strikes_total =
>>>>>> > strikes_total.1255.AcuriteLightningPacket". from looking at my
>>>>>> deltas
>>>>>> > section, does it look as though I have this set up correctly or am
>>>>>> I off
>>>>>> > a little bit?
>>>>>> >
>>>>>> > [SDR]
>>>>>> > # This section is for the software-defined radio driver.
>>>>>> >
>>>>>> > # The driver to use
>>>>>> > driver = user.sdr
>>>>>> >
>>>>>> >
>>>>>> > [[sensor_map]]
>>>>>> > outTemp = temperature.030B.AcuriteAtlasPacket
>>>>>> > outHumidity = humidity.030B.AcuriteAtlasPacket
>>>>>> > windSpeed = wind_speed.030B.AcuriteAtlasPacket
>>>>>> > windDir = wind_dir.030B.AcuriteAtlasPacket
>>>>>> > UV = uv.030B.AcuriteAtlasPacket
>>>>>> > rain_total = rain_total.030B.AcuriteAtlasPacket
>>>>>> > radiation = lux.030B.AcuriteAtlasPacket
>>>>>> > lux = lux.030B.AcuriteAtlasPacket
>>>>>> > outTempBatteryStatus = battery.030B.AcuriteAtlasPacket
>>>>>> > lightning_distance = distance.1255.AcuriteLightningPacket
>>>>>> > strikes_total = strikes_total.1255.AcuriteLightningPacket
>>>>>> > inTemp = temperature.3071.AcuriteTowerPacketV2
>>>>>> > inHumidity = humidity.3071.AcuriteTowerPacketV2
>>>>>> > pressure = pressure.171.FOWH32BPacket
>>>>>> >
>>>>>> >
>>>>>> > [[deltas]]
>>>>>> > rain = rain_total
>>>>>> > lightning_strike_count = strikes_total
>>>>>>
>>>>>> I think there is a bug in the sdr.py from
>>>>>> https://github.com/matthewwall/weewx-sdr/blob/master/bin/user/sdr.py
>>>>>> where the deltas are listed as:
>>>>>>
>>>>>> DEFAULT_DELTAS = {
>>>>>> 'rain': 'rain_total',
>>>>>> 'strikes': 'strikes_total'}
>>>>>>
>>>>>> Which I couldn't get to work, so I changed mine to:
>>>>>> DEFAULT_DELTAS = {
>>>>>> 'rain': 'rain_total',
>>>>>> 'lightning_strike_count': 'strikes_total'}
>>>>>> And it works without having to add a deltas section to weewx.conf.
>>>>>>
>>>>>> --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "weewx-user" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/weewx-user/xBihBm0jVls/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/weewx-user/1c0205a8-cb0f-4a34-8c2b-dd0d288da2fen%40googlegroups.com
>>>
>>> <https://groups.google.com/d/msgid/weewx-user/1c0205a8-cb0f-4a34-8c2b-dd0d288da2fen%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/4a80e8be-3556-49f8-9981-fe2665baa552n%40googlegroups.com.