Skip to content

Matter temperature / humidity sensor (ESP32 + Si7021) example

License

Notifications You must be signed in to change notification settings

YOGYUI/matter-esp32-si7021

Repository files navigation

Matter Temperature/Humidity Sensor Example (ESP32 + Si7021)

Matter 온습도 센서(Temperature/Humidity Sensor) 예제 프로젝트
다음 2종류의 Matter 클러스터들에 대한 코드 구현 방법을 알아본다

  • Temperature Measurement (Cluster Id: 0x0402)
  • Relative Humidity Measurement (Cluster Id: 0x0405)

Software (Matter)

2개의 Endpoint가 아래와 같이 생성된다

  1. Endpoint ID 1
    Device Type: Temperature Sensor (Classification ID: 0x0302)
    [Clusters]
    • Temperature Measurement (Cluster ID: 0x0402)
      [Attributes]
      • Measured Value (Attribute ID: 0x0000)
      • Min Measured Value (Attribute ID: 0x0001)
      • Max Measured Value (Attribute ID: 0x0002)
  2. Endpoint ID 2
    Device Type: Humidity Sensor (Classification ID: 0x0307)
    [Clusters]
    • Relative Humidity Measurement (Cluster ID: 0x0405)
      [Attributes]
      • Measured Value (Attribute ID: 0x0000)
      • Min Measured Value (Attribute ID: 0x0001)
      • Max Measured Value (Attribute ID: 0x0002)

Hardware

Si7021: I2C 통신 방식의 온습도 센서 IC 사용


I2C GPIO 핀번호 변경은 /main/include/definition.h에서 아래 항목을 수정
default: SDA = GPIO18 / SCL = GPIO19

#define GPIO_PIN_I2C_SCL 19
#define GPIO_PIN_I2C_SDA 18

SDK Version

Helper Scripts

SDK 클론 및 설치

$ source ./scripts/install_sdk.sh

SDK (idf.py) 준비

$ source ./scripts/prepare_sdk.sh

Build & Flash Firmware

  1. Factory Partition (Matter DAC)
    $ source ./scripts/flash_factory_dac_provider.sh
  2. Configure project
    $ idf.py set-target esp32
  3. Build Firmware
    $ idf.py build
  4. Flash Firmware
    $ idf.py -p ${seiral_port} flash monitor

QR Code for commisioning

qrcode.png

References

Matter 온습도 센서 개발 예제 (ESP32)

About

Matter temperature / humidity sensor (ESP32 + Si7021) example

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published