New input processors: 'kWh Accumulator' and 'Log to feed (Join)' + Post processor

While setting up a number of systems last week I needed to log a cumulative kWh reading read directly from a meter to a feed. In the past I’ve used the Wh_accumulator process for this but it’s not really ideal. First the name is incorrect for kWh feeds and second the max power limit filter ends up being 25 MW instead of 25 kW. This hard coded filter is in itself not ideal but is a limitation of the implementation of the input processors in terms of providing more than one configuration option per processor.

The Wh_accumulator process was also developed specifically for the EmonTx pulse count input which can reset if the power to the unit is lost, the process is designed for catching these reset points and removing them, so that the resulting feed continues to increase as though the reset did not happen.

The input I needed to log should not reset (at least within a regular timeline) as its a billing meter reading and I felt it was more important to keep the integrity of the reading rather than filtering for resets, causing the kwh value in the feed to diverge potentially from the actual meter reading.

One of the important features of the Wh_accumulator process is that it creates a feed without any null values if there are missing datapoints, it joins across any gaps with a straight line between the last and current reading. This is needed for creating half hourly, daily, weekly and monthly bar graphs from cumulative kWh data using the delta feature.

What I needed was a simple Log to feed process but with the join option to link across missing data points so that I could then use the resulting feed with a bar graph visualisation. I also took the opportunity to add a kWh Accumulator process so that both options where covered for this process type.

Log to feed (Join)

In addition to the standard log to feed process, this process links missing data points with a straight line between the newest value and the previous value.

kWh Accumulator

This process works the same as the Wh Accumulator but with a filter fixed to 25 kW rather than the 25 MW that would result from using kWh data with the Wh Accumulator. This process include the reset filter present in the Wh Accumulator and joins across gaps with a straight line as described above.

New post process: Remove NAN values

Related to the above , I have also added a new post process designed to run through cumulative kWh feeds that have been logged without a processor that joins the last and current value with a straight line.
Useful if you see gaps in your daily bar graph created from a feed using the standard log_to_feed on a meter reading.

I used this post process to correct old data that I had already recorded before then switching the input process to the new Log to feed (Join) input process.

Both of these developments are now available in the emoncms core and post processing module master branches for testing.