Best DS18B20 Node? Mine doesn't work properly

Hi. I am using this node:

But it is not working properly. Please, check this post:

I am trying to use a switch, but it responds after the sensor node is done doing its own thing. It works really fast without the node I linked above. In this forum post, I tried to fix it with Colin's help, but it didn't work. Surely, there must be other people having the same issue. I am open to all kinds of advices.

For the record, I took a quick look at the source of node-red-contrib-DS18B20-sensor node. It seems to use fs.readdirSync and fs.readFileSync for accessing the device tree. This surely isn't good unless you don't have anything timing critical running on the same Node.js script as it's blocking everything for the time it takes to read the sensors.

Yes, that is exactly the problem in the other thread. Reading four sensors every ten seconds it practically brings node-red on a Pi 4 to its knees. It is basically not fit for purpose.

How can I fix this issue? Can I edit custom nodes like this one? Should I use another node?

If you search for ds18b20 you will see there are a couple of other options. Does anyone else have experience of these. If not then go and look at them on github and check to see if any serious issues have been opened on them.

Okay. I'll do that tomorrow, and let you know the results. Thanks.

Switched to this one:

It greatly reduced the delay of the switch.

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