Skip to content

Commit c34a940

Browse files
committed
Merge branch 'fix/namespace/missing-changes' into 'main'
Fix missing changes from !1267 See merge request app-frameworks/esp-matter!1272
2 parents df05e5e + 4a31769 commit c34a940

File tree

8 files changed

+59
-24
lines changed

8 files changed

+59
-24
lines changed

RELEASE_NOTES.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,45 @@
1+
## 30-Sep-2025
2+
3+
### Namespace Changes to Align with Matter Specifications
4+
5+
#### Cluster namespace changes
6+
- `ota_requestor``ota_software_update_requestor`
7+
- `ota_provider``ota_software_update_provider`
8+
9+
#### Device type namespace changes
10+
- `on_off_switch``on_off_light_switch`
11+
- `power_source_device``power_source`
12+
- `window_covering_device``window_covering`
13+
- `mode_select_device``mode_select`
14+
15+
### Namespace Changes for Consistency
16+
17+
- `on_off_plugin_unit``on_off_plug_in_unit`
18+
- `dimmable_plugin_unit` -> `dimmable_plug_in_unit`
19+
- `descriptor::feature::taglist``descriptor::feature::tag_list`
20+
- `color_temperature_light::color_temperature::startup_color_temperature_mireds``color_temperature_light::color_temperature::start_up_color_temperature_mireds`
21+
22+
### Note
23+
24+
The following namespaces exist in both the `cluster` and `device_type` namespaces:
25+
26+
- `window_covering`
27+
- `power_source`
28+
- `mode_select`
29+
30+
To avoid ambiguity, please reference them explicitly depending on context. For example:
31+
32+
- Use `endpoint::window_covering::create()` to create the **endpoint**
33+
- Use `cluster::window_covering::create()` to create the **cluster**
34+
135
# 2-Sep-2025
236

337
API change.
438

539
Move the macros `REMAP_TO_RANGE()` and `REMAP_TO_RANGE_INVERSE()` to from the `esp_matter_attribute_utils.h` to `common_macros.h`
640
in `examples/common/utils` directory.
741

42+
843
# 10-June-2025
944

1045
API Change.

components/esp_matter/data_model/esp_matter_endpoint.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
9393
}
9494
} /* root_node */
9595

96-
namespace ota_software_update_requestor{
96+
namespace ota_requestor {
9797
uint32_t get_device_type_id()
9898
{
9999
return ESP_MATTER_OTA_REQUESTOR_DEVICE_TYPE_ID;
@@ -133,9 +133,9 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
133133
#endif
134134
}
135135

136-
} /** ota_software_update_requestor **/
136+
} /** ota_requestor **/
137137

138-
namespace ota_software_update_provider{
138+
namespace ota_provider {
139139
uint32_t get_device_type_id()
140140
{
141141
return ESP_MATTER_OTA_PROVIDER_DEVICE_TYPE_ID;
@@ -164,7 +164,7 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
164164
return ESP_OK;
165165
}
166166

167-
} /** ota_software_update_provider **/
167+
} /** ota_provider **/
168168

