Page 1 of 1

powermeter usage for today

Posted: Wed Feb 26, 2014 9:34 pm
by Kroonen
Hi,

We now have nice scripts for realtime reading the power. It also should be nice to have the the current usage for today also realtime.

I don't know how to write it, but i think the value at 0:00 of each day should be remembered (normal and low tariff) and each time it should be , new value - remembered value, and publish the value to the mqtt broker?

Robert, Pieter, is this a nice addition for the script(s)?

Re: powermeter usage for today

Posted: Wed Feb 26, 2014 9:56 pm
by Digit
Sure, that would be a nice add-on.
I already have this in my system, but not in the smartmeter script itself.

I have it tucked away in a script that provides calculated values based on real sensor information, like temperatures difference between measured and setpoint, sun & moon position, delta compared to value @ 00:00, etcetera.

Doing this should be easy to do; just remember the values when the first 6 characters in the P1 timestamp change (haven't checked but I think the century is not in it, so when "140226" becomes "140227") and subtract that value from the current one (and the next to come). Something like that...