[weewx-user] Re: Lightning Strikes on weewx-sdr Issue

2017-09-23 Thread Paul Oversmith
Thanks so much for the quick response.  I felt it was something I missed in 
the setup.
Changes made.  Need the next thunderstorm to make sure it is working.

Also thanks for the suggestion on LightningDistance.  I changed the field 
to REAL.

On Saturday, September 23, 2017 at 7:03:21 PM UTC-4, mwall wrote:
>
>
>
> On Saturday, September 23, 2017 at 5:40:05 PM UTC-4, Paul Oversmith wrote:
>>
>> I am having a real problem with the graph for lightning strikes using an 
>> Acurite 6045 lighting detector and the weewx-sdr driver.
>>
>> The total number of strikes and distance reports correctly, the strikes 
>> (delta) is not right (the strike are reported as .02 to .06 rather than an 
>> integer count, please see attached image).  
>> I have put monitors in the _calculate_delta(label, newtotal, oldtotal) 
>> routine and the values for newtotal and oldtotal are correct and show a 
>> difference of 1 when there is a strike.
>>
>> I tried several different setup options, but none fixed the situation.  I 
>> suspect it has something to do with the time frame and the averaging of 
>> strikes over an interval rather than just reporting the quality,
>>
>> But I am at a loss to see what I have setup incorrectly.
>>
>> Hope someone has a suggestion to fix the problem.
>>
>
> paul,
>
> thank you for the detailed problem description.  you need to set the 
> accumulator for the lightning database field.  as of weewx 3.7, you can do 
> this in the weewx configuration file, like this:
>
> [Accumulator]
>
> [[LightningStrikes]]
> extractor = sum
>
> [[LightningStrikesTotal]]
> extractor = sum
>
> you probably want 'REAL' instead of 'INTEGER' for the 'LightningDistance' 
> field (that will require re-creating the database, or manually modifying 
> the schema in sql)
>
> m
>

-- 
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 weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: Lightning Strikes on weewx-sdr Issue

2017-09-23 Thread mwall


On Saturday, September 23, 2017 at 5:40:05 PM UTC-4, Paul Oversmith wrote:
>
> I am having a real problem with the graph for lightning strikes using an 
> Acurite 6045 lighting detector and the weewx-sdr driver.
>
> The total number of strikes and distance reports correctly, the strikes 
> (delta) is not right (the strike are reported as .02 to .06 rather than an 
> integer count, please see attached image).  
> I have put monitors in the _calculate_delta(label, newtotal, oldtotal) 
> routine and the values for newtotal and oldtotal are correct and show a 
> difference of 1 when there is a strike.
>
> I tried several different setup options, but none fixed the situation.  I 
> suspect it has something to do with the time frame and the averaging of 
> strikes over an interval rather than just reporting the quality,
>
> But I am at a loss to see what I have setup incorrectly.
>
> Hope someone has a suggestion to fix the problem.
>

paul,

thank you for the detailed problem description.  you need to set the 
accumulator for the lightning database field.  as of weewx 3.7, you can do 
this in the weewx configuration file, like this:

[Accumulator]

[[LightningStrikes]]
extractor = sum

[[LightningStrikesTotal]]
extractor = sum

you probably want 'REAL' instead of 'INTEGER' for the 'LightningDistance' 
field (that will require re-creating the database, or manually modifying 
the schema in sql)

m

-- 
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 weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.