Does lightning data show up correctly if you graph it? I have the following
in the graph.conf for the Belchertown Skin:
[homepage]
...
[[daylightning]]
title = Lightning (hourly total)
time_length = today
aggregate_type = sum
aggregate_interval = 3600
type = column
[[[lightning_strike_count]]]
name = Lightning
[[[lightning_distance]]]
name = Min Distance
aggregate_type = min
yAxis = 1
On Monday, March 7, 2022 at 11:22:11 AM UTC-5 Kingsclear Studios wrote:
> Thank you Doug, this is more or less the roadblock(s) I've come against
> too, I've tried this fruitlessly since 2019 with no luck so I figured I
> would finally post about it to see if anyone has had any concrete luck.
> Thanks for the recommendation of the AS3925, I believe that is the same
> core-sensor on the 06045M with a different wrapper on the SDR, so that is
> probably challenging. I just liked it due to the audio/visual warnings it
> produces in use at home, as well as the added value of extra
> temperature/humidity readings, which albeit work fine.
>
> Thanks again,
> Mike.
>
> On Monday, March 7, 2022 at 11:59:36 AM UTC-4 [email protected] wrote:
>
>> I have tried my hand in this device last year with SDR and MQTT. What I
>> found is that the device's counter counts up to 127 (or 255 depending on
>> the SDR release) then essentially resets back to zero. I did not see any
>> code that would compare the incoming value (eg strike count is now 100) to
>> the loop value (eg 99) and update the strike count by 1.
>>
>> My best guess is that Acurite's base station is doing this math
>> difference and showing you the total strikes for the day with the distance
>> of the last strike.
>>
>> What needs to be done here is have a driver/service that will take the
>> raw SDR value for lightning strike count and distance, compare it to the
>> last reported value, then create a record recording the strike count and
>> distance as a separate row in a table (eg lighting_raw_data). Once the
>> archive generation starts, you take the sum of the strikes between archive
>> periods and average the strike distance. I believe that is what the
>> accumulator will do for you.
>>
>> This is where I gave up on the device. I have it in my "nice to have"
>> notes to write this component one day.
>>
>> An alternative is to look at the AS3925 lightning sensor. You can attach
>> that to a Raspberry PI and use Matthew Wall's driver
>> (matthewwall/weewx-as3935:
>> weewx service that collects data from as3935 lightning detector (github.com)
>> <https://github.com/matthewwall/weewx-as3935>) in a separate weewx
>> instance reporting to a separate db. From there you can bind both databases
>> in your main weewx install and report the lightning data in your skin. Look
>> up multiple database bindings in the docs side of the the weewx
>> documentation.
>>
>> Hope that helps!
>>
>> Doug Jenkins
>> www.largoweather.com
>>
>>
>>
>> On Monday, March 7, 2022 at 8:42:46 AM UTC-5 Kingsclear Studios wrote:
>>
>>> Thanks Troy, can confirm it's in place, makes no difference:
>>>
>>> [Accumulator]
>>> [[lightning_strike_count]]
>>> extractor = sum
>>> [[lightning_distance]]
>>> extractor = min
>>> merger = minmax
>>>
>>> Lightning Distance is working perfectly, after each artificial strike
>>> test (power drill + brushless motor = fake lightning) I get the distance
>>> updated properly, with units, my total_strikes count goes up, and I see odd
>>> entries like: strike_count: 0.0 - but no delta value(s), I've been trying
>>> for ages, it seems to elude me :)
>>>
>>> Sample MQTT data flowing to the station as of now:
>>>
>>> { "inHumidity": "31.0", "inTemp_C": "23.777777777777775",
>>> "strikes_total": "244.0", "lightning_distance_km": "6.437376", "dateTime":
>>> "1646660541.0", "inDewpoint_C": "5.625713349750434", "maxSolarRad_Wpm2":
>>> "362.7045034071919", "rainRate_cm_per_hour": "0.0", "strikes_count": "0.0",
>>> "rain_total": "1.59", "windSpeed_kph": "4.310998666280064", "outTemp_C":
>>> "5.888888888888889", "outHumidity": "86.0", "appTemp_C":
>>> "3.6810358576208713", "cloudbase_meter": "326.41695917564834",
>>> "dewpoint_C": "3.7282050766260766", "heatindex_C": "4.778888888888891",
>>> "humidex_C": "5.888888888888889", "windchill_C": "5.888888888888889",
>>> "extraTemp1_C": "5.3999999999999995", "extraHumid1": "53.0", "windDir":
>>> "225.0", "hourRain_cm": "0.025400000000000023", "rain24_cm":
>>> "1.9812000000000007", "dayRain_cm": "0.7112", "usUnits": "16.0" }
>>> On Monday, March 7, 2022 at 9:02:11 AM UTC-4 [email protected] wrote:
>>>
>>>> The only thing I see missing from your weewx.conf would be the
>>>> Accumulator section:
>>>>
>>>> [Accumulator]
>>>> [[lightning_strike_count]]
>>>> extractor = sum
>>>> [[lightning_distance]]
>>>> extractor = min
>>>>
>>>> See if adding the Accumulator section in your weewx.conf fixes your
>>>> issue.
>>>>
>>>> -Troy
>>>>
>>>> On Sunday, March 6, 2022 at 7:40:30 AM UTC-5 Kingsclear Studios wrote:
>>>>
>>>>> Weewx Conf:
>>>>>
>>>>> [SDR]
>>>>> # This section is for the software-defined radio driver.
>>>>>
>>>>> # The driver to use
>>>>> driver = user.sdr
>>>>> path = /usr/local/bin
>>>>> log_unknown_sensors = True
>>>>> log_unmapped_sensors = True
>>>>> [[sensor_map]]
>>>>> extraTemp1 = temperature.1720.AcuriteTowerPacketV2 #
>>>>> basement
>>>>> extraHumid1 = humidity.1720.AcuriteTowerPacketV2
>>>>> outTemp = temperature.041D.Acurite5n1PacketV2
>>>>> outHumidity = humidity.041D.Acurite5n1PacketV2
>>>>> rain_total = rain_total.041D.Acurite5n1PacketV2
>>>>> windDir = wind_dir.041D.Acurite5n1PacketV2
>>>>> windSpeed = wind_speed.041D.Acurite5n1PacketV2
>>>>> inHumidity = humidity.009B.AcuriteLightningPacket #upstairs
>>>>> Humidity
>>>>> inTemp = temperature.009B.AcuriteLightningPacket #upstairs
>>>>> Temperature
>>>>> strikes_total = strikes_total.009B.AcuriteLightningPacket
>>>>> #Total Lightning Strike Count
>>>>> lightning_distance = distance.009B.AcuriteLightningPacket
>>>>> #Storm Distance KM
>>>>> [[sensor_type]]
>>>>> strikes_total = counter
>>>>> [[data_type]]
>>>>> strikes_total = delta
>>>>> [[Deltas]]
>>>>> lightning_strike_count = strikes_total
>>>>>
>>>>>
>>>>> Belchertown Display Settings:
>>>>>
>>>>> station_observations = outTemp, outHumidity, heatindex, dewpoint,
>>>>> rainRate, windSpeed, windDir, windGust, lightning_strike_count,
>>>>> lightning_distance, inTemp, inHumidity, extraTemp1
>>>>>
>>>>> Which results in display of "N/A" for lightning strikes.
>>>>>
>>>>> I can trigger an artificial strike to get a count, and I do see
>>>>> "strikes_total" climbing during this time, so it's recording the event
>>>>> itself in the DB/MQTT and sending it, but I cannot seem to get it to
>>>>> display in the skin as a "daily" count = or a count based on the
>>>>> established reporting period. The 06045M is a counter, it wraps at 255
>>>>> now,
>>>>> so I do understand how it works more or less, just not how to get it to
>>>>> display properly in the skin and for charting in the near future.
>>>>>
>>>>> I've read dozens of threads, and I can't seem to find a conclusive
>>>>> solution - help!!
>>>>>
>>>>> Most recently added to [StdCalibrate]: lightning_distance =
>>>>> lightning_distance if lightning_strike_count > 0 else None
>>>>>
>>>>>
>>>>> [image: Capture.PNG]
>>>>>
>>>>
--
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/cc2e399d-91fd-43c2-85b6-ad356250505bn%40googlegroups.com.