diff --git a/components/esp_matter/data_model/esp_matter_cluster.cpp b/components/esp_matter/data_model/esp_matter_cluster.cpp index 7e56ad2d7..f3d925ffc 100644 --- a/components/esp_matter/data_model/esp_matter_cluster.cpp +++ b/components/esp_matter/data_model/esp_matter_cluster.cpp @@ -1988,11 +1988,12 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags) namespace door_lock { const function_generic_t function_list[] = { + (function_generic_t)emberAfDoorLockClusterInitCallback, (function_generic_t)MatterDoorLockClusterServerAttributeChangedCallback, (function_generic_t)MatterDoorLockClusterServerShutdownCallback, (function_generic_t)MatterDoorLockClusterServerPreAttributeChangedCallback, }; -const int function_flags = CLUSTER_FLAG_ATTRIBUTE_CHANGED_FUNCTION | CLUSTER_FLAG_SHUTDOWN_FUNCTION | +const int function_flags = CLUSTER_FLAG_INIT_FUNCTION | CLUSTER_FLAG_ATTRIBUTE_CHANGED_FUNCTION | CLUSTER_FLAG_SHUTDOWN_FUNCTION | CLUSTER_FLAG_PRE_ATTRIBUTE_CHANGED_FUNCTION; cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags) diff --git a/examples/all_device_types_app/main/app_main.cpp b/examples/all_device_types_app/main/app_main.cpp index b734f52c6..241e47bed 100644 --- a/examples/all_device_types_app/main/app_main.cpp +++ b/examples/all_device_types_app/main/app_main.cpp @@ -218,6 +218,13 @@ void diagnostic_init() } #endif // CONFIG_ENABLE_ESP_DIAGNOSTICS_TRACE +#ifdef CONFIG_SUPPORT_DOOR_LOCK_CLUSTER +void emberAfDoorLockClusterInitCallback(chip::EndpointId endpoint) +{ + ESP_LOGI(TAG, "Door Lock App: Init Callback endpoint=%d", endpoint); +} +#endif // CONFIG_SUPPORT_DOOR_LOCK_CLUSTER + extern "C" void app_main() { esp_err_t err = ESP_OK; diff --git a/examples/door_lock/main/lock/door_lock_callbacks.cpp b/examples/door_lock/main/lock/door_lock_callbacks.cpp index 9767e76de..3954c9d18 100644 --- a/examples/door_lock/main/lock/door_lock_callbacks.cpp +++ b/examples/door_lock/main/lock/door_lock_callbacks.cpp @@ -8,18 +8,8 @@ #include #include "door_lock_manager.h" -#include -#include - -#include -#include -#include -#include #include -using namespace chip::app::Clusters; -using chip::app::DataModel::Nullable; - static const char *TAG = "doorlock_callback"; void door_lock_init()