# Collecting messages and send a avarage

**URL:** https://discourse.nodered.org/t/collecting-messages-and-send-a-avarage/41841
**Category:** General
**Created:** [1 March 2021 17:15 UTC](https://discourse.nodered.org/t/collecting-messages-and-send-a-avarage/41841 "2021-03-01T17:15:11Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Muschelpuster](https://avatars.discourse-cdn.com/v4/letter/m/b3f665/32.png) [@Muschelpuster](https://discourse.nodered.org/u/Muschelpuster)
#### Post date: [1 March 2021 17:15 UTC](https://discourse.nodered.org/t/collecting-messages-and-send-a-avarage/41841/1 "2021-03-01T17:15:11Z")

</div>

Hello,

I'm new at node-red and so here is my first stupid question:  
I use the smart-meter-node to get values from my eletric-power-meter over a USB-IR-Adapter. That works well and so at first thanks to the developer of this node.  
But I get a message every few seconds. Thats great for a realtime-monitor but it's to much for a database. So it will be nice to collect a number of values and give out a avarage of this. Maybe every minute 1 or after 10 or 20 incomming messages. Is this possible?

Niels

---

<div class="post-metadata">

### Author: ![davidz](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@davidz](https://discourse.nodered.org/u/davidz)
#### Post date: [1 March 2021 17:59 UTC](https://discourse.nodered.org/t/collecting-messages-and-send-a-avarage/41841/2 "2021-03-01T17:59:35Z")

</div>

You can use the "smooth" node, send an average of 10 or a given number, only emit one message after reaching the average number.  
 ![Capture](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/e/3e520579a60393d5570a4b951951e69f40eb07dd.jpeg)

---

<div class="post-metadata">

### Author: ![Muschelpuster](https://avatars.discourse-cdn.com/v4/letter/m/b3f665/32.png) [@Muschelpuster](https://discourse.nodered.org/u/Muschelpuster)
#### Post date: [1 March 2021 19:02 UTC](https://discourse.nodered.org/t/collecting-messages-and-send-a-avarage/41841/3 "2021-03-01T19:02:12Z")

</div>

Thanks David, how cool. What a easy way!

Niels

---

<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: [15 March 2021 19:02 UTC](https://discourse.nodered.org/t/collecting-messages-and-send-a-avarage/41841/4 "2021-03-15T19:02:21Z")

</div>

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