# Timer Repeater and Message

**URL:** <https://discourse.nodered.org/t/timer-repeater-and-message/96130>\
**Category:** General\
**Tags:** function-node\
**Created:** [20 March 2025 17:02 UTC](https://discourse.nodered.org/t/timer-repeater-and-message/96130 "2025-03-20T17:02:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Delivery2you](https://avatars.discourse-cdn.com/v4/letter/d/91b2a8/32.png) [@Delivery2you](https://discourse.nodered.org/u/Delivery2you)\
**Post date:** [20 March 2025 17:02 UTC](https://discourse.nodered.org/t/timer-repeater-and-message/96130/1 "2025-03-20T17:02:12Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [20 March 2025 20:51 UTC](https://discourse.nodered.org/t/timer-repeater-and-message/96130/2 "2025-03-20T20:51:31Z")

</div>

Have a look at [node-red-node-smooth](https://flows.nodered.org/node/node-red-node-smooth), which you could configure to give you the mean value over the previous hour.

---

<div class="post-metadata">

**Author:** ![Delivery2you](https://avatars.discourse-cdn.com/v4/letter/d/91b2a8/32.png) [@Delivery2you](https://discourse.nodered.org/u/Delivery2you)\
**Post date:** [22 March 2025 14:51 UTC](https://discourse.nodered.org/t/timer-repeater-and-message/96130/3 "2025-03-22T14:51:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [22 March 2025 15:23 UTC](https://discourse.nodered.org/t/timer-repeater-and-message/96130/4 "2025-03-22T15:23:45Z")

</div>

> [@Delivery2you](#):
>
> 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.

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.

---

<div class="post-metadata">

**Author:** ![Delivery2you](https://avatars.discourse-cdn.com/v4/letter/d/91b2a8/32.png) [@Delivery2you](https://discourse.nodered.org/u/Delivery2you)\
**Post date:** [22 March 2025 16:03 UTC](https://discourse.nodered.org/t/timer-repeater-and-message/96130/5 "2025-03-22T16:03:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [20 June 2025 16:03 UTC](https://discourse.nodered.org/t/timer-repeater-and-message/96130/6 "2025-06-20T16:03:49Z")

</div>

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