Aqara TH
Zigbee T/RH sensor via Home Assistant or Aqara Hub
The Aqara TH (model WSDCGQ11LM for the original, TVOC for the newer
unit) is the cheapest production-grade T/RH sensor we recommend, but it is
Zigbee — so it cannot reach OpenSense directly. It has to go through a
gateway. Two paths are supported: Home Assistant (recommended) and
Aqara Hub (Aqara's own gateway).
Buy
- ≈ €13–€18 retail. Sold as
Aqara Temperature & Humidity Sensor. - Avoid the
Mi(Xiaomi) variant — same chip, different pairing, more fragile.
Path A — Home Assistant (recommended)
Home Assistant is free, open-source, runs on a Raspberry Pi 4 or any old PC, and is what most prosumers already have. We use HA's MQTT bridge as the relay; OpenSense then subscribes to one MQTT topic per device.
Steps
- Install Zigbee2MQTT in HA. Pair a Sonoff ZBDongle-E or similar Zigbee coordinator.
- Put the Aqara TH in pairing mode (hold the button 5 s; the LED blinks).
It should appear in Z2M as
Aqara WSDCGQ11LM. - In OpenSense,
+ ADD DEVICE → AQARA → via HA. Copy the MQTT bridge URL the dialog shows. It looks like:mqtts://mqtt.opensense.murzin.digital:8883 - In HA, configure the MQTT broker: paste the URL, paste the auth token (also shown in the dialog).
- In Z2M's
configuration.yaml, add a forwarding rule:
mqtt:
base_topic: opensense/aqara
server: mqtts://mqtt.opensense.murzin.digital:8883
user: '{ingest_token_from_dialog}'
password: ''
reject_unauthorized: true
- Restart Z2M. Within 5 minutes the sensor's readings appear in OpenSense.
Topic mapping
Z2M publishes on opensense/aqara/<friendly_name>. OpenSense parses the
standard Z2M JSON payload:
{
"temperature": 21.4,
"humidity": 47.2,
"battery": 92,
"linkquality": 121,
"voltage": 3015
}
temperature is °C, humidity is %RH, battery is %, linkquality is
the LQI (0–255). All four are stored.
Path B — Aqara Hub
If you do not run Home Assistant and do not want to, the Aqara Hub M2 (or M3) can act as the bridge. The downside is that Aqara's local API is closed; we rely on Aqara's cloud webhooks, which means an external dependency outside our control.
- Set up the Aqara Hub through the Aqara app (Aqara Home).
- Pair the TH through the Aqara app as usual.
- In the Aqara app,
Developer → Cloud webhook. Paste the OpenSense webhook URL from+ ADD DEVICE → AQARA → via Aqara Hub. - Approve the OAuth flow.
What you give up
- Aqara Hub path is at the mercy of Aqara's cloud. We have seen multi-day outages of their webhook bus. Use HA if you can.
- Zigbee range is ~10 m through one wall, ~3 m through reinforced concrete. For a multi-room hotel, use Efento NS-T instead.
- The Aqara TH reports on change, not on a fixed cadence — so if the fridge is stable, you get sparse data. For HACCP this is acceptable because the OpenSense rule engine treats "no change reported" as "the last value still holds", but auditors who count rows in the CSV will see fewer rows. Set the auditor's expectation: this is event-driven sampling.