Just tidying up my hasty reply, what you are doing is specifying the accumulator extractor function for your observation (you can also specify the adder and merger functions and the accumulator type as well as the extractor function). Oh, and one more thing, you will need WeeWX v 3.7.0 or later to use the [Accumulator] stanza.
Gary On Sunday, 24 March 2019 09:13:14 UTC+10, gjr80 wrote: > > Hi, > > I had a similar issue with the driver I wrote for my solar PV system. You > need to change the accumulator action for your energy field. Try adding > something like: > > [Accumulator] > [[energy]] > extractor = sum > > > to weewx.conf substituting your energy field name in place of 'energy'. > > Gary > > > On Sunday, 24 March 2019 08:59:20 UTC+10, Louis De Lange wrote: >> >> I am busy writing a new driver to capture electricity data from a restful >> service using POST requests - based heavily on the Interceptor driver. >> >> I have the whole think working correctly except for the incremental >> energy (incEnergy) observation. Using software record generation, weewx >> calculates the incEnergy observation record using the average of the loops >> over the archive period, but it should add all the loop increments to >> archive the sum of all the loops - similar to the way that it handles rain. >> >> What do I need to do force the sum of loops for archive record, rather >> than the default average of the loops? >> >> Thanks in advance for any insight. >> >> Louis >> >
