Absolute begginers guide for DIY temperature sensor?

I’ve been looking to build my own temperature sensor for HA and after some research, I landed on DHT22 + ESP8266 but having a hard time finding an absolute beginner’s guide for setting it all up. So far I now I need the two above (+ USB cable) but is there anything else such as wires etc? I am aware that I will be using the https://www.home-assistant.io/integrations/esphome/ ESPHome integration but that’s all I know.

Could someone point me in the right direction? By the way, is MQTT necessary as I keep seeing it mentioned when searching for guides on this subject.

Thank you.

Yes you will need wires to connect the DHT22 to the ESP.
MQTT is not necessary, you can use API. It will then be automatically discovered by HA.

I found this link with a configuration example: https://esphome-configs.io/devices/nodemcu-dht11/

You can also read the ESPHome.io website:

Becareful with ESPHome, you won’t be able to stop using it and doing your own sensors!

Also some tutorials on youtube like this one: https://www.youtube.com/watch?v=9Yu57vjz7AY

I will need wires besides the ones that come with the DHT22?

You bought a DHT with a PCB and wires? If yes you’re good!

I haven’t purchased anything yet but I was leaning towards this and this. Does that look right?

Those DHT22 are the easiest to work with, those without pcb are more difficult. So it looks OK.

1 Like

Yes looks good. No soldering, it will be easy!

Save yourself a lot of heartache down the road and avoid any DHT11/DHT22 sensors. The quality can be spotty, they are extremely sensitive to power issues, they overheat if queried too often, humidity measurements are “best guess” ±20%, and the one wire bus used is extremely sensitive to timing. The various Arduino libraries for the DHT sensors are always being patched one way or another to try and increase the reliability.

For $1 more you can get the BME280 on a small breakout board. This is an I2C based sensor which is better in every way than the DHT11/DHT22.

1 Like