diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 858fdd2fb..af98ef2d3 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,11 @@ +## 31-Oct-2025 +### API Changes: `feature::add()` Function +The following APIs have been updated — the config parameter has been removed, as the corresponding attributes are optional. +``` +window_covering::feature::lift::add(cluster_t *cluster); +window_covering::feature::tilt::add(cluster_t *cluster); +``` + ## 21-Oct-2025 ### API Changes: `feature::add()` Function The following APIs have been updated — the config parameter has been removed, as the corresponding attributes are internally managed and not user-configurable: diff --git a/components/esp_matter/data_model/esp_matter_cluster.cpp b/components/esp_matter/data_model/esp_matter_cluster.cpp index 3f9f443c3..58b3a7265 100644 --- a/components/esp_matter/data_model/esp_matter_cluster.cpp +++ b/components/esp_matter/data_model/esp_matter_cluster.cpp @@ -2052,14 +2052,14 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags) feature::lift::get_id(), feature::tilt::get_id()); if (has(feature::lift::get_id())) { - feature::lift::add(cluster, &(config->features.lift)); + feature::lift::add(cluster); // optional if lift is supported if (has(feature::position_aware_lift::get_id())) { feature::position_aware_lift::add(cluster, &(config->features.position_aware_lift)); } } if (has(feature::tilt::get_id())) { - feature::tilt::add(cluster, &(config->features.tilt)); + feature::tilt::add(cluster); // optional if tilt is supported if (has(feature::position_aware_tilt::get_id())) { feature::position_aware_tilt::add(cluster, &(config->features.position_aware_tilt)); diff --git a/components/esp_matter/data_model/esp_matter_cluster.h b/components/esp_matter/data_model/esp_matter_cluster.h index 7c4580cb9..b49634907 100644 --- a/components/esp_matter/data_model/esp_matter_cluster.h +++ b/components/esp_matter/data_model/esp_matter_cluster.h @@ -537,8 +537,6 @@ typedef struct config { const uint8_t end_product_type; uint8_t mode; struct { - feature::lift::config_t lift; - feature::tilt::config_t tilt; feature::position_aware_lift::config_t position_aware_lift; feature::absolute_position::config_t absolute_position; feature::position_aware_tilt::config_t position_aware_tilt; diff --git a/components/esp_matter/data_model/esp_matter_feature.cpp b/components/esp_matter/data_model/esp_matter_feature.cpp index ce72f4546..a5d22aa86 100644 --- a/components/esp_matter/data_model/esp_matter_feature.cpp +++ b/components/esp_matter/data_model/esp_matter_feature.cpp @@ -535,8 +535,6 @@ esp_err_t add(cluster_t *cluster, config_t *config) /* Attributes not managed internally */ attribute::create_remaining_time(cluster, config->remaining_time); - attribute::create_min_level(cluster, config->min_level); - attribute::create_max_level(cluster, config->max_level); attribute::create_start_up_current_level(cluster, config->start_up_current_level); return ESP_OK; @@ -755,13 +753,11 @@ uint32_t get_id() return (uint32_t)WindowCovering::Feature::kLift; } -esp_err_t add(cluster_t *cluster, config_t *config) +esp_err_t add(cluster_t *cluster) { VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG, ESP_LOGE(TAG, "Cluster cannot be NULL")); update_feature_map(cluster, get_id()); - attribute::create_number_of_actuations_lift(cluster, config->number_of_actuations_lift); - return ESP_OK; } @@ -774,13 +770,11 @@ uint32_t get_id() return (uint32_t)WindowCovering::Feature::kTilt; } -esp_err_t add(cluster_t *cluster, config_t *config) +esp_err_t add(cluster_t *cluster) { VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG, ESP_LOGE(TAG, "Cluster cannot be NULL")); update_feature_map(cluster, get_id()); - attribute::create_number_of_actuations_tilt(cluster, config->number_of_actuations_tilt); - return ESP_OK; } @@ -798,10 +792,8 @@ esp_err_t add(cluster_t *cluster, config_t *config) VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG, ESP_LOGE(TAG, "Cluster cannot be NULL")); uint32_t lift_feature_map = feature::lift::get_id(); if ((get_feature_map_value(cluster) & lift_feature_map) == lift_feature_map) { - update_feature_map(cluster, get_id()); - attribute::create_current_position_lift_percentage(cluster, config->current_position_lift_percentage); attribute::create_target_position_lift_percent_100ths(cluster, config->target_position_lift_percent_100ths); attribute::create_current_position_lift_percent_100ths(cluster, config->current_position_lift_percent_100ths); @@ -849,8 +841,6 @@ esp_err_t add(cluster_t *cluster, config_t *config) return ESP_ERR_NOT_SUPPORTED; } if ((get_feature_map_value(cluster) & abs_and_pa_lf_and_lf_feature_map) == abs_and_pa_lf_and_lf_feature_map) { - attribute::create_physical_closed_limit_lift(cluster, config->physical_closed_limit_lift); - attribute::create_current_position_lift(cluster, config->current_position_lift); attribute::create_installed_open_limit_lift(cluster, config->installed_open_limit_lift); attribute::create_installed_closed_limit_lift(cluster, config->installed_closed_limit_lift); } else { @@ -858,8 +848,6 @@ esp_err_t add(cluster_t *cluster, config_t *config) } if ((get_feature_map_value(cluster) & abs_and_pa_tl_and_tl_feature_map) == abs_and_pa_tl_and_tl_feature_map) { - attribute::create_physical_closed_limit_tilt(cluster, config->physical_closed_limit_tilt); - attribute::create_current_position_tilt(cluster, config->current_position_tilt); attribute::create_installed_open_limit_tilt(cluster, config->installed_open_limit_tilt); attribute::create_installed_closed_limit_tilt(cluster, config->installed_closed_limit_tilt); } else { @@ -898,7 +886,6 @@ esp_err_t add(cluster_t *cluster, config_t *config) update_feature_map(cluster, get_id()); - attribute::create_current_position_tilt_percentage(cluster, config->current_position_tilt_percentage); attribute::create_target_position_tilt_percent_100ths(cluster, config->target_position_tilt_percent_100ths); attribute::create_current_position_tilt_percent_100ths(cluster, config->current_position_tilt_percent_100ths); @@ -1391,6 +1378,7 @@ esp_err_t add(cluster_t *cluster, config_t *config) update_feature_map(cluster, get_id()); + attribute::create_spin_speeds(cluster, NULL, 0, 0); attribute::create_spin_speed_current(cluster, config->spin_speed_current); return ESP_OK; @@ -1412,6 +1400,7 @@ esp_err_t add(cluster_t *cluster, config_t *config) update_feature_map(cluster, get_id()); attribute::create_number_of_rinses(cluster, config->number_of_rinses); + attribute::create_supported_rinses(cluster, NULL, 0, 0); return ESP_OK; } @@ -1437,8 +1426,6 @@ esp_err_t add(cluster_t *cluster) update_feature_map(cluster, get_id()); attribute::create_smoke_state(cluster, 0); - attribute::create_contamination_state(cluster, 0); - attribute::create_smoke_sensitivity_level(cluster, 0); event::create_smoke_alarm(cluster); event::create_interconnect_smoke_alarm(cluster); @@ -2723,9 +2710,6 @@ esp_err_t add(cluster_t *cluster) /* Attributes not managed internally */ attribute::create_door_state(cluster, 0); - attribute::create_door_open_events(cluster, 0); - attribute::create_door_close_events(cluster, 0); - attribute::create_open_period(cluster, 0); /* events */ event::create_door_state_change(cluster); @@ -2798,7 +2782,6 @@ esp_err_t add(cluster_t *cluster, config_t *config) attribute::create_number_of_total_users_supported(cluster, config->number_of_total_user_supported); attribute::create_credential_rules_support(cluster, config->credential_rules_supported); attribute::create_number_of_credentials_supported_per_user(cluster, config->number_of_credentials_supported_per_user); - attribute::create_expiring_user_timeout(cluster, config->expiring_user_timeout); /* Commands */ command::create_set_user(cluster); diff --git a/components/esp_matter/data_model/esp_matter_feature.h b/components/esp_matter/data_model/esp_matter_feature.h index d98a01259..3e57cf559 100644 --- a/components/esp_matter/data_model/esp_matter_feature.h +++ b/components/esp_matter/data_model/esp_matter_feature.h @@ -172,7 +172,6 @@ esp_err_t add(cluster_t *cluster); namespace icd_management { namespace feature { namespace check_in_protocol_support { - uint32_t get_id(); esp_err_t add(cluster_t *cluster); @@ -360,25 +359,15 @@ namespace feature { namespace lift { -typedef struct config { - uint16_t number_of_actuations_lift; - config() : number_of_actuations_lift(0) {} -} config_t; - uint32_t get_id(); -esp_err_t add(cluster_t *cluster, config_t *config); +esp_err_t add(cluster_t *cluster); } /* lift */ namespace tilt { -typedef struct config { - uint16_t number_of_actuations_tilt; - config() : number_of_actuations_tilt(0) {} -} config_t; - uint32_t get_id(); -esp_err_t add(cluster_t *cluster, config_t *config); +esp_err_t add(cluster_t *cluster); } /* tilt */ @@ -388,10 +377,9 @@ esp_err_t add(cluster_t *cluster, config_t *config); namespace position_aware_lift { typedef struct config { - nullable current_position_lift_percentage; nullable target_position_lift_percent_100ths; nullable current_position_lift_percent_100ths; - config() : current_position_lift_percentage(), target_position_lift_percent_100ths(), current_position_lift_percent_100ths() {} + config() : target_position_lift_percent_100ths(), current_position_lift_percent_100ths() {} } config_t; uint32_t get_id(); @@ -405,15 +393,11 @@ esp_err_t add(cluster_t *cluster, config_t *config); namespace absolute_position { typedef struct config { - uint16_t physical_closed_limit_lift; - nullable current_position_lift; uint16_t installed_open_limit_lift; uint16_t installed_closed_limit_lift; - uint16_t physical_closed_limit_tilt; - nullable current_position_tilt; uint16_t installed_open_limit_tilt; uint16_t installed_closed_limit_tilt; - config() : physical_closed_limit_lift(0), current_position_lift(), installed_open_limit_lift(0), installed_closed_limit_lift(65534), physical_closed_limit_tilt(0), current_position_tilt(), installed_open_limit_tilt(0), installed_closed_limit_tilt(65534) {} + config() : installed_open_limit_lift(0), installed_closed_limit_lift(65534), installed_open_limit_tilt(0), installed_closed_limit_tilt(65534) {} } config_t; uint32_t get_id(); @@ -427,10 +411,9 @@ esp_err_t add(cluster_t *cluster, config_t *config); namespace position_aware_tilt { typedef struct config { - nullable current_position_tilt_percentage; nullable target_position_tilt_percent_100ths; nullable current_position_tilt_percent_100ths; - config() : current_position_tilt_percentage(), target_position_tilt_percent_100ths(), current_position_tilt_percent_100ths() {} + config() : target_position_tilt_percent_100ths(), current_position_tilt_percent_100ths() {} } config_t; uint32_t get_id(); @@ -1344,10 +1327,9 @@ esp_err_t add(cluster_t *cluster, config_t *config); namespace user { typedef struct config { uint16_t number_of_total_user_supported; - uint16_t expiring_user_timeout; uint8_t credential_rules_supported; uint8_t number_of_credentials_supported_per_user; - config() : number_of_total_user_supported(5), expiring_user_timeout(5), credential_rules_supported(0), number_of_credentials_supported_per_user(3) {} + config() : number_of_total_user_supported(5), credential_rules_supported(0), number_of_credentials_supported_per_user(3) {} } config_t; uint32_t get_id(); diff --git a/examples/all_device_types_app/main/esp_matter_console_helpers.cpp b/examples/all_device_types_app/main/esp_matter_console_helpers.cpp index 8d04efaaf..81cac67ae 100644 --- a/examples/all_device_types_app/main/esp_matter_console_helpers.cpp +++ b/examples/all_device_types_app/main/esp_matter_console_helpers.cpp @@ -293,9 +293,7 @@ int create(uint8_t device_type_index) cluster::window_covering::feature::position_aware_lift::config_t position_aware_lift; cluster::window_covering::feature::absolute_position::config_t absolute_position; - nullable percentage = nullable(0); nullable percentage_100ths = nullable(0); - position_aware_lift.current_position_lift_percentage = percentage; position_aware_lift.target_position_lift_percent_100ths = percentage_100ths; position_aware_lift.current_position_lift_percent_100ths = percentage_100ths;