# Quick note if you're a) reading multiple ds18b20's with a raspberry pi and b) struggling with flow stalls

**URL:** <https://discourse.nodered.org/t/quick-note-if-youre-a-reading-multiple-ds18b20s-with-a-raspberry-pi-and-b-struggling-with-flow-stalls/25747>\
**Category:** Hardware\
**Created:** [29 April 2020 14:02 UTC](https://discourse.nodered.org/t/quick-note-if-youre-a-reading-multiple-ds18b20s-with-a-raspberry-pi-and-b-struggling-with-flow-stalls/25747 "2020-04-29T14:02:07Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![kuema](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kuema/32/6542_2.png) [@kuema](https://discourse.nodered.org/u/kuema)\
**Post date:** [30 April 2020 07:27 UTC](https://discourse.nodered.org/t/quick-note-if-youre-a-reading-multiple-ds18b20s-with-a-raspberry-pi-and-b-struggling-with-flow-stalls/25747/3 "2020-04-30T07:27:20Z")

</div>

I had a quick look at the source code of the contrib node: [https://github.com/bpmurray/node-red-contrib-ds18b20-sensor/blob/master/ds18b20-node/ds18b20-node.js](https://github.com/bpmurray/node-red-contrib-ds18b20-sensor/blob/master/ds18b20-node/ds18b20-node.js)

They use synchronous file access to the sensors. This prevents the NodeJS event loop to process other tasks until the operation has finished. Depending on the sensor's resolution, the DS18B20 readings can take over a second per sensor. So the blocking behavior you described is to be expected.

I see you have already found your way to using an ESP8266 and MQTT, that would have been my preferred suggestion as well. 👍  
In fact, that is my setup at home and works like a charm. I have deployed around 8 ESPs here with several sensors (BME280, DS18B20) and door/window switches. 😁

---

_[View the full topic](https://discourse.nodered.org/t/quick-note-if-youre-a-reading-multiple-ds18b20s-with-a-raspberry-pi-and-b-struggling-with-flow-stalls/25747)._
