Skip to content

Commit ca3df4f

Browse files
committed
Merge branch 'update_submodule/matter_1.4.2' into 'main'
connectedhomeip: Update the submodule to latest v1.4.2-branch. See merge request app-frameworks/esp-matter!1223
2 parents d4bfc44 + 4500815 commit ca3df4f

File tree

167 files changed

+549
-3318
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

167 files changed

+549
-3318
lines changed

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ variables:
2828
IDF_CHECKOUT_REF: "v5.4.1"
2929
# This variable represents the short hash of the connectedhomeip submodule.
3030
# Note: Do change this short hash on submodule update MRs.
31-
CHIP_SHORT_HASH: "d144bbbaae"
31+
CHIP_SHORT_HASH: "320b9a6f6c"
3232
DOCKER_IMAGE_NAME: "espressif/chip-idf"
3333

3434
.add_gitlab_ssh_key: &add_gitlab_ssh_key |

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ section in the ESP-Matter Programming Guide.
2828

2929
## Supported ESP-IDF and connectedhomeip versions
3030

31-
- This SDK currently works with commit [d144bbbaae] (https://github.com/project-chip/connectedhomeip/tree/d144bbbaae) of connectedhomeip.
31+
- This SDK currently works with commit [320b9a6f6c] (https://github.com/project-chip/connectedhomeip/tree/320b9a6f66) of connectedhomeip.
3232
- For Matter projects development with this SDK, it is recommended to utilize ESP-IDF [v5.4.1](https://github.com/espressif/esp-idf/tree/v5.4.1).
3333
- For ESP32C5, it is recommended to utilize ESP-IDF [98cd765953](https://github.com/espressif/esp-idf/commit/98cd765953dfe0e7bb1c5df8367e1b54bd966cce).
3434

components/esp_matter/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ set(INCLUDE_DIRS_LIST "."
1111

1212
# TODO: This file has compilation errors
1313
set(EXCLUDE_SRCS_LIST "${MATTER_SDK_PATH}/src/app/clusters/closure-control-server/closure-control-server.cpp")
14+
list(APPEND EXCLUDE_SRCS_LIST "${MATTER_SDK_PATH}/src/app/clusters/general-commissioning-server/TemporaryTestCoupling.cpp")
1415

1516
if (CONFIG_ESP_MATTER_ENABLE_MATTER_SERVER)
1617
list(APPEND SRC_DIRS_LIST "${MATTER_SDK_PATH}/src/app/server"
@@ -36,13 +37,23 @@ if (CONFIG_ESP_MATTER_ENABLE_MATTER_SERVER)
3637
"private")
3738
list(APPEND INCLUDE_DIRS_LIST "zap_common"
3839
"data_model")
40+
list(APPEND EXCLUDE_SRCS_LIST "${MATTER_SDK_PATH}/src/app/clusters/software-diagnostics-server/CodegenIntegration.cpp")
41+
list(APPEND EXCLUDE_SRCS_LIST "${MATTER_SDK_PATH}/src/app/clusters/administrator-commissioning-server/CodegenIntegration.cpp")
42+
list(APPEND EXCLUDE_SRCS_LIST "${MATTER_SDK_PATH}/src/app/clusters/ota-provider/CodegenIntegration.cpp")
43+
44+
if(NOT CONFIG_SUPPORT_SOFTWARE_DIAGNOSTICS_CLUSTER)
45+
list(APPEND EXCLUDE_SRCS_LIST "data_model/software_diagnostics_codegen_integration.cpp")
46+
endif()
47+
3948
endif(CONFIG_ESP_MATTER_ENABLE_DATA_MODEL)
4049
else()
4150
list(APPEND EXCLUDE_SRCS_LIST "esp_matter_identify.cpp"
4251
"esp_matter_ota.cpp"
4352
"esp_matter_attribute_utils.cpp")
4453
endif(CONFIG_ESP_MATTER_ENABLE_MATTER_SERVER)
4554

55+
56+
4657
set(REQUIRES_LIST chip bt esp_matter_console nvs_flash app_update esp_secure_cert_mgr mbedtls esp_system openthread json)
4758

4859
idf_component_register( SRC_DIRS ${SRC_DIRS_LIST}
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
// Copyright 2025 Espressif Systems (Shanghai) PTE LTD
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
#include <app/clusters/administrator-commissioning-server/AdministratorCommissioningCluster.h>
16+
#include <data-model-providers/codegen/CodegenDataModelProvider.h>
17+
#include <app-common/zap-generated/attributes/Accessors.h>
18+
#include <app/util/attribute-storage.h>
19+
20+
using namespace chip;
21+
using namespace chip::app;
22+
using namespace chip::app::Clusters;
23+
using namespace chip::app::Clusters::AdministratorCommissioning::Attributes;
24+
using chip::Protocols::InteractionModel::Status;
25+
26+
namespace {
27+
28+
// AdministratorCommissioningCluster implementation is specifically implemented
29+
// only for the root endpoint (endpoint 0)
30+
// So either:
31+
// - we have a fixed config and it is endpoint 0 OR
32+
// - we have a fully dynamic config
33+
34+
static constexpr size_t kAdministratorCommissioningFixedClusterCount = 0;
35+
36+
using ClusterImpl = AdministratorCommissioningWithBasicCommissioningWindowCluster;
37+
LazyRegisteredServerCluster<ClusterImpl> gServer;
38+
39+
} // namespace
40+
41+
void emberAfAdministratorCommissioningClusterInitCallback(EndpointId endpointId)
42+
{
43+
if (endpointId != kRootEndpointId)
44+
{
45+
return;
46+
}
47+
48+
uint32_t rawFeatureMap;
49+
if (FeatureMap::Get(endpointId, &rawFeatureMap) != Status::Success)
50+
{
51+
ChipLogError(AppServer, "Failed to get feature map for endpoint %u", endpointId);
52+
rawFeatureMap = 0;
53+
}
54+
55+
gServer.Create(endpointId, BitFlags<AdministratorCommissioning::Feature>(rawFeatureMap));
56+
CHIP_ERROR err = CodegenDataModelProvider::Instance().Registry().Register(gServer.Registration());
57+
if (err != CHIP_NO_ERROR)
58+
{
59+
ChipLogError(AppServer, "Admin Commissioning register error: endpoint %u, %" CHIP_ERROR_FORMAT, endpointId, err.Format());
60+
}
61+
}
62+
63+
void emberAfAdministratorCommissioningClusterShutdownCallback(EndpointId endpointId)
64+
{
65+
if (endpointId != kRootEndpointId)
66+
{
67+
return;
68+
}
69+
70+
CHIP_ERROR err = CodegenDataModelProvider::Instance().Registry().Unregister(&gServer.Cluster());
71+
if (err != CHIP_NO_ERROR)
72+
{
73+
ChipLogError(AppServer, "Admin Commissioning unregister error: endpoint %u, %" CHIP_ERROR_FORMAT, endpointId, err.Format());
74+
}
75+
gServer.Destroy();
76+
}
77+
78+
void MatterAdministratorCommissioningPluginServerInitCallback() {}
79+
void MatterAdministratorCommissioningPluginServerShutdownCallback() {}

components/esp_matter/data_model/esp_matter_attribute.cpp

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,13 @@ attribute_t *create_max_paths_per_invoke(cluster_t *cluster, uint16_t value)
297297
esp_matter_uint16(value));
298298
}
299299

300+
attribute_t *create_configuration_version(cluster_t *cluster, uint32_t value)
301+
{
302+
return esp_matter::attribute::create(cluster, BasicInformation::Attributes::ConfigurationVersion::Id,
303+
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
304+
}
305+
306+
300307
} /* attribute */
301308
} /* basic_information */
302309

@@ -958,7 +965,7 @@ attribute_t *create_detached_role_count(cluster_t *cluster, uint16_t value)
958965
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint16(value));
959966
}
960967

961-
attribute_t *create_chlid_role_count(cluster_t *cluster, uint16_t value)
968+
attribute_t *create_child_role_count(cluster_t *cluster, uint16_t value)
962969
{
963970
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::ChildRoleCount::Id,
964971
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint16(value));
@@ -1388,6 +1395,12 @@ attribute_t *create_product_appearance(cluster_t *cluster, uint8_t *value, uint1
13881395
ATTRIBUTE_FLAG_NONE, esp_matter_array(value, length, count));
13891396
}
13901397

