Aqara Temperature & Humidity Vs Xiaomi T&H VS DHT22

I’ve been struggling to find a reliable source of data - real time, or at least somewhat close to it - to truly automate climate devices around the house.

Living 260m above the sea, and in between both the sea and a mountain range, humidity, for instance, has always been quite a struggle.
I had some hope for the DHT22… but the numbers… :face_with_raised_eyebrow:

All three devices are next to each other:

Outside: Aqara sensor / Nacional Weather Institute
Untitled-6

I’ll try to close the door of that room and turn on the dehumidifier, for some hours, and then see the results.

I ended up using the sensors in one of the bathrooms, as it was quite inconvenient to have the other room closed for some hours.

Still… the diference between the Aqara’s & Xiaomi’s sensors and the Dht22 is still quite something:

At 9.30 am, I turned on the dehumidifier:

Could such differences be related with having the first two sensors on a wall and the dht22 in the air?

Yes, you should also compare the temperature at the wall and the temperature mid-air.

I use the “thermal_comfort” integration to compute the absolute humidity. There are important errors on temperature and especially humidity % measurements, but this gives a fair estimate of that property.

The absolute humidity should be more or less the same everywhere. However, the lower the temperature is the higher the relative humidity for the same absolute level. You find condensation on a wall when the air can no longer hold that humidity in air (the air is saturated), because the air will reach that condition at a wall colder than the dew point.

Yeah, there’s really not much difference about absolute humidity between then:

Aqara: 13.57 g/m³
Xiaomi: 14.07 g/m³
Dht22: 14.46 g/m³

Outside: 15.13 g/m³


I’ve also been using thermal comfort, but honestly I still can’t grasp my head around it; as in, should I use dew point or absolute humidity, with a template, to tell me if I should open/close the windows according to the data from inside and outside the house.

I am surprised that your outside humidity is so high, especially in winter time. Maybe you’re not using the correct outside temperature.

I am using the dew point to determine if I should enable the forced air extraction or not. The dew point is interchangeable with the equivalent g/m2 values.

Basically this turns the extraction on if the dew point is below 15.4 °C, and the extérior dew point is below 11.5 °C.
When HA restarts, it also checks if the extraction is already working so that it enters the automation in order to stop the extraction in due time (which means that the interior dew point is lower than 13.8 °C or the external dew point exceeds 12°C).

alias: Bathroom Air Extraction
trigger:
  - platform: numeric_state
    entity_id: sensor.sdb_dewpoint
    above: "15.4"
  - platform: numeric_state
    entity_id: sensor.exterieur_dewpoint
    below: "11.5"
  - platform: event
    event_type: homeassistant_start
    id: ha_restart
condition:
  - condition: or
    conditions:
      - condition: and
        conditions:
          - condition: numeric_state
            entity_id: sensor.exterieur_dewpoint
            below: "11.5"
          - condition: numeric_state
            entity_id: sensor.sdb_dewpoint
            above: "15.2"
      - condition: and
        conditions:
          - condition: state
            entity_id: light.sonoff_01minizb_4febc024_on_off
            state: "on"
          - condition: trigger
            id: ha_restart
action:
  - type: turn_on
    device_id: 3c3d6f675c5d59e015c83cfd7d4282ed
    entity_id: light.sonoff_01minizb_4febc024_on_off
    domain: light
  - wait_for_trigger:
      - platform: template
        value_template: >-
          {{ states('sensor.sdb_dewpoint') | float < 13.8 or
          states('sensor.exterieur_dewpoint') | float > 12 }}
  - type: turn_off
    device_id: 3c3d6f675c5d59e015c83cfd7d4282ed
    entity_id: light.sonoff_01minizb_4febc024_on_off
    domain: light
mode: single

The last two weeks have been quite a struggle with humidity and rain; supposedly it will finally change the next few days.

For instance, right now, after quite a storm:

Aqara: 14.42 g/m³
Xiaomi: 13.87 g/m³
Dht22: 14.32 g/m³

Outside: 13.22 g/m³


That’s a nice way to put it.

The template I’ve been using, with absolute humidity, to know if I should open or close the windows:

