I am experiencing problems with my ESP8266 and a DHT22 sensor.
After some hours (it varies from 4 hours to 24 hours) DHT22 starts sending null values instead of the correct temperature.
it seems a common problem on the internet.
I even tryed uploading a tasmota sonoff firmware on my ESP8266 but I have the same probelm.
is there someone experiencing similar problems?
how can I solve it?
Solution: get a better temperature/humidity sensor. DS18B20, a thermistor, LM35, etc - just about all are more reliable.
There are various dedicated humidity sensors out there as well.
For humidity/temperature/pressure: the BME280 is popular and said to do a great job (haven't tried it myself yet - only tried the BMP280 and it's doing a great job for temp/pressure).
Are you sure that switching to another sensor will solve my problem?
In any case all those sensor will arrive in some.days/weeks and I need to solve the problem now since this sensor is controlling my furnace and consequently my room temperature.
Easiest is the DS18B20 sensor. Reliable and very easy to read.
Good second is the (super cheap) thermistor - at least as reliable and accurate as the DS18B20 but requires some calibration & a bit more work in code. Pair with a good quality resistor.