169169
namespace power_source{
170170
uint32_t get_device_type_id()

components/esp_matter/data_model/esp_matter_endpoint.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ endpoint_t *create(node_t *node, config_t *config, uint8_t flags, void *priv_dat
216216
esp_err_t add(endpoint_t *endpoint, config_t *config);
217217
} /* root_node */
218218

219-
namespace ota_software_update_requestor{
219+
namespace ota_requestor {
220220
typedef struct config {
221221
cluster::descriptor::config_t descriptor;
222222
cluster::ota_software_update_requestor::config_t ota_software_update_requestor;
@@ -226,9 +226,9 @@ uint32_t get_device_type_id();
226226
uint8_t get_device_type_version();
227227
endpoint_t *create(node_t *node, config_t *config, uint8_t flags, void *priv_data);
228228
esp_err_t add(endpoint_t *endpoint, config_t *config);
229-
} /* ota_software_update_requestor */
229+
} /* ota_requestor */
230230

231-
namespace ota_software_update_provider{
231+
namespace ota_provider {
232232
typedef struct config {
233233
cluster::descriptor::config_t descriptor;
234234
cluster::ota_software_update_provider::config_t ota_software_update_provider;
@@ -238,7 +238,7 @@ uint32_t get_device_type_id();
238238
uint8_t get_device_type_version();
239239
endpoint_t *create(node_t *node, config_t *config, uint8_t flags, void *priv_data);
240240
esp_err_t add(endpoint_t *endpoint, config_t *config);
241-
} /* ota_software_update_provider */
241+
} /* ota_provider */
242242

243243
namespace power_source{
244244
typedef struct config {

components/esp_matter/esp_matter_ota.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,15 @@ static esp_matter_ota_requestor_impl_t s_ota_requestor_impl = {
5757
esp_err_t esp_matter_ota_requestor_init(void)
5858
{
5959
#if (CONFIG_ENABLE_OTA_REQUESTOR && (FIXED_ENDPOINT_COUNT == 0))
60-
endpoint::ota_software_update_requestor::config_t config;
60+
endpoint::ota_requestor::config_t config;
6161
node_t *root_node = esp_matter::node::get();
6262
endpoint_t *root_node_endpoint = esp_matter::endpoint::get(root_node, 0);
6363

6464
if (!root_node || !root_node_endpoint) {
6565
return ESP_FAIL;
6666
}
6767

68-
return endpoint::ota_software_update_requestor::add(root_node_endpoint, &config);
68+
return endpoint::ota_requestor::add(root_node_endpoint, &config);
6969
#else
7070
return ESP_ERR_NOT_SUPPORTED;
7171
#endif

docs/en/developing.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -791,14 +791,14 @@ creating in the *app_main.cpp* of the example. Examples:
791791
door_lock::config_t door_lock_config;
792792
endpoint_t *endpoint = door_lock::create(node, &door_lock_config, ENDPOINT_FLAG_NONE);
793793

794-
- window_covering_device:
794+
- window_covering:
795795

796796
::
797797

798-
window_covering_device::config_t window_covering_device_config(static_cast<uint8_t>(chip::app::Clusters::WindowCovering::EndProductType::kTiltOnlyInteriorBlind));
799-
endpoint_t *endpoint = window_covering_device::create(node, &window_covering_config, ENDPOINT_FLAG_NONE);
798+
window_covering::config_t window_covering_config(static_cast<uint8_t>(chip::app::Clusters::WindowCovering::EndProductType::kTiltOnlyInteriorBlind));
799+
endpoint_t *endpoint = endpoint::window_covering::create(node, &window_covering_config, ENDPOINT_FLAG_NONE);
800800

801-
The ``window_covering_device`` ``config_t`` structure includes a constructor that allows specifying
801+
The ``window_covering`` ``config_t`` structure includes a constructor that allows specifying
802802
an end product type different than the default one, which is "Roller shade".
803803
Once a ``config_t`` instance has been instantiated, its end product type cannot be modified.
804804

@@ -915,12 +915,12 @@ For example: Thermostat cluster has O.a+ conformance for Heating and Cooling fea
915915
916916
Optional features which are applicable to a cluster can also be added.
917917

918-
- feature: taglist: Descriptor cluster:
918+
- feature: tag_list: Descriptor cluster:
919919

920920
::
921921

922922
cluster_t* cluster = cluster::get(endpoint, Descriptor::Id);
923-
descriptor::feature::taglist::add(cluster);
923+
descriptor::feature::tag_list::add(cluster);
924924

925925
2.5.3 Adding custom data model fields
926926
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

examples/light_switch/main/app_main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ extern "C" void app_main()
173173
cluster::time_synchronization::feature::time_zone::add(time_sync_cluster, &tz_cfg);
174174
#endif
175175

176-
on_off_switch::config_t switch_config;
177-
endpoint_t *endpoint = on_off_switch::create(node, &switch_config, ENDPOINT_FLAG_NONE, switch_handle);
176+
on_off_light_switch::config_t switch_config;
177+
endpoint_t *endpoint = on_off_light_switch::create(node, &switch_config, ENDPOINT_FLAG_NONE, switch_handle);
178178
ABORT_APP_ON_FAILURE(endpoint != nullptr, ESP_LOGE(TAG, "Failed to create on off switch endpoint"));
179179

180180
/* Add group cluster to the switch endpoint */

examples/multiple_on_off_plugin_units/main/app_main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,9 @@ static esp_err_t create_plug(gpio_plug* plug, node_t* node)
177177
}
178178
}
179179

180-
on_off_plugin_unit::config_t plugin_unit_config;
180+
on_off_plug_in_unit::config_t plugin_unit_config;
181181
plugin_unit_config.on_off.on_off = false;
182-
endpoint_t *endpoint = on_off_plugin_unit::create(node, &plugin_unit_config, ENDPOINT_FLAG_NONE, plug);
182+
endpoint_t *endpoint = on_off_plug_in_unit::create(node, &plugin_unit_config, ENDPOINT_FLAG_NONE, plug);
183183

184184
if (!endpoint) {
185185
ESP_LOGE(TAG, "Matter endpoint creation failed");

examples/ota_provider/main/app_main.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ uint16_t switch_endpoint_id = 0;
2727
using namespace esp_matter;
2828
using namespace esp_matter::attribute;
2929
using namespace esp_matter::endpoint;
30-
using namespace esp_matter::ota_software_update_provider;
30+
using namespace esp_matter::ota_provider;
3131
using namespace chip::app::Clusters;
32-
using chip::app::Clusters::OtaSoftwareUpdateProviderDelegate;
32+
using chip::app::Clusters::OTAProviderDelegate;
3333

3434
static void app_event_cb(const ChipDeviceEvent *event, intptr_t arg)
3535
{
@@ -54,8 +54,8 @@ extern "C" void app_main()
5454
node_t *node = node::create(&node_config, NULL, NULL);
5555
endpoint_t *root_node_endpoint = endpoint::get(node, 0);
5656
cluster::ota_software_update_provider::config_t config;
57-
EspOtaSoftwareUpdateProvider::GetInstance().Init(true);
58-
config.delegate = &EspOtaSoftwareUpdateProvider::GetInstance();
57+
EspOtaProvider::GetInstance().Init(true);
58+
config.delegate = &EspOtaProvider::GetInstance();
5959
cluster_t *ota_provider_cluster = cluster::ota_software_update_provider::create(root_node_endpoint, &config, CLUSTER_FLAG_SERVER);
6060
if (!node || !root_node_endpoint || !ota_provider_cluster) {
6161
ESP_LOGE(TAG, "Failed to create data model");

0 commit comments

Comments
 (0)