mirror of
https://github.com/espressif/esp-matter.git
synced 2026-04-27 19:13:13 +00:00
docs: update release notes and docs for the namespace changes
components/esp-matter: ota_provider and ota_requstor device type namespace changes examples: use modified namespaces
This commit is contained in:
@@ -1,3 +1,37 @@
|
|||||||
|
## 30-Sep-2025
|
||||||
|
|
||||||
|
### Namespace Changes to Align with Matter Specifications
|
||||||
|
|
||||||
|
#### Cluster namespace changes
|
||||||
|
- `ota_requestor` → `ota_software_update_requestor`
|
||||||
|
- `ota_provider` → `ota_software_update_provider`
|
||||||
|
|
||||||
|
#### Device type namespace changes
|
||||||
|
- `on_off_switch` → `on_off_light_switch`
|
||||||
|
- `power_source_device` → `power_source`
|
||||||
|
- `window_covering_device` → `window_covering`
|
||||||
|
- `mode_select_device` → `mode_select`
|
||||||
|
|
||||||
|
### Namespace Changes for Consistency
|
||||||
|
|
||||||
|
- `on_off_plugin_unit` → `on_off_plug_in_unit`
|
||||||
|
- `dimmable_plugin_unit` -> `dimmable_plug_in_unit`
|
||||||
|
- `descriptor::feature::taglist` → `descriptor::feature::tag_list`
|
||||||
|
- `color_temperature_light::color_temperature::startup_color_temperature_mireds` → `color_temperature_light::color_temperature::start_up_color_temperature_mireds`
|
||||||
|
|
||||||
|
### Note
|
||||||
|
|
||||||
|
The following namespaces exist in both the `cluster` and `device_type` namespaces:
|
||||||
|
|
||||||
|
- `window_covering`
|
||||||
|
- `power_source`
|
||||||
|
- `mode_select`
|
||||||
|
|
||||||
|
To avoid ambiguity, please reference them explicitly depending on context. For example:
|
||||||
|
|
||||||
|
- Use `endpoint::window_covering::create()` to create the **endpoint**
|
||||||
|
- Use `cluster::window_covering::create()` to create the **cluster**
|
||||||
|
|
||||||
# 2-Sep-2025
|
# 2-Sep-2025
|
||||||
|
|
||||||
API change.
|
API change.
|
||||||
@@ -5,6 +39,7 @@ API change.
|
|||||||
Move the macros `REMAP_TO_RANGE()` and `REMAP_TO_RANGE_INVERSE()` to from the `esp_matter_attribute_utils.h` to `common_macros.h`
|
Move the macros `REMAP_TO_RANGE()` and `REMAP_TO_RANGE_INVERSE()` to from the `esp_matter_attribute_utils.h` to `common_macros.h`
|
||||||
in `examples/common/utils` directory.
|
in `examples/common/utils` directory.
|
||||||
|
|
||||||
|
|
||||||
# 10-June-2025
|
# 10-June-2025
|
||||||
|
|
||||||
API Change.
|
API Change.
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
|
|||||||
}
|
}
|
||||||
} /* root_node */
|
} /* root_node */
|
||||||
|
|
||||||
namespace ota_software_update_requestor{
|
namespace ota_requestor {
|
||||||
uint32_t get_device_type_id()
|
uint32_t get_device_type_id()
|
||||||
{
|
{
|
||||||
return ESP_MATTER_OTA_REQUESTOR_DEVICE_TYPE_ID;
|
return ESP_MATTER_OTA_REQUESTOR_DEVICE_TYPE_ID;
|
||||||
@@ -133,9 +133,9 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
} /** ota_software_update_requestor **/
|
} /** ota_requestor **/
|
||||||
|
|
||||||
namespace ota_software_update_provider{
|
namespace ota_provider {
|
||||||
uint32_t get_device_type_id()
|
uint32_t get_device_type_id()
|
||||||
{
|
{
|
||||||
return ESP_MATTER_OTA_PROVIDER_DEVICE_TYPE_ID;
|
return ESP_MATTER_OTA_PROVIDER_DEVICE_TYPE_ID;
|
||||||
@@ -164,7 +164,7 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
|
|||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
} /** ota_software_update_provider **/
|
} /** ota_provider **/
|
||||||
|
|
||||||
namespace power_source{
|
namespace power_source{
|
||||||
uint32_t get_device_type_id()
|
uint32_t get_device_type_id()
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ endpoint_t *create(node_t *node, config_t *config, uint8_t flags, void *priv_dat
|
|||||||
esp_err_t add(endpoint_t *endpoint, config_t *config);
|
esp_err_t add(endpoint_t *endpoint, config_t *config);
|
||||||
} /* root_node */
|
} /* root_node */
|
||||||
|
|
||||||
namespace ota_software_update_requestor{
|
namespace ota_requestor {
|
||||||
typedef struct config {
|
typedef struct config {
|
||||||
cluster::descriptor::config_t descriptor;
|
cluster::descriptor::config_t descriptor;
|
||||||
cluster::ota_software_update_requestor::config_t ota_software_update_requestor;
|
cluster::ota_software_update_requestor::config_t ota_software_update_requestor;
|
||||||
@@ -226,9 +226,9 @@ uint32_t get_device_type_id();
|
|||||||
uint8_t get_device_type_version();
|
uint8_t get_device_type_version();
|
||||||
endpoint_t *create(node_t *node, config_t *config, uint8_t flags, void *priv_data);
|
endpoint_t *create(node_t *node, config_t *config, uint8_t flags, void *priv_data);
|
||||||
esp_err_t add(endpoint_t *endpoint, config_t *config);
|
esp_err_t add(endpoint_t *endpoint, config_t *config);
|
||||||
} /* ota_software_update_requestor */
|
} /* ota_requestor */
|
||||||
|
|
||||||
namespace ota_software_update_provider{
|
namespace ota_provider {
|
||||||
typedef struct config {
|
typedef struct config {
|
||||||
cluster::descriptor::config_t descriptor;
|
cluster::descriptor::config_t descriptor;
|
||||||
cluster::ota_software_update_provider::config_t ota_software_update_provider;
|
cluster::ota_software_update_provider::config_t ota_software_update_provider;
|
||||||
@@ -238,7 +238,7 @@ uint32_t get_device_type_id();
|
|||||||
uint8_t get_device_type_version();
|
uint8_t get_device_type_version();
|
||||||
endpoint_t *create(node_t *node, config_t *config, uint8_t flags, void *priv_data);
|
endpoint_t *create(node_t *node, config_t *config, uint8_t flags, void *priv_data);
|
||||||
esp_err_t add(endpoint_t *endpoint, config_t *config);
|
esp_err_t add(endpoint_t *endpoint, config_t *config);
|
||||||
} /* ota_software_update_provider */
|
} /* ota_provider */
|
||||||
|
|
||||||
namespace power_source{
|
namespace power_source{
|
||||||
typedef struct config {
|
typedef struct config {
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ static esp_matter_ota_requestor_impl_t s_ota_requestor_impl = {
|
|||||||
esp_err_t esp_matter_ota_requestor_init(void)
|
esp_err_t esp_matter_ota_requestor_init(void)
|
||||||
{
|
{
|
||||||
#if (CONFIG_ENABLE_OTA_REQUESTOR && (FIXED_ENDPOINT_COUNT == 0))
|
#if (CONFIG_ENABLE_OTA_REQUESTOR && (FIXED_ENDPOINT_COUNT == 0))
|
||||||
endpoint::ota_software_update_requestor::config_t config;
|
endpoint::ota_requestor::config_t config;
|
||||||
node_t *root_node = esp_matter::node::get();
|
node_t *root_node = esp_matter::node::get();
|
||||||
endpoint_t *root_node_endpoint = esp_matter::endpoint::get(root_node, 0);
|
endpoint_t *root_node_endpoint = esp_matter::endpoint::get(root_node, 0);
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ esp_err_t esp_matter_ota_requestor_init(void)
|
|||||||
return ESP_FAIL;
|
return ESP_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return endpoint::ota_software_update_requestor::add(root_node_endpoint, &config);
|
return endpoint::ota_requestor::add(root_node_endpoint, &config);
|
||||||
#else
|
#else
|
||||||
return ESP_ERR_NOT_SUPPORTED;
|
return ESP_ERR_NOT_SUPPORTED;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -791,14 +791,14 @@ creating in the *app_main.cpp* of the example. Examples:
|
|||||||
door_lock::config_t door_lock_config;
|
door_lock::config_t door_lock_config;
|
||||||
endpoint_t *endpoint = door_lock::create(node, &door_lock_config, ENDPOINT_FLAG_NONE);
|
endpoint_t *endpoint = door_lock::create(node, &door_lock_config, ENDPOINT_FLAG_NONE);
|
||||||
|
|
||||||
- window_covering_device:
|
- window_covering:
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
window_covering_device::config_t window_covering_device_config(static_cast<uint8_t>(chip::app::Clusters::WindowCovering::EndProductType::kTiltOnlyInteriorBlind));
|
window_covering::config_t window_covering_config(static_cast<uint8_t>(chip::app::Clusters::WindowCovering::EndProductType::kTiltOnlyInteriorBlind));
|
||||||
endpoint_t *endpoint = window_covering_device::create(node, &window_covering_config, ENDPOINT_FLAG_NONE);
|
endpoint_t *endpoint = endpoint::window_covering::create(node, &window_covering_config, ENDPOINT_FLAG_NONE);
|
||||||
|
|
||||||
The ``window_covering_device`` ``config_t`` structure includes a constructor that allows specifying
|
The ``window_covering`` ``config_t`` structure includes a constructor that allows specifying
|
||||||
an end product type different than the default one, which is "Roller shade".
|
an end product type different than the default one, which is "Roller shade".
|
||||||
Once a ``config_t`` instance has been instantiated, its end product type cannot be modified.
|
Once a ``config_t`` instance has been instantiated, its end product type cannot be modified.
|
||||||
|
|
||||||
@@ -915,12 +915,12 @@ For example: Thermostat cluster has O.a+ conformance for Heating and Cooling fea
|
|||||||
|
|
||||||
Optional features which are applicable to a cluster can also be added.
|
Optional features which are applicable to a cluster can also be added.
|
||||||
|
|
||||||
- feature: taglist: Descriptor cluster:
|
- feature: tag_list: Descriptor cluster:
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
cluster_t* cluster = cluster::get(endpoint, Descriptor::Id);
|
cluster_t* cluster = cluster::get(endpoint, Descriptor::Id);
|
||||||
descriptor::feature::taglist::add(cluster);
|
descriptor::feature::tag_list::add(cluster);
|
||||||
|
|
||||||
2.5.3 Adding custom data model fields
|
2.5.3 Adding custom data model fields
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|||||||
@@ -173,8 +173,8 @@ extern "C" void app_main()
|
|||||||
cluster::time_synchronization::feature::time_zone::add(time_sync_cluster, &tz_cfg);
|
cluster::time_synchronization::feature::time_zone::add(time_sync_cluster, &tz_cfg);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
on_off_switch::config_t switch_config;
|
on_off_light_switch::config_t switch_config;
|
||||||
endpoint_t *endpoint = on_off_switch::create(node, &switch_config, ENDPOINT_FLAG_NONE, switch_handle);
|
endpoint_t *endpoint = on_off_light_switch::create(node, &switch_config, ENDPOINT_FLAG_NONE, switch_handle);
|
||||||
ABORT_APP_ON_FAILURE(endpoint != nullptr, ESP_LOGE(TAG, "Failed to create on off switch endpoint"));
|
ABORT_APP_ON_FAILURE(endpoint != nullptr, ESP_LOGE(TAG, "Failed to create on off switch endpoint"));
|
||||||
|
|
||||||
/* Add group cluster to the switch endpoint */
|
/* Add group cluster to the switch endpoint */
|
||||||
|
|||||||
@@ -177,9 +177,9 @@ static esp_err_t create_plug(gpio_plug* plug, node_t* node)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
on_off_plugin_unit::config_t plugin_unit_config;
|
on_off_plug_in_unit::config_t plugin_unit_config;
|
||||||
plugin_unit_config.on_off.on_off = false;
|
plugin_unit_config.on_off.on_off = false;
|
||||||
endpoint_t *endpoint = on_off_plugin_unit::create(node, &plugin_unit_config, ENDPOINT_FLAG_NONE, plug);
|
endpoint_t *endpoint = on_off_plug_in_unit::create(node, &plugin_unit_config, ENDPOINT_FLAG_NONE, plug);
|
||||||
|
|
||||||
if (!endpoint) {
|
if (!endpoint) {
|
||||||
ESP_LOGE(TAG, "Matter endpoint creation failed");
|
ESP_LOGE(TAG, "Matter endpoint creation failed");
|
||||||
|
|||||||
@@ -27,9 +27,9 @@ uint16_t switch_endpoint_id = 0;
|
|||||||
using namespace esp_matter;
|
using namespace esp_matter;
|
||||||
using namespace esp_matter::attribute;
|
using namespace esp_matter::attribute;
|
||||||
using namespace esp_matter::endpoint;
|
using namespace esp_matter::endpoint;
|
||||||
using namespace esp_matter::ota_software_update_provider;
|
using namespace esp_matter::ota_provider;
|
||||||
using namespace chip::app::Clusters;
|
using namespace chip::app::Clusters;
|
||||||
using chip::app::Clusters::OtaSoftwareUpdateProviderDelegate;
|
using chip::app::Clusters::OTAProviderDelegate;
|
||||||
|
|
||||||
static void app_event_cb(const ChipDeviceEvent *event, intptr_t arg)
|
static void app_event_cb(const ChipDeviceEvent *event, intptr_t arg)
|
||||||
{
|
{
|
||||||
@@ -54,8 +54,8 @@ extern "C" void app_main()
|
|||||||
node_t *node = node::create(&node_config, NULL, NULL);
|
node_t *node = node::create(&node_config, NULL, NULL);
|
||||||
endpoint_t *root_node_endpoint = endpoint::get(node, 0);
|
endpoint_t *root_node_endpoint = endpoint::get(node, 0);
|
||||||
cluster::ota_software_update_provider::config_t config;
|
cluster::ota_software_update_provider::config_t config;
|
||||||
EspOtaSoftwareUpdateProvider::GetInstance().Init(true);
|
EspOtaProvider::GetInstance().Init(true);
|
||||||
config.delegate = &EspOtaSoftwareUpdateProvider::GetInstance();
|
config.delegate = &EspOtaProvider::GetInstance();
|
||||||
cluster_t *ota_provider_cluster = cluster::ota_software_update_provider::create(root_node_endpoint, &config, CLUSTER_FLAG_SERVER);
|
cluster_t *ota_provider_cluster = cluster::ota_software_update_provider::create(root_node_endpoint, &config, CLUSTER_FLAG_SERVER);
|
||||||
if (!node || !root_node_endpoint || !ota_provider_cluster) {
|
if (!node || !root_node_endpoint || !ota_provider_cluster) {
|
||||||
ESP_LOGE(TAG, "Failed to create data model");
|
ESP_LOGE(TAG, "Failed to create data model");
|
||||||
|
|||||||
Reference in New Issue
Block a user