I'm having the same issue - and just caught the FLOAT vs INTEGER problem.   
Don't understand the accumulator piece, shouldn't that be default?

Sent from my iPhone
Clay Jackson


> On Sep 23, 2017, at 2:40 PM, Paul Oversmith <p...@overweb.com> 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.
> 
> My setup:
> 
> Schemia:
> 
> # AcuRite Lightning                         
>            ('OutTempBalcony',         'REAL'),
>            ('OutHumidityBalcony',     'REAL'),
>            ('LightningStrikes',       'INTEGER'),
>            ('LightningStrikesTotal',  'INTEGER'),
>            ('LightningDistance',      'INTEGER'),
> 
> Acurite.conf (a seperate instants and database; I also have a Davis Pro):
> 
> [SDR]
>     driver = user.sdr
>     cmd = /usr/local/bin/rtl_433 -q -U -F json -R40 -R41
>     log_unknown_sensors = False
>     log_unmapped_sensors = True
>     
>         OutTempBalcony = temperature.E76F.AcuriteLightningPacket
>         OutHumidityBalcony = humidity.E76F.AcuriteLightningPacket
>         LightningStrikes = strikes.E76F.AcuriteLightningPacket
>         LightningStrikesTotal = strikes_total.E76F.AcuriteLightningPacket
>         LightningDistance = distance.E76F.AcuriteLightningPacket
> 
>     [[deltas]]
>         LightningStrikes = LightningStrikesTotal
> 
> Skin configuration [Image Generator]:
> 
>         [[[dayLightningStrikes]]]
>             [[[[LightningStrikes]]]]
>               plot_type = bar
>               color = 0x4242b4
>               label = Lightning Strikes
>         [[[dayLightningDistance]]]
>               plot_type = bar
>               yscale =0, 50, 5
>               color = 0x4242b4
>               [[[[LightningDistance]]]]
>               Label = 'Storm Head Distance'
>               
> Skin.tmpl:
> 
>     <tr style='vertical-align:middle'>
>       <td class='metric_name'>Lighting Strikes<br/>(Last Hour)</td>
>       <td class='metric_large' colspan='2' >
>        <a href='dayLightningStrikes.png' 
> class='popup'>$hour($hours_ago=1).LightningStrikes.sum</a>
>       </td>
>       <td class='metric_value'>
>        #if ($day.LightningStrikes.sum.formatted == "0")
>            <span title='No ligntning activity in last hour')'>0</span><br/>
>            <span title='No ligntning activity in last hour')'>0</span>
>        #else
>           <span title='Number of strikes this day. Highest number at 
> $day.LightningStrikes.maxtime.format('%I:%M 
> %p')'>$day.LightningStrikes.sum</span><br/>
>           <span title='Closest Storm Head Distance this day at 
> $day.LightningDistance.mintime.format('%I:%M 
> %p')'>$day.LightningDistance.min</span>
>         #end if
>       </td>
>       <td class='metric_units'> 
>         strikes<br/>miles     
>       </td>
>       <td class='metric_name'>Storm Head<br/>(Last Hour)</td>
>       <td class='metric_large' colspan='2' >
>         #if ($day.LightningStrikes.sum.formatted == "0")
>         <a href='dayLightningDistance.png' class='popup'>0</a>
>        #else
>         <a href='dayLightningDistance.png' 
> class='popup'>$hour($hours_ago=1).LightningDistance.min</a>
>         #end if
>       </td>
>       <td></td>
>       <td class='metric_units'>miles</span></td>
>       
>       <td class='metric_name'>Lighting Strike<br/>Count</td>
>       <td class='metric_large' colspan='2' >
>        <a href='dayLightningStrikes.png' 
> class='popup'>$current.LightningStrikesTotal</a>
>       </td>
>       <td class='metric_name'>Last Storm<br/>Head Distance</td>
>       <td class='metric_large' colspan='2' >
>         <a href='dayLightningDistance.png' 
> class='popup'>$current.LightningDistance.formatted</a>
>       </td>
>       <td class='metric_units'>miles</span></td>
>     </tr>             
> 
> Units.py:
> 
> bs_group_dict = ListOfDicts({"altitude"           : "group_altitude",
> 
>                               "TempFreezer"            : "group_temperature",
>                               "LightningStrikes"       : "group_count",
>                               "LightningStrikesTotal"  : "group_count",
>                               "LightningDistance"      : "group_distance",
> -- 
> 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.
> <dayLightningStrikes.png>

-- 
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.

Reply via email to