-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support of Arduino Matter library #7432
Comments
Why does this need to be part of the core? It can be handled in a 3rd party library. |
Hello @Humancell, thanks for opening this feature Request. I'm adding this to next major milestone 3.0.0 and we will evaluate it. |
Hello, Thank you for considering this! @lbernstone I can understand your question, but I see this no differently from all of the other libraries that are already a part of core. We already have Bluetooth, HTTP, DNS, Webserver, NetBIOS, RainMaker and many more. Just as many of these are built on the esp-protocols, this - it seems - would be built on https://github.com/espressif/esp-matter . It is a protocol layer provided by Espressif in the IDF, and besides the technical reasons I believe by exposing it to Arduino developers it could assist the ESP32 in becoming an even more powerful platform for the development of Matter controllers and devices. |
You can try library I have created few days ago https://github.com/jakubdybczak/esp32-arduino-matter |
Hello,
I did see this library, but from my understanding you have not made this 100% open source, which is a problem for us. We can not use any closed source code in our projects. If I am incorrect, and this really is 100% open source then we could take a look. |
@Humancell |
We will consider this request for next releases in 2023... please be patient. |
I have done an initial effort to build Matter and Arduino as Component. |
Hi all Is there any progress for supporting Matter to the Arduino core? |
@HamzaHajeir - We are currently working to release OpenThread as an Arduino Library. This shall be done later this month. |
About Matter Library implementation for Arduino Core 3.0.x:
|
Glad to hear that's coming support of Matter in the Arduino core. I have just some questions and comments:
With thanks, |
@HamzaHajeir - Thanks for the comments.
Not as part of the tools that ESP32 Arduino would provide.
Commissioning will always be done on-network. Therefore, On-Network Commissioning method will be included.
Yes, correct.
We may consider it for future feature. At first, we'll focus on the Matter 1.0 device types as described above. |
@SuGlider Nice, that explains all, I was mixing between commissioning discovery and commissioning process, seems two different operations. However, it seems that all Factory Data Providers would be 'custom' in Arduino, correct? |
Arduino will set the Matter Device as a Testing unit using a VIDs allocated by the CSA for testing purposes. Commissioning will happen as defined in the description from https://developers.home.google.com/matter/primer/commissioning Discovery may be done using BLE and/or WiFi AP, as described here: https://developers.home.google.com/matter/primer/commissionable-and-operational-discovery |
But this might contradict with this (regarding the providers), where it should be a custom one if someone would use the Arduino:
What I could suggest is making it custom with overridable test providers: defaulted to a derived class of such, that points to test information.
I'll read about them soon and check if any suggestion or comment I can assist with. |
@SuGlider I try to build with 3.0 as component and latest esp matter but it not working, show error:
|
I think that goes after substituting ESP32 to its preprocessor definition 1. Therefore there should be the compile-time definition of ESP32. What steps you've followed to reach to this point? |
Are you mixing WiFi calls and ESP Matter calls in the same project? |
ESP_Matter over WiFi will use the settings from NVS to establish a connection the AP. Arduino WiFi library may break it in case it starts a connection to a different AP or it stops the current connection started by ESP_Matter. Once WiFi is set and the ESP32 STA connects to the AP, it may be possible to use some Arduino WiFi API calls, but it may depend on previously configuration and setting values for the internal WiFi Class members. Therefore, it may not work as well. ESP_Matter can't work within WiFi AP mode. If the Arduino WiFi API method calls IDF LwIP/netif API directly, it may get correct results, but remember that ESP_Matter relies on IPv6. |
Adding on top of the above, I think that the WiFi Events would have a conflict when Arduino WiFi Library and, at the same time, the ESP Matter also consume them. |
I want to use matter with exist Arduino projects and libs. Esp idf or arduino wifi handle I think not difference. I have merge Rainmaker and Esp Homekit sdk too, RM handle wifi but I can use Arduino to check wifi state, ip and more even Arduino only support Bluedroid. |
@dzungpv - Thanks for the explanation about your request. Let me investigate it and try to come up with a way to get these information when using Arduino + Matter as IDF Component:
Blueroid is for BLE operation only. NimBLE is another BLE stack. |
For Nimbel and Bluedroid, it is only example. With Rainmaker project I use it to get Bssi, Rssi and Wifi scan too, it work fine with native IDF wifi |
RainMaker is an application protocol, based on Netowrk Client/Server. It doesn't care about the network transport layer. Matter is also an application protocol, but it cares about the network transport layer. In order to get the WiFi Status, your application shall use the Matter Callbacks and Matter mechanism for getting events in the user application side. It is already in the example code and WiFi events can be received using the
|
@dzungpv - It seems that CHIP/Matter provides a way to control WiFi using RPC. https://project-chip.github.io/connectedhomeip-doc/guides/esp32/rpc_console.html |
@SuGlider Yes, now how I can build project with Arduino core 3.x and Matter? Because it simply failed. |
This is a long term development process. The main goal of the current effort is to allow users to build Matter Accessories using an ESP32 Arduino Matter Library (to be created). In such case, it will use the native Matter WiFi control layer and the native Matter Thread control layer as the first approach. Currently I'm working on:
I would say that making Arduino WiFi Library and Arduino Matter Library compatible with each other is not in the priority list of the current project. But it can be achieved in the long term.
I'll post an example using Arduino + Matter as IDF Component based on Arduino Core 3.0.5 and IDF 5.1. I think I may have it done by the end of the next week. |
Undefined reference implies that some sources are not included in the build. I remember I had this one just recently, I just enabled something within WiFi component through esp-idf menuconfig, then it compiles. Per ESP-Matter and WiFi library coexistence, I believe it's possible through telling Matter that WiFi is controlled by Application. And, here the source shows not reacting to calls (and wifi events) if so: https://github.com/project-chip/connectedhomeip/blob/master/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp [Search for kWiFiStationMode_ApplicationControlled]. I believe that the designers of CHIP just considers this range of use cases, where clients implement their own wifi management code. Consider a product which was in market before adopting Matter and yet have its own wifi management, should the manufacturer deliberately use CHIP wifi management? Nope. |
Follow your hint I was find the config that make Arduino could not build, it is CONFIG_ESP_WIFI_SOFTAP_SUPPORT=n, I enable it then the code can build. Now let play with Wifi part. |
Correct. |
Some correction by considering that |
@SuGlider The PR has a ugly side effect. It causes mass of redefine warnings with pioarduino / Platformio.
EDIT: Probably fixed with espressif/esp32-arduino-lib-builder#217 |
Yes, espressif/esp32-arduino-lib-builder#217 will fix PIO adding |
Thank @HamzaHajeir for the information! I see that, when both Therefore, maybe, we can override Something to dig out. |
To my understanding, we don't need to override the No_WiFi implementation. we just keep CONFIG_ENABLE_WIFI_STATION defined, and CONFIG_ENABLE_WIFI_AP if needed to activate AP. But telling Matter to not touch WiFi with 'ApplicationControlled' concept. That way the application should be responsible to manage WiFi (+WiFiAP) machine state by itself. Considering some issues as WiFi AP SSID should comply to Matter's standard, for an example. Therefore we have something like WiFiManager library. But however I don't know what Arduino WiFi library intersect with that matter, is it something as just managing automatic reconnection? We might consider relying on CHIP's implementation of WiFi management, at least as an available option... |
This integration with Arduino WiFi Library will be left for the long run. As a first approach, the Arduino Matter Library will use CHIP and ESP_Matter as it is now, meaning that ESP_Matter will manage WiFi/Ethernet/Thread directly through ESP-IDF calls. I also need to understand the implication of using Arduino WiFi Lib instead of CHIP WiFi Manager regarding Network Provisioning and Matter Fabric Commissioning processes. |
Initial PR for Arduino Matter Library is posted in PR #10467 |
#10467 is merged and Matter Library will be released into Arduino Core 3.1.0-RC2 or into initial release of Core 3.1.0. Next step is the implementation of more Endpoint profiles as in the list:
|
Related area
Arduino Library
Hardware specification
All Boards
Is your feature request related to a problem?
The Matter specification has been released, and there has been IDF support for quite some time. At one level is would be good to see examples of using these APIs from the Arduino environment. At another level it would be great if there was a higher level Arduino library created that leveraged these APIs and provided examples for both implementing and controlling a Matter device.
Describe the solution you'd like
It would be great if there was a higher level Arduino library created that leveraged the IDF Matter APIs and provided examples for both implementing and controlling a Matter device.
Describe alternatives you've considered
There are some other people outside of this project starting to experiment with this, but they are not fully open source nor sponsored by Espressif.
Additional context
For the Espressif platform to dominate in the market for Matter devices it could be engaging the Arduino developers better.
I have checked existing list of Feature requests and the Contribution Guide
The text was updated successfully, but these errors were encountered: