ESP-IDF component for reading IZAR water meters (WMBUS-T mode) using CC1101 transceiver on ESP32-C6.
Required:
- ESP32-C6 DevKit (or compatible board)
- CC1101 Transceiver Module (868 MHz for Europe)
- 868 MHz antenna for CC1101
- IZAR Water Meter (WMBUS-T compatible)
Wiring:
| CC1101 Pin | ESP32-C6 Pin | Description |
|---|---|---|
| GND | GND | Ground |
| VCC | 3.3V | Power |
| MOSI | GPIO 7 | SPI MOSI |
| MISO | GPIO 2 | SPI MISO |
| SCK | GPIO 15 | SPI Clock |
| CSN | GPIO 6 | Chip Select |
| GDO0 | GPIO 0 | (Optional) |
Add this component to your ESPHome YAML configuration:
external_components:
- source: github://hatch01/izar
components: [ izar_water_meter ]
# Enable logging to find your meter ID
logger:
level: INFO
# IZAR Water Meter configuration
izar_water_meter:
# Optional: specify meter ID to filter (default: 0 = read all meters)
# meter_id: 559927542
water_consumption:
name: "Water Consumption"
unit_of_measurement: "L"
device_class: "water"
state_class: "total_increasing"
accuracy_decimals: 0
meter_id:
name: "Meter ID"
accuracy_decimals: 0- Clone this repository into your ESPHome config directory:
cd /config/esphome
git clone https://github.com/hatch01/izar- Reference it in your YAML:
external_components:
- source: /config/esphome/izar/components
components: [ izar_water_meter ]Step 1: Deploy without a specific meter ID (reads all meters):
izar_water_meter:
# No meter_id specified = read all meters
water_consumption:
name: "Water Consumption"
meter_id:
name: "Meter ID"Step 2: Watch the logs:
esphome logs your-device.yamlYou'll see output like:
[I][izar_water_meter:xxx]: Water meter data: ID=559927542, Usage=158043 L
[I][izar_water_meter:xxx]: Water meter data: ID=559927539, Usage=49405 L
[I][izar_water_meter:xxx]: Water meter data: ID=559927537, Usage=62918 L
Step 3: Find YOUR meter ID:
- Check which meter ID corresponds to your actual water usage
- Note: Multiple meters in range will be detected!
Step 4: Filter for your specific meter:
izar_water_meter:
meter_id: 559927542 # Replace with YOUR meter ID
water_consumption:
name: "Water Consumption"
meter_id:
name: "Meter ID"esphome:
name: water-meter
friendly_name: Water Meter
esp32:
board: esp32-c6-devkitc-1
variant: esp32c6
framework:
type: esp-idf
logger:
level: INFO
api:
encryption:
key: !secret api_encryption_key
ota:
- platform: esphome
password: !secret ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Use component from GitHub
external_components:
- source: github://hatch01/izar
components: [ izar_water_meter ]
# Configure water meter
izar_water_meter:
meter_id: 559927542 # Your meter ID (0 = read all)
water_consumption:
name: "Water Consumption"
unit_of_measurement: "L"
device_class: "water"
state_class: "total_increasing"
accuracy_decimals: 0
meter_id:
name: "Meter ID"
accuracy_decimals: 0izar/
├── components/
│ ├── cc1101/ # CC1101 driver (nopnop2002/esp-idf-cc1101)
│ │ ├── cc1101.c
│ │ ├── cc1101.h
│ │ └── CMakeLists.txt
│ └── izar_water_meter/ # Main ESPHome component
│ ├── izar_water_meter.cpp # ESPHome component implementation
│ ├── izar_water_meter.h
│ ├── izar_wmbus.cpp # WMBUS-T protocol handler
│ ├── izar_wmbus.h
│ ├── izar_utils.cpp # Decoding utilities (3-of-6, CRC, decrypt)
│ ├── izar_utils.h
│ ├── wmbus_t_cc1101_config.h # CC1101 register configuration for WMBUS-T
│ ├── __init__.py # ESPHome component registration
│ ├── sensor.py # ESPHome sensor configuration
│ └── CMakeLists.txt
└── watersensor.yaml # ESPHome configuration file
- ✅ Automatic water meter reading via WMBUS-T protocol (868.95 MHz)
- ✅ Multiple meter support - reads all nearby IZAR meters or filter by ID
- ✅ Home Assistant integration via ESPHome API
- ✅ Robust overflow handling - manages CC1101 RX FIFO without data loss
- ✅ 3-of-6 decoding - proper WMBUS-T packet decoding
- ✅ CRC validation - ensures data integrity
- ✅ Decryption support - handles encrypted meter data
- ✅ Easy meter ID discovery - just watch the logs!
- Frequency: 868.95 MHz
- Modulation: FSK
- Sync Word: 0x543D
- Baud Rate: ~38.4 kbps
The WMBUS-T mode uses a specific set of 47 CC1101 registers defined in wmbus_t_cc1101_config.h. These settings configure:
- Frequency (868.95 MHz)
- Modulation and deviation
- Data rate and channel bandwidth
- Packet format and sync word
- FIFO thresholds
- Setup: CC1101 is initialized and configured for WMBUS-T mode
- RX Mode: CC1101 continuously listens for meter transmissions
- Packet Reception: Data is read from CC1101 FIFO (polled every 100ms)
- Decoding: 3-of-6 encoding is decoded to bytes
- Validation: CRC is checked for data integrity
- Decryption: Encrypted data is decrypted
- Publishing: Water consumption is published to Home Assistant
Check hardware:
- ✓ CC1101 antenna is connected and tuned for 868 MHz
- ✓ Water meter is nearby (within a few meters for testing)
- ✓ All SPI wiring is correct (see pinout above)
- ✓ CC1101 VERSION register returns 0x14 (check logs)
Check meter compatibility:
- Water meter must transmit in WMBUS-T mode (not WMBUS-S or WMBUS-C)
- IZAR/Diehl/Hydrometer meters typically use WMBUS-T
- Meters usually transmit every 8-16 seconds
This is normal! The code automatically handles overflows:
- Detects overflow (MARCSTATE=0x11)
- Reads data from FIFO before flushing
- Recovers to RX mode automatically
- No data loss occurs
If you see frequent overflows, the polling is working correctly.
- Check SPI wiring (MOSI, MISO, SCK, CS)
- Verify 3.3V power supply is stable
- Ensure CC1101 module is genuine (not a clone with issues)
- Ensure ESP-IDF 5.x is installed
- Clean build:
esphome clean watersensor.yaml - Check CMakeLists.txt includes the cc1101 component
- CC1101 Driver: nopnop2002/esp-idf-cc1101
- Original IZAR decoder: Based on various WMBUS-T implementations
- ESPHome: esphome.io
This project is provided as-is for educational and personal use.
- Transmission interval: Water meters typically transmit every 8-16 seconds
- Multiple meters: All meters in range are detected. Use
meter_idto filter. - Sensible threshold: Prevents huge jumps in readings (default: 300,000L)
- Range: Start with CC1101 very close to meter (< 1m), then test range
- Antenna: A proper 868 MHz antenna is critical for reliable reception
- 2025-01: Initial ESP-IDF migration from Arduino
- 2025-01: Fixed RX overflow handling for reliable operation
- 2025-01: Added configurable meter ID filtering
- 2025-01: Production-ready release