# How to do this in Node-RED

**URL:** <https://discourse.nodered.org/t/how-to-do-this-in-node-red/73159>\
**Category:** General\
**Created:** [4 January 2023 13:15 UTC](https://discourse.nodered.org/t/how-to-do-this-in-node-red/73159 "2023-01-04T13:15:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![duaw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/duaw/32/20970_2.png) [@duaw](https://discourse.nodered.org/u/duaw)\
**Post date:** [4 January 2023 13:15 UTC](https://discourse.nodered.org/t/how-to-do-this-in-node-red/73159/1 "2023-01-04T13:15:09Z")

</div>

Hi, guys and gals!  
I am stuck and I need some advice:  
Relative Humidity comes in from my green house via MQTT, eg. "81.78". I round it to a whole number, eg. "82". I want to display it, among others, on a node-red-dashboard chart.  
So far I ignore via filter-node (ex rbe) all unchanged values, eg. "81.95" which would result in the same "82".  
I also rate-limit the values provided to the chart to 1msg / 5 mins. I want to keep the chart lean.  
So far, so good. Works great when there is sufficient fluctuation (as with temperatures).  
However, when there is (like now) 100% over hours, no data gets into the chart. filter-node does its job: it filters unchanged values.  
The line in the chart then ends the moment the 100%-values started coming in. The line ends some hours ago, looks like a sensor or comms failure ...  
This is what I want:  
-- if the value is unchanged, ignore it ... UNLESS 5 mins have passed since the very same value was there. In this case, send the new unchanged value to the chart.  
-- if the value has changed, send it to the rate limit node (and then to the chart).  
How would I do that with standard nodes?  
Thanks in advance, Uwe

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [4 January 2023 13:23 UTC](https://discourse.nodered.org/t/how-to-do-this-in-node-red/73159/2 "2023-01-04T13:23:55Z")

</div>

Why filter the messages , have you just tried rate limit only and drop intermediate messages, or possible the smooth node set to every 5 minutes.

---

<div class="post-metadata">

**Author:** ![edje11](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/edje11/32/572_2.png) [@edje11](https://discourse.nodered.org/u/edje11)\
**Post date:** [4 January 2023 13:47 UTC](https://discourse.nodered.org/t/how-to-do-this-in-node-red/73159/3 "2023-01-04T13:47:59Z")

</div>

I'm using myself the [resend](https://flows.nodered.org/node/node-red-contrib-msg-resend) node for this purpose.

---

<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:** [4 January 2023 14:08 UTC](https://discourse.nodered.org/t/how-to-do-this-in-node-red/73159/4 "2023-01-04T14:08:28Z")

</div>

I think that node is obsolete as the Trigger node now has an option to resend the message at a repeat interval. Or does the resend node have a feature not covered by the Trigger node.

---

<div class="post-metadata">

**Author:** ![duaw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/duaw/32/20970_2.png) [@duaw](https://discourse.nodered.org/u/duaw)\
**Post date:** [4 January 2023 17:20 UTC](https://discourse.nodered.org/t/how-to-do-this-in-node-red/73159/5 "2023-01-04T17:20:31Z")

</div>

Thanks a lot. I was struck with blindness. filter was a first idea and it did stay. No second thought from me.  
Regards, Uwe

---

<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:** [18 January 2023 17:20 UTC](https://discourse.nodered.org/t/how-to-do-this-in-node-red/73159/6 "2023-01-18T17:20:51Z")

</div>

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