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

How to add and remove supporterd attributes of a cluster though esp-matter without using ZAP (CON-1421) #1159

Closed
bilalmalik76 opened this issue Nov 18, 2024 · 7 comments

Comments

@bilalmalik76
Copy link

How to add and remove supporterd attributes of a cluster though esp-matter without using ZAP? Considering esp-matter provide non-zap based APIs, how to find enabled attributes information and how to enable and disbale specific?

@github-actions github-actions bot changed the title How to add and remove supporterd attributes of a cluster though esp-matter without using ZAP How to add and remove supporterd attributes of a cluster though esp-matter without using ZAP (CON-1421) Nov 18, 2024
@shubhamdp
Copy link
Contributor

To check if attribute/cluster present or not there are get() APIs. If the API returns nullptr then the attribute is not present on the node.

For cluster: https://github.com/espressif/esp-matter/blob/main/components/esp_matter/esp_matter_core.h#L397-L407
For Attribute: https://github.com/espressif/esp-matter/blob/main/components/esp_matter/esp_matter_core.h#L567-L578

To add, we have ::create() APIs listed in esp_matter_attribute.h.

We do not have APIs to remove the already present attributes. But, we only add the mandatory attributes/events when creating the device type, so I think you should consider only adding the optional clusters/attributes/events.

@bilalmalik76
Copy link
Author

@shubhamdp What I understood is that all mandatory attributes for a specific cluster of a sepcific device type are already available in esp-matter and we only need to add optional if required?

@shubhamdp
Copy link
Contributor

@bilalmalik76 Yes, thats right. When adding new device type, we ensure and only add the mandatory bits from the specification.

@bilalmalik76
Copy link
Author

Thanks where I can find the list of mandatory attributes available in esp-matter?

@shubhamdp
Copy link
Contributor

esp_matter_cluster.cpp contains the list of attributes/commands/events which are mandatory for a cluster.

@shubhamdp
Copy link
Contributor

@bilalmalik76 any updates on this? Please close the issue if your question is answered.

@bilalmalik76
Copy link
Author

I am closing this and will reopen if needed.

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

2 participants