powermeter usage for today

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

Moderators: Digit, Rene, Willem4ever, Bwired

Post Reply
Kroonen
Member
Member
Posts: 302
Joined: Mon Oct 01, 2007 6:38 pm
Location: Netherlands

powermeter usage for today

Post 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)?
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

Re: powermeter usage for today

Post 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...
Post Reply

Return to “MQTT & Node.js”