Skip to content

Commit 09648e8

Browse files
author
Tom Lasswell
committed
docs: document H5059/H5044 leak support + multiSync decode (#87)
README: broaden leak-sensor coverage to H5058/H5059 (+H5054/H5055) via H5043/H5044 hub. protocol-reference: add runtime multiSync hub-packet decode (0xEE/0x34 layout, byte 5 battery vs bytes 14/16 wet, (hub,sno) sensor map) from the #87 release.
1 parent bc84880 commit 09648e8

2 files changed

Lines changed: 25 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ It is **capability‑based**: entities are created from the capabilities Govee r
3333
| **Space heaters** | H7130, H7131, H721C | Power switch, target‑temperature number, auto‑stop switch |
3434
| **Thermometers / hygrometers** | H5103, H5107, H5109, H5179 | Temperature & humidity sensors + a "Last Changed" timestamp |
3535
| **Air‑quality monitors** | H5140 | CO₂ / temperature / humidity sensors |
36-
| **Leak sensors** | H5058 (via H5043/H5044 hub) | Moisture binary sensor, battery, sensor/gateway connectivity, last‑wet timestamp, button‑press event |
36+
| **Leak sensors** | H5058, H5059 (also H5054/H5055) via an H5043/H5044 hub | Moisture binary sensor, battery, sensor/gateway connectivity, last‑wet timestamp, button‑press event |
3737

3838
Don't see your device, or a capability is missing? [Open an issue](https://github.com/lasswellt/govee-homeassistant/issues) with a diagnostics download (see [Diagnostics](#diagnostics--debug-logging)).
3939

@@ -70,7 +70,7 @@ The API key alone gives you device control and **polling** for state.
7070
In the same setup flow you can enter your **Govee account email and password**. This enables:
7171

7272
- **Real‑time push updates** over AWS IoT MQTT (no waiting for the next poll)
73-
- **Leak‑sensor support** (H5058 via an H5043/H5044 hub)
73+
- **Leak‑sensor support** (H5058 / H5059, and other LoRa leak sensors, via an H5043/H5044 hub)
7474

7575
#### Two‑factor (email code)
7676

docs/govee-protocol-reference.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2300,6 +2300,29 @@ Standalone leak sensor returned by the Developer (API-key) endpoint. Leak state
23002300
- `probesState.top` / `probesState.bot` report per-probe state (`1` = water present, `0` = clear); expose as attributes.
23012301
- Device IDs use the extended 16-octet form (e.g. `03:4E:CE:6D:FF:FF:FF:12:FF:FF:00:33:FF:FF:00:4C`).
23022302

2303+
##### Runtime leak delivery — hub `multiSync` packet (issue #87)
2304+
2305+
The Developer-API `event` capability above is only the **definition**. Live leak state does **not** arrive via the state poll — it is pushed over AWS IoT MQTT as a `multiSync` message from the **hub** (H5043/H5044), carrying BLE-format sensor packets (base64) in `op.command[]`. Each packet is 20 bytes:
2306+
2307+
| Byte | Meaning |
2308+
|------|---------|
2309+
| `0` | `0xEE` — sensor-report header |
2310+
| `1` | event type: `0x34` = leak/dry, `0x32` = button press |
2311+
| `2` | sensor slot (`sno`) on the hub — keys the `(hub, slot) → sensor` map |
2312+
| `5` | battery % (e.g. `0x64` = 100). **NOT the wet flag** — legacy decoders misread this byte |
2313+
| `14`, `16` | probe state (`0x01` = wet, `0x00` = dry); byte `15` = `0x03` separator |
2314+
2315+
Wet decode (leak sensors must never under-report):
2316+
2317+
```python
2318+
is_wet = raw[5] == 0x01 or (len(raw) >= 17 and (raw[14] == 0x01 or raw[16] == 0x01))
2319+
```
2320+
2321+
- **H5059** reports wet in bytes `14`/`16`; earlier SKUs (H5058) were decoded off byte `5`. The OR keeps both working.
2322+
- Button-press packets (`0x32`) encode the sensor MAC in bytes `2..9` **reverse byte order**, not a slot number.
2323+
- The `(hub, sno) → sensor_id` map is built from the account/BFF device list; a sensor whose SKU is absent from `LEAK_SENSOR_SKUS` is dropped before the map is built, so its events log as "unknown sensor". Supported SKUs: `H5058`, `H5054`, `H5055`, `H5059`; hubs: `H5043`, `H5044`.
2324+
- Full derivation: `docs/_research/2026-06-04_h5059-h5044-leak-sensor-support.md`.
2325+
23032326
#### H5054 — Water Detector (NOT in Developer API)
23042327

23052328
The H5054 water detector is **not returned by the Developer API** (the API-key `/user/devices` endpoint this integration's discovery uses), so it never appears via the standard path. It is only exposed through the **app/account API** (same path the H5058 leak sensor uses). Confirmed in issue #62: a full integration diagnostics dump omitted the user's H5054s entirely, while their Homebridge account-based client enumerated all 10.

0 commit comments

Comments
 (0)