GithubHelp home page GithubHelp logo

Comments (7)

Stormtracker017 avatar Stormtracker017 commented on May 28, 2024

I attached a graphic showing how the strike_count just wraps around from 0 to 127 but the total lightning strikes for the archive period is not being updated for the 06045M. The AS3935 module seems to be updating correctly.

06045M Lightning Graph

from weewx-sdr.

matthewwall avatar matthewwall commented on May 28, 2024

the sensor reports strike_count, but the weewx-sdr driver should convert that to strikes_total

then the difference between the strikes_total in each period should be reported in the strikes field. so strikes is the field you want in the database. it is analogous to rain - it is a delta value, not a cumulative value.

the fact that the acurite sensor wraps every 128 counts could cause some problems, especially if you get more than 128 strikes in a time interval. we might have to add some logic to deal with wraparounds in general, and the acurite sensor in particular.

what are you using for the accumulated total, and how are you doing the accumulating?

from weewx-sdr.

Stormtracker017 avatar Stormtracker017 commented on May 28, 2024

Here is my mapping for the 06045M sensors:

[[sensor_map]]
# 5n1 Sensor

    windDir = wind_dir.0C37.Acurite5n1Packet
    windSpeed = wind_speed.0C37.Acurite5n1Packet
    outTemp = temperature.0C37.Acurite5n1Packet
    outHumidity = humidity.0C37.Acurite5n1Packet
    rain_total = rain_total.0C37.Acurite5n1Packet
    
    # 06045M 
    
    LS_1_active = active.36E4.AcuriteLightningPacket
    LS_1_distance = distance.36E4.AcuriteLightningPacket
    LS_1_lightning_strikes = strikes_total.36E4.AcuriteLightningPacket
    LS_1_rfi = rfi.36E4.AcuriteLightningPacket
    LS_1_temperature = temperature.36E4.AcuriteLightningPacket
    LS_1_humidity = humidity.36E4.AcuriteLightningPacket
    LS_1_battery = battery.36E4.AcuriteLightningPacket
    
    LS_2_active = active.00E4.AcuriteLightningPacket
    LS_2_distance = distance.00E4.AcuriteLightningPacket
    LS_2_lightning_strikes = strikes_total.00E4.AcuriteLightningPacket
    LS_2_rfi = rfi.00E4.AcuriteLightningPacket
    LS_2_temperature = temperature.00E4.AcuriteLightningPacket
    LS_2_humidity = humidity.00E4.AcuriteLightningPacket
    LS_2_battery = battery.00E4.AcuriteLightningPacket

Here is what I see:

Dec 1 21:59:13 raspberrypi weewx[582]: sdr: MainThread: lines=['{"time" : "2019-12-02 02:59:10", "model" : "Acurite Lightning 6045M", "id" : 228, "channel" : "C", "temperature_F" : 30.000, "humidity" : 99, "strike_count" : 91, "storm_dist" : 5, "active" : 0, "rfi" : 0, "ussb1" : 1, "battery" : "OK", "exception" : 0, "raw_msg" : "00e46f638e88dbc56c"}\n', '{"time" : "2019-12-02 02:59:10", "model" : "Acurite Lightning 6045M", "id" : 228, "channel" : "C", "temperature_F" : 30.000, "humidity" : 99, "strike_count" : 91, "storm_dist" : 5, "active" : 0, "rfi" : 0, "ussb1" : 1, "battery" : "OK", "exception" : 0, "raw_msg" : "00e46f638e88dbc56c"}\n', '{"time" : "2019-12-02 02:59:10", "model" : "Acurite Lightning 6045M", "id" : 228, "channel" : "C", "temperature_F" : 30.000, "humidity" : 99, "strike_count" : 91, "storm_dist" : 5, "active" : 0, "rfi" : 0, "ussb1" : 1, "battery" : "OK", "exception" : 0, "raw_msg" : "00e46f638e88dbc56c"}\n', '{"time" : "2019-12-02 02:59:10", "model" : "Acurite tower sensor", "id" : 4079, "sensor_id" : 4079, "channel" : "A", "temperature_C" : 23.800, "humidity" : 26, "battery_low" : 1}\n', '{"time" : "2019-12-02 02:59:10", "model" : "Acurite tower sensor", "id" : 4079, "sensor_id" : 4079, "channel" : "A", "temperature_C" : 23.800, "humidity" : 26, "battery_low" : 1}\n', '{"time" : "2019-12-02 02:59:10", "model" : "Acurite tower sensor", "id" : 4079, "sensor_id" : 4079, "channel" : "A", "temperature_C" : 23.800, "humidity" : 26, "battery_low" : 1}\n']

Dec 1 21:59:14 raspberrypi weewx[582]: bme280: {'LS_2_distance': 5, 'LS_2_humidity': 99, 'LS_2_active': 0, 'dateTime': 1575255550, 'LS_2_battery': 0, 'inHumidity': 27.88299552542264, 'inTemp': 80.35782372527291, 'LS_2_temperature': 30.0, 'LS_2_rfi': 0, 'LS_2_lightning_strikes': 91, 'usUnits': 1}

I'm using sum for the accumulated total and taking the last three archive periods (900 seconds) and summing them together.

from weewx-sdr.

matthewwall avatar matthewwall commented on May 28, 2024

try this in your weewx config:

    [[sensor_map]]
        ...
        LS_1_lightning_strikes_total = strikes_total.36E4.AcuriteLightningPacket
        ...
        LS_2_lightning_strikes_total = strikes_total.00E4.AcuriteLightningPacket
        ...
    [[deltas]]
        rain = rain_total
        LS_1_lightning_strikes = LS_1_lightning_strikes_total
        LS_2_lightning_strikes = LS_1_lightning_strikes_total

from weewx-sdr.

Stormtracker017 avatar Stormtracker017 commented on May 28, 2024

Made the changes in the weewx config file, the Lightning Total equals zero. Just need to wait for a Thunderstorm or two.
6045M Lightning Count

from weewx-sdr.

jrhelbert avatar jrhelbert commented on May 28, 2024

Working to help round out the Atlas code in rtl_433 (https://groups.google.com/d/msg/rtl_433/gvTUFWJlFxE/oDidDIx9AAAJ) and running into the lightning wrap around issue.

Seems like the best option to deal with the wraparound is for weewx-sdr to be aware of the field size. ie the Atlas code should be aware of how big fields are (at least fields that are cumulative and we might want to run deltas against.) Then we can use that value to calculate the delta whenever there is a wraparound.

from weewx-sdr.

rct avatar rct commented on May 28, 2024

In case anyone finds this closed issue - see #81 - The decoding of the 6045 strike counter changed. It was incorrectly reported as 7 bits in rtl_433 before April 13 2020.

from weewx-sdr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.