Just to make sure I didn’t overlook anything, is it possible to send the maximum energy value of an input or output and not just the difference since the last measurement? Can this be solved in the calculator with a “max” key word or something like that?
Sending kWh is supposed to do that, but I just tried to send it to Emoncms and am getting a 0 input. Let me look into it. Should be the same for influxDB.
Looking at the code, it’s as you said, kWh output produces the change in kWh since the last post to influx or Emoncms. The zero value I am seeing in my Emoncms input is probably a significant digits issue.
At this point, I am reluctant to change how it works given it has been that way for a long time. I don’t recall my thinking at the time, but it is set to deliver 7 decimal places, so the delta kWh was apparently intentional.
It’s coincidental that you bring this up as I’ve been working feverishly on the new query/graph and that’s one area that I’ve made significant changes. The new graph only deals in Wh, and displays them as kWh as the magnitude dictates, a-la-influx. This has simplified things considerably and as is usually the case, made them more logical. With the new query/graph, you can get the total Wh (or kWh if appropriate) for the duration of the inquiry, with delta kW for the groups(intervals). The internal kWh counter is not available. So if you wanted to know the kWh used between any two points in time, it will tell you that.
I believe you can use the integral function in influx to do the same thing.