Hi, A little background as to how WeeWX takes loop data and generates archive records to save to database. WeeWX accumulates the loop data seen during an archive interval and when using software record generation (as you are) WeeWX synthesises an archive record from the accumulated loop data at the end of the archive period. The value for each observation in the archive record is calculated from the accumulated values using an extractor function. The default extractor function is ‘average’. Average is fine for most observations (eg temperatures and pressures) but is unsuitable for something like rain. For rain we use ‘sum’ as the extractor function. WeeWX supports the following extractor functions; avg, count, last, max, min, noop, sum and wind. Each is pretty self explanatory except for noop and wind. Noop does nothing and wind is a special extractor that returns wind speed and direction as well as wind gust speed and wind gust direction.
So in your case you are seeing WeeWX apply the default average extractor to your lightning data. Clearly that is not what you want for lightning strike count, you want ‘sum’ just as for rain. Fortunately, you can tell WeeWX what extractor function to use for an observation. In weewx.conf look for an [Accumulator] stanza and add an entry as follows: [Accumulator] [[lightning_strike_count]] extractor = sum If you don’t have an [Accumulator] stanza just add it at the end of the file. As for lightning_distance, it really depends what you want to extract. There would seem to be a few possibilities, avg and min seem the two most likely but you could also use last. I guess it comes down to what data you want to record/display. Once you’ve worked that out just add an appropriate extractor entry for lightning_distance. Oh, and once you have finished your changes to weewx.conf you will need to restart WeeWX. Gary -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/cbe3e1fd-b17f-4b04-9a22-df9e47f4fb04o%40googlegroups.com.