Calculate Electrical consumption at 1 Minute interval

Hello,

I'm a beginner with Node Red. We have Energy Project at our company were we trace the Electrical Power. We use a Weidmueller UC20-WL2000-AC with Node Red for Weidmueller v1.1.2.

My problem is now, that our IT want the value of the power meter, what we consume between 1 minute. The want that I store the value and again 1 minute later, then subtract the value and send them the result of that calculation.

I have no idea how I can realize that. I have checked the forum but maybe I don't ask the correct questions.
I hope someone here can help me to solve this problem.

Welcome to the forum @Funky123

What do you not know how to do?
Fetch the value?
Do that every minute?
Calculate the difference with the last reading?
Send them the result?

If you are just starting with node red, I recommend watching this playlist: Node-RED Essentials. The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot more in about 1 hour. A small investment for a lot of gain.

2 Likes

Hi @Colin

my problem is to calculate the difference since the last reading.

Thanks for the Link, I will watch them.

Maybe have a look at this:

That´s what I am using for SmartPlugs at home.
I am writing the value to a .txt file every few minutes and on nodered start I initialize the value from that .txt file

In flows.nodered.org there is an example flow for exactly this. It's a couple of years old and I have not tried it.

So you'll need to store the previous reading, then do the difference on the next reading...

You could use Context storage:

https://nodered.org/docs/user-guide/context

Thanks for all feedback.
I use the code from @jbudd , that is exact what I'm looking for.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.