1398+
attribute_t *create_configuration_version(cluster_t *cluster, uint32_t value)
1399+
{
1400+
return esp_matter::attribute::create(cluster, BridgedDeviceBasicInformation::Attributes::ConfigurationVersion::Id,
1401+
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
1402+
}
1403+
13911404
} /* attribute */
13921405
} /* bridged_device_basic_information */
13931406

@@ -2758,7 +2771,7 @@ attribute_t *create_auto_relock_time(cluster_t *cluster, uint32_t value)
27582771
esp_matter_uint32(value));
27592772
}
27602773

2761-
attribute_t *create_sound_valume(cluster_t *cluster, uint8_t value)
2774+
attribute_t *create_sound_volume(cluster_t *cluster, uint8_t value)
27622775
{
27632776
return esp_matter::attribute::create(cluster, DoorLock::Attributes::SoundVolume::Id, ATTRIBUTE_FLAG_WRITABLE,
27642777
esp_matter_enum8(value));
@@ -3333,6 +3346,13 @@ attribute_t *create_temperature_unit(cluster_t *cluster, uint8_t value)
33333346
ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_NONVOLATILE,
33343347
esp_matter_enum8(value));
33353348
}
3349+
3350+
attribute_t *create_supported_temperature_units(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
3351+
{
3352+
return esp_matter::attribute::create(cluster, UnitLocalization::Attributes::SupportedTemperatureUnits::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY,
3353+
esp_matter_array(value, length, count));
3354+
}
3355+
33363356
} /* attribute */
33373357
} /* unit_localization */
33383358

