# Dht 11/22 hangs Node red when disconnected

**URL:** <https://discourse.nodered.org/t/dht-11-22-hangs-node-red-when-disconnected/26922>\
**Category:** General\
**Created:** [19 May 2020 12:35 UTC](https://discourse.nodered.org/t/dht-11-22-hangs-node-red-when-disconnected/26922 "2020-05-19T12:35:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ki-va](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ki-va/32/22283_2.png) [@Ki-va](https://discourse.nodered.org/u/Ki-va)\
**Post date:** [19 May 2020 12:35 UTC](https://discourse.nodered.org/t/dht-11-22-hangs-node-red-when-disconnected/26922/1 "2020-05-19T12:35:36Z")

</div>

hi,  
I have a problem with DHT sensors, if a sensor is malfunction or removed from my system (RPi 3b )under power, Node red hangs until the sensor is plugged in and NR continues.  
Is there a way to override a malfunction or removed sensor and with out hanging NR?

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [19 May 2020 15:14 UTC](https://discourse.nodered.org/t/dht-11-22-hangs-node-red-when-disconnected/26922/2 "2020-05-19T15:14:30Z")

</div>

- What version of NR and Node.js?
- What OS are you running on the Pi and what release?
- What dht node are you using (full name please)
- What settings for that node do you have?
- can you access the Pi via SSH while this is happening?

---

<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:** [19 May 2020 21:07 UTC](https://discourse.nodered.org/t/dht-11-22-hangs-node-red-when-disconnected/26922/3 "2020-05-19T21:07:30Z")

</div>

Also what do you mean by 'hangs'?  
Does the whole Pi grind to a halt or just node red?  
Is the node-red editor still accessible?  
What do you see if you run `top` in a terminal and then make it hang?

---

<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:** [19 May 2020 21:36 UTC](https://discourse.nodered.org/t/dht-11-22-hangs-node-red-when-disconnected/26922/4 "2020-05-19T21:36:00Z")

</div>

The main question is exactly which DHT node is being used ?

---

<div class="post-metadata">

**Author:** ![Ki-va](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ki-va/32/22283_2.png) [@Ki-va](https://discourse.nodered.org/u/Ki-va)\
**Post date:** [20 May 2020 06:52 UTC](https://discourse.nodered.org/t/dht-11-22-hangs-node-red-when-disconnected/26922/5 "2020-05-20T06:52:40Z")

</div>

I'm using the following node:  
node-red-contrib-dht-sensor.  
Found a solution: I'v added a Switch after The contrib-dht-sensor node  
and stated that if msg.isValid = false do not continue my flow.  
thank you for your help.

---

<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:** [3 June 2020 06:52 UTC](https://discourse.nodered.org/t/dht-11-22-hangs-node-red-when-disconnected/26922/6 "2020-06-03T06:52:44Z")

</div>

Closed on 3 June 2020 06:52 UTC

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