# Checking status of sensor

**URL:** <https://discourse.nodered.org/t/checking-status-of-sensor/47772>\
**Category:** General\
**Created:** [29 June 2021 07:52 UTC](https://discourse.nodered.org/t/checking-status-of-sensor/47772 "2021-06-29T07:52:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![subwayfootlong](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/subwayfootlong/32/42037_2.png) [@subwayfootlong](https://discourse.nodered.org/u/subwayfootlong)\
**Post date:** [29 June 2021 07:52 UTC](https://discourse.nodered.org/t/checking-status-of-sensor/47772/1 "2021-06-29T07:52:55Z")

</div>

Hello all,  
I want to ask what would be the best way to achieve my this desired outcome using red.

> A sensor is outputting information every second.  
> If the sensor is off, it would not have any output.  
> After 5 seconds of consecutive of having no outputs, msg.payload="Sensor off!!"

Do I use a function node or is there a built in node in node red?

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [29 June 2021 07:57 UTC](https://discourse.nodered.org/t/checking-status-of-sensor/47772/2 "2021-06-29T07:57:26Z")

</div>

I think the `RBE` node may go a long way to reduce the messages you see - maybe.

Get the node receiving the output from the sensor and then connect the `RBE` node.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [29 June 2021 08:08 UTC](https://discourse.nodered.org/t/checking-status-of-sensor/47772/3 "2021-06-29T08:08:09Z")

</div>

Use the trigger node set to send nothing - wait 5 secs - then send "Sensor Off!" - with the time set to extend on any new input...

(The RBE node will just remove repeats - so may not be what you need in this instance - but could be useful after this to reduce the volume of repeats if that is also a problem)

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [29 June 2021 08:11 UTC](https://discourse.nodered.org/t/checking-status-of-sensor/47772/4 "2021-06-29T08:11:54Z")

</div>

No problems.

I didn't understand it that way.

But all good.

---

<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:** [28 August 2021 08:12 UTC](https://discourse.nodered.org/t/checking-status-of-sensor/47772/5 "2021-08-28T08:12:34Z")

</div>

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