I am seeing a weird problem with the lightning distance value, where the
distance gets stuck reporting 10!
I copied the [[Corrections]] scheme shown earlier in this thread.
I'm pretty sure I got it right, because it works most of the time.
##############################################################################
[SDR]
# This section is for the software-defined radio driver.
# collect data from Acurite Atlas sensor
# The driver to use
driver = user.sdr
cmd = rtl_433 -R 40 -M utc -F json
[[sensor_map]]
outTemp = temperature.0011.AcuriteAtlasPacket
outHumidity = humidity.0011.AcuriteAtlasPacket
windSpeed = wind_speed.0011.AcuriteAtlasPacket
windDir = wind_dir.0011.AcuriteAtlasPacket
UV = uv.0011.AcuriteAtlasPacket
luminosity = lux.0011.AcuriteAtlasPacket
Atlas_rain_total = rain_total.0011.AcuriteAtlasPacket
Atlas_strike_count = strike_count.0011.AcuriteAtlasPacket
lightning_distance = strike_distance.0011.AcuriteAtlasPacket
windBatteryStatus = battery.0011.AcuriteAtlasPacket
[[deltas]]
rain = Atlas_rain_total
lightning_strike_count = Atlas_strike_count
[[Corrections]]
lightning_distance = lightning_distance if lightning_strike_count >
0 else None
##############################################################################
But, I've now seen several storms with lightning and and the
lightinig_distance value gets stuck reporting 10 forever after!
I see the 10 repeating in the database, so I believe that weewx is
generating that number and sending it into the database.
Here's a look in the database using DB Browser for SQLite.
Note how a distance value of 5.64705882352941 from the Acurite Atlas
appears and then it's 10 thereafter.
You can see the lightning_strike_count is zero.
The "else None" part of the condition statement appears to stop working?
[image: ksnip_20210523-111132.png]
On Thursday, July 23, 2020 at 5:55:55 AM UTC-5 [email protected] wrote:
> Thank you for the detailed explanation Gary! I have added the
>> [Accumulator] section to my weewx.conf for lightning_strike_count ->
>> extractor = sum and lightning_distance -> extractor = min. Now to wait for
>> another storm.
>
>
> -Troy
>
--
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/74c16b1a-a35c-4f3d-b630-c31d965900fen%40googlegroups.com.