Timer Repeater and Message

Hey there!

I am trying to calculate energy every hour. At the moment, I receive the MQTT message from a device every 10 seconds. I am just reading the Amp Usage and sending it thru a node on the HA Dashboard.
I want to be able thru NodeRed to calculate the usage of the device, based on the 1 hour average Amp received. The device is working on 12V.
Thx in advance!
I am not that good on NodeRed!

Have a look at node-red-node-smooth, which you could configure to give you the mean value over the previous hour.

1 Like

Great Job THX! It worked. I usually measure the mAmp every 10 seconds, so I just split the quantity through the smooth node you recommended. In that case, I have the mean value at the exact time. With the Function NODE, I Calculate and send it to my MQTT broker.

Are you converting the current to Watts (ie 12 x Amps)?
Watt/hours is the unit of energy, which is normally used for the measure of usage.

YES. that is how I measure the POWER usage of the system.