RPI4B vs DHT22 vs Node-Red

Platform: pi 4 model B+
OS: Raspios 21-05-07
Node-RED: 1.3.4
node: v14.17.5
nodejs: v10.24.0
npm: 6.14.14
bcm2385 libs 1.69

problem node: node-red-contrib-dht-sensor v1.0.4

Hey team, I'm having problems with my DHT22 on Node-Red

I've followed the instructions @ node-red-contrib-dht-sensor (node) - Node-RED

However it seems to continually spit out errors like:

I've also tested my DHT22 sensor on the RPI4B with a simple python script and it seems to be connected and outputting correctly

Can anyone help point to me towards where I've cooked it?

In my mind it could be an issue of BCM2385 vs BCM2711 for the later rpi4b versions but honestly at this point I'm unsure

EDIT: I'm going to try and connect up my SCD30 to see if that interfaces with node-red

EDIT2: This is my flow, with the only two edits being in timestamp (regular intervals) and in debug node to make the output include the complete msg object

That should eliminate incorrect wiring (wrong GPIO and/or power)... but good to doublecheck.

The fact that it is seeing "0.00" for both reading tells me it is simply not connecting... I honestly don't know if that node would pass on the more traditional NAN error, or if "0.00" is the equivalent.

Are you running Node-Red with the correct root permissions? as indicated in the directions. However, I will admit to a lack of NR knowledge on how to confirm that :blush: ... all I know it that I must be, as my DHT sensor works fine with same node/settings, although I am using GPIO 26.

Just noticed this... I am running an RPi3b so my results may not compare to yours.

If the Dht is hooked up wrong you will get 00.00 on the output not NaN. The single hardest thing is figuring out which pin to hook up to.
I use node-red-contrib-dht-sensor and the node does work. I use the BCM GPIO pin numbering scheme. Find a good website that lists out all the different pin numbering schemes and sort out which pin you need to hook to. The chip is pretty robust I've hooked them up backwards and they survived. I suspect you have the data on the wrong pin and it may take some research to get it right but once you do it should work. There are so many pin numbering schemes it's tough to slog through them.
I'm sure you realize you are way behind on Node Red version. My DHT ran fine on that version but sooner or later consider an upgrade to new version.

Are you running Node-Red with the correct root permissions?

Thanks for making this comment mate, sent me down an absolute rabbit hole from superusers/root, docker, yarn'in, and various git libraries

I'm unsure if my DHT22 sensor will work now but I did get my SCD30 sensor working in the end with a tiny bit of trial and error

Now I'm really unsure how or where to throw these few lines of code, I have to try and see how accurate the sensor is tomorrow

Now I'mma try to implement a relay :slight_smile:
Thanks again for your help

Roger the DHT sensor does seem like a bit of buggery, I might a have a look around for more high quality / reliable sensors like the SCD30

Ha good catch on that Node Red version! I copy pasted that problem template changed all other versions but not the NR one