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

2017-09-23 Thread Clay Jackson
Ah, thanks for the clarification!   

Sent from my iPhone
Clay Jackson


> On Sep 23, 2017, at 5:44 PM, mwall  wrote:
> 
>> On Saturday, September 23, 2017 at 7:11:55 PM UTC-4, Clay Jackson wrote:
>> 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?
> 
> the accumulator determines how values will be aggregated over time periods.  
> for example, observations such as rain are treated differently than 
> observations such as temperature.
> 
> when you add a new field to the database, you typically have to specify a few 
> things:
> 
> - the database type, e.g., 'INTEGER'
> - the unit group
> - the accumulator behavior
> 
> right now each of these is done in a different place - the type is in the 
> schema as python code (typically user/schema.py or user/extensions.py), the 
> unit group is in python code (typically user/extensions.py), and the 
> accumulator behavior is in weewx configuration file.
> 
> it might make sense to put all these things together, for example completely 
> in the weewx configuration file.
> 
> however, such a system has not yet been designed.
> 
> 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.

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


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

2017-09-23 Thread mwall
On Saturday, September 23, 2017 at 7:11:55 PM UTC-4, Clay Jackson wrote:
>
> 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?
>

the accumulator determines how values will be aggregated over time periods. 
 for example, observations such as rain are treated differently than 
observations such as temperature.

when you add a new field to the database, you typically have to specify a 
few things:

- the database type, e.g., 'INTEGER'
- the unit group
- the accumulator behavior

right now each of these is done in a different place - the type is in the 
schema as python code (typically user/schema.py or user/extensions.py), the 
unit group is in python code (typically user/extensions.py), and the 
accumulator behavior is in weewx configuration file.

it might make sense to put all these things together, for example 
completely in the weewx configuration file.

however, such a system has not yet been designed.

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.


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

2017-09-23 Thread Clay Jackson
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  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:
> 
> 
>   Lighting Strikes(Last Hour)
>   
> class='popup'>$hour($hours_ago=1).LightningStrikes.sum
>   
>   
>#if ($day.LightningStrikes.sum.formatted == "0")
>0
>0
>#else
>%p')'>$day.LightningStrikes.sum
>%p')'>$day.LightningDistance.min
> #end if
>   
>
> strikesmiles 
>   
>   Storm Head(Last Hour)
>   
> #if ($day.LightningStrikes.sum.formatted == "0")
> 0
>#else
>  class='popup'>$hour($hours_ago=1).LightningDistance.min
> #end if
>   
>   
>   miles
>   
>   Lighting StrikeCount
>   
> class='popup'>$current.LightningStrikesTotal
>   
>   Last StormHead Distance
>   
>  class='popup'>$current.LightningDistance.formatted
>   
>   miles
>  
> 
> 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.
> 

-- 
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] Lightning Strikes on weewx-sdr Issue

2017-09-23 Thread Paul Oversmith
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:


  Lighting Strikes(Last Hour)
  
   $hour($hours_ago=1).LightningStrikes.sum
  
  
   #if ($day.LightningStrikes.sum.formatted == "0")
   0
   0
   #else
  $day.LightningStrikes.sum
  $day.LightningDistance.min
#end if
  
   
strikesmiles 
  
  Storm Head(Last Hour)
  
#if ($day.LightningStrikes.sum.formatted == "0")
0
   #else
$hour($hours_ago=1).LightningDistance.min
#end if
  
  
  miles
  
  Lighting StrikeCount
  
   $current.LightningStrikesTotal
  
  Last StormHead Distance
  
$current.LightningDistance.formatted
  
  miles
 

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.