A soil moisture sensor running on ESP32-C6, using Matter over Thread. The device operates as a Sleepy End Device, waking periodically to read a capacitive soil moisture sensor and report the value over the network.
- ESP32-C6 development board
- Capacitive soil moisture sensor V2.0 connected to GPIO0 (ADC1_CH0)
- GPIO9 (BOOT button) for factory reset
The sensor value is exposed as a Matter RelativeHumidityMeasurement cluster (0-100% range).
Requires ESP-IDF v5.5 and ESP-Matter.
source esp-idf/export.sh
export ESP_MATTER_PATH=/path/to/esp-matter
source $ESP_MATTER_PATH/export.sh
idf.py set-target esp32c6
idf.py build
idf.py flash monitor
Commission the device using any Matter controller. Default pairing parameters:
- Discriminator: 3840
- Passcode: 20202021
The tools/qrgen.html page can generate a Matter QR code for commissioning.
The device runs as an Intermittently Connected Device (sleepy end device) with these defaults:
| Parameter | Value |
|---|---|
| Idle mode interval | 180s |
| Active mode duration | 1000ms |
| Active mode threshold | 1000ms |
The sensor is read each time the device enters active mode.