Skip to content
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

Hardware and Functional Requirements, and Integration of Matter with an Existing Project (CON-1433) #1171

Open
esp-dev opened this issue Nov 26, 2024 · 4 comments

Comments

@esp-dev
Copy link

esp-dev commented Nov 26, 2024

Dear Team,

We are planning to use ESP-Matter in our IoT project, and we have several questions regarding hardware and functional requirements as well as integration:

  1. Hardware Requirements (to pass Matter certification):

    • Which CPU model is recommended for devices supporting Matter?
    • Is PSRAM required? If yes, what is the minimum recommended amount?
    • What is the minimum flash memory required?
  2. Additional Functionalities:

    • Our device must support a local HTTP server and provide at least one cloud connection via TLS. Does ESP-Matter support implementing these functionalities? Are there any recommendations for integrating these features with the SDK?
    • We require support for AP mode, WPS, and the ability to manually configure static IP addresses. Does ESP-Matter natively support these features, or will they need to be implemented from scratch?
    • Regarding device pairing, does Matter offer the option to pair using AP mode, or is Bluetooth mandatory for pairing?
  3. Integration of Matter with an Existing Project:

    • What are the recommendations for adding Matter support to an existing project based on ESP-IDF? Are there any examples or documentation available to facilitate such integration?
    • Does ESP-Matter provide ready-to-use components that can be integrated into an application already using other communication stacks?

We would greatly appreciate detailed responses to help us better plan the implementation and adaptation of our existing system to support Matter.

Kind regards,

@github-actions github-actions bot changed the title Hardware and Functional Requirements, and Integration of Matter with an Existing Project Hardware and Functional Requirements, and Integration of Matter with an Existing Project (CON-1433) Nov 26, 2024
@jonsmirl
Copy link
Contributor

I'm not Espressif employee, but I have been working with esp-matter for a long time....

It is very easy to switch CPUs with the esp-idf, you just set-target and recompile. So I would develop on an ESP32-S3 with PSRAM initially. It is a lot of hassle dealing with low RAM conditions so just avoid that initially. Then after you get your code working see if it fits on something like the ESP32-C3. All of the basic Matter devices will fit onto the ESP32-C3, so this is a function of how much other stuff you add. For example, my system implements a bridge and a lot of other stuff and it requires PSRAM. But that's just because all of the other stuff I added needs about 300KB of additional memory, if I removed the stuff I added it wouldn't need PSRAM.

As for the other things, I run esp-matter in one task and I run esp-idf code in another task. As far as I know you can do anything you want in the other task as long don't do something like change the wifi mode when the other task is using it. I am also running an http server and esp-matter is basically unaware that I am doing that. You just need to implement some messaging between the tasks to coordinate. In my case esp-matter gets wifi running, then it I send a message which starts the http task.

Look in the closed issues, other people have built custom pairing solutions. One way to do that is to get the device onto wifi using your non-matter solution. Then start Matter in on-network commissioning mode. On-network mode assumes the network is already running. I believe this is encoded into the QRCode so IOS will know to use on-network instead of Bluetooth.

@esp-dev
Copy link
Author

esp-dev commented Nov 27, 2024

Hi Jon,
thank you for your reply. Messages between tasks seem to make sense. I will think about implementing this.
I also looked through the esp-matter code and the implementation is now better than it was at the beginning. This is built so that part of the code is in esp-matter and part of it is in the connectedhomeip/src/platform/ESP32 repository itself. I haven't looked at the updated matter documentation yet, but I can see that there has been progress. Previously, I also encountered the problem of statically allocated memory by the matter library. In turn, getting rid of bluetooth would not only save flash and RAM, but also get rid of bluetooth certification.
If RAM is insufficient, ESP32-S3R2 is quite expensive, the old ESP32 with PSRAM seems to be better. We are still waiting for the C5 or C61 series to appear.

@MaplestoryAlen
Copy link

Dear Team,

We are planning to use ESP-Matter in our IoT project, and we have several questions regarding hardware and functional requirements as well as integration:

  1. Hardware Requirements (to pass Matter certification):

    • Which CPU model is recommended for devices supporting Matter?
    • Is PSRAM required? If yes, what is the minimum recommended amount?
    • What is the minimum flash memory required?
  2. Additional Functionalities:

    • Our device must support a local HTTP server and provide at least one cloud connection via TLS. Does ESP-Matter support implementing these functionalities? Are there any recommendations for integrating these features with the SDK?
    • We require support for AP mode, WPS, and the ability to manually configure static IP addresses. Does ESP-Matter natively support these features, or will they need to be implemented from scratch?
    • Regarding device pairing, does Matter offer the option to pair using AP mode, or is Bluetooth mandatory for pairing?
  3. Integration of Matter with an Existing Project:

    • What are the recommendations for adding Matter support to an existing project based on ESP-IDF? Are there any examples or documentation available to facilitate such integration?
    • Does ESP-Matter provide ready-to-use components that can be integrated into an application already using other communication stacks?

We would greatly appreciate detailed responses to help us better plan the implementation and adaptation of our existing system to support Matter.

Kind regards,

At present, we are developing an ESP32S3 with LVGL screen, using 16MB of memory and 8MB of SPRAM. In terms of functionality, it includes MQTT and HTTP, BLE debugging, and OTA. The OTA I compiled is estimated to be around 6MB. If we only use HTTP functionality and the data volume is not large, the 4MB flash of ESP32S3 is sufficient. However, the premise is that after the network is distributed, BLE needs to be turned off to release about 80K of RAM

@jonsmirl
Copy link
Contributor

jonsmirl commented Feb 28, 2025

I have a very similar system with LVGL and parallel LCD. We were running in RGB mode but that takes a lot of bus bandwidth so we are switching over to 8080 mode using the framebuffer on the LCD. Our LCD already supported both modes.

To use 4MB flash with OTA your image has to be under 2MB (you have to store TWO copies of it) We are currently 2.5MB so we can't use a 4MB flash chip. We easily fit into 8MB flash and 2MB of PSRAM. We have built hardware with both the ESP32S3-PICO1-N8R2 and ESP32S3-R2 with external 8MB flash chip. Not sure yet which is cheaper in production.

i was looking for better dev board and ordered one of these to try: https://www.moddable.com/moddable-six They don't have a schematic that I can find, but you have the source code for it with the LCD driver code.

Systematically move everything to PSRAM and you can leave BLE on. I have 60K free internal and 1.6MB free PSRAM. That is with both wifi and BLE running. This is the largest annoyance:
Task: CHIP 0x3fceea8c -> MALLOC_CAP_INTERNAL: 40144 MALLOC_CAP_SPIRAM: 20836 Highwater 4116

40144 bytes of CHIP in internal RAM. Have not figured out how to push it into PSRAM.

Another annoyance is that to use the flash driver your stack has to be in internal RAM. #1249

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants