An update since I experienced a lot of lightning over the past week.  As a 
refresher, here are my pertinent lines from weewx.conf:

    [[sensor_map]]
        # This section is for handling data for the Tempest Weather Station
        outTemp = air_temperature.ST-00102080.obs_st
        outHumidity = relative_humidity.ST-00102080.obs_st
        pressure = station_pressure.ST-00102080.obs_st
        lightning_strikes = lightning_strike_count.ST-00102080.obs_st
        avg_distance = lightning_strike_avg_distance.ST-00102080.obs_st
        outTempBatteryStatus = battery.ST-00102080.obs_st
        windSpeed = wind_speed.ST-00102080.rapid_wind
        windDir = wind_direction.ST-00102080.rapid_wind
        luminosity = illuminance.ST-00102080.obs_st
        UV = uv.ST-00102080.obs_st
        rain = rain_accumulated.ST-00102080.obs_st
        #windBatteryStatus = battery.ST-00102080.obs_st
        radiation = solar_radiation.ST-00102080.obs_st
        lightning_distance = distance.ST-00102080.evt_strike
        #lightningYYY = energy.ST-00102080.evt_strike
        lightning_strike_count = lightning_strike_count.ST-00102080.obs_st

[StdCalibrate]
    [[Corrections]]
lightning_distance = lightning_distance if lightning_strike_count > 0 else 
None

[Accumulator]
[[lightning_strikes]]
extractor = sum
[[lightning_distance]]
extractor = min
[[avg_distance]]
extractor = avg

I experimented with the Seasons skin to double-check what I was doing in 
the Belchertown skin.  These two entries in skin.conf yield the graphs 
shown.  Seems to work ok for both.   But I had to use my new 
lightning_strike_count variable because the Accumulator summing 
lightning_strikes must have been messing up the graphs.  At least that is 
my theory, any input is appreciated.

        [[[weeklightning]]]
            yscale = None, None, 1
            plot_type = bar
            [[[[lightning_strike_count]]]]
                aggregate_type = sum
                aggregate_interval = day
                label = Lightning (daily total)
[image: weeklightning]
        [[[weeklightningdistance]]]
            yscale = 0, 25, 5
            line_type = None
            marker_type = box
            marker_size = 2
            [[[[lightning_distance]]]]
                label = Lightning Distance
[image: weeklightningdistance]

And for Belchertown:
   [[weekLightningInfo]]
        title = Lightning
        [[[lightning_strike_count]]]
            yAxis = 0
            yAxis_min = 0
            yAxis_tickInterval = 1
            yAxis_label = "Number of Strikes"
            stacking = normal
            color = "orange"
            lineWidth = 0
            #aggregate_type = sum
            [[[[marker]]]]
                enabled = true
                radius = 4
            [[[[states]]]]
                [[[[[hover]]]]]
                        lineWidthPlus = 0                
        [[[lightning_distance]]]
            yAxis = 1
            yAxis_min = 0
            yAxis_label = "Distance (miles)"
            stacking = normal
            color = "blue"
            lineWidth = 0
            #aggregate_type = min
            [[[[marker]]]]
                enabled = true
                radius = 3
            [[[[states]]]]
                [[[[[hover]]]]]
                        lineWidthPlus = 0    
 
[image: Screenshot 2023-09-11 095402.png]
I have to do some further tweaking on the left y-axis tick interval, but 
the data looks good.  Need to figure out how to get rid of the 0 value for 
all the no-strike points.

I tried this, but it yields a blank graph, probably because of the 
aggregate options...
   [[lightningthisweek]]
        title = Lightning (hourly total)
        time_length = week
        aggregate_type = sum
        aggregate_interval = 3600
        type = column
        [[[lightning_strike_count]]]
            name = Lightning
        [[[lightning_distance]]]
            name = Min Distance
            aggregate_type = min
            yAxis = 1

This one yields a good graph and I will probably try to combine this with 
the lightning strikes/distance graph above.
[image: Screenshot 2023-09-11 100013.png]

This guy's site https://weather.sangrephotography.com/ has a good lightning 
graph (only lightning for the day so you have to wait for a thunderstorm 
for the graph to appear).  I contacted him trying to get the config files 
he uses but he has not responded.

