Several temperatur sensors with different whats the right one?

it’s confusing to me, there are different temperature sensors 1-wire, able to connect more sensors on one port and others, one with very small cable lenght others with some meters, with humidity and without and so on…
DHT22, DS18B20, …

Is there any kind of guidance???

I want to…

  • get different temperature values from different places.
  • place the sensors 3-5 meters away from my Raspberry Pi 3
  • get the humidity as well
  • and it should be reliable

does anybody knows a good comparing website of the different solutions??


Arduino forums can help further with code on how to id the temp sensors; they all have unique serial numbers. But you could just heat up one, and check with value responds to it and id it this way.

I have built a Setting with an ESP8266 running ESPEasy and 10 waterproof (=stainless steel) DS18B20 1-wire sensors (only temperature) plus one DHT11 (temperature/humidity).

Within ESPEasy you can easy Setup the sensors (just connect them one after the other and Setup the configuration for them) and the temperature/humidity values are sent via MQTT to my openHab Installation (RasPi 2B).

The DS18B20 can be ordered with 1m/3m/5m cable length so it’s not a problem to connect them.

All 10 DS18B20 share one data pin, but the DHT11 needs 1 pin for its own (every DHT11 you connect needs its own data pin).

The DS18B20 are very stable, it’s more likely to have fault measurements because of the mounting.
The DHT11 is not as good, but measures temperature & humidity (for approx. 1-2 EUR). If you need a more accurate measurement of humidity, check for DHT22 wich is a bit pricier (2-3 EUR)

Maybe you can check out ESP8266 & ESPEasy as low-cost solution. The ESP8266-12 has built-in WLAN, is compatible with Arduino-IDE and cost 2-3 EUR.


I have a DHT11 in my bathroom primarily because I wanted to track the humidity and two DS18B20’s downstairs. The DS18B20’s are more accurate and have a better resolution than the DHT11. Because the DHT11 only records to the nearest degree I find that there are more jumps in the data than the smooth lines I see from the DS18B20.

Like @imhofa I have two DS18B20s linked to a single ESP8266, which pushes the temperatures out over an MQTT Bus, but I have written an Arduino script to dynamically cope with up to 8 probes connected to one wire.

I wrote up my code here, but just realised I haven’t included the libraries I used. A quick google should turn them up

Hi Rob,

my first steps with ESP8266 and DS18B20/DHT11 was the same way. I developed the code step by step by myself:

  • get measurement from one DS18B20 (via serial console)
  • get measurement from multiple DS18B20 (via serial console)
  • get measurement from DHT11 (via srial console)
  • get connected to my WLAN
  • get connected to MQTT Broker
  • publish measured values via MQTT

The problem I faced was as I started a second project with ESP8266 with a similar task: you have to change your source code to get things worked…

If I wanted to change a part in the code, which is the same in both projects, you have to change both projects - not very convenient. At this stage I found ESPEasy (

  • one programm for all ESP8266 in my house
  • every ESP8266 can be parameterized via WLAN for ist special purpose
  • many sensors / actors are ready to use
  • changes can be made without reprogramming the ESP just over the air (WLAN)

So if you are now starting with one project/module, but you know there will be more applications around your house to solve with ESP8266, I would reommend to have a look at ESPEasy.

But for know I wrote enough, and the original thread was about using a RasPi3 with sensors and not ESP8266…


1 Like