Lightning Strikes Weewx Database

Here’s your sensor_map:

[[sensor_map]]
    ...
    lightningXXX = lightning_strike_count.ST-00002310.obs_st
    lightningYYY = lightning_strike_avg_distance.ST-00002310.obs_st
    ...
    lightning_distance = distance.ST-00002310.evt_strike
    lightning_strike_count = energy.ST-00002310.evt_strike

The XXX and YYY were placeholders in a commented-out (not executed) config line, as an example of using the per-minute obs_air data back before WeeWX supported lightning data natively. Put a # back in front of these two lines, unless you only want to use the per-minute summary in WeeWX. Then, change the variable names on the left of the equals signs to lightning_distance and lightning_strike_count.

… and your StdCalibrate:

[StdCalibrate]
    [[Corrections]]
        lightning_strike_count = lightning_strike_count + 1

The reason for your 30 million strikes is because we want this kludge above to always come out as 1. We’re mapping energy into count just to have a value in it, and then using the equivalent of count - count (0) + 1 to get the one count that we need.

More details in my next post…