I need to read through and understand High Charts better.

Dan


On Monday, August 28, 2023 at 11:27:01 AM UTC-4 Dan Roman wrote:

> Hi Mark,
>
> Coincidentally I was just working on this last week.  I have not been able 
> to get lightning working completely still. In my configuration 
> lightning_strikes and avg_distance still display as Invalid Observations in 
> Belchertown.  I was able to get the following observations added but have 
> to wait for a thunderstorm to see if it works.  I added a second lightning 
> entry lightning_strike_count to my sensor map to experiment with because I 
> think my entries in [Accumulator] are causing problems.
> Lightning Strikes 0
> Lightning Distance N/A
>   
>
> I have been playing with the graphs too.  I am able to get a graph to 
> display by distance but trying to get more than just that on the graph 
> broke things.  I wanted to try a column chart for the number of strikes, 
> but could not figure it out.  For my Tempest I am using the Weatherflow UDP 
> and this is my sensor map, pretty standard...
>
>     [[sensor_map]]
>         # This section is for handling data for the Tempest Weather Station
>         outTemp = air_temperature.ST-00102080.obs_st
>         outHumidity = relative_humidity.ST-00102080.obs_st
>         pressure = station_pressure.ST-00102080.obs_st
>         lightning_strikes = lightning_strike_count.ST-00102080.obs_st
>         avg_distance = lightning_strike_avg_distance.ST-00102080.obs_st
>         outTempBatteryStatus = battery.ST-00102080.obs_st
>         windSpeed = wind_speed.ST-00102080.rapid_wind
>         windDir = wind_direction.ST-00102080.rapid_wind
>         luminosity = illuminance.ST-00102080.obs_st
>         UV = uv.ST-00102080.obs_st
>         rain = rain_accumulated.ST-00102080.obs_st
>         #windBatteryStatus = battery.ST-00102080.obs_st
>         radiation = solar_radiation.ST-00102080.obs_st
>         lightning_distance = distance.ST-00102080.evt_strike
>         #lightningYYY = energy.ST-00102080.evt_strike
>         lightning_strike_count = lightning_strike_count.ST-00102080.obs_st
>
> The last entry I added as a duplicate to experiment with.
>
> And I have this correction...
>
> [StdCalibrate]
>     [[Corrections]]
>         lightning_distance = lightning_distance if lightning_strike_count 
> > 0 else None
>
> And this for accumulator...
>
> [Accumulator]
>     [[lightning_strikes]]
>         extractor = sum
>     [[lightning_distance]]
>         extractor = min
>     [[avg_distance]]
>         extractor = avg
>
> I have not been able to get all the lightning info I want to display with 
> either the Seasons or Belchertown skins.
>
> I played around with Seasons to see if I could get things working there 
> since I was having trouble in Belchertown.  I put the same observations in 
> Seasons as Belchertown and get the same results.  I tried this in skin.conf 
> for graphs too, but they don't look right, may need to accumulate some data:
>
>         [[[daylightning]]]
>             yscale = None, None, 1
>             plot_type = bar
>             [[[[lightning_strikes]]]]
>                 aggregate_type = sum
>                 aggregate_interval = hour
>                 label = Lightning (hourly total)
>
>         [[[daylightningdistance]]]
>            yscale = None, None, 1
>             plot_type = bar
>             [[[[lightning_distance]]]]
>                 aggregate_type = min
>                 aggregate_interval = hour
>                 label = Lightning (closest hourly)
>
> And in Belchertown these entries in graph.conf throw errors (I have them 
> commented for now):
>
> #    [[Lightning_chart]]
> #        title = Lightning count
> #        time_length = 10800
> #        aggregate_interval = 300
> #        gapsize = 108000
> #        type = column
> #
> #        [[[lightning_strikes]]]
> #            name = Lightning Count
> #            zIndex = 1
> #             aggregate_type = sum
>
> Throws this error:
> weewx.UnknownType: 'lightning_strikes' or 'sum'
> Warning: Error trying to use database binding wx_binding to graph 
> observation lightning_strikes. Error was: 'lightning_strikes' or 'sum'.
>
> #    [[LightningInfo]]
> #        title = Lightning
> #        [[[lightning_strikes]]]
> #            yAxis = 0
> #            yAxis_min = 0
> #            yAxis_tickInterval = 1
> #            yAxis_label = "Number of Strikes"
> #            stacking = normal
> #            color = "orange"
> #            lineWidth = 0
> #            [[[[marker]]]]
> #                enabled = true
> #                radius = 4
> #            [[[[states]]]]
> #                [[[[[hover]]]]]
> #                        lineWidthPlus = 0                
>
> This throws:
> weewx.UnknownType: lightning_strikes
> Warning: Error trying to use database binding wx_binding to graph 
> observation lightning_strikes. Error was: lightning_strikes.
>
> Not sure if my weewx.conf entry under [Accumulator] is causing the problem?
>
> I also tried Kevin's graphs that he provided on June 20th but haven't 
> gotten them to work either, which is why I added the lightning_strike_count 
> to my sensor list. Get errors:
> TypeError: unsupported operand type(s) for %: 'NoneType' and 'int'
> Warning: Error trying to use database binding wx_binding to graph 
> observation lightning_strike_count. Error was: unsupported operand type(s) 
> for %: 'NoneType' and 'int'.
>
> Maybe I have to wait for some lightning data to be added first.
>
> It has been very frustrating!
>
> Dan
>
>
> On Sun, Aug 27, 2023 at 10:25 AM [email protected] <[email protected]> 
> wrote:
>
>> Di you ever figure out how to get rid of this?
>>
>> Observation lightning_strike_count is using unit count that returns %d 
>> for StringFormat, rather than float point decimal format value - using 0 as 
>> rounding
>>
>> Thanks!
>>
>> On Saturday, June 24, 2023 at 8:15:11 PM UTC-6 Dan Roman wrote:
>>
>>> Had a thunderstorm today and lightning still does not register at all 
>>> even after adding the graphs. I don't think lightning is being saved in my 
>>> database and I have to figure that out first, then I might be able to 
>>> display it.
>>>
>>> --
>>> Dan Roman
>>> [email protected]
>>>
>>> On Thu, Jun 22, 2023, 5:11 AM Mark Fraser <[email protected]> wrote:
>>>
>>>> On 20/06/2023 14:30, Dan Roman wrote:
>>>> > Thanks Mark, I will give it a try and add it to my graphs to see if 
>>>> it 
>>>> > works with Weatherflow.
>>>> > 
>>>> > Were you able (or did you try) to add a last 3 hours lightning count 
>>>> to 
>>>> > the Belchertown main page, for example, "Lightning count last 3 
>>>> hours: 15"?
>>>> > 
>>>> > That's one of the things that Alex and I were trying to accomplish as 
>>>> well.
>>>>
>>>> Dan,
>>>> Any ideas how to get rid of
>>>>
>>>> "Observation lightning_strike_count is using unit count that returns %d 
>>>> for StringFormat, rather than float point decimal format value - using 
>>>> 0 
>>>> as rounding "?
>>>>
>>>> -- 
>>>> You received this message because you are subscribed to a topic in the 
>>>> Google Groups "weewx-user" group.
>>>> To unsubscribe from this topic, visit 
>>>> https://groups.google.com/d/topic/weewx-user/8S1zsvbW2v8/unsubscribe.
>>>> To unsubscribe from this group and all its topics, send an email to 
>>>> [email protected].
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/weewx-user/fa0a934d-146e-2e89-034c-e4edcf6b394d%40gmail.com
>>>> .
>>>>
>>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "weewx-user" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/weewx-user/8S1zsvbW2v8/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> [email protected].
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/weewx-user/8c02666b-adf5-4e75-8b08-efaf4e4612dan%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/weewx-user/8c02666b-adf5-4e75-8b08-efaf4e4612dan%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> -- 
> Dan Roman
> [email protected]
>  
>

-- 
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/bf2781f8-1905-417c-b5e8-bbe236b25a2cn%40googlegroups.com.

Reply via email to