I have an Acurite 6045 feeding data via SDR to my weewx (3.9.2 with the 4.0 
database schema) on RPi4 setup.  It's working fine, but I'd like to fine 
tune what goes into the database a little.  The 6045 sends the last 
distance recorded with every packet, even if there haven't been any new 
strikes.  I want to set distance to null in the database if there aren't 
any new strikes.  The strikes that go into the database 
(lightning_strike_count) are derived from the delta of strikes_total 
reported with each loop, as configured in the driver's section of 
weewx.conf (below).  Is there a way to tell either the driver or StdQC to 
override distance based on the derived lightning_strike_count field?  
Something akin to  "if lightning_strike_count < 1 then lightning_distance = 
null else lightning_distance=distance.0027.AcuriteLightningPacket"? Or is 
this going to be as involved as the whole wind direction when no wind speed 
topic?  I'd like to try and put the right data into the database rather 
than scheduling a nightly sqlite update to correct the distance field.  TIA 
for any suggestions.


    [[sensor_map]]
        windDir = wind_dir.0936.Acurite5n1PacketV2
        windSpeed = wind_speed.0936.Acurite5n1PacketV2
        outTemp = temperature.0936.Acurite5n1PacketV2
        outHumidity = humidity.0936.Acurite5n1PacketV2
        rain_total = rain_total.0936.Acurite5n1PacketV2
        inTemp = temperature.207C.AcuriteTowerPacketV2
        inHumidity = humidity.207C.AcuriteTowerPacketV2
        extraTemp1 = temperature.3732.AcuriteTowerPacketV2
        extraHumid1 = humidity.3732.AcuriteTowerPacketV2
        extraTemp2 = temperature.1D31.Acurite00275MPacket
        extraHumid2 = humidity.1D31.Acurite00275MPacket
        extraTemp3 = temperature.0027.AcuriteLightningPacket
        extrahumid3 = humidity.0027.AcuriteLightningPacket
        strikes_total = strikes_total.0027.AcuriteLightningPacket
        lightning_distance = distance.0027.AcuriteLightningPacket
        lightning_disturber_count = rfi.0027.AcuriteLightningPacket
        lightning__noise_count = exception.0027.AcuriteLightningPacket
        extraTemp4 = temperature.1DA8.AcuriteTowerPacketV2
        extraHumid4 = humidity.1DA8.AcuriteTowerPacketV2
        extraTemp5 = temperature.08A7.AcuriteTowerPacketV2
        extraHumid5 = humidity.08A7.AcuriteTowerPacketV2
        extraTemp6 = temperature.1E71.Acurite00275MPacket
        extraHumid6 = humidity.1E71.Acurite00275MPacket


    [[deltas]]
        rain = rain_total
        lightning_strike_count = strikes_total
##############################################################################
# Accumulator section, to prevent averaging of lighting strke and distance
# data from the Acurite 6045 lightning Sensor.
# see:  https://www.wxforum.net/index.php?topic=30139.75
##############################################################################
[Accumulator]
    [[lightning_strike_count]]
        extractor = sum
    [[lightning_distance]]
        extractor = min
    [[lightning_disturber_count]]
        extractor = sum



-- 
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/d90f8e63-a942-4008-8a63-9b020e527b03o%40googlegroups.com.

Reply via email to