Suggestion: Change topic to event/metering/summation/minute
Closed this issue · 2 comments
Have you considered changing the MQTT topic to event/metering/summation/minute
? That seems to be a more accurate number than event/metering/instantaneous_demand
. instantaneous_demand
seems to update every 3 seconds and may miss small bits that add up. summation/minute
seems to include an average of all usage for the past minute, to a floating point accuracy. For InfluxDB I think this might be a better topic.
The example output for this topic is
{
"type":"minute",
"time":1614969300000,
"local_time":"2021-03-05T13:35:00",
"value":632.543825
}
Now that I think about it, I'm wondering if summation/minute
is just providing an average of the instantaneous_demand
over the past minute, hence the floating point accuracy.
Hi George, I hadn't considered that — in fact, I didn't know event/metering/summation/minute
existed.
Now that I think about it, I'm wondering if
summation/minute
is just providing an average of theinstantaneous_demand
over the past minute, hence the floating point accuracy.
I would guess, but have no evidence, that that's the case.
In any case, I would probably accept a PR that optionally subscribes to that topic and sends it to InfluxDB. Ideally we could combine instantaneous demand and the minute summation in a single measurement, but that could be a little messy in the current codebase.