I built an IoT temperature and humidity sensor for our screened-in porch (a lanai as we say in Florida). I've had the Huzzah32 (ESP32) board and the DHT11 just hanging by the USB connector during prolonged testing and the temp and humidity kind of matched the results from another commercial unit whose sensor is also on the porch.
I bought some small black plastic boxes from Hammond and finally got around to mounting the ESP32 in the box with the DHT11mounted on top on the outside of the box. I also drilled large holes in the sides of the box for airflow, since the ESP32 gets warm during normal operation.
Fastforward a little: The temperature is now reading about 10 degrees F higher than the commercial unit. <stoopid question> Since the DHT11 is mounted flush (there's a 1mm gap maybe) to the top of the box, am I reading the elevated temperature of the box due to the heat of the ESP32? Or am I reading stored heat in the box and sensor because I did the box fabrication in the garage where the temperature was much higher than the outside?
I'll let it run for a day and see if it settles out. If not, do I have to add a 'fudge' factor to the data payload sent to MQTT to downgrade the temp reading? Or… would a different sensor be better (a DHT22 perhaps?)? Same problem would exist because the new sensor would be mounted flush as well.
Or (again)… should I remove the screws from the DHT11 and let it hang by the 3-pin JST cable?