[solved!]DHT11's stopped working on Pi3b


Raspian with the latest updates and kernel. Pi3B+
I have been running a pi out in the greenhouse since last spring and I just noticed the temp/humidity DHT11 sensor stopped working.
I am using node-red with the node-red-contrib-dht-sensor lib. I just figured the sensor went bad so I ordered another and... woops the sensor is fine...
I have a spare Pi so I decided to try to get a spare DHT11 running on a fresh install.
Still no joy. Something must have borked in an update, maybe? Does anybody else have any DHT11's running?
Here is a simple debug flow for one.

[{"id":"99fdf180.ce","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"4b7411e7.09ff6","type":"inject","z":"99fdf180.ce","name":"","topic":"","payload":"","payloadType":"date","repeat":"2","crontab":"","once":false,"onceDelay":0.1,"x":150,"y":100,"wires":[["3228568d.3137ca"]]},{"id":"3228568d.3137ca","type":"rpi-dht22","z":"99fdf180.ce","name":"DHT11","topic":"rpi-dht11","dht":"11","pintype":"0","pin":4,"x":367,"y":113,"wires":[["808f8448.936a08"]]},{"id":"808f8448.936a08","type":"debug","z":"99fdf180.ce","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":568,"y":108,"wires":[]}]


object topic: "rpi-dht11" payload: "0.00" _msgid: "997fc7b.a04e738" humidity: "0.00" isValid: false errors: 4 location: "DHT11" sensorid: "dht11"
Any advice on how to troubleshoot this would be greatly appreciated!



Hey Jon,

I haven't running a DHT11 sensor at the moment. But seems the node-red-contrib-dht-sensor that you are using, is build on top of node-dht-sensor. In this issue, they talk about a dht-sensor.log file.

Can you perhaps find more information inside that log file?


Thanks for that!
I tried the Validation method outlined there and still no joy.
The log file is not present on my system either.
I will try and make a post there too.


do you have a 4.7K resistor between the data line and Vcc? I don't remember where I forund that tidbit, but is how I always connecdt them up


There is one built into the cct board attached to the DHT11.
This has been working for almost a year before it quit so it should not be a connection or hardware issue (tried a brand new sensor too).


What version of node-red-contrib-dht-sensor are you using? You can find out by using manage palette
what version of NR and node.j (can be found in startup log)
what GPIO pins are you using?
what version of the bcm2385 lib?


I am using the latest version of all of that on this fresh install.
node-red-contrib-dht-sensor v1.0.4
uname -a Linux raspberrypi 4.14.98-v7+ #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l GNU/Linux lsb_release -d Description: Raspbian GNU/Linux 9.8 (stretch)
npm list (node:1467) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead. node-dht-sensor@0.0.34 /home/pi/Downloads/node-dht-sensor └── nan@2.8.0 node -v v8.11.1 npm -v 1.4.21 (node:1482) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
I am using GPIO pin 4 and the latest bcm2385 libs 1.58 .



Please don't take this wrong, but saying you are on the latest versions doesn't help anyone. If someone in the future looks at this they will have no idea what releases were envolved. In addition in the last couple days any one of the peices may have been updated. So please give me the exact releases.

I'm setting up a test system but have to go out for a couple hous so I won't e back on for a bit.


No offence taken!
I appreciate you trying to help me.
All of the pertinent versions are listed above.


Solved! The new sensor's I got have 3 pins instead of 4, the pinout I had was incorrect!
https://components101.com/dht11-temperature-sensor Dont use that one its wrong!!
This one is correct:
Now back to trouble shooting the original issue...
Thank you for your time!
Best regards,

1 Like

In the future start your thread with

Platform: pi 3 model B+
OS: Stretch-lite 2018-11-13
Node-RED: 0.19.5
Node.js: v10.15.1
problem node: node-red-contrib-dht-sensor v1.0.4
bcm2385 libs 1.58

problem: blah blah blah

that will make it much easier for people, that want to help, get up to speed with the issue.


npm 1.4 is known to break many things... and is def not "the latest" - neither is node 8.11.1 ... they may be what apt / debian / raspbian give you by default - but are way back level and do not have the latest security and other fixes.


The best way to get a known working set of tools is to upgrade using the install/upgrade script for the Pi in the node-red docs.


Thank you gentlemen!
It turns out the original issue was a fried GPIO pin.