diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0f14b8879..9d877f53f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -164,7 +164,7 @@ build_esp_matter_examples_pytest_C6_idf_v5_1: when: always expire_in: 4 days variables: - IDF_VERSION: "v5.1.1" + IDF_VERSION: "6b1f40b9bfb91ec82fab4a60e5bfb4ca0c9b062f" script: - cd ${ESP_MATTER_PATH} - pip install -r tools/ci/requirements-build.txt @@ -197,7 +197,7 @@ build_esp_matter_examples_pytest_H2_idf_v5_1: when: always expire_in: 4 days variables: - IDF_VERSION: "v5.1.1" + IDF_VERSION: "6b1f40b9bfb91ec82fab4a60e5bfb4ca0c9b062f" script: - *setup_ot_rcp - *setup_ot_br @@ -221,7 +221,7 @@ build_esp_matter_examples_non_pytest_idf_v5_1: when: always expire_in: 4 days variables: - IDF_VERSION: "v5.1.1" + IDF_VERSION: "6b1f40b9bfb91ec82fab4a60e5bfb4ca0c9b062f" script: - *build_external_platform_example diff --git a/README.md b/README.md index 195e52db4..dcd61d643 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,8 @@ Espressif's SDK for Matter is the official Matter development framework for ESP3 ## Supported ESP-IDF and connectedhomeip versions -- This SDK currently works with [5b4f800](https://github.com/project-chip/connectedhomeip/commit/5b4f8004662d00bdb111367fec7d3ea978c23372) of connectedhomeip. -- For Matter projects development with this SDK, it is recommended to utilize ESP-IDF [v5.1.1 release](https://github.com/espressif/esp-idf/releases/tag/v5.1.1). +- This SDK currently works with [699ff65e](https://github.com/project-chip/connectedhomeip/commit/699ff65e065a28e4b7ee3a2d84110444b1709040) of connectedhomeip. +- For Matter projects development with this SDK, it is recommended to utilize ESP-IDF [v5.1 commit 6b1f40b9b](https://github.com/espressif/esp-idf/tree/6b1f40b9bfb91ec82fab4a60e5bfb4ca0c9b062f). ## Documentation diff --git a/components/esp_matter/esp_matter_attribute.cpp b/components/esp_matter/esp_matter_attribute.cpp index 1e97b4f76..7d250ec8f 100644 --- a/components/esp_matter/esp_matter_attribute.cpp +++ b/components/esp_matter/esp_matter_attribute.cpp @@ -542,6 +542,72 @@ attribute_t *create_max_group_keys_per_fabric(cluster_t *cluster, uint16_t value } /* attribute */ } /* group_key_management */ +namespace icd_management { +namespace attribute { +attribute_t *create_idle_mode_interval(cluster_t *cluster, uint32_t value, uint32_t min, uint32_t max) +{ + attribute_t *attribute = esp_matter::attribute::create(cluster, IcdManagement::Attributes::IdleModeInterval::Id, + ATTRIBUTE_FLAG_NONE, esp_matter_uint32(value)); + if (!attribute) { + ESP_LOGE(TAG, "Could not create attribute"); + return NULL; + } + esp_matter::attribute::add_bounds(attribute, esp_matter_uint32(min), esp_matter_uint32(max)); + return attribute; +} + +attribute_t *create_active_mode_interval(cluster_t *cluster, uint32_t value, uint32_t min) +{ + attribute_t *attribute = esp_matter::attribute::create(cluster, IcdManagement::Attributes::ActiveModeInterval::Id, + ATTRIBUTE_FLAG_NONE, esp_matter_uint32(value)); + if (!attribute) { + ESP_LOGE(TAG, "Could not create attribute"); + return NULL; + } + esp_matter::attribute::add_bounds(attribute, esp_matter_uint32(min), esp_matter_uint32(UINT32_MAX)); + return attribute; +} + +attribute_t *create_active_mode_threshold(cluster_t *cluster, uint16_t value, uint16_t min) +{ + attribute_t *attribute = esp_matter::attribute::create(cluster, IcdManagement::Attributes::ActiveModeThreshold::Id, + ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value)); + if (!attribute) { + ESP_LOGE(TAG, "Could not create attribute"); + return NULL; + } + esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(min), esp_matter_uint16(UINT16_MAX)); + return attribute; +} + +attribute_t *create_registered_clients(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count) +{ + return esp_matter::attribute::create(cluster, IcdManagement::Attributes::RegisteredClients::Id, ATTRIBUTE_FLAG_NONVOLATILE, + esp_matter_array(value,length, count)); +} + +attribute_t *create_icd_counter(cluster_t *cluster,uint32_t value) +{ + return esp_matter::attribute::create(cluster, IcdManagement::Attributes::ICDCounter::Id, ATTRIBUTE_FLAG_NONVOLATILE, + esp_matter_uint32(value)); +} + +attribute_t *create_clients_supported_per_fabric(cluster_t *cluster, uint16_t value, uint16_t min) +{ + attribute_t *attribute = esp_matter::attribute::create(cluster, IcdManagement::Attributes::ClientsSupportedPerFabric::Id, + ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value)); + if (!attribute) { + ESP_LOGE(TAG, "Could not create attribute"); + return NULL; + } + esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(min), esp_matter_uint16(UINT16_MAX)); + return attribute; + +} + +} /* attribute */ +} /* icd_management */ + namespace diagnostics_network_wifi { namespace attribute { diff --git a/components/esp_matter/esp_matter_attribute.h b/components/esp_matter/esp_matter_attribute.h index a0583466c..b805315e1 100644 --- a/components/esp_matter/esp_matter_attribute.h +++ b/components/esp_matter/esp_matter_attribute.h @@ -173,6 +173,17 @@ attribute_t *create_max_group_keys_per_fabric(cluster_t *cluster, uint16_t value } /* attribute */ } /* group_key_management */ +namespace icd_management { +namespace attribute { +attribute_t *create_idle_mode_interval(cluster_t *cluster, uint32_t value, uint32_t min, uint32_t max); +attribute_t *create_active_mode_interval(cluster_t *cluster, uint32_t value, uint32_t min); +attribute_t *create_active_mode_threshold(cluster_t *cluster, uint16_t value, uint16_t min); +attribute_t *create_registered_clients(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count); +attribute_t *create_icd_counter(cluster_t *cluster,uint32_t value); +attribute_t *create_clients_supported_per_fabric(cluster_t *cluster, uint16_t value, uint16_t min); +} /* attribute */ +} /* icd_management */ + namespace diagnostics_network_wifi { namespace attribute { attribute_t *create_bssid(cluster_t *cluster, uint8_t *value, uint16_t length); diff --git a/components/esp_matter/esp_matter_cluster.cpp b/components/esp_matter/esp_matter_cluster.cpp index 10d08a9b5..f85a3e085 100644 --- a/components/esp_matter/esp_matter_cluster.cpp +++ b/components/esp_matter/esp_matter_cluster.cpp @@ -886,6 +886,48 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_ } } /* power_source */ +namespace icd_management { +const function_generic_t *function_list = NULL; +const int function_flags = CLUSTER_FLAG_NONE; + +cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features) +{ + cluster_t *cluster = cluster::create(endpoint, IcdManagement::Id, flags); + if (!cluster) { + ESP_LOGE(TAG, "Could not create cluster"); + return NULL; + } +#if CONFIG_ENABLE_ICD_SERVER + if (flags & CLUSTER_FLAG_SERVER) { + set_plugin_server_init_callback(cluster, MatterIcdManagementPluginServerInitCallback); + add_function_list(cluster, function_list, function_flags); + } + + if (flags & CLUSTER_FLAG_SERVER) { + /* Attributes managed internally */ + global::attribute::create_feature_map(cluster, 0); + + /* Attributes not managed internally */ + if (config) { + global::attribute::create_cluster_revision(cluster, config->cluster_revision); + attribute::create_idle_mode_interval(cluster, config->idle_mode_interval, 500, 64800000); + attribute::create_active_mode_interval(cluster, config->active_mode_interval, 300); + attribute::create_active_mode_threshold(cluster, config->active_mode_threshold, 300); + } else { + ESP_LOGE(TAG, "Config is NULL. Cannot add some attributes."); + } + } + + if (features & feature::check_in_protocol_support::get_id()) { + feature::check_in_protocol_support::config_t cip_config; + feature::check_in_protocol_support::add(cluster, &cip_config); + } +#endif // CONFIG_ENABLE_ICD_SERVER + return cluster; +} + +} /* icd_management */ + namespace user_label { const function_generic_t *function_list = NULL; const int function_flags = CLUSTER_FLAG_NONE; diff --git a/components/esp_matter/esp_matter_cluster.h b/components/esp_matter/esp_matter_cluster.h index bdaec9954..193a612cb 100644 --- a/components/esp_matter/esp_matter_cluster.h +++ b/components/esp_matter/esp_matter_cluster.h @@ -233,6 +233,18 @@ typedef struct config { cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features); } /* power_source */ +namespace icd_management { +typedef struct config { + uint16_t cluster_revision; + uint32_t idle_mode_interval; + uint32_t active_mode_interval; + uint16_t active_mode_threshold; + config() : cluster_revision(1), idle_mode_interval(5000), active_mode_interval(300), active_mode_threshold(300) {} +} config_t; + +cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features); +} /* icd_management */ + namespace user_label { typedef struct config { uint16_t cluster_revision; diff --git a/components/esp_matter/esp_matter_command.cpp b/components/esp_matter/esp_matter_command.cpp index 5383fadc3..ed87d2170 100644 --- a/components/esp_matter/esp_matter_command.cpp +++ b/components/esp_matter/esp_matter_command.cpp @@ -426,6 +426,45 @@ static esp_err_t esp_matter_command_callback_add_group_if_identifying(const Conc return ESP_OK; } +static esp_err_t esp_matter_command_callback_register_client(const ConcreteCommandPath &command_path, + TLVReader &tlv_data, void *opaque_ptr) +{ + chip::app::Clusters::IcdManagement::Commands::RegisterClient::DecodableType command_data; + CHIP_ERROR error = Decode(tlv_data, command_data); + if (error == CHIP_NO_ERROR) { +#if CONFIG_ENABLE_ICD_SERVER + emberAfIcdManagementClusterRegisterClientCallback((CommandHandler *)opaque_ptr, command_path, command_data); +#endif + } + return ESP_OK; +} + +static esp_err_t esp_matter_command_callback_unregister_client(const ConcreteCommandPath &command_path, + TLVReader &tlv_data, void *opaque_ptr) +{ + chip::app::Clusters::IcdManagement::Commands::UnregisterClient::DecodableType command_data; + CHIP_ERROR error = Decode(tlv_data, command_data); + if (error == CHIP_NO_ERROR) { +#if CONFIG_ENABLE_ICD_SERVER + emberAfIcdManagementClusterUnregisterClientCallback((CommandHandler *)opaque_ptr, command_path, command_data); +#endif + } + return ESP_OK; +} + +static esp_err_t esp_matter_command_callback_stay_active_request(const ConcreteCommandPath &command_path, + TLVReader &tlv_data, void *opaque_ptr) +{ + chip::app::Clusters::IcdManagement::Commands::StayActiveRequest::DecodableType command_data; + CHIP_ERROR error = Decode(tlv_data, command_data); + if (error == CHIP_NO_ERROR) { +#if CONFIG_ENABLE_ICD_SERVER + emberAfIcdManagementClusterStayActiveRequestCallback((CommandHandler *)opaque_ptr, command_path, command_data); +#endif + } + return ESP_OK; +} + static esp_err_t esp_matter_command_callback_off(const ConcreteCommandPath &command_path, TLVReader &tlv_data, void *opaque_ptr) { @@ -1682,6 +1721,35 @@ command_t *create_remove_group_response(cluster_t *cluster) } /* command */ } /* groups */ +namespace icd_management { +namespace command { +command_t *create_register_client(cluster_t *cluster) +{ + return esp_matter::command::create(cluster, IcdManagement::Commands::RegisterClient::Id, COMMAND_FLAG_ACCEPTED, + esp_matter_command_callback_register_client); +} + +command_t *create_register_client_response(cluster_t *cluster) +{ + return esp_matter::command::create(cluster, IcdManagement::Commands::RegisterClientResponse::Id, + COMMAND_FLAG_GENERATED, NULL); +} + +command_t *create_unregister_client(cluster_t *cluster) +{ + return esp_matter::command::create(cluster, IcdManagement::Commands::UnregisterClient::Id, COMMAND_FLAG_ACCEPTED, + esp_matter_command_callback_unregister_client); +} + +command_t *create_stay_active_request(cluster_t *cluster) +{ + return esp_matter::command::create(cluster, IcdManagement::Commands::StayActiveRequest::Id, COMMAND_FLAG_ACCEPTED, + esp_matter_command_callback_stay_active_request); +} + +} /* command */ +} /* icd_management */ + namespace scenes { namespace command { diff --git a/components/esp_matter/esp_matter_command.h b/components/esp_matter/esp_matter_command.h index 2f41def00..bba44c3c2 100644 --- a/components/esp_matter/esp_matter_command.h +++ b/components/esp_matter/esp_matter_command.h @@ -172,6 +172,15 @@ command_t *create_remove_group_response(cluster_t *cluster); } /* command */ } /* groups */ +namespace icd_management { +namespace command { +command_t *create_register_client(cluster_t *cluster); +command_t *create_register_client_response(cluster_t *cluster); +command_t *create_unregister_client(cluster_t *cluster); +command_t *create_stay_active_request(cluster_t *cluster); +} /* command */ +} /* icd_management */ + namespace scenes { namespace command { command_t *create_add_scene(cluster_t *cluster); diff --git a/components/esp_matter/esp_matter_core.cpp b/components/esp_matter/esp_matter_core.cpp index 43e6ced45..d3b431ddd 100644 --- a/components/esp_matter/esp_matter_core.cpp +++ b/components/esp_matter/esp_matter_core.cpp @@ -981,12 +981,28 @@ static esp_err_t chip_init(event_callback_t callback, intptr_t callback_arg) ESP_LOGE(TAG, "Failed to initialize Thread stack"); return ESP_FAIL; } +#if CHIP_CONFIG_ENABLE_ICD_SERVER + if (ConnectivityMgr().SetThreadDeviceType(ConnectivityManager::kThreadDeviceType_SleepyEndDevice) != CHIP_NO_ERROR) { + ESP_LOGE(TAG, "Failed to set the Thread device type"); + return ESP_FAIL; + } +#elif CHIP_DEVICE_CONFIG_THREAD_FTD + if (ConnectivityMgr().SetThreadDeviceType(ConnectivityManager::kThreadDeviceType_Router) != CHIP_NO_ERROR) { + ESP_LOGE(TAG, "Failed to set the Thread device type"); + return ESP_FAIL; + } +#else + if (ConnectivityMgr().SetThreadDeviceType(ConnectivityManager::kThreadDeviceType_MinimalEndDevice) != CHIP_NO_ERROR) { + ESP_LOGE(TAG, "Failed to set the Thread device type"); + return ESP_FAIL; + } +#endif if (ThreadStackMgr().StartThreadTask() != CHIP_NO_ERROR) { ESP_LOGE(TAG, "Failed to launch Thread task"); return ESP_FAIL; } -#endif +#endif // CHIP_DEVICE_CONFIG_ENABLE_THREAD PlatformMgr().ScheduleWork(esp_matter_chip_init_task, reinterpret_cast(xTaskGetCurrentTaskHandle())); // Wait for the matter stack to be initialized @@ -1042,6 +1058,8 @@ esp_err_t factory_reset() if (err == ESP_OK) { nvs_erase_all(node_handle); } + nvs_commit(node_handle); + nvs_close(node_handle); nvs_close(node_handle); nvs_commit(node_handle); diff --git a/components/esp_matter/esp_matter_endpoint.cpp b/components/esp_matter/esp_matter_endpoint.cpp index b7078066b..908fcaac0 100644 --- a/components/esp_matter/esp_matter_endpoint.cpp +++ b/components/esp_matter/esp_matter_endpoint.cpp @@ -63,6 +63,10 @@ endpoint_t *add(endpoint_t *endpoint, config_t *config) #if CHIP_DEVICE_CONFIG_ENABLE_THREAD diagnostics_network_thread::create(endpoint, &(config->diagnostics_network_thread), CLUSTER_FLAG_SERVER); #endif +#if CHIP_CONFIG_ENABLE_ICD_SERVER + icd_management::create(endpoint, &(config->icd_management), CLUSTER_FLAG_SERVER, + icd_management::feature::check_in_protocol_support::get_id()); +#endif return endpoint; } @@ -1039,7 +1043,7 @@ endpoint_t *add(endpoint_t *endpoint, config_t *config) descriptor::create(endpoint, &(config->descriptor), CLUSTER_FLAG_SERVER); identify::create(endpoint, &(config->identify), CLUSTER_FLAG_SERVER); - on_off::create(endpoint, &(config->on_off), CLUSTER_FLAG_SERVER, on_off::feature::dead_front::get_id()); + on_off::create(endpoint, &(config->on_off), CLUSTER_FLAG_SERVER, on_off::feature::dead_front_behavior::get_id()); cluster::thermostat::create(endpoint, &(config->thermostat), CLUSTER_FLAG_SERVER, cluster::thermostat::feature::cooling::get_id() | cluster::thermostat::feature::heating::get_id()); diff --git a/components/esp_matter/esp_matter_endpoint.h b/components/esp_matter/esp_matter_endpoint.h index 1e25a6231..943bcd146 100644 --- a/components/esp_matter/esp_matter_endpoint.h +++ b/components/esp_matter/esp_matter_endpoint.h @@ -109,6 +109,7 @@ typedef struct config { cluster::operational_credentials::config_t operational_credentials; cluster::diagnostics_network_wifi::config_t diagnostics_network_wifi; cluster::diagnostics_network_thread::config_t diagnostics_network_thread; + cluster::icd_management::config_t icd_management; } config_t; uint32_t get_device_type_id(); diff --git a/components/esp_matter/esp_matter_feature.cpp b/components/esp_matter/esp_matter_feature.cpp index bf8c1df75..95055d959 100644 --- a/components/esp_matter/esp_matter_feature.cpp +++ b/components/esp_matter/esp_matter_feature.cpp @@ -215,7 +215,7 @@ esp_err_t add(cluster_t *cluster) return ESP_ERR_INVALID_ARG; } update_feature_map(cluster, get_id()); - + return ESP_OK; } @@ -229,13 +229,13 @@ uint32_t get_id() } esp_err_t add(cluster_t *cluster) -{ +{ if (!cluster) { ESP_LOGE(TAG, "Cluster cannot be NULL"); return ESP_ERR_INVALID_ARG; } update_feature_map(cluster, get_id()); - + return ESP_OK; } @@ -244,18 +244,18 @@ esp_err_t add(cluster_t *cluster) namespace fabric_scenes { uint32_t get_id() -{ +{ return (uint32_t)Scenes::Feature::kFabricScenes; } esp_err_t add(cluster_t *cluster) -{ +{ if (!cluster) { ESP_LOGE(TAG, "Cluster cannot be NULL"); return ESP_ERR_INVALID_ARG; } update_feature_map(cluster, get_id()); - + return ESP_OK; } @@ -264,6 +264,42 @@ esp_err_t add(cluster_t *cluster) } /* feature */ } /* scenes */ +namespace icd_management { +namespace feature { +namespace check_in_protocol_support { + +uint32_t get_id() +{ + return (uint32_t)IcdManagement::Feature::kCheckInProtocolSupport; +} + +esp_err_t add(cluster_t *cluster, config_t *config) +{ + if (!cluster) { + ESP_LOGE(TAG, "Cluster cannot be NULL"); + return ESP_ERR_INVALID_ARG; + } + update_feature_map(cluster, get_id()); + + /* Attributes managed internally */ + attribute::create_registered_clients(cluster, NULL, 0, 0); + attribute::create_icd_counter(cluster, 0); + + /* Attribute not managed internally*/ + attribute::create_clients_supported_per_fabric(cluster, config->clients_supported_per_fabric, 1); + + /* Commands */ + command::create_register_client(cluster); + command::create_register_client_response(cluster); + command::create_unregister_client(cluster); + + return ESP_OK; +} + +} /* check_in_protocol_support */ +} /* feature */ +} /* icd_management */ + namespace on_off { namespace feature { namespace lighting { @@ -297,11 +333,11 @@ esp_err_t add(cluster_t *cluster, config_t *config) } /* lighting */ -namespace dead_front { +namespace dead_front_behavior { uint32_t get_id() { - return (uint32_t)OnOff::Feature::kDeadFront; + return (uint32_t)OnOff::Feature::kDeadFrontBehavior; } esp_err_t add(cluster_t *cluster) @@ -315,7 +351,7 @@ esp_err_t add(cluster_t *cluster) return ESP_OK; } -} /* dead_front */ +} /* dead_front_behavior */ } /* feature */ } /* on_off */ diff --git a/components/esp_matter/esp_matter_feature.h b/components/esp_matter/esp_matter_feature.h index 7b777c0fd..9c030e955 100644 --- a/components/esp_matter/esp_matter_feature.h +++ b/components/esp_matter/esp_matter_feature.h @@ -57,7 +57,7 @@ esp_err_t add(cluster_t *cluster, config_t *config); } /* battery */ -// Rechargeable feature is dependent on Battery feature, in order to add +// Rechargeable feature is dependent on Battery feature, in order to add // Rechargeable feature one must add Battery feature first. namespace rechargeable { typedef struct config { @@ -71,7 +71,7 @@ esp_err_t add(cluster_t *cluster, config_t *config); } /* rechargeable */ -// Replaceable feature is dependent on Battery feature, in order to add +// Replaceable feature is dependent on Battery feature, in order to add // Replaceable feature one must add Battery feature first. namespace replaceable { typedef struct config { @@ -120,6 +120,19 @@ esp_err_t add(cluster_t *cluster); } /* feature */ } /* scenes */ +namespace icd_management { +namespace feature { +namespace check_in_protocol_support { +typedef struct config { + uint16_t clients_supported_per_fabric; +} config_t; + +uint32_t get_id(); +esp_err_t add(cluster_t *cluster, config_t *config); + +} /* check_in_protocol_support */ +} /* feature */ +} /* icd_management */ namespace on_off { namespace feature { @@ -138,12 +151,12 @@ esp_err_t add(cluster_t *cluster, config_t *config); } /* lighting */ -namespace dead_front { +namespace dead_front_behavior { uint32_t get_id(); esp_err_t add(cluster_t *cluster); -} /* dead_front */ +} /* dead_front_behavior */ } /* feature */ } /* on_off */ diff --git a/components/esp_matter/zap_common/app/PluginApplicationCallbacks.h b/components/esp_matter/zap_common/app/PluginApplicationCallbacks.h index 989e76208..fef14489d 100644 --- a/components/esp_matter/zap_common/app/PluginApplicationCallbacks.h +++ b/components/esp_matter/zap_common/app/PluginApplicationCallbacks.h @@ -18,11 +18,12 @@ // THIS FILE IS GENERATED BY ZAP #pragma once - void MatterAccessControlPluginServerInitCallback(); void MatterAccountLoginPluginServerInitCallback(); void MatterActionsPluginServerInitCallback(); +void MatterActivatedCarbonFilterMonitoringPluginServerInitCallback(); void MatterAdministratorCommissioningPluginServerInitCallback(); +void MatterAirQualityPluginServerInitCallback(); void MatterApplicationBasicPluginServerInitCallback(); void MatterApplicationLauncherPluginServerInitCallback(); void MatterAudioOutputPluginServerInitCallback(); @@ -32,12 +33,15 @@ void MatterBasicInformationPluginServerInitCallback(); void MatterBinaryInputBasicPluginServerInitCallback(); void MatterBindingPluginServerInitCallback(); void MatterBooleanStatePluginServerInitCallback(); +void MatterCarbonDioxideConcentrationMeasurementPluginServerInitCallback(); +void MatterCarbonMonoxideConcentrationMeasurementPluginServerInitCallback(); void MatterChannelPluginServerInitCallback(); -void MatterClientMonitoringPluginServerInitCallback(); void MatterColorControlPluginServerInitCallback(); void MatterContentLauncherPluginServerInitCallback(); void MatterDescriptorPluginServerInitCallback(); void MatterDiagnosticLogsPluginServerInitCallback(); +void MatterDishwasherAlarmPluginServerInitCallback(); +void MatterDishwasherModePluginServerInitCallback(); void MatterDoorLockPluginServerInitCallback(); void MatterElectricalMeasurementPluginServerInitCallback(); void MatterEthernetNetworkDiagnosticsPluginServerInitCallback(); @@ -45,13 +49,18 @@ void MatterFanControlPluginServerInitCallback(); void MatterFaultInjectionPluginServerInitCallback(); void MatterFixedLabelPluginServerInitCallback(); void MatterFlowMeasurementPluginServerInitCallback(); +void MatterFormaldehydeConcentrationMeasurementPluginServerInitCallback(); void MatterGeneralCommissioningPluginServerInitCallback(); void MatterGeneralDiagnosticsPluginServerInitCallback(); void MatterGroupKeyManagementPluginServerInitCallback(); void MatterGroupsPluginServerInitCallback(); +void MatterHepaFilterMonitoringPluginServerInitCallback(); +void MatterIcdManagementPluginServerInitCallback(); void MatterIdentifyPluginServerInitCallback(); void MatterIlluminanceMeasurementPluginServerInitCallback(); void MatterKeypadInputPluginServerInitCallback(); +void MatterLaundryWasherControlsPluginServerInitCallback(); +void MatterLaundryWasherModePluginServerInitCallback(); void MatterLevelControlPluginServerInitCallback(); void MatterLocalizationConfigurationPluginServerInitCallback(); void MatterLowPowerPluginServerInitCallback(); @@ -59,19 +68,31 @@ void MatterMediaInputPluginServerInitCallback(); void MatterMediaPlaybackPluginServerInitCallback(); void MatterModeSelectPluginServerInitCallback(); void MatterNetworkCommissioningPluginServerInitCallback(); +void MatterNitrogenDioxideConcentrationMeasurementPluginServerInitCallback(); void MatterOccupancySensingPluginServerInitCallback(); void MatterOnOffPluginServerInitCallback(); void MatterOnOffSwitchConfigurationPluginServerInitCallback(); void MatterOperationalCredentialsPluginServerInitCallback(); +void MatterOperationalStatePluginServerInitCallback(); void MatterOtaSoftwareUpdateProviderPluginServerInitCallback(); void MatterOtaSoftwareUpdateRequestorPluginServerInitCallback(); +void MatterOzoneConcentrationMeasurementPluginServerInitCallback(); +void MatterPm10ConcentrationMeasurementPluginServerInitCallback(); +void MatterPm1ConcentrationMeasurementPluginServerInitCallback(); +void MatterPm25ConcentrationMeasurementPluginServerInitCallback(); void MatterPowerSourcePluginServerInitCallback(); void MatterPowerSourceConfigurationPluginServerInitCallback(); void MatterPressureMeasurementPluginServerInitCallback(); void MatterPumpConfigurationAndControlPluginServerInitCallback(); +void MatterRadonConcentrationMeasurementPluginServerInitCallback(); void MatterRefrigeratorAlarmPluginServerInitCallback(); +void MatterRefrigeratorAndTemperatureControlledCabinetModePluginServerInitCallback(); void MatterRelativeHumidityMeasurementPluginServerInitCallback(); +void MatterRvcCleanModePluginServerInitCallback(); +void MatterRvcOperationalStatePluginServerInitCallback(); +void MatterRvcRunModePluginServerInitCallback(); void MatterScenesPluginServerInitCallback(); +void MatterSmokeCoAlarmPluginServerInitCallback(); void MatterSoftwareDiagnosticsPluginServerInitCallback(); void MatterSwitchPluginServerInitCallback(); void MatterTargetNavigatorPluginServerInitCallback(); @@ -82,6 +103,7 @@ void MatterThermostatUserInterfaceConfigurationPluginServerInitCallback(); void MatterThreadNetworkDiagnosticsPluginServerInitCallback(); void MatterTimeFormatLocalizationPluginServerInitCallback(); void MatterTimeSynchronizationPluginServerInitCallback(); +void MatterTotalVolatileOrganicCompoundsConcentrationMeasurementPluginServerInitCallback(); void MatterUnitLocalizationPluginServerInitCallback(); void MatterUnitTestingPluginServerInitCallback(); void MatterUserLabelPluginServerInitCallback(); diff --git a/components/esp_matter/zap_common/app/callback-stub.cpp b/components/esp_matter/zap_common/app/callback-stub.cpp index 9ebc70f25..18d51d78c 100644 --- a/components/esp_matter/zap_common/app/callback-stub.cpp +++ b/components/esp_matter/zap_common/app/callback-stub.cpp @@ -1,22 +1,3 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - #include #include #include @@ -38,9 +19,15 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case app::Clusters::Actions::Id: emberAfActionsClusterInitCallback(endpoint); break; + case app::Clusters::ActivatedCarbonFilterMonitoring::Id: + emberAfActivatedCarbonFilterMonitoringClusterInitCallback(endpoint); + break; case app::Clusters::AdministratorCommissioning::Id: emberAfAdministratorCommissioningClusterInitCallback(endpoint); break; + case app::Clusters::AirQuality::Id: + emberAfAirQualityClusterInitCallback(endpoint); + break; case app::Clusters::ApplicationBasic::Id: emberAfApplicationBasicClusterInitCallback(endpoint); break; @@ -68,12 +55,15 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case app::Clusters::BooleanState::Id: emberAfBooleanStateClusterInitCallback(endpoint); break; + case app::Clusters::CarbonDioxideConcentrationMeasurement::Id: + emberAfCarbonDioxideConcentrationMeasurementClusterInitCallback(endpoint); + break; + case app::Clusters::CarbonMonoxideConcentrationMeasurement::Id: + emberAfCarbonMonoxideConcentrationMeasurementClusterInitCallback(endpoint); + break; case app::Clusters::Channel::Id: emberAfChannelClusterInitCallback(endpoint); break; - case app::Clusters::IcdManagement::Id: - emberAfIcdManagementClusterInitCallback(endpoint); - break; case app::Clusters::ColorControl::Id: emberAfColorControlClusterInitCallback(endpoint); break; @@ -86,6 +76,12 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case app::Clusters::DiagnosticLogs::Id: emberAfDiagnosticLogsClusterInitCallback(endpoint); break; + case app::Clusters::DishwasherAlarm::Id: + emberAfDishwasherAlarmClusterInitCallback(endpoint); + break; + case app::Clusters::DishwasherMode::Id: + emberAfDishwasherModeClusterInitCallback(endpoint); + break; case app::Clusters::DoorLock::Id: emberAfDoorLockClusterInitCallback(endpoint); break; @@ -107,6 +103,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case app::Clusters::FlowMeasurement::Id: emberAfFlowMeasurementClusterInitCallback(endpoint); break; + case app::Clusters::FormaldehydeConcentrationMeasurement::Id: + emberAfFormaldehydeConcentrationMeasurementClusterInitCallback(endpoint); + break; case app::Clusters::GeneralCommissioning::Id: emberAfGeneralCommissioningClusterInitCallback(endpoint); break; @@ -119,6 +118,12 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case app::Clusters::Groups::Id: emberAfGroupsClusterInitCallback(endpoint); break; + case app::Clusters::HepaFilterMonitoring::Id: + emberAfHepaFilterMonitoringClusterInitCallback(endpoint); + break; + case app::Clusters::IcdManagement::Id: + emberAfIcdManagementClusterInitCallback(endpoint); + break; case app::Clusters::Identify::Id: emberAfIdentifyClusterInitCallback(endpoint); break; @@ -128,6 +133,12 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case app::Clusters::KeypadInput::Id: emberAfKeypadInputClusterInitCallback(endpoint); break; + case app::Clusters::LaundryWasherControls::Id: + emberAfLaundryWasherControlsClusterInitCallback(endpoint); + break; + case app::Clusters::LaundryWasherMode::Id: + emberAfLaundryWasherModeClusterInitCallback(endpoint); + break; case app::Clusters::LevelControl::Id: emberAfLevelControlClusterInitCallback(endpoint); break; @@ -149,6 +160,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case app::Clusters::NetworkCommissioning::Id: emberAfNetworkCommissioningClusterInitCallback(endpoint); break; + case app::Clusters::NitrogenDioxideConcentrationMeasurement::Id: + emberAfNitrogenDioxideConcentrationMeasurementClusterInitCallback(endpoint); + break; case app::Clusters::OccupancySensing::Id: emberAfOccupancySensingClusterInitCallback(endpoint); break; @@ -161,12 +175,27 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case app::Clusters::OperationalCredentials::Id: emberAfOperationalCredentialsClusterInitCallback(endpoint); break; + case app::Clusters::OperationalState::Id: + emberAfOperationalStateClusterInitCallback(endpoint); + break; case app::Clusters::OtaSoftwareUpdateProvider::Id: emberAfOtaSoftwareUpdateProviderClusterInitCallback(endpoint); break; case app::Clusters::OtaSoftwareUpdateRequestor::Id: emberAfOtaSoftwareUpdateRequestorClusterInitCallback(endpoint); break; + case app::Clusters::OzoneConcentrationMeasurement::Id: + emberAfOzoneConcentrationMeasurementClusterInitCallback(endpoint); + break; + case app::Clusters::Pm10ConcentrationMeasurement::Id: + emberAfPm10ConcentrationMeasurementClusterInitCallback(endpoint); + break; + case app::Clusters::Pm1ConcentrationMeasurement::Id: + emberAfPm1ConcentrationMeasurementClusterInitCallback(endpoint); + break; + case app::Clusters::Pm25ConcentrationMeasurement::Id: + emberAfPm25ConcentrationMeasurementClusterInitCallback(endpoint); + break; case app::Clusters::PowerSource::Id: emberAfPowerSourceClusterInitCallback(endpoint); break; @@ -179,12 +208,33 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case app::Clusters::PumpConfigurationAndControl::Id: emberAfPumpConfigurationAndControlClusterInitCallback(endpoint); break; + case app::Clusters::RadonConcentrationMeasurement::Id: + emberAfRadonConcentrationMeasurementClusterInitCallback(endpoint); + break; + case app::Clusters::RefrigeratorAlarm::Id: + emberAfRefrigeratorAlarmClusterInitCallback(endpoint); + break; + case app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id: + emberAfRefrigeratorAndTemperatureControlledCabinetModeClusterInitCallback(endpoint); + break; case app::Clusters::RelativeHumidityMeasurement::Id: emberAfRelativeHumidityMeasurementClusterInitCallback(endpoint); break; + case app::Clusters::RvcCleanMode::Id: + emberAfRvcCleanModeClusterInitCallback(endpoint); + break; + case app::Clusters::RvcOperationalState::Id: + emberAfRvcOperationalStateClusterInitCallback(endpoint); + break; + case app::Clusters::RvcRunMode::Id: + emberAfRvcRunModeClusterInitCallback(endpoint); + break; case app::Clusters::Scenes::Id: emberAfScenesClusterInitCallback(endpoint); break; + case app::Clusters::SmokeCoAlarm::Id: + emberAfSmokeCoAlarmClusterInitCallback(endpoint); + break; case app::Clusters::SoftwareDiagnostics::Id: emberAfSoftwareDiagnosticsClusterInitCallback(endpoint); break; @@ -194,6 +244,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case app::Clusters::TargetNavigator::Id: emberAfTargetNavigatorClusterInitCallback(endpoint); break; + case app::Clusters::TemperatureControl::Id: + emberAfTemperatureControlClusterInitCallback(endpoint); + break; case app::Clusters::TemperatureMeasurement::Id: emberAfTemperatureMeasurementClusterInitCallback(endpoint); break; @@ -209,6 +262,12 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case app::Clusters::TimeFormatLocalization::Id: emberAfTimeFormatLocalizationClusterInitCallback(endpoint); break; + case app::Clusters::TimeSynchronization::Id: + emberAfTimeSynchronizationClusterInitCallback(endpoint); + break; + case app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id: + emberAfTotalVolatileOrganicCompoundsConcentrationMeasurementClusterInitCallback(endpoint); + break; case app::Clusters::UnitLocalization::Id: emberAfUnitLocalizationClusterInitCallback(endpoint); break; @@ -232,7 +291,6 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) break; } } - void __attribute__((weak)) emberAfAccessControlClusterInitCallback(EndpointId endpoint) { // To prevent warning @@ -248,11 +306,21 @@ void __attribute__((weak)) emberAfActionsClusterInitCallback(EndpointId endpoint // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfActivatedCarbonFilterMonitoringClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfAdministratorCommissioningClusterInitCallback(EndpointId endpoint) { // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfAirQualityClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfApplicationBasicClusterInitCallback(EndpointId endpoint) { // To prevent warning @@ -298,12 +366,17 @@ void __attribute__((weak)) emberAfBooleanStateClusterInitCallback(EndpointId end // To prevent warning (void) endpoint; } -void __attribute__((weak)) emberAfChannelClusterInitCallback(EndpointId endpoint) +void __attribute__((weak)) emberAfCarbonDioxideConcentrationMeasurementClusterInitCallback(EndpointId endpoint) { // To prevent warning (void) endpoint; } -void __attribute__((weak)) emberAfIcdManagementClusterInitCallback(EndpointId endpoint) +void __attribute__((weak)) emberAfCarbonMonoxideConcentrationMeasurementClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfChannelClusterInitCallback(EndpointId endpoint) { // To prevent warning (void) endpoint; @@ -328,6 +401,16 @@ void __attribute__((weak)) emberAfDiagnosticLogsClusterInitCallback(EndpointId e // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfDishwasherAlarmClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfDishwasherModeClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfDoorLockClusterInitCallback(EndpointId endpoint) { // To prevent warning @@ -363,6 +446,11 @@ void __attribute__((weak)) emberAfFlowMeasurementClusterInitCallback(EndpointId // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfFormaldehydeConcentrationMeasurementClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfGeneralCommissioningClusterInitCallback(EndpointId endpoint) { // To prevent warning @@ -383,6 +471,16 @@ void __attribute__((weak)) emberAfGroupsClusterInitCallback(EndpointId endpoint) // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfHepaFilterMonitoringClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfIcdManagementClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfIdentifyClusterInitCallback(EndpointId endpoint) { // To prevent warning @@ -398,6 +496,16 @@ void __attribute__((weak)) emberAfKeypadInputClusterInitCallback(EndpointId endp // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfLaundryWasherControlsClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfLaundryWasherModeClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfLevelControlClusterInitCallback(EndpointId endpoint) { // To prevent warning @@ -433,6 +541,11 @@ void __attribute__((weak)) emberAfNetworkCommissioningClusterInitCallback(Endpoi // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfNitrogenDioxideConcentrationMeasurementClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfOccupancySensingClusterInitCallback(EndpointId endpoint) { // To prevent warning @@ -453,6 +566,11 @@ void __attribute__((weak)) emberAfOperationalCredentialsClusterInitCallback(Endp // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfOperationalStateClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfOtaSoftwareUpdateProviderClusterInitCallback(EndpointId endpoint) { // To prevent warning @@ -463,6 +581,26 @@ void __attribute__((weak)) emberAfOtaSoftwareUpdateRequestorClusterInitCallback( // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfOzoneConcentrationMeasurementClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfPm10ConcentrationMeasurementClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfPm1ConcentrationMeasurementClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfPm25ConcentrationMeasurementClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfPowerSourceClusterInitCallback(EndpointId endpoint) { // To prevent warning @@ -483,16 +621,51 @@ void __attribute__((weak)) emberAfPumpConfigurationAndControlClusterInitCallback // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfRadonConcentrationMeasurementClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfRefrigeratorAlarmClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfRefrigeratorAndTemperatureControlledCabinetModeClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfRelativeHumidityMeasurementClusterInitCallback(EndpointId endpoint) { // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfRvcCleanModeClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfRvcOperationalStateClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfRvcRunModeClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfScenesClusterInitCallback(EndpointId endpoint) { // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfSmokeCoAlarmClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfSoftwareDiagnosticsClusterInitCallback(EndpointId endpoint) { // To prevent warning @@ -508,6 +681,11 @@ void __attribute__((weak)) emberAfTargetNavigatorClusterInitCallback(EndpointId // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfTemperatureControlClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfTemperatureMeasurementClusterInitCallback(EndpointId endpoint) { // To prevent warning @@ -533,6 +711,16 @@ void __attribute__((weak)) emberAfTimeFormatLocalizationClusterInitCallback(Endp // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfTimeSynchronizationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfTotalVolatileOrganicCompoundsConcentrationMeasurementClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfUnitLocalizationClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/components/esp_matter/zap_common/zap-generated/CHIPClusters.h b/components/esp_matter/zap_common/zap-generated/CHIPClusters.h index 76c6fdf52..3f4da83ae 100644 --- a/components/esp_matter/zap_common/zap-generated/CHIPClusters.h +++ b/components/esp_matter/zap_common/zap-generated/CHIPClusters.h @@ -16,8 +16,6 @@ */ // THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion #pragma once #include @@ -219,6 +217,13 @@ public: ~EthernetNetworkDiagnosticsCluster() {} }; +class DLL_EXPORT TimeSynchronizationCluster : public ClusterBase +{ +public: + TimeSynchronizationCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {} + ~TimeSynchronizationCluster() {} +}; + class DLL_EXPORT BridgedDeviceBasicInformationCluster : public ClusterBase { public: @@ -275,6 +280,13 @@ public: ~BooleanStateCluster() {} }; +class DLL_EXPORT IcdManagementCluster : public ClusterBase +{ +public: + IcdManagementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {} + ~IcdManagementCluster() {} +}; + class DLL_EXPORT ModeSelectCluster : public ClusterBase { public: @@ -282,6 +294,111 @@ public: ~ModeSelectCluster() {} }; +class DLL_EXPORT LaundryWasherModeCluster : public ClusterBase +{ +public: + LaundryWasherModeCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {} + ~LaundryWasherModeCluster() {} +}; + +class DLL_EXPORT RefrigeratorAndTemperatureControlledCabinetModeCluster : public ClusterBase +{ +public: + RefrigeratorAndTemperatureControlledCabinetModeCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {} + ~RefrigeratorAndTemperatureControlledCabinetModeCluster() {} +}; + +class DLL_EXPORT LaundryWasherControlsCluster : public ClusterBase +{ +public: + LaundryWasherControlsCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {} + ~LaundryWasherControlsCluster() {} +}; + +class DLL_EXPORT RvcRunModeCluster : public ClusterBase +{ +public: + RvcRunModeCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {} + ~RvcRunModeCluster() {} +}; + +class DLL_EXPORT RvcCleanModeCluster : public ClusterBase +{ +public: + RvcCleanModeCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {} + ~RvcCleanModeCluster() {} +}; + +class DLL_EXPORT TemperatureControlCluster : public ClusterBase +{ +public: + TemperatureControlCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {} + ~TemperatureControlCluster() {} +}; + +class DLL_EXPORT RefrigeratorAlarmCluster : public ClusterBase +{ +public: + RefrigeratorAlarmCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {} + ~RefrigeratorAlarmCluster() {} +}; + +class DLL_EXPORT DishwasherModeCluster : public ClusterBase +{ +public: + DishwasherModeCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {} + ~DishwasherModeCluster() {} +}; + +class DLL_EXPORT AirQualityCluster : public ClusterBase +{ +public: + AirQualityCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {} + ~AirQualityCluster() {} +}; + +class DLL_EXPORT SmokeCoAlarmCluster : public ClusterBase +{ +public: + SmokeCoAlarmCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {} + ~SmokeCoAlarmCluster() {} +}; + +class DLL_EXPORT DishwasherAlarmCluster : public ClusterBase +{ +public: + DishwasherAlarmCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {} + ~DishwasherAlarmCluster() {} +}; + +class DLL_EXPORT OperationalStateCluster : public ClusterBase +{ +public: + OperationalStateCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {} + ~OperationalStateCluster() {} +}; + +class DLL_EXPORT RvcOperationalStateCluster : public ClusterBase +{ +public: + RvcOperationalStateCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {} + ~RvcOperationalStateCluster() {} +}; + +class DLL_EXPORT HepaFilterMonitoringCluster : public ClusterBase +{ +public: + HepaFilterMonitoringCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {} + ~HepaFilterMonitoringCluster() {} +}; + +class DLL_EXPORT ActivatedCarbonFilterMonitoringCluster : public ClusterBase +{ +public: + ActivatedCarbonFilterMonitoringCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {} + ~ActivatedCarbonFilterMonitoringCluster() {} +}; + class DLL_EXPORT DoorLockCluster : public ClusterBase { public: @@ -387,6 +504,76 @@ public: ~OccupancySensingCluster() {} }; +class DLL_EXPORT CarbonMonoxideConcentrationMeasurementCluster : public ClusterBase +{ +public: + CarbonMonoxideConcentrationMeasurementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {} + ~CarbonMonoxideConcentrationMeasurementCluster() {} +}; + +class DLL_EXPORT CarbonDioxideConcentrationMeasurementCluster : public ClusterBase +{ +public: + CarbonDioxideConcentrationMeasurementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {} + ~CarbonDioxideConcentrationMeasurementCluster() {} +}; + +class DLL_EXPORT NitrogenDioxideConcentrationMeasurementCluster : public ClusterBase +{ +public: + NitrogenDioxideConcentrationMeasurementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {} + ~NitrogenDioxideConcentrationMeasurementCluster() {} +}; + +class DLL_EXPORT OzoneConcentrationMeasurementCluster : public ClusterBase +{ +public: + OzoneConcentrationMeasurementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {} + ~OzoneConcentrationMeasurementCluster() {} +}; + +class DLL_EXPORT Pm25ConcentrationMeasurementCluster : public ClusterBase +{ +public: + Pm25ConcentrationMeasurementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {} + ~Pm25ConcentrationMeasurementCluster() {} +}; + +class DLL_EXPORT FormaldehydeConcentrationMeasurementCluster : public ClusterBase +{ +public: + FormaldehydeConcentrationMeasurementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {} + ~FormaldehydeConcentrationMeasurementCluster() {} +}; + +class DLL_EXPORT Pm1ConcentrationMeasurementCluster : public ClusterBase +{ +public: + Pm1ConcentrationMeasurementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {} + ~Pm1ConcentrationMeasurementCluster() {} +}; + +class DLL_EXPORT Pm10ConcentrationMeasurementCluster : public ClusterBase +{ +public: + Pm10ConcentrationMeasurementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {} + ~Pm10ConcentrationMeasurementCluster() {} +}; + +class DLL_EXPORT TotalVolatileOrganicCompoundsConcentrationMeasurementCluster : public ClusterBase +{ +public: + TotalVolatileOrganicCompoundsConcentrationMeasurementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {} + ~TotalVolatileOrganicCompoundsConcentrationMeasurementCluster() {} +}; + +class DLL_EXPORT RadonConcentrationMeasurementCluster : public ClusterBase +{ +public: + RadonConcentrationMeasurementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {} + ~RadonConcentrationMeasurementCluster() {} +}; + class DLL_EXPORT WakeOnLanCluster : public ClusterBase { public: @@ -478,13 +665,6 @@ public: ~ElectricalMeasurementCluster() {} }; -class DLL_EXPORT ClientMonitoringCluster : public ClusterBase -{ -public: - ClientMonitoringCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {} - ~ClientMonitoringCluster() {} -}; - class DLL_EXPORT UnitTestingCluster : public ClusterBase { public: diff --git a/components/esp_matter/zap_common/zap-generated/access.h b/components/esp_matter/zap_common/zap-generated/access.h index 363a189f4..799f8f7d5 100644 --- a/components/esp_matter/zap_common/zap-generated/access.h +++ b/components/esp_matter/zap_common/zap-generated/access.h @@ -49,6 +49,8 @@ 0x0000003E, /* Cluster: Operational Credentials, Attribute: NOCs, Privilege: administer */ \ /* Cluster: Group Key Management, Attribute: GroupKeyMap, Privilege: view */ \ /* Cluster: User Label, Attribute: LabelList, Privilege: view */ \ + 0x00000046, /* Cluster: ICD Management, Attribute: RegisteredClients, Privilege: administer */ \ + 0x00000046, /* Cluster: ICD Management, Attribute: ICDCounter, Privilege: administer */ \ /* Cluster: Door Lock, Attribute: DoorOpenEvents, Privilege: view */ \ /* Cluster: Door Lock, Attribute: DoorClosedEvents, Privilege: view */ \ /* Cluster: Door Lock, Attribute: OpenPeriod, Privilege: view */ \ @@ -112,6 +114,8 @@ 0x00000000, /* Cluster: Operational Credentials, Attribute: NOCs, Privilege: administer */ \ /* Cluster: Group Key Management, Attribute: GroupKeyMap, Privilege: view */ \ /* Cluster: User Label, Attribute: LabelList, Privilege: view */ \ + 0x00000003, /* Cluster: ICD Management, Attribute: RegisteredClients, Privilege: administer */ \ + 0x00000004, /* Cluster: ICD Management, Attribute: ICDCounter, Privilege: administer */ \ /* Cluster: Door Lock, Attribute: DoorOpenEvents, Privilege: view */ \ /* Cluster: Door Lock, Attribute: DoorClosedEvents, Privilege: view */ \ /* Cluster: Door Lock, Attribute: OpenPeriod, Privilege: view */ \ @@ -175,6 +179,8 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Operational Credentials, Attribute: NOCs, Privilege: administer */ \ /* Cluster: Group Key Management, Attribute: GroupKeyMap, Privilege: view */ \ /* Cluster: User Label, Attribute: LabelList, Privilege: view */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: ICD Management, Attribute: RegisteredClients, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: ICD Management, Attribute: ICDCounter, Privilege: administer */ \ /* Cluster: Door Lock, Attribute: DoorOpenEvents, Privilege: view */ \ /* Cluster: Door Lock, Attribute: DoorClosedEvents, Privilege: view */ \ /* Cluster: Door Lock, Attribute: OpenPeriod, Privilege: view */ \ @@ -404,6 +410,11 @@ 0x00000031, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 0x00000031, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ 0x00000033, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ + 0x00000038, /* Cluster: Time Synchronization, Command: SetUTCTime, Privilege: administer */ \ + 0x00000038, /* Cluster: Time Synchronization, Command: SetTrustedTimeSource, Privilege: administer */ \ + 0x00000038, /* Cluster: Time Synchronization, Command: SetTimeZone, Privilege: manage */ \ + 0x00000038, /* Cluster: Time Synchronization, Command: SetDSTOffset, Privilege: manage */ \ + 0x00000038, /* Cluster: Time Synchronization, Command: SetDefaultNTP, Privilege: administer */ \ 0x0000003C, /* Cluster: Administrator Commissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 0x0000003C, /* Cluster: Administrator Commissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 0x0000003C, /* Cluster: Administrator Commissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -419,6 +430,9 @@ 0x0000003F, /* Cluster: Group Key Management, Command: KeySetRead, Privilege: administer */ \ 0x0000003F, /* Cluster: Group Key Management, Command: KeySetRemove, Privilege: administer */ \ 0x0000003F, /* Cluster: Group Key Management, Command: KeySetReadAllIndices, Privilege: administer */ \ + 0x00000046, /* Cluster: ICD Management, Command: RegisterClient, Privilege: manage */ \ + 0x00000046, /* Cluster: ICD Management, Command: UnregisterClient, Privilege: manage */ \ + 0x00000046, /* Cluster: ICD Management, Command: StayActiveRequest, Privilege: manage */ \ 0x00000101, /* Cluster: Door Lock, Command: SetWeekDaySchedule, Privilege: administer */ \ 0x00000101, /* Cluster: Door Lock, Command: GetWeekDaySchedule, Privilege: administer */ \ 0x00000101, /* Cluster: Door Lock, Command: ClearWeekDaySchedule, Privilege: administer */ \ @@ -430,8 +444,6 @@ 0x00000101, /* Cluster: Door Lock, Command: SetCredential, Privilege: administer */ \ 0x00000101, /* Cluster: Door Lock, Command: GetCredentialStatus, Privilege: administer */ \ 0x00000101, /* Cluster: Door Lock, Command: ClearCredential, Privilege: administer */ \ - 0x00001046, /* Cluster: Client Monitoring, Command: RegisterClientMonitoring, Privilege: manage */ \ - 0x00001046, /* Cluster: Client Monitoring, Command: UnregisterClientMonitoring, Privilege: manage */ \ 0xFFF1FC06, /* Cluster: Fault Injection, Command: FailAtFault, Privilege: manage */ \ 0xFFF1FC06, /* Cluster: Fault Injection, Command: FailRandomlyAtFault, Privilege: manage */ \ } @@ -458,6 +470,11 @@ 0x00000006, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ 0x00000008, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ 0x00000000, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ + 0x00000000, /* Cluster: Time Synchronization, Command: SetUTCTime, Privilege: administer */ \ + 0x00000001, /* Cluster: Time Synchronization, Command: SetTrustedTimeSource, Privilege: administer */ \ + 0x00000002, /* Cluster: Time Synchronization, Command: SetTimeZone, Privilege: manage */ \ + 0x00000004, /* Cluster: Time Synchronization, Command: SetDSTOffset, Privilege: manage */ \ + 0x00000005, /* Cluster: Time Synchronization, Command: SetDefaultNTP, Privilege: administer */ \ 0x00000000, /* Cluster: Administrator Commissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ 0x00000001, /* Cluster: Administrator Commissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ 0x00000002, /* Cluster: Administrator Commissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -473,6 +490,9 @@ 0x00000001, /* Cluster: Group Key Management, Command: KeySetRead, Privilege: administer */ \ 0x00000003, /* Cluster: Group Key Management, Command: KeySetRemove, Privilege: administer */ \ 0x00000004, /* Cluster: Group Key Management, Command: KeySetReadAllIndices, Privilege: administer */ \ + 0x00000000, /* Cluster: ICD Management, Command: RegisterClient, Privilege: manage */ \ + 0x00000002, /* Cluster: ICD Management, Command: UnregisterClient, Privilege: manage */ \ + 0x00000003, /* Cluster: ICD Management, Command: StayActiveRequest, Privilege: manage */ \ 0x0000000B, /* Cluster: Door Lock, Command: SetWeekDaySchedule, Privilege: administer */ \ 0x0000000C, /* Cluster: Door Lock, Command: GetWeekDaySchedule, Privilege: administer */ \ 0x0000000D, /* Cluster: Door Lock, Command: ClearWeekDaySchedule, Privilege: administer */ \ @@ -484,8 +504,6 @@ 0x00000022, /* Cluster: Door Lock, Command: SetCredential, Privilege: administer */ \ 0x00000024, /* Cluster: Door Lock, Command: GetCredentialStatus, Privilege: administer */ \ 0x00000026, /* Cluster: Door Lock, Command: ClearCredential, Privilege: administer */ \ - 0x00000000, /* Cluster: Client Monitoring, Command: RegisterClientMonitoring, Privilege: manage */ \ - 0x00000001, /* Cluster: Client Monitoring, Command: UnregisterClientMonitoring, Privilege: manage */ \ 0x00000000, /* Cluster: Fault Injection, Command: FailAtFault, Privilege: manage */ \ 0x00000001, /* Cluster: Fault Injection, Command: FailRandomlyAtFault, Privilege: manage */ \ } @@ -512,6 +530,11 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Time Synchronization, Command: SetUTCTime, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Time Synchronization, Command: SetTrustedTimeSource, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: Time Synchronization, Command: SetTimeZone, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Time Synchronization, Command: SetDSTOffset, Privilege: manage */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Time Synchronization, Command: SetDefaultNTP, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Administrator Commissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Administrator Commissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Administrator Commissioning, Command: RevokeCommissioning, Privilege: administer */ \ @@ -527,6 +550,9 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Group Key Management, Command: KeySetRead, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Group Key Management, Command: KeySetRemove, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Group Key Management, Command: KeySetReadAllIndices, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: ICD Management, Command: RegisterClient, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: ICD Management, Command: UnregisterClient, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: ICD Management, Command: StayActiveRequest, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Door Lock, Command: SetWeekDaySchedule, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Door Lock, Command: GetWeekDaySchedule, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Door Lock, Command: ClearWeekDaySchedule, Privilege: administer */ \ @@ -538,8 +564,6 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Door Lock, Command: SetCredential, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Door Lock, Command: GetCredentialStatus, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Door Lock, Command: ClearCredential, Privilege: administer */ \ - kMatterAccessPrivilegeManage, /* Cluster: Client Monitoring, Command: RegisterClientMonitoring, Privilege: manage */ \ - kMatterAccessPrivilegeManage, /* Cluster: Client Monitoring, Command: UnregisterClientMonitoring, Privilege: manage */ \ kMatterAccessPrivilegeManage, /* Cluster: Fault Injection, Command: FailAtFault, Privilege: manage */ \ kMatterAccessPrivilegeManage, /* Cluster: Fault Injection, Command: FailRandomlyAtFault, Privilege: manage */ \ } diff --git a/components/esp_matter/zap_common/zap-generated/gen_config.h b/components/esp_matter/zap_common/zap-generated/gen_config.h index 1b3602219..4abbc0486 100644 --- a/components/esp_matter/zap_common/zap-generated/gen_config.h +++ b/components/esp_matter/zap_common/zap-generated/gen_config.h @@ -194,6 +194,7 @@ #define EMBER_AF_FAN_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT FIXED_ENDPOINT_COUNT // used in fan control #define EMBER_AF_DISHWASHER_ALARM_CLUSTER_SERVER_ENDPOINT_COUNT FIXED_ENDPOINT_COUNT // used in dishwasher #define EMBER_AF_LAUNDRY_WASHER_CONTROLS_CLUSTER_SERVER_ENDPOINT_COUNT FIXED_ENDPOINT_COUNT // used in washer control +#define EMBER_AF_SAMPLE_MEI_CLUSTER_SERVER_ENDPOINT_COUNT FIXED_ENDPOINT_COUNT // used in sample-mei #define EMBER_AF_MODE_SELECT_CLUSTER_SERVER_ENDPOINT_COUNT CONFIG_ESP_MATTER_MODE_SELECT_CLUSTER_ENDPOINT_COUNT // used in mode select #define EMBER_AF_TEMPERATURE_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT CONFIG_ESP_MATTER_TEMPERATURE_CONTROL_CLUSTER_ENDPOINT_COUNT // used in temperature control diff --git a/components/esp_matter_controller/logger/zap-generated/DataModelLogger.cpp b/components/esp_matter_controller/logger/zap-generated/DataModelLogger.cpp index 9e2a1da4d..d9252de91 100644 --- a/components/esp_matter_controller/logger/zap-generated/DataModelLogger.cpp +++ b/components/esp_matter_controller/logger/zap-generated/DataModelLogger.cpp @@ -5077,6 +5077,14 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; } +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const SampleMei::Commands::AddArgumentsResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("returnValue", indent + 1, value.returnValue)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributePath & path, chip::TLV::TLVReader * data) { @@ -5273,7 +5281,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("OffWaitTime", 1, value); } case OnOff::Attributes::StartUpOnOff::Id: { - chip::app::DataModel::Nullable value; + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("StartUpOnOff", 1, value); } @@ -6631,6 +6639,11 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("TestEventTriggersEnabled", 1, value); } + case GeneralDiagnostics::Attributes::AverageWearCount::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AverageWearCount", 1, value); + } case GeneralDiagnostics::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); @@ -13490,6 +13503,47 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } + case SampleMei::Id: { + switch (path.mAttributeId) + { + case SampleMei::Attributes::FlipFlop::Id: { + bool value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("FlipFlop", 1, value); + } + case SampleMei::Attributes::GeneratedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("GeneratedCommandList", 1, value); + } + case SampleMei::Attributes::AcceptedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AcceptedCommandList", 1, value); + } + case SampleMei::Attributes::EventList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("EventList", 1, value); + } + case SampleMei::Attributes::AttributeList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AttributeList", 1, value); + } + case SampleMei::Attributes::FeatureMap::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("FeatureMap", 1, value); + } + case SampleMei::Attributes::ClusterRevision::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ClusterRevision", 1, value); + } + } + break; + } default: break; } @@ -13997,6 +14051,17 @@ CHIP_ERROR DataModelLogger::LogCommand(const chip::app::ConcreteCommandPath & pa } break; } + case SampleMei::Id: { + switch (path.mCommandId) + { + case SampleMei::Commands::AddArgumentsResponse::Id: { + SampleMei::Commands::AddArgumentsResponse::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AddArgumentsResponse", 1, value); + } + } + break; + } default: break; } diff --git a/components/esp_matter_controller/logger/zap-generated/DataModelLogger.h b/components/esp_matter_controller/logger/zap-generated/DataModelLogger.h index a5fbdc0c4..96f8b52b0 100644 --- a/components/esp_matter_controller/logger/zap-generated/DataModelLogger.h +++ b/components/esp_matter_controller/logger/zap-generated/DataModelLogger.h @@ -557,3 +557,5 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::UnitTesting::Commands::TestEmitTestFabricScopedEventResponse::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::SampleMei::Commands::AddArgumentsResponse::DecodableType & value); diff --git a/connectedhomeip/connectedhomeip b/connectedhomeip/connectedhomeip index ecc0d63cf..699ff65e0 160000 --- a/connectedhomeip/connectedhomeip +++ b/connectedhomeip/connectedhomeip @@ -1 +1 @@ -Subproject commit ecc0d63cf7eb91f4017bf8c264b53cf690420eb5 +Subproject commit 699ff65e065a28e4b7ee3a2d84110444b1709040 diff --git a/docs/en/developing.rst b/docs/en/developing.rst index 38d174fdf..5e49b5687 100644 --- a/docs/en/developing.rst +++ b/docs/en/developing.rst @@ -51,7 +51,7 @@ For using VSCode for development, please check `Developing in WSL +#include +#include +#if CONFIG_PM_ENABLE +#include +#endif + +#include +#include + +#include +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD +#include +#endif + +#include +#include + +static const char *TAG = "app_main"; + +using namespace esp_matter; +using namespace esp_matter::attribute; +using namespace esp_matter::endpoint; +using namespace chip::app::Clusters; + +constexpr auto k_timeout_seconds = 300; + +static void app_event_cb(const ChipDeviceEvent *event, intptr_t arg) +{ + switch (event->Type) { + case chip::DeviceLayer::DeviceEventType::kInterfaceIpAddressChanged: + ESP_LOGI(TAG, "Interface IP Address changed"); + break; + + case chip::DeviceLayer::DeviceEventType::kCommissioningComplete: + ESP_LOGI(TAG, "Commissioning complete"); + break; + + case chip::DeviceLayer::DeviceEventType::kFailSafeTimerExpired: + ESP_LOGI(TAG, "Commissioning failed, fail safe timer expired"); + break; + + case chip::DeviceLayer::DeviceEventType::kCommissioningSessionStarted: + ESP_LOGI(TAG, "Commissioning session started"); + break; + + case chip::DeviceLayer::DeviceEventType::kCommissioningSessionStopped: + ESP_LOGI(TAG, "Commissioning session stopped"); + break; + + case chip::DeviceLayer::DeviceEventType::kCommissioningWindowOpened: + ESP_LOGI(TAG, "Commissioning window opened"); + break; + + case chip::DeviceLayer::DeviceEventType::kCommissioningWindowClosed: + ESP_LOGI(TAG, "Commissioning window closed"); + break; + + case chip::DeviceLayer::DeviceEventType::kFabricRemoved: + { + ESP_LOGI(TAG, "Fabric removed successfully"); + if (chip::Server::GetInstance().GetFabricTable().FabricCount() == 0) + { + chip::CommissioningWindowManager & commissionMgr = chip::Server::GetInstance().GetCommissioningWindowManager(); + constexpr auto kTimeoutSeconds = chip::System::Clock::Seconds16(k_timeout_seconds); + if (!commissionMgr.IsCommissioningWindowOpen()) + { + /* After removing last fabric, this example does not remove the Wi-Fi credentials + * and still has IP connectivity so, only advertising on DNS-SD. + */ + CHIP_ERROR err = commissionMgr.OpenBasicCommissioningWindow(kTimeoutSeconds, + chip::CommissioningWindowAdvertisement::kDnssdOnly); + if (err != CHIP_NO_ERROR) + { + ESP_LOGE(TAG, "Failed to open commissioning window, err:%" CHIP_ERROR_FORMAT, err.Format()); + } + } + } + break; + } + + case chip::DeviceLayer::DeviceEventType::kFabricWillBeRemoved: + ESP_LOGI(TAG, "Fabric will be removed"); + break; + + case chip::DeviceLayer::DeviceEventType::kFabricUpdated: + ESP_LOGI(TAG, "Fabric is updated"); + break; + + case chip::DeviceLayer::DeviceEventType::kFabricCommitted: + ESP_LOGI(TAG, "Fabric is committed"); + break; + default: + break; + } +} + +static esp_err_t app_identification_cb(identification::callback_type_t type, uint16_t endpoint_id, uint8_t effect_id, + uint8_t effect_variant, void *priv_data) +{ + ESP_LOGI(TAG, "Identification callback: type: %u, effect: %u, variant: %u", type, effect_id, effect_variant); + return ESP_OK; +} + +static esp_err_t app_attribute_update_cb(attribute::callback_type_t type, uint16_t endpoint_id, uint32_t cluster_id, + uint32_t attribute_id, esp_matter_attr_val_t *val, void *priv_data) +{ + esp_err_t err = ESP_OK; + + if (type == PRE_UPDATE) { + /* Driver update */ + } + + return err; +} + +extern "C" void app_main() +{ + esp_err_t err = ESP_OK; + + /* Initialize the ESP NVS layer */ + nvs_flash_init(); + +#if CONFIG_PM_ENABLE + esp_pm_config_t pm_config = { + .max_freq_mhz = CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ, + .min_freq_mhz = CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ, +#if CONFIG_FREERTOS_USE_TICKLESS_IDLE + .light_sleep_enable = true +#endif + }; + err = esp_pm_configure(&pm_config); +#endif + /* Create a Matter node and add the mandatory Root Node device type on endpoint 0 */ + node::config_t node_config; + node_t *node = node::create(&node_config, app_attribute_update_cb, app_identification_cb); + endpoint::on_off_light::config_t endpoint_config; + endpoint_t *app_endpoint = endpoint::on_off_light::create(node, &endpoint_config, ENDPOINT_FLAG_NONE, NULL); + + /* These node and endpoint handles can be used to create/add other endpoints and clusters. */ + if (!node || !app_endpoint) { + ESP_LOGE(TAG, "Matter node creation failed"); + } + +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD + /* Set OpenThread platform config */ + esp_openthread_platform_config_t config = { + .radio_config = ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG(), + .host_config = ESP_OPENTHREAD_DEFAULT_HOST_CONFIG(), + .port_config = ESP_OPENTHREAD_DEFAULT_PORT_CONFIG(), + }; + set_openthread_platform_config(&config); +#endif + + /* Matter start */ + err = esp_matter::start(app_event_cb); + if (err != ESP_OK) { + ESP_LOGE(TAG, "Matter start failed: %d", err); + } +} diff --git a/examples/sleepy_device/main/app_priv.h b/examples/sleepy_device/main/app_priv.h new file mode 100644 index 000000000..c23600252 --- /dev/null +++ b/examples/sleepy_device/main/app_priv.h @@ -0,0 +1,33 @@ +/* + This example code is in the Public Domain (or CC0 licensed, at your option.) + + Unless required by applicable law or agreed to in writing, this + software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + CONDITIONS OF ANY KIND, either express or implied. +*/ + +#pragma once + +#include +#include + +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD +#include "esp_openthread_types.h" +#endif + +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD +#define ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG() \ + { \ + .radio_mode = RADIO_MODE_NATIVE, \ + } + +#define ESP_OPENTHREAD_DEFAULT_HOST_CONFIG() \ + { \ + .host_connection_mode = HOST_CONNECTION_MODE_NONE, \ + } + +#define ESP_OPENTHREAD_DEFAULT_PORT_CONFIG() \ + { \ + .storage_partition_name = "nvs", .netif_queue_size = 10, .task_queue_size = 10, \ + } +#endif diff --git a/examples/sleepy_device/main/idf_component.yml b/examples/sleepy_device/main/idf_component.yml new file mode 100644 index 000000000..95ee7845b --- /dev/null +++ b/examples/sleepy_device/main/idf_component.yml @@ -0,0 +1,6 @@ +dependencies: + espressif/cmake_utilities: + version: 0.* + rules: # will add "optional_component" only when all if clauses are True + - if: "idf_version >=5.0" + - if: "target in [esp32c2]" diff --git a/examples/sleepy_device/partitions.csv b/examples/sleepy_device/partitions.csv new file mode 100644 index 000000000..ffe5f242e --- /dev/null +++ b/examples/sleepy_device/partitions.csv @@ -0,0 +1,10 @@ +# Name, Type, SubType, Offset, Size, Flags +# Note: Firmware partition offset needs to be 64K aligned, initial 36K (9 sectors) are reserved for bootloader and partition table +esp_secure_cert, 0x3F, ,0xd000, 0x2000, encrypted +nvs, data, nvs, 0x10000, 0xC000, +nvs_keys, data, nvs_keys,, 0x1000, encrypted +otadata, data, ota, , 0x2000 +phy_init, data, phy, , 0x1000, +ota_0, app, ota_0, 0x20000, 0x1E0000, +ota_1, app, ota_1, 0x200000, 0x1E0000, +fctry, data, nvs, 0x3E0000, 0x6000 diff --git a/examples/sleepy_device/sdkconfig.defaults b/examples/sleepy_device/sdkconfig.defaults new file mode 100644 index 000000000..adb802253 --- /dev/null +++ b/examples/sleepy_device/sdkconfig.defaults @@ -0,0 +1,42 @@ +# Default to 921600 baud when flashing and monitoring device +CONFIG_ESPTOOLPY_BAUD_921600B=y +CONFIG_ESPTOOLPY_BAUD=921600 +CONFIG_ESPTOOLPY_COMPRESSED=y +CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y +CONFIG_ESPTOOLPY_MONITOR_BAUD=115200 +CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y + +#enable BT +CONFIG_BT_ENABLED=y +CONFIG_BT_NIMBLE_ENABLED=y + +#disable BT connection reattempt +CONFIG_BT_NIMBLE_ENABLE_CONN_REATTEMPT=n + +#enable lwip ipv6 autoconfig +CONFIG_LWIP_IPV6_AUTOCONFIG=y + +# Use a custom partition table +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_FILENAME="partitions.csv" +CONFIG_PARTITION_TABLE_OFFSET=0xC000 + +# Button +CONFIG_BUTTON_PERIOD_TIME_MS=20 +CONFIG_BUTTON_LONG_PRESS_TIME_MS=5000 + +# disable softap by default +CONFIG_ESP_WIFI_SOFTAP_SUPPORT=n + +# Disable DS Peripheral +CONFIG_ESP_SECURE_CERT_DS_PERIPHERAL=n + +# Use compact attribute storage mode +CONFIG_ESP_MATTER_NVS_USE_COMPACT_ATTR_STORAGE=y + +# Enable HKDF in mbedtls +CONFIG_MBEDTLS_HKDF_C=y + +# Increase LwIP IPv6 address number to 6 (MAX_FABRIC + 1) +# unique local addresses for fabrics(MAX_FABRIC), a link local address(1) +CONFIG_LWIP_IPV6_NUM_ADDRESSES=6 diff --git a/examples/sleepy_device/sdkconfig.defaults.esp32h2 b/examples/sleepy_device/sdkconfig.defaults.esp32h2 new file mode 100644 index 000000000..81d7f951f --- /dev/null +++ b/examples/sleepy_device/sdkconfig.defaults.esp32h2 @@ -0,0 +1,93 @@ +CONFIG_IDF_TARGET="esp32h2" + +# libsodium +CONFIG_LIBSODIUM_USE_MBEDTLS_SHA=y + +# NIMBLE +CONFIG_BT_ENABLED=y +CONFIG_BT_NIMBLE_ENABLED=y +CONFIG_BT_NIMBLE_EXT_ADV=n +CONFIG_BT_NIMBLE_HCI_EVT_BUF_SIZE=70 +CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING=n + +# FreeRTOS should use legacy API +CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY=y + +# Enable OpenThread +CONFIG_OPENTHREAD_ENABLED=y +CONFIG_OPENTHREAD_SRP_CLIENT=y +CONFIG_OPENTHREAD_DNS_CLIENT=y +CONFIG_OPENTHREAD_LOG_LEVEL_DYNAMIC=n +CONFIG_OPENTHREAD_LOG_LEVEL_NOTE=y +CONFIG_OPENTHREAD_CLI=n + +# Disable lwip ipv6 autoconfig +CONFIG_LWIP_IPV6_AUTOCONFIG=n + +# Use a custom partition table +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" + +# LwIP config for OpenThread +CONFIG_LWIP_IPV6_NUM_ADDRESSES=8 +CONFIG_LWIP_MULTICAST_PING=y + +# MDNS platform +CONFIG_USE_MINIMAL_MDNS=n +CONFIG_ENABLE_EXTENDED_DISCOVERY=y + +# Enable OTA Requestor +CONFIG_ENABLE_OTA_REQUESTOR=y + +# Disable STA and AP for ESP32H2 +CONFIG_ENABLE_WIFI_STATION=n +CONFIG_ENABLE_WIFI_AP=n + +# Disable chip shell +CONFIG_ENABLE_CHIP_SHELL=n + +# Enable DS Peripheral +CONFIG_ESP_SECURE_CERT_DS_PERIPHERAL=y + +# BLE Sleep +CONFIG_BT_LE_SLEEP_ENABLE=y +CONFIG_BT_LE_LP_CLK_SRC_DEFAULT=y + +# Use external 32K crystal +CONFIG_RTC_CLK_SRC_EXT_CRYS=y + +# Enable power management +CONFIG_PM_ENABLE=y +CONFIG_PM_DFS_INIT_AUTO=y +CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP=y +CONFIG_ESP_SLEEP_POWER_DOWN_FLASH=y + +# FreeRTOS config for light sleep +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_USE_TICKLESS_IDLE=y + +# Enable IEEE 802.15.4 sleep +CONFIG_IEEE802154_SLEEP_ENABLE=y + +# FreeRTOS config for light sleep +CONFIG_LWIP_ND6=n +CONFIG_LWIP_IPV4=n +CONFIG_DISABLE_IPV4=y + +# Disable hardware acceleration +CONFIG_MBEDTLS_HARDWARE_AES=n +CONFIG_MBEDTLS_HARDWARE_MPI=n +CONFIG_MBEDTLS_HARDWARE_SHA=n +CONFIG_MBEDTLS_HARDWARE_ECC=n +CONFIG_MBEDTLS_HARDWARE_ECDSA_VERIFY=n +CONFIG_MBEDTLS_SSL_PROTO_DTLS=y + +# Use OpenThread MTD +CONFIG_OPENTHREAD_MTD=y + +# ICD configurations +CONFIG_ENABLE_ICD_SERVER=y +CONFIG_ICD_FAST_POLL_INTERVAL_MS=500 +CONFIG_ICD_IDLE_MODE_INTERVAL_SEC=60 +CONFIG_ICD_ACTIVE_MODE_INTERVAL_MS=1000 +CONFIG_ICD_ACTIVE_MODE_THRESHOLD_MS=1000 diff --git a/examples/zap_light/CMakeLists.txt b/examples/zap_light/CMakeLists.txt index 61ba76e0f..51f60766d 100644 --- a/examples/zap_light/CMakeLists.txt +++ b/examples/zap_light/CMakeLists.txt @@ -72,4 +72,4 @@ idf_build_set_property(CXX_COMPILE_OPTIONS "-DEMBER_AF_WINDOW_COVERING_CLUSTER_S idf_build_set_property(CXX_COMPILE_OPTIONS "-DEMBER_AF_FAN_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT=1" APPEND) idf_build_set_property(CXX_COMPILE_OPTIONS "-DEMBER_AF_DISHWASHER_ALARM_CLUSTER_SERVER_ENDPOINT_COUNT=1" APPEND) idf_build_set_property(CXX_COMPILE_OPTIONS "-DEMBER_AF_LAUNDRY_WASHER_CONTROLS_CLUSTER_SERVER_ENDPOINT_COUNT=1" APPEND) -idf_build_set_property(CXX_COMPILE_OPTIONS "-DMATTER_SCENES_TABLE_SIZE=CONFIG_ESP_MATTER_SCENES_TABLE_SIZE" APPEND) +idf_build_set_property(CXX_COMPILE_OPTIONS "-DEMBER_AF_SAMPLE_MEI_CLUSTER_SERVER_ENDPOINT_COUNT=1" APPEND)