template:
  - binary_sensor:
    - name: Ventilate Windows Hall
      unique_id: ventilate_windows_hall
      icon: >-
            if (state === 'off') return 'mdi:window-closed-variant'; else return
            'mdi:window-open-variant';
      state: >
        {% set o_hum = states('sensor.outside_absolutehumidity') %}
        {% set o_tmp = states('sensor.outside_t_and_h_temperature') %}
        {% set i_hum = states('sensor.hall_absolutehumidity') %}
        {% set i_tmp = states('sensor.hall_temperature_sensor') %}
        {{ i_hum  > o_hum and i_tmp > o_tmp }}
    - name: Ventilate Windows WC
      unique_id: ventilate_windows_wc
      icon: >-
            if (state === 'off') return 'mdi:window-closed-variant'; else return
            'mdi:window-open-variant';
      state: >
        {% set o_hum = states('sensor.outside_absolutehumidity') %}
        {% set o_tmp = states('sensor.outside_t_and_h_temperature') %}
        {% set i_hum = states('sensor.wc_absolutehumidity') %}
        {% set i_tmp = states('sensor.wc_temperature_sensor') %}
        {{ i_hum  > o_hum and i_tmp > o_tmp }}
    - name: Ventilate Windows Bedroom
      unique_id: ventilate_windows_bedroom
      icon: >-
            if (state === 'off') return 'mdi:window-closed-variant'; else return
            'mdi:window-open-variant';
      state: >
        {% set o_hum = states('sensor.outside_absolutehumidity') %}
        {% set o_tmp = states('sensor.outside_t_and_h_temperature') %}
        {% set i_hum = states('sensor.bedroom_absolutehumidity') %}
        {% set i_tmp = states('sensor.bedroom_temperature_sensor') %}
        {{ i_hum  > o_hum and i_tmp > o_tmp }}
    - name: Ventilate Windows Living Room
      unique_id: ventilate_windows_livingroom
      device_class: window
      state: >
        {% set o_hum = states('sensor.outside_absolutehumidity') %}
        {% set o_tmp = states('sensor.outside_t_and_h_temperature') %}
        {% set i_hum = states('sensor.livingroom_absolutehumidity') %}
        {% set i_tmp = states('sensor.living_room_temperature_sensor') %}
        {{ i_hum  > o_hum and i_tmp > o_tmp }}
    - name: Ventilate Windows Bedroom2
      unique_id: ventilate_windows_bedroom2
      icon: >-
            if (state === 'off') return 'mdi:window-closed-variant'; else return
            'mdi:window-open-variant';
      state: >
        {% set o_hum = states('sensor.outside_absolutehumidity') %}
        {% set o_tmp = states('sensor.outside_t_and_h_temperature') %}
        {% set i_hum = states('sensor.bedroom2_absolutehumidity') %}
        {% set i_tmp = states('sensor.bedroom_2_temperature_sensor') %}
        {{ i_hum  > o_hum and i_tmp > o_tmp }}
    - name: Ventilate Windows Kitchen
      unique_id: ventilate_windows_kitchen
      icon: >-
            if (state === 'off') return 'mdi:window-closed-variant'; else return
            'mdi:window-open-variant';
      state: >
        {% set o_hum = states('sensor.outside_absolutehumidity') %}
        {% set o_tmp = states('sensor.outside_t_and_h_temperature') %}
        {% set i_hum = states('sensor.kitchen_absolutehumidity') %}
        {% set i_tmp = states('sensor.kitchen_temperature_sensor') %}
        {{ i_hum  > o_hum and i_tmp > o_tmp }}
    - name: Ventilate Windows Bathroom
      unique_id: ventilate_windows_bathroom
      icon: >-
            if (state === 'off') return 'mdi:window-closed-variant'; else return
            'mdi:window-open-variant';
      state: >
        {% set o_hum = states('sensor.outside_absolutehumidity') %}
        {% set o_tmp = states('sensor.outside_t_and_h_temperature') %}
        {% set i_hum = states('sensor.bathroom_absolutehumidity') %}
        {% set i_tmp = states('sensor.bathroom_temperature_sensor') %}
        {{ i_hum  > o_hum and i_tmp > o_tmp }}
#and so on....

Right now, it’s telling me to open all the windows… :expressionless:

At the same time, I always felt that the humidity values were too high… It was one of the reasons to find an alternative to Aqara’s sensors. Even though, the outside sensor checks with the Nacional Weather Institute.

Yes, the relative humidity levels definitively are very high and correspond more to the humidity level I find in the bathroom after a shower…

I compared accros several other unconnected meters to get an idea if the measurement is precise “enough)”.

Regarding the DHT22 - I suppose that there are many “copies” around and I doubt that they all are precise.
I find here a sale of DHT22 and when looking at the datasheet that indicates a 2% (max 5%) deviation without specifying the conditions, it is mentioning a RHT03. Adafruit used to propose AM2303 as the “DHT22” for instance. Somebody reported that 3 sensors next to each other indicated 39, 44 and 54%. Even on the current forum we see bad experiences .
I found a report where the author compared several sensors (DHT22, DHT11, SHT71).

It seems that at the %RH extremes, the precision of the measurements is worst.

One approach is also to open your window for 5 or 10 minutes, and see how the measurements evolve after that - do they get to the same absolute level of humidity after 1 hour or lower. If lower, I would suppose that the outside humidity was lower than inside.