29 Commits

Author SHA1 Message Date
chendejin cade5352c4 components/esp_matter: call init callbacks for endpoints created before esp_matter::start 2026-03-27 11:02:43 +08:00
Shubham Patil daf12f3421 fix(data_model): unlink cluster from endpoint on cluster::destroy
cluster::destroy() freed the cluster memory and its children (attributes,
commands, events) but never removed the cluster from the parent endpoint's
linked list, leaving a dangling pointer. This caused use-after-free crashes
when creating a new cluster on the same endpoint after destroying one.

Fix: look up the parent endpoint via the endpoint_id stored in the cluster
struct and unlink before freeing, consistent with how attribute::destroy,
command::destroy and event::destroy handle their parent lists.
2026-03-18 09:03:28 +05:30
Chris Leishman c718d9b504 fix(data_model): silence spurious "Cluster cannot be NULL" error during dynamic endpoint init
When using the esp_matter data model (CONFIG_ESP_MATTER_ENABLE_DATA_MODEL=y),
attribute::get(endpoint_id, cluster_id, attribute_id) is called during endpoint
registration via emberAfExternalAttributeReadCallback. If the cluster doesn't
exist on the endpoint, the lookup returns NULL, which is then passed to the
two-argument get(cluster_t*, attribute_id) overload that logs at error level.

Add a NULL guard in the three-argument overload to return nullptr early,
consistent with how command::get(endpoint_id, cluster_id, command_id) already
handles this case.

Fixes #1692
2026-02-24 07:32:17 -08:00
Shu Chen 77a7e01716 Merge branch 'fix_endpoint_report' into 'main'
components/esp_matter: report attribute change in endpoint::enable and disable

See merge request app-frameworks/esp-matter!1427
2026-02-10 11:06:19 +00:00
chendejin dd9d4d9c53 components/esp_matter: report attribute change in endpoint::enable and disable 2026-02-09 10:51:22 +08:00
WanqQixiang 968ff042a8 CI: add astyle pre-commit hook 2026-02-03 15:30:42 +08:00
chendejin f3a727930b components/esp_matter: call init function in endpoint::enable 2026-01-30 14:09:50 +08:00
Shu Chen 6456f3fbe2 Merge branch 'submodule/update_8f943388af' into 'main'
submodule: update connectedhomeip submodule to commit id 8f943388af

See merge request app-frameworks/esp-matter!1404
2026-01-26 07:45:05 +00:00
Hrishikesh Dhayagude 3f65036765 Merge branch 'attribute_update_cb' into 'main'
components/esp_matter: Add attribute update callback in case of attribute managed by SCI and AAI.

See merge request app-frameworks/esp-matter!1371
2026-01-22 16:02:46 +08:00
WanqQixiang baf5959df1 submodule: update connectedhomeip submodule to commit id 8f943388af 2026-01-19 08:37:19 +08:00
Rohit 651c1c6db9 components/esp_matter: Add attribute update callback in case of attribute managed by SCI and AAI. 2026-01-16 11:51:49 +05:30
Shu Chen 40b9d1413e Merge branch 'feat/add-destroy-methods' into 'main'
Add Destroy API Support for Commands, Attributes, and Events

See merge request app-frameworks/esp-matter!1336
2026-01-15 11:16:23 +00:00
Rohit 5e56b173d2 components/esp-matter: Fix the delegate initialization flow. Fixes:https://github.com/espressif/esp-matter/issues/1630 2026-01-13 17:12:18 +05:30
mahesh 0d77177a53 components/esp_matter: add destroy methods for command, attribute and
events
- remove data model elements depends on specific feature addition
2025-12-18 12:03:36 +05:30
Rohit ba887f9f6a components/esp-matter: Fix the set_val call and add RAII lock. 2025-12-18 10:31:49 +05:30
Shubham Patil ad2ea4f55b components/esp-matter: fix types for on_time and off_wait_time
These are non-nullable uint16's, so removed the nullable type
2025-12-04 22:15:26 +05:30
Shubham Patil a87107fb15 components/esp_matter: extend set val for internally managed writable
attributes

- re-implemented the set_val to set them using the TLV buffer for an
  attribute using DataModelProvider::WriteAttribute() API.

- renamed older set_val() to set_val_internal() and made it private.

- changed the set_val's occurances with set_val_internal inside the
  component. Since our sdk should not be worrying about getting data
  from the internally managed attributes, its safe to use the
  set_val_internal().

- updated release notes
2025-12-01 15:55:40 +05:30
Shubham Patil a420f4c946 components/esp-matter: get_val() to support internally mngd attributes
- re-implemented the attribute::get_val() to get the TLV data for an
  attribute using DataModelProvider::ReadAttribute() and then decoding
  that into esp_matter_attr_val_t.

- Renamed the older get_val() to get_val_internal() and made it
  a private API.
2025-11-27 19:16:04 +05:30
Shubham Patil 7251a7aa9f components/esp-matter: added attribute::get_val_type() API
This works for both base attributes i.e. managed internally as well as
esp-matter managed attributes as well.
2025-11-27 19:16:04 +05:30
Shubham Patil 1ca78a590f components/esp-matter: Split attribute val's usage in data model core
We have attribute base which only contains the id and flags.
But having the data type would be benefitial when fetching value for
internally managed attributes. So, rather than guessing the type we
can fetch it.
2025-11-27 19:16:04 +05:30
WanqQixiang 211658c88e upgrade connectedhomeip to latest release v1.5 branch 2025-11-25 16:11:40 +08:00
shripad621git c5c997fc4f esp_matter/data_model: Add better error logging in case of attribute type mismatch in set_val
- Fixes https://github.com/espressif/esp-matter/issues/1551.
2025-10-07 14:14:41 +05:30
WanqQixiang 9fdd2b586e example: Fix compilation of generic_switch example 2025-09-03 09:35:11 +08:00
WanqQixiang 9d7ff306f6 esp_matter: Add data model provider for esp_matter data model and remove upstream ember codes from esp_matter component 2025-09-02 10:16:06 +08:00
WanqQixiang c0fe4b57bf revert commit c91d9d5a components/esp_matter: resize group data provider when ep count change 2025-08-28 11:00:26 +08:00
Rohit 7138fd3867 components/esp_matter: Support to get optional bits while initialisation of delegates.
Fixes: https://github.com/espressif/esp-matter/issues/1471
2025-08-20 15:32:26 +05:30
liyashuai 661718c3e5 compenents/esp_matter: Add group provider implementation which was accidentally deleted 2025-08-13 18:03:22 +08:00
Shubham Patil fb58eaf9d9 components/esp_matter: api to get the command handler using
endpoint, cluster, and command ids

current api to get the command handler is a bit overkill to use, it
requires additional parameter which is flag and to get that we need to
look into the cluster create apis and then jump to command create apis
to figure out that parameter.
2025-07-30 13:11:55 +05:30
WanqQixiang 13a15243cc esp_matter: create a data_model directory and move data_model related codes to it 2025-07-25 15:59:35 +08:00