components/esp_matter/data_model/esp_matter_attribute.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ attribute_t *create_unique_id(cluster_t *cluster, char *value, uint16_t length);
8686
attribute_t *create_capability_minima(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count);
8787
attribute_t *create_specification_version(cluster_t *cluster, uint32_t value);
8888
attribute_t *create_max_paths_per_invoke(cluster_t *cluster, uint16_t value);
89+
attribute_t *create_configuration_version(cluster_t *cluster, uint32_t value);
8990

9091
/** These attributes are optional for the cluster, but when added to this cluster, the value is maintained internally.
9192
* If the attributes are added in some other cluster, then the value is not maintained internally.
@@ -259,7 +260,7 @@ attribute_t *create_ext_address(cluster_t *cluster, nullable<uint64_t> value);
259260
attribute_t *create_rloc16(cluster_t *cluster, nullable<uint16_t> value);
260261
attribute_t *create_overrun_count(cluster_t *cluster, uint64_t value);
261262
attribute_t *create_detached_role_count(cluster_t *cluster, uint16_t value);
262-
attribute_t *create_chlid_role_count(cluster_t *cluster, uint16_t value);
263+
attribute_t *create_child_role_count(cluster_t *cluster, uint16_t value);
263264
attribute_t *create_router_role_count(cluster_t *cluster, uint16_t value);
264265
attribute_t *create_leader_role_count(cluster_t *cluster, uint16_t value);
265266
attribute_t *create_attach_attempt_count(cluster_t *cluster, uint16_t value);
@@ -355,6 +356,8 @@ attribute_t *create_serial_number(cluster_t *cluster, char *value, uint16_t leng
355356
attribute_t *create_reachable(cluster_t *cluster, bool value);
356357
attribute_t *create_unique_id(cluster_t *cluster, char *value, uint16_t length);
357358
attribute_t *create_product_appearance(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count);
359+
attribute_t *create_configuration_version(cluster_t *cluster, uint32_t *value);
360+
358361
} /* attribute */
359362
} /* bridged_device_basic_information */
360363

@@ -667,7 +670,7 @@ attribute_t *create_number_of_credentials_supported_per_user(cluster_t *cluster,
667670
attribute_t *create_language(cluster_t *cluster, const char * value, uint16_t length);
668671
attribute_t *create_led_settings(cluster_t *cluster, uint8_t value);
669672
attribute_t *create_auto_relock_time(cluster_t *cluster, uint32_t value);
670-
attribute_t *create_sound_valume(cluster_t *cluster, uint8_t value);
673+
attribute_t *create_sound_volume(cluster_t *cluster, uint8_t value);
671674
attribute_t *create_operating_mode(cluster_t *cluster, uint8_t value, uint8_t min, uint8_t max);
672675
attribute_t *create_supported_operating_modes(cluster_t *cluster, const uint16_t value);
673676
attribute_t *create_default_configuration_register(cluster_t *cluster, uint16_t value);
@@ -830,6 +833,8 @@ attribute_t *create_supported_locales(cluster_t *cluster, uint8_t *value, uint16
830833
namespace unit_localization {
831834
namespace attribute {
832835
attribute_t *create_temperature_unit(cluster_t *cluster, uint8_t value);
836+
attribute_t *create_supported_temperature_units(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count);
837+
833838
} /* attribute */
834839
} /* unit_localization */
835840

components/esp_matter/data_model/esp_matter_cluster.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
240240
attribute::create_capability_minima(cluster, NULL, 0, 0);
241241
attribute::create_specification_version(cluster, 0);
242242
attribute::create_max_paths_per_invoke(cluster, 0);
243+
attribute::create_configuration_version(cluster, 0);
243244

244245
/* Attributes not managed internally */
245246
global::attribute::create_cluster_revision(cluster, cluster_revision);

0 commit comments

Comments
 (0)