DHT11 sampling rate and offset configuration

Hi all,

I have a dht11 sensor connected to RP3 with the following config:

  • platform: dht
    sensor: DHT11
    name: Hygrometer
    pin: 4
    temperature_offset: -4.5
    humidity_offset: -9
    monitored_conditions:
    • temperature
    • humidity

Here are two issues I have:

  1. temperature readings are much less than the humidity readings.
  2. the temperature offset seems not work.

Any idea? Or how to track these issues?

Thanks,
Andong

I’ve not used this component yet, but what are some of the values from the sensor?

Also, what do you mean by “temperature readings are much less than the humidity readings.”

Are you saying the temp is colder then the humidity reading? That’s comparing apples and oranges… Temp is in degrees, and humidity is in % right?

As a side note, any reason you’re using the DHT11, over the DHT22? I’ve personally used the DHT22 for some sensor nodes, and they work amazingly well! Here’s a compairison.

I have received both the temperature and humidity values from the sensor, just the number of samples from temperature is less than humidity. The values of both temperature and humidity are okay but need some calibration using the offset.

I use DHT11 just because it is cheaper. I have a real thermometer so I used it to calibrate the DHT11 sensor. However, the temperature value seems did not change.

Looking through the code, it looks like the sensor is designed to update once every 30 seconds, is this about accurate with what you’re seeing?

At what frequency are the sensors updating; Also could it be possible that the temperature isn’t changing, so it appears to not be updating?

Lastly, there’s some debug code written into the component. You could try enabling debug logging for this component. More on how to do that here. If you are able to get debug logging enabled, please post the relevant logs here.

edit: It looks like the component is designed to add the value, with the offset, then round it to the first decimal point. Here’s the actual code:

self._state = round(temperature + temperature_offset, 1)

The debug logging will show the actual values, which would be a big help.