Read Kamstrup FlowIQ 2200 (wM-Bus) using an ESP32 + CC1101, publish values over MQTT, and let Home Assistant create the device + sensors automatically via MQTT Discovery.
A single MQTT device with sensors such as:
- Water Meter Usage (m³) – total consumption
- Water Meter Month Start (m³) – month baseline
- Water Meter Flow (L/h) – current flow as an integer L/h (flow over 256 L/h may be temporarily wrong between full frames)
- Water Meter Flow (Full) (L/h) – flow from full frames (2‑byte), may be sporadic
See Flow behavior (compact vs full frames) below for how these values are derived.
- Works with FlowIQ 2200 telegrams where AES key and meter ID are known.
- Publishes JSON to MQTT for easy HA sensors.
- ESP32: tested.
- ESP8266: experimental / untested.
FlowIQ 2200 sends two frame types:
- Compact frames (CI=0x79) contain flow in 1 byte (0..255).
- Full frames (CI=0x78) contain flow in 2 bytes and are often much less frequent (minutes between).
- Observed: full frames can be even more sporadic during evenings/weekends.
Readouts:
FlowLphfrom compact frames (1‑byte VIF 0x32).FlowLphFullfrom full frames (2‑byte VIF 0x3B).
To get a usable flow value above 255, the firmware uses this rule:
- When a full frame arrives, its flow value is cached.
- While waiting for the next full frame, compact flow is extended by a +256 offset based on the last full frame.
- When a new full frame arrives with flow <256, the offset is reset.
This means FlowLph can look "stuck" high or low between full frames if the meter is quiet. This is expected and will update as soon as a new full frame arrives.
- Observed: full frames can be even more sporadic during evenings/weekends.
This project is based on code from:
- esp32-multical21 by pthalin
Repository: https://github.com/pthalin/esp32-multical21
License: GNU GPL v3 (or later)
That project is itself derived from:
- esp-multical21 by chester4444
Repository: https://github.com/chester4444/esp-multical21
License: GNU GPL v3 (or later)
This project is GNU GPL v3 (or later).
See: LICENSE, CREDITS.md, and CHANGELOG.md.
Important: Original copyright headers are preserved in derived files.
All modifications are marked with: modified by erikxson, 2026.
- ESP32 Dev board
- CC1101 module (868 MHz)
- Antenna tuned for 868 MHz
- 3.3V power (do NOT use 5V for CC1101)
Important: CC1101 is 3.3V only. Do not power it from 5V.
This pin order follows the module silk-screen from VCC downward (as on the common green CC1101 boards):
| CC1101 pin (top → bottom) | Connect to ESP32 | Notes |
|---|---|---|
| VCC | 3V3 | 3.3V only |
| GND | GND | common ground |
| MOSI | GPIO 23 | SPI MOSI |
| SCK/SCLK | GPIO 18 | SPI SCK |
| MISO | GPIO 19 | SPI MISO |
| GDO2 | (optional / not used) | leave unconnected unless your build uses it |
| GDO0 | GPIO 32 | data/interrupt pin used by firmware |
| CSN | GPIO 4 | SPI CS |
Right-side pads on many modules:
| CC1101 pad | Connection | Notes |
|---|---|---|
| GND | GND | (optional) |
| ANT | Antenna wire | solder antenna here |
| GND | GND | (optional) |
- Open VS Code
- Install PlatformIO (Extensions → search “PlatformIO”)
- In VS Code: File → Open Folder… and select the repo folder (watermeter-flowiq2200)
- Wait for PlatformIO to finish indexing dependencies
- Rename
src/credentials.example.h→src/credentials.h - Fill in:
- Wi-Fi SSID + password
- MQTT broker host/IP
- MQTT username/password (or empty strings if not used)
- meterId (4 bytes)
- key (16 bytes AES-128)
- Confirm your wiring matches
include/hwconfig.h
- ESP32 (tested)
- ESP8266 (experimental / untested)
- PlatformIO → Project tasks → select environment (
esp32recommended) → Build
- PlatformIO → Project tasks → select environment → Upload
- PlatformIO → Project tasks → select environment → Monitor
Home Assistant must have the MQTT integration configured and connected to the broker.
Verify in Home Assistant:
- Settings → Devices & Services → MQTT
- Open the Devices list
- Look for a new device named similar to: Water Meter
You should get sensors such as:
- Water Meter Usage (m³)
- Water Meter Month Start (m³)
- Water Meter Flow (L/h)
Home Assistant: Settings → Devices & Services → MQTT → Configure → Listen to a topic
Listen to:
watermeter/0/sensor/mydatajsonwatermeter/0/onlinewatermeter/0/online_ts
- Command:
watermeter/0/cmd/reset
Payload:true - Status (retained):
watermeter/0/cmd/reset/status
Payload set back tofalseafter processing.
- Command:
espmeter/reset
Payload:true
- WiFi connection: retries up to 5 times with ~10s delay between attempts, then reboots.
- MQTT reconnect: 5s backoff between connection attempts.
If this project saved you time, consider buying me a coffee
