---
title: "Aqara Temperature, Humidity and Pressure Sensor"
description: "Aqara WSDCGQ11LM Zigbee sensor via Zigbee2Tasmota gateway and MQTT: temperature, humidity, pressure, battery level and offline alerts in TapHome."
url: "https://taphome.com/en/compatibility/zigbee2tasmota-aqara-temperature-humidity-and-pressure-sensor/"
language: en
lastmod: 2026-10-08
generator: hugo
ai:
  topics: ["mqtt","sensor","zigbee","battery-powered","weather"]
  questions: ["How to integrate Aqara WSDCGQ11LM with TapHome?","What does the Aqara temperature and humidity sensor TapHome template measure?","How to connect an Aqara Zigbee sensor to TapHome via Tasmota?","Why is my Aqara sensor showing offline in TapHome?","How to pair an Aqara WSDCGQ11LM with a Zigbee2Tasmota gateway?","Does TapHome monitor battery level of Aqara Zigbee sensors?"]
---

# Aqara Temperature, Humidity and Pressure Sensor

Communication: Packet Parser → MQTT

- [Aqara Product Page](https://www.aqara.com/en/product/temperature-humidity-sensor/)

> Network address
> 
> With the MQTT broker built into TapHome, enter `127.0.0.1` as the broker address in TapHome. In the device, enter the IP address of the TapHome Core and give the Core an IP reservation in the router.
> 
> [Network Preparation](https://taphome.com/en/docs/setup/network-preparation/)

## Integration guide

> [!IMPORTANT]
> This device communicates via **Zigbee** through a Tasmota gateway. Make sure you have
> the [Zigbee2Tasmota Gateway](https://taphome.com/en/compatibility/zigbee2tasmota-gateway/)
> template imported and your device paired before proceeding.

The Aqara WSDCGQ11LM is a compact battery-powered Zigbee sensor that measures ambient temperature, relative humidity and atmospheric pressure. It communicates with TapHome over MQTT through a Zigbee2Tasmota gateway — the sensor sends periodic readings via the `tele/{gateway}/SENSOR` topic, and the template parses the `ZbReceived` JSON payload.

The sensor is powered by a CR2032 coin cell battery. The template monitors battery level and voltage via service attributes, warns when battery drops below 30%, and detects device offline states (warning after 12 hours, error after 24 hours).

## Configuration

### Pairing the sensor

1. On the Zigbee2Tasmota gateway, enable **Permit Join** (via the gateway template switch in TapHome or Tasmota console command `ZbPermitJoin 1`)
2. Press and hold the reset button on the Aqara sensor for approximately 5 seconds until the blue LED blinks
3. Release the button — the sensor should pair within 60 seconds
4. Note the assigned Device ID (e.g., `0x1234`) from the gateway's service attributes or Tasmota console

### Import parameters

After pairing, import the device template with these parameters:

| Parameter | Description | Example |
|-----------|-------------|---------|
| MQTT Broker IP Address | IP of the MQTT broker | `192.168.1.10` |
| MQTT Broker Port | Broker port (default 1883) | `1883` |
| Gateway name | Tasmota MQTT topic (Configuration → MQTT → Topic) | `tasmota_XXXXX` |
| Device ID | Short Zigbee address from pairing | `0x1234` |

> [!WARNING]
> Aqara/Xiaomi Zigbee devices do not fully comply with the Zigbee standard and may experience connectivity issues with certain Zigbee routers. Known incompatible routers include Centralite, General Electric, OSRAM, Sylvania, SmartThings and Securifi. Use routers confirmed compatible with Xiaomi devices (e.g., IKEA TRADFRI).

## Device capabilities

### Temperature and humidity

The Temperature and Humidity device reads the `Temperature` and `Humidity` fields from the `ZbReceived` JSON payload. Temperature is reported in °C as a direct value. Humidity is reported as a raw integer (e.g., 4520 for 45.20%) and divided by 100 in the listener script to produce the ratio that TapHome displays as a percentage.

Both values update whenever the sensor transmits a `SENSOR` message — typically every few minutes or on significant change.

### Atmospheric pressure

The Pressure device reads the `Pressure` field from the `ZbReceived` JSON payload. The value is reported in hPa (hectopascals) and mapped via ValueLogTypeConversion from raw type 62 to pressure type 25 with a 1:1 linear scale.

Atmospheric pressure can be used for weather trend monitoring or altitude-based automation rules.

### Battery and device health

The module exposes several service attributes populated by the `ZbInfo` polling mechanism (1-hour interval via the ReadScript):

- **Battery Percentage** — estimated CR2032 battery level. A warning is raised when the level drops below 30%.
- **Battery Voltage** — current battery voltage in volts.
- **Link Quality** — Zigbee signal strength scaled from 0–254 to 0–100%.
- **IEEEAddr**, **ModelId**, **Manufacturer**, **Endpoints**, **Config** — device identification and Zigbee configuration metadata.

The template also tracks `LastSeenEpoch` from ZbInfo responses. If the sensor has not been seen for more than 12 hours, a warning is raised. After 24 hours, an error is raised — indicating the sensor may be offline, out of range, or its battery is depleted.

> [!TIP]
> CR2032 battery updates from Zigbee devices can take up to 24 hours to refresh. A sudden drop does not necessarily mean the battery is failing — wait for the next reporting cycle.

### Additional capabilities

The WSDCGQ11LM also supports per-sensor calibration offsets for temperature, humidity and pressure readings (available in zigbee2mqtt). The battery voltage is additionally exposed as a device-level entity in some Zigbee stacks. These capabilities can be added in a future template update.

## Troubleshooting

### Sensor not reporting data

1. Verify the Zigbee2Tasmota gateway is connected to the MQTT broker and receiving messages (check `tele/{GWname}/SENSOR` in an MQTT client)
2. Confirm the Device ID in the template matches the short address assigned during pairing (e.g., `0x1234`)
3. Check the Link Quality service attribute — values below 20% indicate a weak Zigbee signal. Move the sensor closer to the gateway or add a compatible Zigbee router device
4. Press the sensor button once to force a transmission and verify the gateway receives the message

### Humidity reading appears incorrect

The template divides the Humidity value by 100 (e.g., `45.2` becomes 0.452, displayed as 45.2 %). If the reading is 100 times too high or too low, check the `Humidity` value in the Tasmota console — the template expects it in percent.

### Device shows offline warning

1. Check the battery level — a depleted CR2032 will cause the sensor to stop transmitting
2. The Aqara sensor is a Zigbee end device (not a router) and communicates through nearby Zigbee router devices. If a router goes offline, the sensor may become unreachable
3. Try pressing the sensor button to wake it and force a re-association with the Zigbee network
4. If the issue persists, re-pair the device by holding the reset button for 5 seconds until the blue LED blinks

## How to install in TapHome

### Prerequisites

- Zigbee gateway with Tasmota firmware (e.g., Sonoff ZBBridge, eWeLink ZB-GW03)
- MQTT broker running on your local network (TapHome built-in broker or external)
- TapHome CCU on the same network

> [!TIP]
> TapHome has a built-in MQTT broker — enable it in **Settings** → **Hardware** → **MQTT Broker**. No additional software is needed.

### Step 1 — Set Up the Tasmota Zigbee Gateway

1. Flash [Tasmota firmware](https://tasmota.github.io/docs/Getting-Started/) on a supported Zigbee coordinator (e.g., Sonoff ZBBridge, eWeLink ZB-GW03)
2. Connect the gateway to your Wi-Fi network via the Tasmota web UI
3. Navigate to **Configuration** → **Configure MQTT** and set:
   - **Host:** the IP address of the TapHome Core for the built-in broker (with an IP reservation in the router → [Network Preparation](https://taphome.com/en/docs/setup/network-preparation/)), or your broker IP (e.g., `192.168.1.10`)
   - **Port:** `1883`
   - **Topic:** note down the topic name (e.g., `tasmota_XXXXX`) — you will need it during template import

For detailed instructions, see the [Tasmota Zigbee documentation](https://tasmota.github.io/docs/Zigbee/).

### Step 2 — Import the Gateway Template in TapHome

1. Download the gateway template from the [Zigbee2Tasmota Gateway](https://taphome.com/en/compatibility/zigbee2tasmota-gateway/) compatibility page
2. In TapHome, go to **Settings** → **Hardware** → **Packet Parser** → **Import**
3. Import the template with these parameters:
   - **MQTT Broker IP Address:** `127.0.0.1` for the TapHome built-in broker, otherwise your broker IP (e.g., `192.168.1.10`)
   - **MQTT Broker Port:** `1883`
   - **Gateway name:** the Tasmota MQTT topic from Step 1 (e.g., `tasmota_XXXXX`)

After import, you will see two devices: **Permit Join** (switch) and **Devices Found** (counter).

### Step 3 — Pair a Zigbee Device

1. In TapHome, turn on the **Permit Join** switch — this opens a 60-second pairing window
2. On the Zigbee device, start the pairing procedure (typically hold the reset button for 5 seconds until the LED blinks)
3. Watch the **Devices Found** counter — it increments when a new device joins
4. Check the **Service Attributes** of the gateway to see the new device's ID (e.g., `0x1234`), manufacturer, and model
5. The pairing mode deactivates automatically after the timeout

### Step 4 — Import the Device Template

1. Download the device-specific template from the corresponding compatibility page
2. Import the template with these parameters:
   - **MQTT Broker IP Address:** same as the gateway
   - **MQTT Broker Port:** `1883`
   - **Gateway name:** same Tasmota MQTT topic as above
   - **Device ID:** the short address from pairing (e.g., `0x1234`)

## Available devices 2

These devices appear in TapHome after import.

Aqara Temperature, Humidity and Pressure Sensor Module

Service Attributes

|                    |                                                                       |
|--------------------|-----------------------------------------------------------------------|
| IEEEAddr           | Zigbee IEEE address — unique 64-bit hardware identifier of the sensor |
| ModelId            |                                                                       |
| Manufacturer       |                                                                       |
| Endpoints          |                                                                       |
| Config             |                                                                       |
| Link Quality       | Zigbee signal strength — 0% (no signal) to 100% (excellent)           |
| Battery Voltage    |                                                                       |
| Battery Percentage | Estimated CR2032 battery level — warning at less than 30%             |

Custom Variables

`GWname` (string) Tasmota MQTT topic name of the Zigbee gateway (found in Configuration → MQTT → Topic) 

`ID` (string) Zigbee short address of the sensor (assigned during pairing)

After pairing the sensor via Permit Join, find the device short address in the gateway's Devices Found service attribute or via Tasmota console command ZbStatus

Read (module)

```taphome
MQTTPUBLISH("cmnd/" + GWname+ "/ZbInfo", ID)
```

Listener

```taphome
if INDEXOF(RECEIVEDMSG.Topic, "SENSOR") > 0
	var ZbReceived := PARSEJSON(RECEIVEDMSG.Payload, "ZbReceived." + ID, true);
    var bat := PARSEJSON(ZbReceived, "BatteryPercentage", true);
    if(!ISNULL(bat), BatteryPercentage := bat);
    var volt := PARSEJSON(ZbReceived, "BatteryVoltage", true);
    if(!ISNULL(volt), BatteryVoltage := volt);
    
    var deviceInfo := PARSEJSON(RECEIVEDMSG.Payload, "ZbInfo." + ID, true);
    if !ISNULL(deviceInfo)
    	LastSeenEpoch := PARSEJSON(deviceInfo, "LastSeenEpoch");
        COMPLETESERVICEATTRIBUTE("IEEEAddr", PARSEJSON(deviceInfo, "IEEEAddr"));
        COMPLETESERVICEATTRIBUTE("ModelId", PARSEJSON(deviceInfo, "ModelId"));
        COMPLETESERVICEATTRIBUTE("Manufacturer", PARSEJSON(deviceInfo, "Manufacturer"));
        COMPLETESERVICEATTRIBUTE("Endpoints", PARSEJSON(deviceInfo, "Endpoints"));
        COMPLETESERVICEATTRIBUTE("Config", PARSEJSON(deviceInfo, "Config"));
        COMPLETESERVICEATTRIBUTE("Link Quality", ROUND(LINEAR(PARSEJSON(deviceInfo, "LinkQuality"), 0,0, 254, 100)) + "%");
    end
end

if BatteryPercentage < 30
	ADDWARNING("Low battery (<30%)");
end

if !ISNAN(LastSeenEpoch)
	DATETIME now := NOW();
	var secondsSeen := now.UNIXTIME - LastSeenEpoch;
	if secondsSeen > 12 * 60 * 60
		if secondsSeen > 24 * 60 * 60
			ADDERROR("Device is offline > 24H");
		else
			ADDWARNING("Device is offline > 12H");        
		end
	end
end
```

Service Attributes

IEEEAddr

```taphome
MQTTPUBLISH("cmnd/" + GWname+ "/ZbInfo", ID)
```

ModelId

```

```

Manufacturer

```

```

Endpoints

```

```

Config

```

```

Link Quality

```

```

Battery Voltage

```taphome
BatteryVoltage + " V"
```

Battery Percentage

```taphome
BatteryPercentage + "%"
```

Pressure Variable Read-only

Atmospheric pressure in hPa — useful for weather tracking and altitude-based automation

numeric Unit: hPa

Listener

```taphome
if INDEXOF(RECEIVEDMSG.Topic, "SENSOR") > 0
    var val := PARSEJSON(RECEIVEDMSG.Payload, "ZbReceived." + ID + ".Pressure", true);
    if(!ISNULL(val), Va := val);
end
```

Temperature and Humidity Temperature Sensor Read-only

Combined air temperature (°C) and relative humidity (%) from a single Zigbee sensor

temperature + humidity Unit: °C / %

Listener

```taphome
if INDEXOF(RECEIVEDMSG.Topic, "SENSOR") > 0
    var temp := PARSEJSON(RECEIVEDMSG.Payload, "ZbReceived." + ID + ".Temperature", true);
    var hum := PARSEJSON(RECEIVEDMSG.Payload, "ZbReceived." + ID + ".Humidity", true);
    if (!ISNULL(temp), Te := temp);
    if (!ISNULL(hum), Hu := hum/ 100);
end
```

**Connection:** Packet Parser → MQTT

Possible improvements (3)

- Battery Voltage (device-level) — Battery voltage in mV exposed as a separate entity in zigbee2mqtt. TapHome template reads it as a module-level service attribute instead.
- Sensor Calibration Offsets — zigbee2mqtt supports per-sensor calibration offsets for temperature, humidity, and pressure. Not configurable in TapHome template.
- Link Quality (device-level) — LinkQuality is available per SENSOR message but only exposed as a module-level service attribute via ZbInfo polling.

## Import parameters

Enter these values when you import the XML.

| Asked in the app                                            | Default         |
|-------------------------------------------------------------|-----------------|
| Mqtt Broker IP address                                      | `192.168.0.1`   |
| Mqtt Broker port                                            | `1883`          |
| Gateway name (Tasmota-&gt;Configuration-&gt;MQTT-&gt;Topic) | `tasmota_XXXXX` |
| Device ID                                                   | `0xFFFF`        |

## Sources

- Tasmota Zigbee Documentation
  
  [tasmota.github.io](https://tasmota.github.io/docs/Zigbee/) 2026-03-29
- Zigbee Compatible Devices Database
  
  2026-03-29
- Aqara Product Page — Temperature and Humidity Sensor
  
  [www.aqara.com](https://www.aqara.com/en/product/temperature-humidity-sensor/) 2026-03-29
- Blakadder — Aqara WSDCGQ11LM
  
  [zigbee.blakadder.com](https://zigbee.blakadder.com/Aqara_WSDCGQ11LM.html) 2026-03-29
- zigbee2mqtt — Aqara WSDCGQ11LM
  
  [www.zigbee2mqtt.io](https://www.zigbee2mqtt.io/devices/WSDCGQ11LM.html) 2026-03-29

## Related Documentation

- [MQTT Integration](https://taphome.com/en/compatibility/mqtt-guide/)
- [Packet Parser (HTTP, TCP, UDP, FTP, MQTT)](https://taphome.com/en/docs/integration/packet-parser/)
- [Packet parser functions](https://taphome.com/en/docs/script/packet-parser/)
- [Parsing functions](https://taphome.com/en/docs/script/parsing-functions/)
- [MQTT Broker](https://taphome.com/en/docs/integration/packet-parser/mqtt-broker/)
- [Listener scripts](https://taphome.com/en/docs/script/listener-scripts/)

