# Show if sensor is ative or inactive

**URL:** <https://discourse.nodered.org/t/show-if-sensor-is-ative-or-inactive/7957>\
**Category:** General\
**Created:** [14 February 2019 11:05 UTC](https://discourse.nodered.org/t/show-if-sensor-is-ative-or-inactive/7957 "2019-02-14T11:05:59Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [14 February 2019 11:12 UTC](https://discourse.nodered.org/t/show-if-sensor-is-ative-or-inactive/7957/2 "2019-02-14T11:12:10Z")

</div>

You now have 3 threads all on the same topic....  
tell me which one you want to use in preference and I will lock the others to stop others getting confused.

> [@Database not receive the data when one sensor stops](https://discourse.nodered.org/t/database-not-receive-the-data-when-one-sensor-stops/7824/35):
>
> I use this thread. I testing another way for my problem but i still in the same, the way i´m used is this: My function is programmed like this: if (typeof msg.payload === 'number') { msg.payload = true; } else { msg.payload= false; } return msg; When I run the program this gives me the following values ​​of msg.payload: 14/02/2019, 09:45:01[node: test function](http://10.6.4.101:1880/#)ns=2;s=SensorIndutivo : msg.payload : boolean true 14/02/2019, 09:45:01[node: value …

> [@Message ON/OFF in case one sensor Stop working](https://discourse.nodered.org/t/message-on-off-in-case-one-sensor-stop-working/7920/16):
>
> You have the delay set to 500 milliseconds so it will send one then 0.5 seconds later it sends the other. You need to set the timeout larger than the normal time between samples. Also you do not want to send ON or OFF to the Join node, that should still be connected direct to the sensor.

---

_[View the full topic](https://discourse.nodered.org/t/show-if-sensor-is-ative-or-inactive/7957)._
