powermeter usage for today

Forum about MQTT, machine-to-machine (M2M), "Internet of Things" and Node.js

Moderators: Digit, Rene, Willem4ever, Bwired

powermeter usage for today

Postby Kroonen » Wed Feb 26, 2014 8:34 pm


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)?
Posts: 302
Joined: October 2007
Location: Netherlands

Re: powermeter usage for today

Postby Digit » Wed Feb 26, 2014 8:56 pm

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...
User avatar
Global Moderator
Global Moderator
Posts: 3388
Joined: March 2006
Location: Netherlands

Return to MQTT & Node.js

Who is online

Users browsing this forum: No registered users and 1 guest