Fastest OneWire (ds18b20) update rate on Raspberry Pi

@meeki007 - have you also looked at https://flows.nodered.org/node/node-red-contrib-sensor-ds18b20 - how does that compare in terms of read speed ?

Because the node is locked into GPIO4
Quote from Documentation on the contrib.....
"The DS18B20 sensors must be connected on GPIO4 (or physical pin #7) because this is the only pin that supports native 1-Wire protocol"

Well this is not true any more. I use any pin I want with

    dtoverlay=w1-gpio,gpiopin=x

So I never gave node-red-contrib-sensor-ds18b20 a look.

I doubt it will do well due to its synchronous code. So read spread will be high and it will block the event loop as well.

Consider this post:

That is a different node, hence why I was asking if the other suffered in the same way.

Ooops, sorry for that. I shouldn't post before I had my first cup of coffee. :see_no_evil:

1 Like

That one uses the https://www.npmjs.com/package/ds18b20 library and makes proper use of callbacks. So it should work better from that point of view.

Another useful feature of owserver is that it can cache values, so if a value is requested multiple times (possibly by different clients) then it can provide the last value read rather than having to read the sensor again. I have mine set to timeout the cache at 15 seconds, which with DS18B20 is fine as nothing much happens in that timescale.