Getting started with Matter Protocol using ESP Zerocode

Getting started with Matter Protocol using ESP Zerocode

Get started with Matter Protocol using the ESP ZeroCode platform and ESP32. Control an LED strip with Alexa using Matter. No CODE required.

In this Internet of Things tutorial, I have explained how to get started with Matter Protocol using the ESP Zerocode platform and ESP32.

What is Matter Protocol?

Matter, an open-source connectivity standard for IoT and smart home devices, prioritizes compatibility and interoperability across various manufacturers while emphasizing user security through local control options.

What is Matter Protocol

Using Matter protocol you can easily connect the ESP32 with most of the IoT platform through the internet, but you must have a hub/gateway for that particular IoT platform.

esp32 matter protocol p9 2

To connect Alexa, you need an Echo device, for Google Home, you need a Google Nest mini…

The ESP32 will be connected to the hub which is within the same WiFi network. The hub is connected to the IoT cloud server of that IoT platform.

Here we will control an LED strip with Alexa using Matter Protocol.

control an LED strip with Alexa using Matter Protocol

Circuit for the ESP32 WLED project

Circuit for the ESP32 WLED project.

In the circuit, I have connected the D25 with the Din pin of the LED strip. And used a 7805 voltage regulator to provide the 5V supply to ESP32.

If you use 5V WS2812 LED strip, the voltage regulator is not required. You just need the ESP32 and the LED strip.

Tutorial video on ESP32 Matter Protocol

In the Matter tutorial video, I have covered the following steps in detail.

  • Circuit for the ESP32 WLED project.
  • Install Matter firmware to ESP32 using ESP ZeroCode.
  • Steps to connect Amazon Alexa using Matter protocol.

Now to prepare a Matter-certified firmware and install it to ESP32, we will use ESP ZeroCode platform.

What is ESP ZeroCode platform?

ESP ZeroCode is a web-based application specifically created to prepare Matter-certified firmware for ESP32 devices as per the user’s preferences and specifications.

visit the ESP ZeroCode

First, visit the ESP ZeroCode: https://zerocode.espressif.com/

ESP Launchpad makes use of WebUSB to communicate with the device. Currently, Safari & Firefox browsers don’t support it yet.

Recommended browser: Google Chrome

Then create an account in ESP ZeroCode.

ESP ZeroCode setup step-2

Login to your account using your email ID and password.

Also, connect the ESP32 to your laptop.

ESP ZeroCode setup step-3

Click on “Create a new product“.

ESP ZeroCode setup step-4

Enter a name for the product.

ESP ZeroCode setup step-5

Now you have to select the product type according to the product (Socket, Plug Lights, etc).

Here we are going to control an LED strip, so I have selected the LED Strip.

ESP ZeroCode setup step-6

Now click on “Next step“.

ESP ZeroCode setup step-7

Now select the type of ESP32 board that you are going to use.

Here I will use DOIT ESP32 DEVKIT V1, so I have selected “ESP32-WROOM-32E” under ESP32.

ESP ZeroCode setup step-8

Now click on “Next step“.

ESP ZeroCode setup step-9

Now select the GPIO details as per your circuit.

As per the circuit, the D25 GPIO is connected with the LED Din pin, so in the IO pin, I have selected GPIO 25.

And here I want to control the first 10 LEDs in the strip, so I have entered 10 in the “Number of LEDs“.

Now click on “Next step“.

ESP ZeroCode setup step-10

By default, the radio button of matter and 3-years update will selected. Keep it as it is.

If you want to add the device to Google Home, then you have to create a certificate.

ESP ZeroCode setup step-11

Now click on “Try in ESP Launchpad“.

It will prepare the firmware for the ESP32.

ESP ZeroCode setup step-12

Make sure the ESP32 is connected with the laptop.

Click on “Connect Your Device“.

ESP ZeroCode setup step-13

Now select the COM port where ESP32 is connected. Then click on “Connect“.

Then it will start uploading the firmware to ESP32.

ESP ZeroCode setup step-14

After uploading the firmware, you will get the matter QR code for the device.

We can use this QR code to connect the ESP32 with different IoT platforms.

Here we will add the device to Amazon Alexa. So the Echo Dot must be connected to the same WiFi network.

Now turn on the Bluetooth and Location/GPS on your mobile and open the Amazon Alexa app.

Connect Alexa using the Matter QR code

Steps to add matter device in Alexa app
  1. Open the Amazon Alexa app, go to “Device” and tap on “+” icon.
  2. Tap on “Add Device“.
  3. Select “Light“.
  4. Scroll down and select “Other“.
  5. Tap on “matter“.
Connect Alexa using the Matter QR code

Now scan the matter QR code.

Enter WiFi details

Then select the WiFi name. ESP32 will be connected to this WiFi network.

Tap on “Next”, and the device will be added to the Alexa app.

Under the Device — Lights, you will find a new device called “First Light”.

Rename the device in Alexa app

To rename the device, tap on the device. Go to settings (gear icon), tap on Edit Name.

Enter a new name, then tap on outside the box. the new name will be saved.

Now connect the ESP32 with the circuit. Although the circuit is very simple, I have designed a PCB for this project.

PCB for this ESP32 WLED project

If you want, you can also use this PCB to make the circuit compact and give the project a professional look. This PCB can be used for any other ESP32 WLED project.

You can order any custom-designed PCBs from PCBWay at very reasonable prices.

PCBWay

You can also explore different PCB projects from their Open-source community pcbway.com/project/.

PCBWay contest

PCBWay Design Contest has always encouraged participants to engage in open-source and innovative projects, aiming to inspire more individuals to become a member of the electronics community.

PCBWay contest timeline


In the contest, you have the opportunity to enter a wide range of submissions related to electronic design, spanning FPGA, IoT projects, wearables, embedded electronics, and also encompassing mechanical design, product design, or 3D design.

For more details please click here.

Control the LED strip with Amazon Alexa

Control the LED strip with Amazon Alexa

Now you can easily turn ON/OFF the LEDs, control the brightness, and change the color of the LED strip from the Amazon Alexa app.

Only the Echo Dot and ESP32 must be connected to the same WiFi network. But your mobile can be connected to any different network. So you can control the LEDs from anywhere in the world through the internet.