This Matter-enabled example functions as a light bulb device type, with on/off capabilities.

Initial setup

  1. Clone the Espressif ESP-IDF and check out the v4.4.2 tag:
    mkdir ${HOME}/tools
    cd ${HOME}/tools
    git clone
    cd esp-idf
    git checkout v4.4.2
    git submodule update --init
    export IDF_PATH=${HOME}/tools/esp-idf
  2. Clone and initialize the connectedhomeip repo:
    git clone
    cd connectedhomeip
    git fetch origin v1.0-branch
    git checkout FETCH_HEAD
    git submodule update --init --recursive
    source ./scripts/
  3. Initialize the example:
    cd examples/all-clusters-app/esp32
    source ${IDF_PATH}/
    For MacOS users, if you see an error about the Bash version at this step, it might be because the pre-installed Bash is too old. You may resolve this issue by switching to zsh: chsh -s /bin/zsh.
  4. To set IDF target, run set-target based on your board: set-target esp32
  5. Update the example settings: menuconfig
    1. Set Demo -> Device Type to your board

Build the image and flash the board

  1. Build the Matter example: build
  2. Connect your device via USB. Then run the following command to flash the demo application onto the device: -p /dev/ttyUSB0 flash
    If necessary, replace /dev/ttyUSB0 (Linux) with the correct USB device name for your system (such as /dev/tty.SLAB_USBtoUART or /dev/tty.usbserial on MacOS).
  3. The serial console for the device is available as a USB tty device on your Linux host. It is typically named /dev/ttyUSB0, but may be /dev/ttyUSB1 or higher if you already have other USB serial devices plugged in. The ESP32 WROVER kit exposes two USB tty devices, and it will be the second one that shows device logs.

    To connect to the serial terminal, use a tool like screen, minicom, or your preferred serial terminal program. For example, if the device is at /dev/ttyUSB0:

    screen /dev/ttyUSB0 115200

  4. The network configuration persists on the device once commissioning is completed. To erase it, simply run: -p /dev/ttyUSB0 erase-flash

Next steps

When your Matter example has been successfully built, create a developer project.