[{"data":1,"prerenderedAt":323},["ShallowReactive",2],{"doc-\u002Fhardware\u002Faqara-th":3},{"id":4,"title":5,"body":6,"description":313,"edit":314,"extension":315,"meta":316,"navigation":317,"path":318,"seo":319,"stem":320,"vertical":314,"weight":321,"__hash__":322},"content\u002Fhardware\u002Faqara-th.md","Aqara TH",{"type":7,"value":8,"toc":304},"minimark",[9,31,36,54,58,61,66,106,113,119,123,130,219,237,241,248,269,275,279,300],[10,11,12,13,17,18,21,22,26,27,30],"p",{},"The Aqara TH (model ",[14,15,16],"code",{},"WSDCGQ11LM"," for the original, ",[14,19,20],{},"TVOC"," for the newer\nunit) is the cheapest production-grade T\u002FRH sensor we recommend, but it is\nZigbee — so it cannot reach OpenSense directly. It has to go through a\ngateway. Two paths are supported: ",[23,24,25],"strong",{},"Home Assistant"," (recommended) and\n",[23,28,29],{},"Aqara Hub"," (Aqara's own gateway).",[32,33,35],"h2",{"id":34},"buy","Buy",[37,38,39,47],"ul",{},[40,41,42,43,46],"li",{},"≈ €13–€18 retail. Sold as ",[14,44,45],{},"Aqara Temperature & Humidity Sensor",".",[40,48,49,50,53],{},"Avoid the ",[14,51,52],{},"Mi"," (Xiaomi) variant — same chip, different pairing, more\nfragile.",[32,55,57],{"id":56},"path-a-home-assistant-recommended","Path A — Home Assistant (recommended)",[10,59,60],{},"Home Assistant is free, open-source, runs on a Raspberry Pi 4 or any old\nPC, and is what most prosumers already have. We use HA's MQTT bridge as\nthe relay; OpenSense then subscribes to one MQTT topic per device.",[62,63,65],"h3",{"id":64},"steps","Steps",[67,68,69,76,82,96,99],"ol",{},[40,70,71,72,75],{},"Install ",[23,73,74],{},"Zigbee2MQTT"," in HA. Pair a Sonoff ZBDongle-E or similar\nZigbee coordinator.",[40,77,78,79,46],{},"Put the Aqara TH in pairing mode (hold the button 5 s; the LED blinks).\nIt should appear in Z2M as ",[14,80,81],{},"Aqara WSDCGQ11LM",[40,83,84,85,88,89,92,93],{},"In OpenSense, ",[14,86,87],{},"+ ADD DEVICE → AQARA → via HA",". Copy the ",[23,90,91],{},"MQTT bridge\nURL"," the dialog shows. It looks like:\n",[14,94,95],{},"mqtts:\u002F\u002Fmqtt.opensense.murzin.digital:8883",[40,97,98],{},"In HA, configure the MQTT broker: paste the URL, paste the auth token\n(also shown in the dialog).",[40,100,101,102,105],{},"In Z2M's ",[14,103,104],{},"configuration.yaml",", add a forwarding rule:",[107,108,110],"cmd",{"label":109},"$ z2m configuration.yaml",[10,111,112],{},"mqtt:\nbase_topic: opensense\u002Faqara\nserver: mqtts:\u002F\u002Fmqtt.opensense.murzin.digital:8883\nuser: '{ingest_token_from_dialog}'\npassword: ''\nreject_unauthorized: true",[67,114,116],{"start":115},6,[40,117,118],{},"Restart Z2M. Within 5 minutes the sensor's readings appear in OpenSense.",[62,120,122],{"id":121},"topic-mapping","Topic mapping",[10,124,125,126,129],{},"Z2M publishes on ",[14,127,128],{},"opensense\u002Faqara\u002F\u003Cfriendly_name>",". OpenSense parses the\nstandard Z2M JSON payload:",[131,132,137],"pre",{"className":133,"code":134,"language":135,"meta":136,"style":136},"language-json shiki shiki-themes github-dark github-dark","{\n  \"temperature\": 21.4,\n  \"humidity\": 47.2,\n  \"battery\": 92,\n  \"linkquality\": 121,\n  \"voltage\": 3015\n}\n","json","",[14,138,139,148,164,177,190,203,213],{"__ignoreMap":136},[140,141,144],"span",{"class":142,"line":143},"line",1,[140,145,147],{"class":146},"suv1-","{\n",[140,149,151,155,158,161],{"class":142,"line":150},2,[140,152,154],{"class":153},"s8ozJ","  \"temperature\"",[140,156,157],{"class":146},": ",[140,159,160],{"class":153},"21.4",[140,162,163],{"class":146},",\n",[140,165,167,170,172,175],{"class":142,"line":166},3,[140,168,169],{"class":153},"  \"humidity\"",[140,171,157],{"class":146},[140,173,174],{"class":153},"47.2",[140,176,163],{"class":146},[140,178,180,183,185,188],{"class":142,"line":179},4,[140,181,182],{"class":153},"  \"battery\"",[140,184,157],{"class":146},[140,186,187],{"class":153},"92",[140,189,163],{"class":146},[140,191,193,196,198,201],{"class":142,"line":192},5,[140,194,195],{"class":153},"  \"linkquality\"",[140,197,157],{"class":146},[140,199,200],{"class":153},"121",[140,202,163],{"class":146},[140,204,205,208,210],{"class":142,"line":115},[140,206,207],{"class":153},"  \"voltage\"",[140,209,157],{"class":146},[140,211,212],{"class":153},"3015\n",[140,214,216],{"class":142,"line":215},7,[140,217,218],{"class":146},"}\n",[10,220,221,224,225,228,229,232,233,236],{},[14,222,223],{},"temperature"," is °C, ",[14,226,227],{},"humidity"," is %RH, ",[14,230,231],{},"battery"," is %, ",[14,234,235],{},"linkquality"," is\nthe LQI (0–255). All four are stored.",[32,238,240],{"id":239},"path-b-aqara-hub","Path B — Aqara Hub",[10,242,243,244,247],{},"If you do not run Home Assistant and do not want to, the Aqara Hub M2 (or\nM3) can act as the bridge. The downside is that Aqara's local API is\n",[23,245,246],{},"closed","; we rely on Aqara's cloud webhooks, which means an external\ndependency outside our control.",[67,249,250,253,256,266],{},[40,251,252],{},"Set up the Aqara Hub through the Aqara app (Aqara Home).",[40,254,255],{},"Pair the TH through the Aqara app as usual.",[40,257,258,259,262,263,46],{},"In the Aqara app, ",[14,260,261],{},"Developer → Cloud webhook",". Paste the OpenSense\nwebhook URL from ",[14,264,265],{},"+ ADD DEVICE → AQARA → via Aqara Hub",[40,267,268],{},"Approve the OAuth flow.",[270,271],"stoplight",{"alarm":272,"ok":273,"warn":274},"‘Aqara Developer’ section not visible — your hub firmware is too old","Readings within 2 min","OAuth not granted to all devices — re-approve in Aqara Home",[32,276,278],{"id":277},"what-you-give-up","What you give up",[37,280,281,284,293],{},[40,282,283],{},"Aqara Hub path is at the mercy of Aqara's cloud. We have seen multi-day\noutages of their webhook bus. Use HA if you can.",[40,285,286,287,292],{},"Zigbee range is ~10 m through one wall, ~3 m through reinforced concrete.\nFor a multi-room hotel, use ",[288,289,291],"a",{"href":290},"\u002Fhardware\u002Fefento-ns-t","Efento NS-T"," instead.",[40,294,295,296,299],{},"The Aqara TH reports on ",[23,297,298],{},"change",", not on a fixed cadence — so if the\nfridge is stable, you get sparse data. For HACCP this is acceptable\nbecause the OpenSense rule engine treats \"no change reported\" as \"the\nlast value still holds\", but auditors who count rows in the CSV will see\nfewer rows. Set the auditor's expectation: this is event-driven sampling.",[301,302,303],"style",{},"html pre.shiki code .suv1-, html code.shiki .suv1-{--shiki-default:#E1E4E8;--shiki-dark:#E1E4E8}html pre.shiki code .s8ozJ, html code.shiki .s8ozJ{--shiki-default:#79B8FF;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":136,"searchDepth":166,"depth":166,"links":305},[306,307,311,312],{"id":34,"depth":150,"text":35},{"id":56,"depth":150,"text":57,"children":308},[309,310],{"id":64,"depth":166,"text":65},{"id":121,"depth":166,"text":122},{"id":239,"depth":150,"text":240},{"id":277,"depth":150,"text":278},"Zigbee T\u002FRH sensor via Home Assistant or Aqara Hub",null,"md",{},true,"\u002Fhardware\u002Faqara-th",{"title":5,"description":313},"hardware\u002Faqara-th",120,"IbHqv4zI70jPrBhfWQjfEUCr9HwWaqh8GPzMJA2Mzu0",1779022953718]