Make Matter Accessory with ESP32

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Finally, we are here. Apple officially supports Matter through Apple's Homekit. Believe it or not, It can be expected that in the future, smart home devices will be built on Matter. So we have to prepare for the new era of the smart home device. This is the first Matter accessory I made as a demo. One EPS32-S3 dev kit can turn into a great smart lamp. That's really cool. Also, it can be turned on and off through Siri, and it works very easily with Apple's HomeKit, so you can control it from the out of your home. In this video, I'm gonna cover starting with installing Matter framework and build example app called the lightning app for ESP32-S3. Let me introduce the heroes of this project. First up is the ESP32-S3-DevKitC. Since it is an N8R8, it has 8MB Flash and 8MB PSRAM. It does not matter though. Also, since an RGB LED is attached to the board, this will give you the color you want. This is the reason why I choose this one. No need to wire anything. In the end, I'll control this LED from my iPhone's Home App. Apple TV is important in this project. You must set up a home hub to add Matter accessories to the Home app. So you need a device like an Apple TV or HomePod or iPad. According to the article, the iPad can no longer be used as a home hub. This hasn't been officially announced yet, but it looks like it'll be out of support soon. That's not good. Apple TV automatically becomes a home hub when you add it to HomeKit. So all you need to sign in to iCloud with your Apple ID. For your information, Apple TV can be used from the 4th generation or later. And I'm gonna add Matter accessory I made on my iPhone and control it through Home App. With this, today's project begins. Let's get the Matter Framework. The first thing we need to do is check out the matter code. Let's proceed one by one by following the building guide they provide. This project contains many sub-modules. It took me about an hour to download all of them. Probably because many people started developing matter, I think it might be. The way I see it, it would be good for you to work out for a while if you just get started. There is something I wanna mention while we wait. You must develop using ESP-IDF. So, I recommend that you use Visual Studio Code. Installing ESP-IDF is very detailed in Espressif. Also, there is a tutorial for using VS Code. If you add them one by one, there is no problem preparing the development environment. I assume you have ESP-IDF and Visual Studio Code ready. As you can see, I develop in a Mac environment, so I'll set it for macOS. If you are using a different OS, please install it accordingly. Check out is over. An hour has passed. It's crazy. The next thing we need to do is to set up some necessary settings for the build. You must have Xcode and Brew, if you don't have them, install them first. This is a required process for Mac only. I also use an Intel Mac, so I use this method. In order for pkg config to work properly, make a symbolic link from the pkg config in openssl to the newly installed pkg config. I have a version of 1.1.1q openssl installed, not 1.1.1g, so I will make it for this. I'm ready to set up the environment. Please install the necessary parts according to the OS you are using first. Now it's a setting for the environment. Set all environment variables required to build the project. Let's move to the top-level folder and run the activate script. Finally, we can see this welcome screen. Welcome to matter activator. It says this sets your shell environment variables. Like above, If you can see this message, "Environment passes all checks!", it means that the necessary settings for building the project are now ready. It's time to build all sources, libraries, and tests for the host platform. For the build, it uses GN and Ninja here. GN is a meta-build system that generates build files for Ninja. And then Ninja uses build.ninja files to define build rules. Ninja is a small build system with a focus on speed. Ninja is used to building Google Chrome, parts of Android, and LLVM. We can build our project with this. ESP-IDF also uses Ninja to build the project. If you need more detailed information, I recommend Googling it. You can find a bunch of information about it. Seems like all done. Let me run all tests. There were no errors, so all tests were completed without any problems. Let me try this again to confirm. Here we can confirm "no work to do". that means that the tests passed in a previous build. The preparation of Matter is over. Next, let's deploy an example officially supported by matter to my ESP32-S3. The example I'll be using is the Lightning app. If you use the ESP32-S3 devkit, you can control the RGB led on the board without modifying the source code. This is the target project. Let me open VS Code here. I'm currently using ESP-IDF version 4.4.2. Hang on. Let me resize the window. I do not modify anything in this project. Just I'll select the connected port. And set the target board to ESP32-S3. That's it. I'm waiting for the target setting done. It's all done. Let me build it. It's starting to build the first matter project. I hope there is no issue. For ESP32-S3, the LED pin is set to 48. If your board has RGB LEDs connected to other GPIOs, please edit CONFIG_LED_GPIO in sdkconfig. If there is a problem with the build, first check that the ESP-IDF build works properly in your VS Code. Also, if you run into problems with matter framework, Please try running the activate script again in the bash terminal. The build task was done without any issues. After flashing to the device, open the monitor and check the log console. Currently, the device doesn't have any connections. It continues to wait for an external connection. It uses a QR code to make a connection. If you look in the console, you can find the link. When you click the link, a QR code is automatically generated through the web. What a good process. I'm trying to register this as a new accessory through the home app of my iPhone. Just read the QR code through the app. Oh, my God. Looks like my Apple TV isn't 16.1 yet. I need to update my Apple TV. Let me do this first. My apple TV is now up to date. Let me try to add my device again. QR code Scanning is done. I'll show you my iPhone. This time, it went to the screen that says "Connecting to accessory". Feeling good. It says uncertified accessory. Of course. As this is a demo, accessories are not certified. I will discuss device certification again when I have a chance. Hang on a second. Finally, It's connected. I'm so happy with this. Set an accessory name. It also has basic Light Automations settings. My first matter accessory was registered in my Home. This is awesome. I wonder how it works. Let's change the color of the light. Can you see this? It works like a smart lamp. You can set not only the color you want but also the brightness. The overall quality seems to be very good because it's used within the Apple Home app. Everything works very well. What I'm gonna test this time is whether I can control matter accessories if I'm not on the same network. I have no doubt it will work, but let's test it. As you can see here, I am currently connected to LTE and turned off WiFi. Yeap, it works fine. It works seamlessly. The currently supported device types are as follows. Most types of basic home devices are supported. I wonder how the camera part will be supported in the future. Making meter accessories with ESP32 is very interesting. This will definitely enable more projects. I will try my best to do as many projects as possible. Today ends here. Thank you for watching. See you on the next project.
Info
Channel: That Project
Views: 37,768
Rating: undefined out of 5
Keywords: ESP32 Project, ESP32CAM project, That Project, Arduino Project, chip matter, matter project, matter ESP32, ESP32-C2 matter, ESP32-S3 matter, ESP32-H2 matter, Project CHIP, What is Matter?, How does Matter work?, smart home device, smart home ESP32, iOS ESP32, HomePod, AppleTV, Smart Lamp, How to make Matter accessories with ESP32, ESP32 philips hue, Smart Device with matter, iOS 16.1 Matter, AppleTV home hub, iPad Home hub, ESP32 HomeKit, matter HomeKit
Id: i2doZomr9V0
Channel Id: undefined
Length: 10min 12sec (612 seconds)
Published: Wed Oct 26 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.