Merge branch 'data_model_gen' into 'main'

Add automated data model generation from Matter XML specifications

See merge request app-frameworks/esp-matter!1138
This commit is contained in:
Hrishikesh Dhayagude
2026-04-16 19:16:06 +08:00
696 changed files with 81603 additions and 6756 deletions
+66 -2
View File
@@ -374,6 +374,18 @@ build_esp_matter_examples_pytest_C2:
python tools/ci/memory_analyzer.py --chip esp32c2 --job_name "build_esp_matter_examples_pytest_C2" --ref_map_file light_mr_base.map --example "light"
fi
.build_generated_data_model_all_device_types_app_H2: &build_generated_data_model_all_device_types_app_H2
- *setup_ot_rcp
- cd ${ESP_MATTER_PATH}/examples/all_device_types_app
- echo "CONFIG_ESP_MATTER_ENABLE_GENERATED_DATA_MODEL=y" >> sdkconfig.defaults
- idf.py set-target esp32h2
- idf.py build
.build_generated_data_model_examples_pytest_C3: &build_generated_data_model_examples_pytest_C3
- cd ${ESP_MATTER_PATH}
- echo "CONFIG_ESP_MATTER_ENABLE_GENERATED_DATA_MODEL=y" >> ${ESP_MATTER_PATH}/examples/light/sdkconfig.defaults
- pip install -r tools/ci/requirements-build.txt
- python tools/ci/build_apps.py ./examples --pytest_c3
build_override_sdkconfig_examples:
resource_group: build_override_sdkconfig_examples
@@ -385,6 +397,8 @@ build_override_sdkconfig_examples:
- *build_esp32c6_wifi_thread_example
- *build_controller_otbr_example
- *build_lit_icd_example
- *build_generated_data_model_examples_pytest_C3
- *build_generated_data_model_all_device_types_app_H2
build_zap_light_example:
resource_group: build_zap_light_example
@@ -467,7 +481,6 @@ build_nopytest_remaining_examples_manual:
--parallel-index ${CI_NODE_INDEX:-1}
parallel: 2
build_esp_matter_examples_pytest_C3:
resource_group: build_esp_matter_examples_pytest_C3
extends:
@@ -490,7 +503,6 @@ build_esp_matter_examples_pytest_C3:
- pip install -r tools/ci/requirements-build.txt
- python tools/ci/build_apps.py ./examples --pytest_c3
pytest_esp32c3_esp_matter_dut:
stage: target_test
image: ${DOCKER_IMAGE_NAME}:chip_${CHIP_SHORT_HASH}_idf_${IDF_CHECKOUT_REF}
@@ -809,3 +821,55 @@ pre_commit_check:
tags:
- build
data_model_gen_unit_tests:
image: $CI_DOCKER_REGISTRY/esp-env-v6.0:1
stage: pre_check
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_PIPELINE_SOURCE == "push" || $CI_COMMIT_BRANCH == "main"
script:
- pip install -r ${ESP_MATTER_PATH}/tools/data_model_gen/requirements.txt
- cd ${ESP_MATTER_PATH}/tools/data_model_gen
- python tests/run_tests.py -v
tags:
- build
data_model_gen_check:
image: ${DOCKER_IMAGE_NAME}:chip_${CHIP_SHORT_HASH}_idf_${IDF_CHECKOUT_REF}
stage: pre_check
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_PIPELINE_SOURCE == "push" || $CI_COMMIT_BRANCH == "main"
script:
# Link CHIP submodule from Docker image cache
- rm -rf ${ESP_MATTER_PATH}/connectedhomeip/connectedhomeip
- ln -s ${CHIP_SUBMODULE_PATH} ${ESP_MATTER_PATH}/connectedhomeip/connectedhomeip
# Install data_model_gen dependencies and pre-commit
- pip install -r ${ESP_MATTER_PATH}/tools/data_model_gen/requirements.txt
- pip install pre-commit
# Regenerate data model from scratch
- cd ${ESP_MATTER_PATH}/tools/data_model_gen
- python data_model_gen.py --clean --no-colored-logs
# Format generated code with pre-commit hooks (astyle, codespell, etc.)
- cd ${ESP_MATTER_PATH}
- pre-commit install-hooks
- find components/esp_matter/data_model/generated -name '*.cpp' -o -name '*.h' | xargs pre-commit run --files || true
# Fail if generated+formatted files differ from what is committed
- |
UNTRACKED=$(git ls-files --others --exclude-standard components/esp_matter/data_model/generated/)
if ! git diff --quiet components/esp_matter/data_model/generated/ || [ -n "$UNTRACKED" ]; then
echo "ERROR: Generated data model code is out of date or not properly formatted."
echo ""
echo "To fix: run the following locally and commit the result:"
echo " cd tools/data_model_gen && python data_model_gen.py --clean"
echo " pre-commit run --files \$(find components/esp_matter/data_model/generated -name '*.cpp' -o -name '*.h')"
echo ""
git diff --stat components/esp_matter/data_model/generated/
if [ -n "$UNTRACKED" ]; then
echo "Untracked files:"
echo "$UNTRACKED"
fi
exit 1
fi
echo "Generated data model files are up to date and properly formatted."
tags:
- build
+47
View File
@@ -1,3 +1,50 @@
# 14-April-2026
## Generated Data Model (Experimental)
### Added
- Experimental support for a **generated data model** based on Matter Specification XMLs.
- Generated sources are available under:
- `components/esp_matter/data_model/generated/`
### Changed
- Legacy handwritten data model implementation moved to:
- `components/esp_matter/data_model/legacy/`
- Data model can now be generated using:
```
python tools/data_model_gen/data_model_gen.py
```
- Some APIs and namespaces have been updated with the generated data model.
- The examples below are representative and not a complete list of changes.
e.g.
- Namespace updates include:
```
- namespace wifi {} → namespace wi_fi {}
```
- Color Control Cluster Attribute API's
```
attribute_t *create_primary_n_x(cluster_t * cluster, uint16_t value, uint8_t index);
attribute_t *create_primary_n_y(cluster_t * cluster, uint16_t value, uint8_t index);
attribute_t *create_primary_n_intensity(cluster_t * cluster, nullable<uint8_t> value, uint8_t index);
```
to
```
attribute_t *create_primary_1_x(cluster_t *cluster, uint16_t value);
attribute_t *create_primary_1_y(cluster_t *cluster, uint16_t value);
attribute_t *create_primary_1_intensity(cluster_t *cluster, nullable<uint8_t> value);
```
### Configuration
- Enable via `CONFIG_ESP_MATTER_ENABLE_GENERATED_DATA_MODEL` (menuconfig → ESP Matter → Generated Data Model)
- Existing implementations is used by default
# 5-Mar-2026
### Controller API changes
+21
View File
@@ -48,6 +48,27 @@ if (CONFIG_ESP_MATTER_ENABLE_MATTER_SERVER)
list(APPEND INCLUDE_DIRS_LIST "zap_common"
"data_model")
list(APPEND PRIV_INCLUDE_DIRS_LIST "data_model/private")
if(CONFIG_ESP_MATTER_ENABLE_GENERATED_DATA_MODEL)
foreach(GENERATED_DATA_MODEL_PATH "device_types" "clusters")
list(APPEND SRC_DIRS_LIST "data_model/generated/${GENERATED_DATA_MODEL_PATH}")
list(APPEND INCLUDE_DIRS_LIST "data_model/generated/${GENERATED_DATA_MODEL_PATH}")
file(GLOB DIRS CONFIGURE_DEPENDS "data_model/generated/${GENERATED_DATA_MODEL_PATH}/*")
foreach(DIR ${DIRS})
if(IS_DIRECTORY ${DIR})
list(APPEND SRC_DIRS_LIST ${DIR})
list(APPEND INCLUDE_DIRS_LIST ${DIR})
endif()
endforeach()
endforeach()
list(APPEND PRIV_INCLUDE_DIRS_LIST "data_model/generated")
list(APPEND SRC_DIRS_LIST "data_model/generated/")
else()
list(APPEND SRC_DIRS_LIST "data_model/legacy")
list(APPEND INCLUDE_DIRS_LIST "data_model/legacy")
endif()
endif(CONFIG_ESP_MATTER_ENABLE_DATA_MODEL)
else()
list(APPEND EXCLUDE_SRCS_LIST "esp_matter_identify.cpp"
+10
View File
@@ -224,6 +224,16 @@ menu "ESP Matter"
If enabled, we will not use zap to define the data model of the node. All of the
endpoints are dynamic.
config ESP_MATTER_ENABLE_GENERATED_DATA_MODEL
bool "Enable Generated Data Model"
default n
depends on ESP_MATTER_ENABLE_DATA_MODEL
help
An experimental feature to use data model generated via automated scripts instead of legacy implementation.
When enabled:
- Generated clusters and endpoints are used.
- Legacy data model code is not compiled. More details can be found in the README.md file in the tools/data_model_gen directory.
config ESP_MATTER_ENABLE_MATTER_SERVER
bool "Enable Matter Server"
default y
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -13,613 +13,9 @@
// limitations under the License.
#pragma once
#include <esp_matter.h>
namespace esp_matter {
namespace cluster {
/** Specific command create APIs
*
* If some standard command is not present here, it can be added.
* If a custom command needs to be created, the low level esp_matter::command::create() API can be used.
*/
namespace actions {
namespace command {
command_t *create_instant_action(cluster_t *cluster);
command_t *create_instant_action_with_transition(cluster_t *cluster);
command_t *create_start_action(cluster_t *cluster);
command_t *create_start_action_with_duration(cluster_t *cluster);
command_t *create_stop_action(cluster_t *cluster);
command_t *create_pause_action(cluster_t *cluster);
command_t *create_pause_action_with_duration(cluster_t *cluster);
command_t *create_resume_action(cluster_t *cluster);
command_t *create_enable_action(cluster_t *cluster);
command_t *create_enable_action_with_duration(cluster_t *cluster);
command_t *create_disable_action(cluster_t *cluster);
command_t *create_disable_action_with_duration(cluster_t *cluster);
} /* command */
} /* actions */
namespace access_control {
namespace command {
command_t *create_review_fabric_restrictions(cluster_t *cluster);
command_t *create_review_fabric_restrictions_response(cluster_t *cluster);
} /* command */
} /* access_control */
namespace bridged_device_basic_information {
namespace command {
command_t *create_keep_active(cluster_t *cluster);
} /* command */
} /* bridged_device_basic_information */
namespace thread_network_diagnostics {
namespace command {
command_t *create_reset_counts(cluster_t *cluster);
} /* command */
} /* thread_network_diagnostics */
namespace wifi_network_diagnostics {
namespace command {
command_t *create_reset_counts(cluster_t *cluster);
} /* command */
} /* wifi_network_diagnostics */
namespace ethernet_network_diagnostics {
namespace command {
command_t *create_reset_counts(cluster_t *cluster);
} /* command */
} /* ethernet_network_diagnostics */
namespace diagnostic_logs {
namespace command {
command_t *create_retrieve_logs_request(cluster_t *cluster);
command_t *create_retrieve_logs_response(cluster_t *cluster);
} /* command */
} /* diagnostic_logs */
namespace general_diagnostics {
namespace command {
command_t *create_test_event_trigger(cluster_t *cluster);
command_t *create_time_snap_shot(cluster_t *cluster);
command_t *create_time_snap_shot_response(cluster_t *cluster);
command_t *create_payload_test_request(cluster_t *cluster);
command_t *create_payload_test_response(cluster_t *cluster);
} /* command */
} /* general_diagnostics */
namespace software_diagnostics {
namespace command {
command_t *create_reset_watermarks(cluster_t *cluster);
} /* command */
} /* software_diagnostics */
namespace group_key_management {
namespace command {
command_t *create_key_set_write(cluster_t *cluster);
command_t *create_key_set_read(cluster_t *cluster);
command_t *create_key_set_remove(cluster_t *cluster);
command_t *create_key_set_read_all_indices(cluster_t *cluster);
command_t *create_key_set_read_response(cluster_t *cluster);
command_t *create_key_set_read_all_indices_response(cluster_t *cluster);
} /* command */
} /* group_key_management */
namespace general_commissioning {
namespace command {
command_t *create_arm_fail_safe(cluster_t *cluster);
command_t *create_set_regulatory_config(cluster_t *cluster);
command_t *create_commissioning_complete(cluster_t *cluster);
command_t *create_arm_fail_safe_response(cluster_t *cluster);
command_t *create_set_regulatory_config_response(cluster_t *cluster);
command_t *create_commissioning_complete_response(cluster_t *cluster);
command_t *create_set_tc_acknowledgements(cluster_t *cluster);
command_t *create_set_tc_acknowledgements_response(cluster_t *cluster);
} /* command */
} /* general_commissioning */
#ifndef CONFIG_CUSTOM_NETWORK_CONFIG
namespace network_commissioning {
namespace command {
command_t *create_scan_networks(cluster_t *cluster);
command_t *create_add_or_update_wifi_network(cluster_t *cluster);
command_t *create_add_or_update_thread_network(cluster_t *cluster);
command_t *create_remove_network(cluster_t *cluster);
command_t *create_connect_network(cluster_t *cluster);
command_t *create_reorder_network(cluster_t *cluster);
command_t *create_scan_networks_response(cluster_t *cluster);
command_t *create_network_config_response(cluster_t *cluster);
command_t *create_connect_network_response(cluster_t *cluster);
} /* command */
} /* network_commissioning */
#endif // CONFIG_CUSTOM_NETWORK_CONFIG
namespace administrator_commissioning {
namespace command {
command_t *create_open_commissioning_window(cluster_t *cluster);
command_t *create_open_basic_commissioning_window(cluster_t *cluster);
command_t *create_revoke_commissioning(cluster_t *cluster);
} /* command */
} /* administrator_commissioning */
namespace operational_credentials {
namespace command {
command_t *create_attestation_request(cluster_t *cluster);
command_t *create_certificate_chain_request(cluster_t *cluster);
command_t *create_csr_request(cluster_t *cluster);
command_t *create_add_noc(cluster_t *cluster);
command_t *create_update_noc(cluster_t *cluster);
command_t *create_update_fabric_label(cluster_t *cluster);
command_t *create_remove_fabric(cluster_t *cluster);
command_t *create_add_trusted_root_certificate(cluster_t *cluster);
command_t *create_attestation_response(cluster_t *cluster);
command_t *create_certificate_chain_response(cluster_t *cluster);
command_t *create_csr_response(cluster_t *cluster);
command_t *create_noc_response(cluster_t *cluster);
command_t *create_set_vid_verification_statement(cluster_t *cluster);
command_t *create_sign_vid_verification_request(cluster_t *cluster);
command_t *create_sign_vid_verification_response(cluster_t *cluster);
} /* command */
} /* operational_credentials */
namespace ota_software_update_provider {
namespace command {
command_t *create_query_image(cluster_t *cluster);
command_t *create_apply_update_request(cluster_t *cluster);
command_t *create_notify_update_applied(cluster_t *cluster);
command_t *create_query_image_response(cluster_t *cluster);
command_t *create_apply_update_response(cluster_t *cluster);
} /* command */
} /* ota_software_update_provider */
namespace ota_software_update_requestor {
namespace command {
command_t *create_announce_ota_provider(cluster_t *cluster);
} /* command */
} /* ota_software_update_requestor */
namespace identify {
namespace command {
command_t *create_identify(cluster_t *cluster);
command_t *create_trigger_effect(cluster_t *cluster);
} /* command */
} /* identify */
namespace groups {
namespace command {
command_t *create_add_group(cluster_t *cluster);
command_t *create_view_group(cluster_t *cluster);
command_t *create_get_group_membership(cluster_t *cluster);
command_t *create_remove_group(cluster_t *cluster);
command_t *create_remove_all_groups(cluster_t *cluster);
command_t *create_add_group_if_identifying(cluster_t *cluster);
command_t *create_add_group_response(cluster_t *cluster);
command_t *create_view_group_response(cluster_t *cluster);
command_t *create_get_group_membership_response(cluster_t *cluster);
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_t *create_stay_active_response(cluster_t *cluster);
} /* command */
} /* icd_management */
namespace scenes_management {
namespace command {
command_t *create_add_scene(cluster_t *cluster);
command_t *create_view_scene(cluster_t *cluster);
command_t *create_remove_scene(cluster_t *cluster);
command_t *create_remove_all_scenes(cluster_t *cluster);
command_t *create_store_scene(cluster_t *cluster);
command_t *create_recall_scene(cluster_t *cluster);
command_t *create_get_scene_membership(cluster_t *cluster);
command_t *create_copy_scene(cluster_t *cluster);
command_t *create_add_scene_response(cluster_t *cluster);
command_t *create_view_scene_response(cluster_t *cluster);
command_t *create_remove_scene_response(cluster_t *cluster);
command_t *create_remove_all_scenes_response(cluster_t *cluster);
command_t *create_store_scene_response(cluster_t *cluster);
command_t *create_get_scene_membership_response(cluster_t *cluster);
command_t *create_copy_scene_response(cluster_t *cluster);
} /* command */
} /* scenes_management */
namespace on_off {
namespace command {
command_t *create_off(cluster_t *cluster);
command_t *create_on(cluster_t *cluster);
command_t *create_toggle(cluster_t *cluster);
command_t *create_off_with_effect(cluster_t *cluster);
command_t *create_on_with_recall_global_scene(cluster_t *cluster);
command_t *create_on_with_timed_off(cluster_t *cluster);
} /* command */
} /* on_off */
namespace level_control {
namespace command {
command_t *create_move_to_level(cluster_t *cluster);
command_t *create_move(cluster_t *cluster);
command_t *create_step(cluster_t *cluster);
command_t *create_stop(cluster_t *cluster);
command_t *create_move_to_level_with_on_off(cluster_t *cluster);
command_t *create_move_with_on_off(cluster_t *cluster);
command_t *create_step_with_on_off(cluster_t *cluster);
command_t *create_stop_with_on_off(cluster_t *cluster);
command_t *create_move_to_closest_frequency(cluster_t *cluster);
} /* command */
} /* level_control */
namespace color_control {
namespace command {
command_t *create_move_to_hue(cluster_t *cluster);
command_t *create_move_hue(cluster_t *cluster);
command_t *create_step_hue(cluster_t *cluster);
command_t *create_move_to_saturation(cluster_t *cluster);
command_t *create_move_saturation(cluster_t *cluster);
command_t *create_step_saturation(cluster_t *cluster);
command_t *create_move_to_hue_and_saturation(cluster_t *cluster);
command_t *create_stop_move_step(cluster_t *cluster);
command_t *create_move_to_color_temperature(cluster_t *cluster);
command_t *create_move_color_temperature(cluster_t *cluster);
command_t *create_step_color_temperature(cluster_t *cluster);
command_t *create_move_to_color(cluster_t *cluster);
command_t *create_move_color(cluster_t *cluster);
command_t *create_step_color(cluster_t *cluster);
command_t *create_enhanced_move_to_hue(cluster_t *cluster);
command_t *create_enhanced_move_hue(cluster_t *cluster);
command_t *create_enhanced_step_hue(cluster_t *cluster);
command_t *create_enhanced_move_to_hue_and_saturation(cluster_t *cluster);
command_t *create_color_loop_set(cluster_t *cluster);
} /* command */
} /* color_control */
namespace thermostat {
namespace command {
command_t *create_setpoint_raise_lower(cluster_t *cluster);
command_t *create_set_active_schedule_request(cluster_t *cluster);
command_t *create_set_active_preset_request(cluster_t *cluster);
command_t *create_atomic_request(cluster_t *cluster);
command_t *create_atomic_response(cluster_t *cluster);
} /* command */
} /* thermostat */
namespace operational_state {
namespace command {
command_t *create_pause(cluster_t *cluster);
command_t *create_stop(cluster_t *cluster);
command_t *create_start(cluster_t *cluster);
command_t *create_resume(cluster_t *cluster);
command_t *create_operational_command_response(cluster_t *cluster);
} /* command */
} /* operational_state */
namespace smoke_co_alarm {
namespace command {
command_t *create_self_test_request(cluster_t *cluster);
} /* command */
} /* smoke_co_alarm */
namespace door_lock {
namespace command {
command_t *create_lock_door(cluster_t *cluster);
command_t *create_unlock_door(cluster_t *cluster);
command_t *create_unlock_with_timeout(cluster_t *cluster);
command_t *create_set_weekday_schedule(cluster_t *cluster);
command_t *create_get_weekday_schedule(cluster_t *cluster);
command_t *create_get_weekday_schedule_response(cluster_t *cluster);
command_t *create_clear_weekday_schedule(cluster_t *cluster);
command_t *create_set_year_day_schedule(cluster_t *cluster);
command_t *create_get_year_day_schedule(cluster_t *cluster);
command_t *create_get_year_day_schedule_response(cluster_t *cluster);
command_t *create_clear_year_day_schedule(cluster_t *cluster);
command_t *create_set_holiday_schedule(cluster_t *cluster);
command_t *create_get_holiday_schedule(cluster_t *cluster);
command_t *create_get_holiday_schedule_response(cluster_t *cluster);
command_t *create_clear_holiday_schedule(cluster_t *cluster);
command_t *create_set_user_type(cluster_t *cluster);
command_t *create_get_user_type(cluster_t *cluster);
command_t *create_get_user_type_response(cluster_t *cluster);
command_t *create_set_user(cluster_t *cluster);
command_t *create_get_user(cluster_t *cluster);
command_t *create_get_user_response(cluster_t *cluster);
command_t *create_clear_user(cluster_t *cluster);
command_t *create_set_credential(cluster_t *cluster);
command_t *create_set_credential_response(cluster_t *cluster);
command_t *create_get_credential_status(cluster_t *cluster);
command_t *create_get_credential_status_response(cluster_t *cluster);
command_t *create_clear_credential(cluster_t *cluster);
command_t *create_unbolt_door(cluster_t *cluster);
command_t *create_set_aliro_reader_config(cluster_t *cluster);
command_t *create_clear_aliro_reader_config(cluster_t *cluster);
} /* command */
} /* door_lock */
namespace window_covering {
namespace command {
command_t *create_up_or_open(cluster_t *cluster);
command_t *create_down_or_close(cluster_t *cluster);
command_t *create_stop_motion(cluster_t *cluster);
command_t *create_go_to_lift_percentage(cluster_t *cluster);
command_t *create_go_to_tilt_percentage(cluster_t *cluster);
} /* command */
} /* window_covering */
namespace mode_select {
namespace command {
command_t *create_change_to_mode(cluster_t *cluster);
} /* command */
} /* mode_select */
namespace temperature_control {
namespace command {
command_t *create_set_temperature(cluster_t *cluster);
} /* command */
} /* temperature_control */
namespace fan_control {
namespace command {
command_t *create_step(cluster_t *cluster);
} /* command */
} /* fan_control */
namespace resource_monitoring {
namespace command {
command_t *create_reset_condition(cluster_t *cluster);
} /* command */
} /* resource_monitoring */
namespace hepa_filter_monitoring {
namespace command = resource_monitoring::command;
} /* hepa_filter_monitoring */
namespace activated_carbon_filter_monitoring {
namespace command = resource_monitoring::command;
} /* activated_carbon_filter_monitoring */
namespace mode_base {
namespace command {
command_t *create_change_to_mode(cluster_t *cluster);
command_t *create_change_to_mode_response(cluster_t *cluster);
} /* command */
} /* mode_base */
namespace keypad_input {
namespace command {
command_t *create_send_key(cluster_t *cluster);
command_t *create_send_key_response(cluster_t *cluster);
} /* command */
} /* keypad_input */
namespace boolean_state_configuration {
namespace command {
command_t *create_suppress_alarm(cluster_t *cluster);
command_t *create_enable_disable_alarm(cluster_t *cluster);
} /* command */
} /* boolean_state_configuration */
namespace energy_evse {
namespace command {
command_t *create_disable(cluster_t *cluster);
command_t *create_enable_charging(cluster_t *cluster);
command_t *create_enable_discharging(cluster_t *cluster);
command_t *create_start_diagnostics(cluster_t *cluster);
command_t *create_set_targets(cluster_t *cluster);
command_t *create_get_targets(cluster_t *cluster);
command_t *create_clear_targets(cluster_t *cluster);
command_t *create_get_targets_response(cluster_t *cluster);
} /* command */
} /* energy_evse */
namespace microwave_oven_control {
namespace command {
command_t *create_set_cooking_parameters(cluster_t *cluster);
command_t *create_add_more_time(cluster_t *cluster);
} /* command */
} /* microwave_oven_control */
namespace valve_configuration_and_control {
namespace command {
command_t *create_open(cluster_t *cluster);
command_t *create_close(cluster_t *cluster);
} /* command */
} /* valve_configuration_and_control */
namespace device_energy_management {
namespace command {
command_t *create_power_adjust_request(cluster_t *cluster);
command_t *create_cancel_power_adjust_request(cluster_t *cluster);
command_t *create_start_time_adjust_request(cluster_t *cluster);
command_t *create_pause_request(cluster_t *cluster);
command_t *create_resume_request(cluster_t *cluster);
command_t *create_modify_forecast_request(cluster_t *cluster);
command_t *create_request_constraint_based_forecast(cluster_t *cluster);
command_t *create_cancel_request(cluster_t *cluster);
} /* command */
} /* device_energy_management */
namespace thread_border_router_management {
namespace command {
command_t *create_get_active_dataset_request(cluster_t *cluster);
command_t *create_get_pending_dataset_request(cluster_t *cluster);
command_t *create_dataset_response(cluster_t *cluster);
command_t *create_set_active_dataset_request(cluster_t *cluster);
command_t *create_set_pending_dataset_request(cluster_t *cluster);
} /* command */
} /* thread_border_router_management */
namespace wifi_network_management {
namespace command {
command_t *create_network_passphrase_request(cluster_t *cluster);
command_t *create_network_passphrase_response(cluster_t *cluster);
} /* command */
} /* wifi_network_management */
namespace thread_network_directory {
namespace command {
command_t *create_add_network(cluster_t *cluster);
command_t *create_remove_network(cluster_t *cluster);
command_t *create_get_operational_dataset(cluster_t *cluster);
command_t *create_operational_dataset_response(cluster_t *cluster);
} /* command */
} /* thread_network_directory */
namespace service_area {
namespace command {
command_t *create_select_areas(cluster_t *cluster);
command_t *create_select_areas_response(cluster_t *cluster);
command_t *create_skip_area(cluster_t *cluster);
command_t *create_skip_area_response(cluster_t *cluster);
} /* command */
} /* service_area */
namespace water_heater_management {
namespace command {
command_t *create_boost(cluster_t *cluster);
command_t *create_cancel_boost(cluster_t *cluster);
} /* command */
} /* water_heater_management */
namespace commissioner_control {
namespace command {
command_t *create_request_commissioning_approval(cluster_t *cluster);
command_t *create_commission_node(cluster_t *cluster);
command_t *create_reverse_open_commissioning_window(cluster_t *cluster);
} /* command */
} /* commissioner_control */
namespace time_synchronization {
namespace command {
command_t *create_set_utc_time(cluster_t *cluster);
command_t *create_set_trusted_time_source(cluster_t *cluster);
command_t *create_set_time_zone(cluster_t *cluster);
command_t *create_set_time_zone_response(cluster_t *cluster);
command_t *create_set_dst_offset(cluster_t *cluster);
command_t *create_set_default_ntp(cluster_t *cluster);
} /* command */
} /* time_synchronization */
namespace camera_av_stream_management {
namespace command {
command_t *create_audio_stream_allocate(cluster_t *cluster);
command_t *create_audio_stream_allocate_response(cluster_t *cluster);
command_t *create_audio_stream_deallocate(cluster_t *cluster);
command_t *create_video_stream_allocate(cluster_t *cluster);
command_t *create_video_stream_allocate_response(cluster_t *cluster);
command_t *create_video_stream_modify(cluster_t *cluster);
command_t *create_video_stream_deallocate(cluster_t *cluster);
command_t *create_snapshot_stream_allocate(cluster_t *cluster);
command_t *create_snapshot_stream_allocate_response(cluster_t *cluster);
command_t *create_snapshot_stream_modify(cluster_t *cluster);
command_t *create_snapshot_stream_deallocate(cluster_t *cluster);
command_t *create_set_stream_priorities(cluster_t *cluster);
command_t *create_capture_snapshot(cluster_t *cluster);
command_t *create_capture_snapshot_response(cluster_t *cluster);
} /* command */
} /*camera av stream transport*/
namespace webrtc_transport_provider {
namespace command {
command_t *create_solicit_offer(cluster_t *cluster);
command_t *create_solicit_offer_response(cluster_t *cluster);
command_t *create_provide_offer(cluster_t *cluster);
command_t *create_provide_offer_response(cluster_t *cluster);
command_t *create_provide_answer(cluster_t *cluster);
command_t *create_provide_ice_candidates(cluster_t *cluster);
command_t *create_end_session(cluster_t *cluster);
} /* command */
}/*webrtc transport provider*/
namespace webrtc_transport_requestor {
namespace command {
command_t *create_offer(cluster_t *cluster);
command_t *create_answer(cluster_t *cluster);
command_t *create_ice_candidates(cluster_t *cluster);
command_t *create_end(cluster_t *cluster);
} /* command */
}/*webrtc transport requestor*/
namespace chime {
namespace command {
command_t *create_play_chime_sound(cluster_t *cluster);
} /* command */
} /* chime */
namespace closure_control {
namespace command {
command_t *create_stop(cluster_t *cluster);
command_t *create_move_to(cluster_t *cluster);
command_t *create_calibrate(cluster_t *cluster);
} /* command */
} /* closure_control */
namespace closure_dimension {
namespace command {
command_t *create_set_target(cluster_t *cluster);
command_t *create_step(cluster_t *cluster);
} /* command */
} /* closure_dimension */
namespace camera_av_settings_user_level_management {
namespace command {
command_t *create_mptz_set_position(cluster_t *cluster);
command_t *create_mptz_relative_move(cluster_t *cluster);
command_t *create_mptz_move_to_preset(cluster_t *cluster);
command_t *create_mptz_save_preset(cluster_t *cluster);
command_t *create_mptz_remove_preset(cluster_t *cluster);
command_t *create_dptz_set_viewport(cluster_t *cluster);
command_t *create_dptz_relative_move(cluster_t *cluster);
} /* command */
} /* camera_av_settings_user_level_management */
namespace push_av_stream_transport {
namespace command {
command_t *create_allocate_push_transport(cluster_t *cluster);
command_t *create_allocate_push_transport_response(cluster_t *cluster);
command_t *create_deallocate_push_transport(cluster_t *cluster);
command_t *create_modify_push_transport(cluster_t *cluster);
command_t *create_set_transport_status(cluster_t *cluster);
command_t *create_manually_trigger_transport(cluster_t *cluster);
command_t *create_find_transport(cluster_t *cluster);
command_t *create_find_transport_response(cluster_t *cluster);
} /* command */
} /* push_av_stream_transport */
namespace commodity_tariff {
namespace command {
command_t *create_get_tariff_component(cluster_t *cluster);
command_t *create_get_tariff_component_response(cluster_t *cluster);
command_t *create_get_day_entry(cluster_t *cluster);
command_t *create_get_day_entry_response(cluster_t *cluster);
} /* command */
} /* commodity_tariff */
namespace commodity_price {
namespace command {
command_t *create_get_detailed_price_request(cluster_t *cluster);
command_t *create_get_detailed_price_response(cluster_t *cluster);
command_t *create_get_detailed_forecast_request(cluster_t *cluster);
command_t *create_get_detailed_forecast_response(cluster_t *cluster);
} /* command */
} /* commodity_price */
namespace zone_management {
namespace command {
command_t *create_two_d_cartesian_zone(cluster_t *cluster);
command_t *create_two_d_cartesian_zone_response(cluster_t *cluster);
command_t *create_update_two_d_cartesian_zone(cluster_t *cluster);
command_t *create_remove_zone(cluster_t *cluster);
command_t *create_or_update_trigger(cluster_t *cluster);
command_t *create_remove_trigger(cluster_t *cluster);
} /* command */
} /* zone_management */
} /* cluster */
} /* esp_matter */
#include <sdkconfig.h>
#if CONFIG_ESP_MATTER_ENABLE_GENERATED_DATA_MODEL
#include "generated/clusters/all_clusters.h"
#else
#include "legacy/esp_matter_command_impl.h"
#endif
@@ -42,6 +42,18 @@
#include <app/clusters/diagnostic-logs-server/diagnostic-logs-server.h>
#include <app/clusters/closure-control-server/closure-control-server.h>
#include <app/clusters/closure-dimension-server/closure-dimension-server.h>
#include <app/clusters/application-launcher-server/application-launcher-server.h>
#include <app/clusters/account-login-server/account-login-server.h>
#include <app/clusters/audio-output-server/audio-output-server.h>
#include <app/clusters/channel-server/channel-server.h>
#include <app/clusters/content-app-observer/content-app-observer.h>
#include <app/clusters/content-control-server/content-control-server.h>
#include <app/clusters/low-power-server/low-power-server.h>
#include <app/clusters/messages-server/messages-server.h>
#include <app/clusters/media-input-server/media-input-server.h>
#include <app/clusters/media-playback-server/media-playback-server.h>
#include <app/clusters/target-navigator-server/target-navigator-server.h>
#include <app/clusters/wake-on-lan-server/wake-on-lan-server.h>
#include <app/clusters/commodity-tariff-server/commodity-tariff-server.h>
#include <app/clusters/commodity-price-server/commodity-price-server.h>
#include <app/clusters/electrical-grid-conditions-server/electrical-grid-conditions-server.h>
@@ -588,6 +600,116 @@ void MeterIdentificationDelegateInitCB(void *delegate, uint16_t endpoint_id)
LogErrorOnFailure(meter_identification_instance->Init());
}
void ApplicationLauncherDelegateInitCB(void *delegate, uint16_t endpoint_id)
{
VerifyOrReturn(delegate != nullptr);
ApplicationLauncher::Delegate *application_launcher_delegate = static_cast<ApplicationLauncher::Delegate *>(delegate);
ApplicationLauncher::SetDefaultDelegate(endpoint_id, application_launcher_delegate);
}
void AccountLoginDelegateInitCB(void *delegate, uint16_t endpoint_id)
{
VerifyOrReturn(delegate != nullptr);
AccountLogin::Delegate *account_login_delegate = static_cast<AccountLogin::Delegate *>(delegate);
AccountLogin::SetDefaultDelegate(endpoint_id, account_login_delegate);
}
void AudioOutputDelegateInitCB(void *delegate, uint16_t endpoint_id)
{
VerifyOrReturn(delegate != nullptr);
AudioOutput::Delegate *audio_output_delegate = static_cast<AudioOutput::Delegate *>(delegate);
AudioOutput::SetDefaultDelegate(endpoint_id, audio_output_delegate);
}
void ChannelDelegateInitCB(void *delegate, uint16_t endpoint_id)
{
VerifyOrReturn(delegate != nullptr);
Channel::Delegate *channel_delegate = static_cast<Channel::Delegate *>(delegate);
Channel::SetDefaultDelegate(endpoint_id, channel_delegate);
}
void ContentAppObserverDelegateInitCB(void *delegate, uint16_t endpoint_id)
{
VerifyOrReturn(delegate != nullptr);
ContentAppObserver::Delegate *content_app_observer_delegate = static_cast<ContentAppObserver::Delegate *>(delegate);
ContentAppObserver::SetDefaultDelegate(endpoint_id, content_app_observer_delegate);
}
void ContentControlDelegateInitCB(void *delegate, uint16_t endpoint_id)
{
VerifyOrReturn(delegate != nullptr);
ContentControl::Delegate *content_control_delegate = static_cast<ContentControl::Delegate *>(delegate);
ContentControl::SetDefaultDelegate(endpoint_id, content_control_delegate);
}
void DishwasherModeDelegateInitCB(void *delegate, uint16_t endpoint_id)
{
InitModeDelegate(delegate, endpoint_id, DishwasherMode::Id);
}
void LowPowerDelegateInitCB(void *delegate, uint16_t endpoint_id)
{
VerifyOrReturn(delegate != nullptr);
LowPower::Delegate *low_power_delegate = static_cast<LowPower::Delegate *>(delegate);
LowPower::SetDefaultDelegate(endpoint_id, low_power_delegate);
}
void MessagesDelegateInitCB(void *delegate, uint16_t endpoint_id)
{
VerifyOrReturn(delegate != nullptr);
Messages::Delegate *messages_delegate = static_cast<Messages::Delegate *>(delegate);
Messages::SetDefaultDelegate(endpoint_id, messages_delegate);
}
void MediaInputDelegateInitCB(void *delegate, uint16_t endpoint_id)
{
VerifyOrReturn(delegate != nullptr);
MediaInput::Delegate *media_input_delegate = static_cast<MediaInput::Delegate *>(delegate);
MediaInput::SetDefaultDelegate(endpoint_id, media_input_delegate);
}
void MediaPlaybackDelegateInitCB(void *delegate, uint16_t endpoint_id)
{
VerifyOrReturn(delegate != nullptr);
MediaPlayback::Delegate *media_playback_delegate = static_cast<MediaPlayback::Delegate *>(delegate);
MediaPlayback::SetDefaultDelegate(endpoint_id, media_playback_delegate);
}
void OvenModeDelegateInitCB(void *delegate, uint16_t endpoint_id)
{
InitModeDelegate(delegate, endpoint_id, OvenMode::Id);
}
void OvenCavityOperationalStateDelegateInitCB(void *delegate, uint16_t endpoint_id)
{
VerifyOrReturn(delegate != nullptr);
OperationalState::Delegate *operational_state_delegate = static_cast<OperationalState::Delegate *>(delegate);
OvenCavityOperationalState::Instance *instance = nullptr;
if (s_operational_state_instances.find(endpoint_id) == s_operational_state_instances.end()) {
instance = new OvenCavityOperationalState::Instance(operational_state_delegate, endpoint_id);
s_operational_state_instances[endpoint_id] = static_cast<OperationalState::Instance *>(instance);
} else {
instance = static_cast<OvenCavityOperationalState::Instance *>(s_operational_state_instances[endpoint_id]);
}
(void) instance->Init();
}
void RefrigeratorAndTemperatureControlledCabinetModeDelegateInitCB(void *delegate, uint16_t endpoint_id)
{
InitModeDelegate(delegate, endpoint_id, RefrigeratorAndTemperatureControlledCabinetMode::Id);
}
void RvcOperationalStateDelegateInitCB(void *delegate, uint16_t endpoint_id)
{
VerifyOrReturn(delegate != nullptr);
RvcOperationalState::Delegate *rvc_operational_state_delegate = static_cast<RvcOperationalState::Delegate *>(delegate);
RvcOperationalState::Instance *instance = nullptr;
if (s_operational_state_instances.find(endpoint_id) == s_operational_state_instances.end()) {
instance = new RvcOperationalState::Instance(rvc_operational_state_delegate, endpoint_id);
s_operational_state_instances[endpoint_id] = static_cast<OperationalState::Instance *>(instance);
} else {
instance = static_cast<RvcOperationalState::Instance *>(s_operational_state_instances[endpoint_id]);
}
(void) instance->Init();
}
void TargetNavigatorDelegateInitCB(void *delegate, uint16_t endpoint_id)
{
VerifyOrReturn(delegate != nullptr);
TargetNavigator::Delegate *target_navigator_delegate = static_cast<TargetNavigator::Delegate *>(delegate);
TargetNavigator::SetDefaultDelegate(endpoint_id, target_navigator_delegate);
}
void WakeOnLanDelegateInitCB(void *delegate, uint16_t endpoint_id)
{
VerifyOrReturn(delegate != nullptr);
WakeOnLan::Delegate *wake_on_lan_delegate = static_cast<WakeOnLan::Delegate *>(delegate);
WakeOnLan::SetDefaultDelegate(endpoint_id, wake_on_lan_delegate);
}
} // namespace delegate_cb
} // namespace cluster
} // namespace esp_matter
@@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#pragma once
namespace esp_matter {
namespace cluster {
@@ -63,6 +65,24 @@ void CommodityTariffDelegateInitCB(void *delegate, uint16_t endpoint_id);
void CommodityPriceDelegateInitCB(void *delegate, uint16_t endpoint_id);
void ElectricalGridConditionsDelegateInitCB(void *delegate, uint16_t endpoint_id);
void MeterIdentificationDelegateInitCB(void *delegate, uint16_t endpoint_id);
void ApplicationLauncherDelegateInitCB(void *delegate, uint16_t endpoint_id);
void AccountLoginDelegateInitCB(void *delegate, uint16_t endpoint_id);
void AudioOutputDelegateInitCB(void *delegate, uint16_t endpoint_id);
void ChannelDelegateInitCB(void *delegate, uint16_t endpoint_id);
void ContentAppObserverDelegateInitCB(void *delegate, uint16_t endpoint_id);
void ContentControlDelegateInitCB(void *delegate, uint16_t endpoint_id);
void DishwasherModeDelegateInitCB(void *delegate, uint16_t endpoint_id);
void LowPowerDelegateInitCB(void *delegate, uint16_t endpoint_id);
void MessagesDelegateInitCB(void *delegate, uint16_t endpoint_id);
void MediaInputDelegateInitCB(void *delegate, uint16_t endpoint_id);
void MediaPlaybackDelegateInitCB(void *delegate, uint16_t endpoint_id);
void OvenModeDelegateInitCB(void *delegate, uint16_t endpoint_id);
void OvenCavityOperationalStateDelegateInitCB(void *delegate, uint16_t endpoint_id);
void RefrigeratorAndTemperatureControlledCabinetModeDelegateInitCB(void *delegate, uint16_t endpoint_id);
void RvcOperationalStateDelegateInitCB(void *delegate, uint16_t endpoint_id);
void TargetNavigatorDelegateInitCB(void *delegate, uint16_t endpoint_id);
void WakeOnLanDelegateInitCB(void *delegate, uint16_t endpoint_id);
} // namespace delegate_cb
} // namespace cluster
File diff suppressed because it is too large Load Diff
@@ -13,289 +13,9 @@
// limitations under the License.
#pragma once
#include <esp_err.h>
#include <esp_matter_data_model.h>
#include <platform/DeviceControlServer.h>
namespace esp_matter {
namespace cluster {
/** Specific event send APIs
*
* If some standard event is not present here, it can be added.
*/
namespace access_control {
namespace event {
event_t *create_access_control_entry_changed(cluster_t *cluster);
event_t *create_access_control_extension_changed(cluster_t *cluster);
event_t *create_fabric_restriction_review_update(cluster_t *cluster);
} // namespace event
} // namespace access_control
namespace actions {
namespace event {
event_t *create_state_changed(cluster_t *cluster);
event_t *create_action_failed(cluster_t *cluster);
} // namespace event
} // namespace actions
namespace basic_information {
namespace event {
event_t *create_start_up(cluster_t *cluster);
event_t *create_shut_down(cluster_t *cluster);
event_t *create_leave(cluster_t *cluster);
event_t *create_reachable_changed(cluster_t *cluster);
} // namespace event
} // namespace basic_information
namespace ota_software_update_requestor {
namespace event {
event_t *create_state_transition(cluster_t *cluster);
event_t *create_version_applied(cluster_t *cluster);
event_t *create_download_error(cluster_t *cluster);
} // namespace event
} // namespace ota_software_update_requestor
namespace general_diagnostics {
namespace event {
event_t *create_hardware_fault_change(cluster_t *cluster);
event_t *create_radio_fault_change(cluster_t *cluster);
event_t *create_network_fault_change(cluster_t *cluster);
event_t *create_boot_reason(cluster_t *cluster);
} // namespace event
} // namespace general_diagnostics
namespace wifi_network_diagnostics {
namespace event {
event_t *create_disconnection(cluster_t *cluster);
event_t *create_association_failure(cluster_t *cluster);
event_t *create_connection_status(cluster_t *cluster);
} // namespace event
} // namespace wifi_network_diagnostics
namespace thread_network_diagnostics {
namespace event {
event_t *create_connection_status(cluster_t *cluster);
event_t *create_network_fault_change(cluster_t *cluster);
} // namespace event
} // namespace thread_network_diagnostics
namespace software_diagnostics {
namespace event {
event_t *create_software_fault(cluster_t *cluster);
} // namespace event
} // namespace software_diagnostics
namespace time_synchronization {
namespace event {
event_t *create_dst_table_empty(cluster_t *cluster);
event_t *create_dst_status(cluster_t *cluster);
event_t *create_time_zone_status(cluster_t *cluster);
event_t *create_time_failure(cluster_t *cluster);
event_t *create_missing_trusted_time_source(cluster_t *cluster);
} // namespace event
} // namespace time_synchronization
namespace bridged_device_basic_information {
namespace event {
event_t *create_active_changed(cluster_t *cluster);
event_t *create_start_up(cluster_t *cluster);
event_t *create_shut_down(cluster_t *cluster);
event_t *create_leave(cluster_t *cluster);
event_t *create_reachable_changed(cluster_t *cluster);
} // namespace event
} // namespace bridged_device_basic_information
namespace power_source {
namespace event {
event_t *create_wired_fault_change(cluster_t *cluster);
event_t *create_bat_fault_change(cluster_t *cluster);
event_t *create_bat_charge_fault_change(cluster_t *cluster);
}
}
namespace smoke_co_alarm {
namespace event {
event_t *create_smoke_alarm(cluster_t *cluster);
event_t *create_co_alarm(cluster_t *cluster);
event_t *create_low_battery(cluster_t *cluster);
event_t *create_hardware_fault(cluster_t *cluster);
event_t *create_end_of_service(cluster_t *cluster);
event_t *create_self_test_complete(cluster_t *cluster);
event_t *create_alarm_muted(cluster_t *cluster);
event_t *create_mute_ended(cluster_t *cluster);
event_t *create_interconnect_smoke_alarm(cluster_t *cluster);
event_t *create_interconnect_co_alarm(cluster_t *cluster);
event_t *create_all_clear(cluster_t *cluster);
} // namespace event
} // namespace smoke_co_alarm
namespace door_lock {
namespace event {
event_t *create_door_lock_alarm(cluster_t *cluster);
event_t *create_door_state_change(cluster_t *cluster);
event_t *create_lock_operation(cluster_t *cluster);
event_t *create_lock_operation_error(cluster_t *cluster);
event_t *create_lock_user_change(cluster_t *cluster);
} // namespace event
} // namespace door_lock
namespace switch_cluster {
namespace event {
event_t *create_switch_latched(cluster_t *cluster);
event_t *create_initial_press(cluster_t *cluster);
event_t *create_long_press(cluster_t *cluster);
event_t *create_short_release(cluster_t *cluster);
event_t *create_long_release(cluster_t *cluster);
event_t *create_multi_press_ongoing(cluster_t *cluster);
event_t *create_multi_press_complete(cluster_t *cluster);
esp_err_t send_switch_latched(chip::EndpointId endpoint, uint8_t new_position);
esp_err_t send_initial_press(chip::EndpointId endpoint, uint8_t new_position);
esp_err_t send_long_press(chip::EndpointId endpoint, uint8_t new_position);
esp_err_t send_short_release(chip::EndpointId endpoint, uint8_t previous_position);
esp_err_t send_long_release(chip::EndpointId endpoint, uint8_t previous_position);
esp_err_t send_multi_press_ongoing(chip::EndpointId endpoint, uint8_t new_position, uint8_t count);
esp_err_t send_multi_press_complete(chip::EndpointId endpoint, uint8_t new_position, uint8_t count);
} // namespace event
} // namespace switch_cluster
namespace boolean_state {
namespace event {
event_t *create_state_change(cluster_t *cluster);
} // namespace event
} // namespace boolean_state
namespace boolean_state_configuration {
namespace event {
event_t *create_alarms_state_changed(cluster_t *cluster);
event_t *create_sensor_fault(cluster_t *cluster);
} // namespace event
} // namespace boolean_state_configuration
namespace operational_state {
namespace event {
event_t *create_operational_error(cluster_t *cluster);
event_t *create_operation_completion(cluster_t *cluster);
} // namespace event
} // namespace operational_state
namespace pump_configuration_and_control {
namespace event {
event_t *create_supply_voltage_low(cluster_t *cluster);
event_t *create_supply_voltage_high(cluster_t *cluster);
event_t *create_power_missing_phase(cluster_t *cluster);
event_t *create_system_pressure_low(cluster_t *cluster);
event_t *create_system_pressure_high(cluster_t *cluster);
event_t *create_dry_running(cluster_t *cluster);
event_t *create_motor_temperature_high(cluster_t *cluster);
event_t *create_pump_motor_fatal_failure(cluster_t *cluster);
event_t *create_electronic_temperature_high(cluster_t *cluster);
event_t *create_pump_blocked(cluster_t *cluster);
event_t *create_sensor_failure(cluster_t *cluster);
event_t *create_electronic_non_fatal_failure(cluster_t *cluster);
event_t *create_electronic_fatal_failure(cluster_t *cluster);
event_t *create_general_fault(cluster_t *cluster);
event_t *create_leakage(cluster_t *cluster);
event_t *create_air_detection(cluster_t *cluster);
event_t *create_turbine_operation(cluster_t *cluster);
} // namespace event
} // namespace pump_configuration_and_control
namespace electrical_power_measurement {
namespace event {
event_t *create_measurement_period_ranges(cluster_t *cluster);
} // namespace event
} // namespace electrical_power_measurement
namespace electrical_energy_measurement {
namespace event {
event_t *create_cumulative_energy_measured(cluster_t *cluster);
event_t *create_periodic_energy_measured(cluster_t *cluster);
} // namespace event
} // namespace electrical_energy_measurement
namespace energy_evse {
namespace event {
event_t *create_ev_connected(cluster_t *cluster);
event_t *create_ev_not_detected(cluster_t *cluster);
event_t *create_energy_transfer_started(cluster_t *cluster);
event_t *create_energy_transfer_stopped(cluster_t *cluster);
event_t *create_fault(cluster_t *cluster);
event_t *create_rfid(cluster_t *cluster);
} /* event */
} /* energy_evse */
namespace valve_configuration_and_control {
namespace event {
event_t *create_valve_state_changed(cluster_t *cluster);
event_t *create_valve_fault(cluster_t *cluster);
} // namespace event
} // namespace valve_configuration_and_control
namespace device_energy_management {
namespace event {
event_t *create_power_adjust_start(cluster_t *cluster);
event_t *create_power_adjust_end(cluster_t *cluster);
event_t *create_paused(cluster_t *cluster);
event_t *create_resumed(cluster_t *cluster);
} // namespace event
} // namespace device_energy_management
namespace water_heater_management {
namespace event {
event_t *create_boost_started(cluster_t *cluster);
event_t *create_boost_ended(cluster_t *cluster);
} // namespace event
} // namespace water_heater_management
namespace commissioner_control {
namespace event {
event_t *create_commissioning_request_result(cluster_t *cluster);
} // namespace event
} // namespace commissioner_control
namespace occupancy_sensing {
namespace event {
event_t *create_occupancy_changed(cluster_t *cluster);
} // namespace event
} // namespace occupancy_sensing
namespace closure_control {
namespace event {
event_t *create_operational_error(cluster_t *cluster);
event_t *create_movement_completed(cluster_t *cluster);
event_t *create_engage_state_changed(cluster_t *cluster);
event_t *create_secure_state_changed(cluster_t *cluster);
} // namespace event
} // namespace closure_control
namespace push_av_stream_transport {
namespace event {
event_t *create_push_transport_begin(cluster_t *cluster);
event_t *create_push_transport_end(cluster_t *cluster);
} // namespace event
} // namespace push_av_stream_transport
namespace commodity_price {
namespace event {
event_t *create_price_change(cluster_t *cluster);
} // namespace event
} // namespace commodity_price
namespace electrical_grid_conditions {
namespace event {
event_t *create_current_conditions_changed(cluster_t *cluster);
} // namespace event
} // namespace electrical_grid_conditions
namespace zone_management {
namespace event {
event_t *create_zone_triggered(cluster_t *cluster);
event_t *create_zone_stopped(cluster_t *cluster);
} // namespace event
} // namespace zone_management
} // namespace cluster
} // namespace esp_matter
#include <sdkconfig.h>
#if CONFIG_ESP_MATTER_ENABLE_GENERATED_DATA_MODEL
#include "generated/clusters/all_clusters.h"
#else
#include "legacy/esp_matter_event_impl.h"
#endif
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,40 @@
// Copyright 2021 Espressif Systems (Shanghai) PTE LTD
//
// 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.
#pragma once
#define CALL_ONCE(cb) \
[](){ \
static bool is_called = false; \
if (!is_called) { \
cb(); \
is_called = true; \
} \
}
// convenience macro for checking if features is enabled or not
// must be used only from the ::create() API so that it can find config
// eg: if (has(feature::constant_pressure)) { ... }
#define has_feature(feature_name) ((feature_map & feature::feature_name::get_id()) ? 1 : 0)
#define has_attribute(attribute_name) (esp_matter::attribute::get(cluster, attribute::attribute_name::Id) != nullptr)
#define has_command(command_name, flag) (esp_matter::command::get(cluster, command::command_name::Id, flag) != nullptr)
// Macros to reduce repetitive validation code
#define VALIDATE_FEATURES_EXACT_ONE(name, ...) \
do { if (!validate_features(config->feature_flags, feature_policy::k_exact_one, name, {__VA_ARGS__})) \
return ABORT_CLUSTER_CREATE(cluster); } while(0)
#define VALIDATE_FEATURES_AT_LEAST_ONE(name, ...) \
do { if (!validate_features(config->feature_flags, feature_policy::k_at_least_one, name, {__VA_ARGS__})) \
return ABORT_CLUSTER_CREATE(cluster); } while(0)
@@ -0,0 +1,221 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#include <esp_log.h>
#include <esp_matter_core.h>
#include <esp_matter.h>
#include <app-common/zap-generated/cluster-enums.h>
#include <app-common/zap-generated/callback.h>
#include <app/InteractionModelEngine.h>
#include <zap_common/app/PluginApplicationCallbacks.h>
#include <access_control.h>
#include <access_control_ids.h>
#include <binding.h>
#include <esp_matter_data_model_priv.h>
#include <app/ClusterCallbacks.h>
using namespace chip::app::Clusters;
using chip::app::CommandHandler;
using chip::app::DataModel::Decode;
using chip::TLV::TLVReader;
using namespace esp_matter;
using namespace esp_matter::cluster;
static const char *TAG = "access_control_cluster";
constexpr uint16_t cluster_revision = 2;
namespace esp_matter {
namespace cluster {
namespace access_control {
namespace feature {
namespace extension {
uint32_t get_id()
{
return Extension::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_extension(cluster, NULL, 0, 0);
event::create_access_control_extension_changed(cluster);
return ESP_OK;
}
} /* extension */
namespace managed_device {
uint32_t get_id()
{
return ManagedDevice::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
#if CHIP_CONFIG_USE_ACCESS_RESTRICTIONS
attribute::create_commissioning_arl(cluster, NULL, 0, 0);
#endif // CHIP_CONFIG_USE_ACCESS_RESTRICTIONS
#if CHIP_CONFIG_USE_ACCESS_RESTRICTIONS
attribute::create_arl(cluster, NULL, 0, 0);
#endif // CHIP_CONFIG_USE_ACCESS_RESTRICTIONS
#if CHIP_CONFIG_USE_ACCESS_RESTRICTIONS
command::create_review_fabric_restrictions(cluster);
#endif // CHIP_CONFIG_USE_ACCESS_RESTRICTIONS
command::create_review_fabric_restrictions_response(cluster);
event::create_fabric_restriction_review_update(cluster);
return ESP_OK;
}
} /* managed_device */
} /* feature */
namespace attribute {
attribute_t *create_acl(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, ACL::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_array(value, length, count));
}
attribute_t *create_extension(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(extension), NULL);
return esp_matter::attribute::create(cluster, Extension::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_array(value, length, count));
}
attribute_t *create_subjects_per_access_control_entry(cluster_t *cluster, uint16_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, SubjectsPerAccessControlEntry::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(4), esp_matter_uint16(65534));
return attribute;
}
attribute_t *create_targets_per_access_control_entry(cluster_t *cluster, uint16_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, TargetsPerAccessControlEntry::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(3), esp_matter_uint16(65534));
return attribute;
}
attribute_t *create_access_control_entries_per_fabric(cluster_t *cluster, uint16_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, AccessControlEntriesPerFabric::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(4), esp_matter_uint16(65534));
return attribute;
}
#if CHIP_CONFIG_USE_ACCESS_RESTRICTIONS
attribute_t *create_commissioning_arl(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(managed_device), NULL);
return esp_matter::attribute::create(cluster, CommissioningARL::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_array(value, length, count));
}
#endif // CHIP_CONFIG_USE_ACCESS_RESTRICTIONS
#if CHIP_CONFIG_USE_ACCESS_RESTRICTIONS
attribute_t *create_arl(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(managed_device), NULL);
return esp_matter::attribute::create(cluster, ARL::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_array(value, length, count));
}
#endif // CHIP_CONFIG_USE_ACCESS_RESTRICTIONS
} /* attribute */
namespace command {
#if CHIP_CONFIG_USE_ACCESS_RESTRICTIONS
command_t *create_review_fabric_restrictions(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(managed_device), NULL);
return esp_matter::command::create(cluster, ReviewFabricRestrictions::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
#endif // CHIP_CONFIG_USE_ACCESS_RESTRICTIONS
command_t *create_review_fabric_restrictions_response(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(managed_device), NULL);
return esp_matter::command::create(cluster, ReviewFabricRestrictionsResponse::Id, COMMAND_FLAG_GENERATED, NULL);
}
} /* command */
namespace event {
event_t *create_access_control_entry_changed(cluster_t *cluster)
{
return esp_matter::event::create(cluster, AccessControlEntryChanged::Id);
}
event_t *create_access_control_extension_changed(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(extension), NULL);
return esp_matter::event::create(cluster, AccessControlExtensionChanged::Id);
}
event_t *create_fabric_restriction_review_update(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(managed_device), NULL);
return esp_matter::event::create(cluster, FabricRestrictionReviewUpdate::Id);
}
} /* event */
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)
{
cluster_t *cluster = esp_matter::cluster::create(endpoint, access_control::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, access_control::Id));
if (flags & CLUSTER_FLAG_SERVER) {
VerifyOrReturnValue(config != NULL, ABORT_CLUSTER_CREATE(cluster));
static const auto plugin_server_init_cb = CALL_ONCE(MatterAccessControlPluginServerInitCallback);
set_plugin_server_init_callback(cluster, plugin_server_init_cb);
add_function_list(cluster, function_list, function_flags);
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
/* Attributes not managed internally */
global::attribute::create_cluster_revision(cluster, cluster_revision);
attribute::create_subjects_per_access_control_entry(cluster, config->subjects_per_access_control_entry);
attribute::create_targets_per_access_control_entry(cluster, config->targets_per_access_control_entry);
attribute::create_access_control_entries_per_fabric(cluster, config->access_control_entries_per_fabric);
attribute::create_acl(cluster, NULL, 0, 0);
/* Events */
event::create_access_control_entry_changed(cluster);
cluster::set_init_and_shutdown_callbacks(cluster, ESPMatterAccessControlClusterServerInitCallback,
ESPMatterAccessControlClusterServerShutdownCallback);
}
return cluster;
}
} /* access_control */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,75 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace access_control {
namespace feature {
namespace extension {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* extension */
namespace managed_device {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* managed_device */
} /* feature */
namespace attribute {
attribute_t *create_acl(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_extension(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_subjects_per_access_control_entry(cluster_t *cluster, uint16_t value);
attribute_t *create_targets_per_access_control_entry(cluster_t *cluster, uint16_t value);
attribute_t *create_access_control_entries_per_fabric(cluster_t *cluster, uint16_t value);
#if CHIP_CONFIG_USE_ACCESS_RESTRICTIONS
attribute_t *create_commissioning_arl(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
#endif // CHIP_CONFIG_USE_ACCESS_RESTRICTIONS
#if CHIP_CONFIG_USE_ACCESS_RESTRICTIONS
attribute_t *create_arl(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
#endif // CHIP_CONFIG_USE_ACCESS_RESTRICTIONS
} /* attribute */
namespace command {
#if CHIP_CONFIG_USE_ACCESS_RESTRICTIONS
command_t *create_review_fabric_restrictions(cluster_t *cluster);
#endif // CHIP_CONFIG_USE_ACCESS_RESTRICTIONS
command_t *create_review_fabric_restrictions_response(cluster_t *cluster);
} /* command */
namespace event {
event_t *create_access_control_entry_changed(cluster_t *cluster);
event_t *create_access_control_extension_changed(cluster_t *cluster);
event_t *create_fabric_restriction_review_update(cluster_t *cluster);
} /* event */
typedef struct config {
uint16_t subjects_per_access_control_entry;
uint16_t targets_per_access_control_entry;
uint16_t access_control_entries_per_fabric;
config() : subjects_per_access_control_entry(4), targets_per_access_control_entry(3), access_control_entries_per_fabric(4) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* access_control */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,82 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace access_control {
inline constexpr uint32_t Id = 0x001F;
namespace feature {
namespace Extension {
inline constexpr uint32_t Id = 0x1;
} /* Extension */
namespace ManagedDevice {
inline constexpr uint32_t Id = 0x2;
} /* ManagedDevice */
} /* feature */
namespace attribute {
namespace ACL {
inline constexpr uint32_t Id = 0x0000;
} /* ACL */
namespace Extension {
inline constexpr uint32_t Id = 0x0001;
} /* Extension */
namespace SubjectsPerAccessControlEntry {
inline constexpr uint32_t Id = 0x0002;
} /* SubjectsPerAccessControlEntry */
namespace TargetsPerAccessControlEntry {
inline constexpr uint32_t Id = 0x0003;
} /* TargetsPerAccessControlEntry */
namespace AccessControlEntriesPerFabric {
inline constexpr uint32_t Id = 0x0004;
} /* AccessControlEntriesPerFabric */
namespace CommissioningARL {
inline constexpr uint32_t Id = 0x0005;
} /* CommissioningARL */
namespace ARL {
inline constexpr uint32_t Id = 0x0006;
} /* ARL */
} /* attribute */
namespace command {
namespace ReviewFabricRestrictions {
inline constexpr uint32_t Id = 0x00;
} /* ReviewFabricRestrictions */
namespace ReviewFabricRestrictionsResponse {
inline constexpr uint32_t Id = 0x01;
} /* ReviewFabricRestrictionsResponse */
} /* command */
namespace event {
namespace AccessControlEntryChanged {
inline constexpr uint32_t Id = 0x00;
} /* AccessControlEntryChanged */
namespace AccessControlExtensionChanged {
inline constexpr uint32_t Id = 0x01;
} /* AccessControlExtensionChanged */
namespace FabricRestrictionReviewUpdate {
inline constexpr uint32_t Id = 0x02;
} /* FabricRestrictionReviewUpdate */
} /* event */
} /* access_control */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,157 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#include <esp_log.h>
#include <esp_matter_core.h>
#include <esp_matter.h>
#include <app-common/zap-generated/cluster-enums.h>
#include <app-common/zap-generated/callback.h>
#include <app/InteractionModelEngine.h>
#include <zap_common/app/PluginApplicationCallbacks.h>
#include <esp_matter_delegate_callbacks.h>
#include <account_login.h>
#include <account_login_ids.h>
#include <binding.h>
#include <esp_matter_data_model_priv.h>
using namespace chip::app::Clusters;
using chip::app::CommandHandler;
using chip::app::DataModel::Decode;
using chip::TLV::TLVReader;
using namespace esp_matter;
using namespace esp_matter::cluster;
using namespace esp_matter::cluster::delegate_cb;
static const char *TAG = "account_login_cluster";
constexpr uint16_t cluster_revision = 2;
static esp_err_t esp_matter_command_callback_get_setup_pin(const ConcreteCommandPath &command_path, TLVReader &tlv_data,
void *opaque_ptr)
{
chip::app::Clusters::AccountLogin::Commands::GetSetupPIN::DecodableType command_data;
chip::app::CommandHandler *command_obj = (chip::app::CommandHandler *)opaque_ptr;
CHIP_ERROR error = command_data.Decode(tlv_data, command_obj->GetAccessingFabricIndex());
if (error == CHIP_NO_ERROR) {
emberAfAccountLoginClusterGetSetupPINCallback((CommandHandler *)opaque_ptr, command_path, command_data);
}
return ESP_OK;
}
static esp_err_t esp_matter_command_callback_login(const ConcreteCommandPath &command_path, TLVReader &tlv_data,
void *opaque_ptr)
{
chip::app::Clusters::AccountLogin::Commands::Login::DecodableType command_data;
chip::app::CommandHandler *command_obj = (chip::app::CommandHandler *)opaque_ptr;
CHIP_ERROR error = command_data.Decode(tlv_data, command_obj->GetAccessingFabricIndex());
if (error == CHIP_NO_ERROR) {
emberAfAccountLoginClusterLoginCallback((CommandHandler *)opaque_ptr, command_path, command_data);
}
return ESP_OK;
}
static esp_err_t esp_matter_command_callback_logout(const ConcreteCommandPath &command_path, TLVReader &tlv_data,
void *opaque_ptr)
{
chip::app::Clusters::AccountLogin::Commands::Logout::DecodableType command_data;
chip::app::CommandHandler *command_obj = (chip::app::CommandHandler *)opaque_ptr;
CHIP_ERROR error = command_data.Decode(tlv_data, command_obj->GetAccessingFabricIndex());
if (error == CHIP_NO_ERROR) {
emberAfAccountLoginClusterLogoutCallback((CommandHandler *)opaque_ptr, command_path, command_data);
}
return ESP_OK;
}
namespace esp_matter {
namespace cluster {
namespace account_login {
namespace command {
command_t *create_get_setup_pin(cluster_t *cluster)
{
return esp_matter::command::create(cluster, GetSetupPIN::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_get_setup_pin);
}
command_t *create_get_setup_pin_response(cluster_t *cluster)
{
return esp_matter::command::create(cluster, GetSetupPINResponse::Id, COMMAND_FLAG_GENERATED, NULL);
}
command_t *create_login(cluster_t *cluster)
{
return esp_matter::command::create(cluster, Login::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_login);
}
command_t *create_logout(cluster_t *cluster)
{
return esp_matter::command::create(cluster, Logout::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_logout);
}
} /* command */
namespace event {
event_t *create_logged_out(cluster_t *cluster)
{
return esp_matter::event::create(cluster, LoggedOut::Id);
}
} /* event */
static void create_default_binding_cluster(endpoint_t *endpoint)
{
binding::config_t config;
binding::create(endpoint, &config, CLUSTER_FLAG_SERVER);
}
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)
{
cluster_t *cluster = esp_matter::cluster::create(endpoint, account_login::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, account_login::Id));
if (flags & CLUSTER_FLAG_SERVER) {
VerifyOrReturnValue(config != NULL, ABORT_CLUSTER_CREATE(cluster));
if (config->delegate != nullptr) {
static const auto delegate_init_cb = AccountLoginDelegateInitCB;
set_delegate_and_init_callback(cluster, delegate_init_cb, config->delegate);
}
static const auto plugin_server_init_cb = CALL_ONCE(MatterAccountLoginPluginServerInitCallback);
set_plugin_server_init_callback(cluster, plugin_server_init_cb);
add_function_list(cluster, function_list, function_flags);
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
/* Attributes not managed internally */
global::attribute::create_cluster_revision(cluster, cluster_revision);
command::create_get_setup_pin(cluster);
command::create_get_setup_pin_response(cluster);
command::create_login(cluster);
command::create_logout(cluster);
}
if (flags & CLUSTER_FLAG_CLIENT) {
create_default_binding_cluster(endpoint);
}
return cluster;
}
} /* account_login */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,44 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace account_login {
namespace command {
command_t *create_get_setup_pin(cluster_t *cluster);
command_t *create_get_setup_pin_response(cluster_t *cluster);
command_t *create_login(cluster_t *cluster);
command_t *create_logout(cluster_t *cluster);
} /* command */
namespace event {
event_t *create_logged_out(cluster_t *cluster);
} /* event */
typedef struct config {
void *delegate;
config() : delegate(nullptr) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* account_login */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,49 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace account_login {
inline constexpr uint32_t Id = 0x050E;
namespace command {
namespace GetSetupPIN {
inline constexpr uint32_t Id = 0x00;
} /* GetSetupPIN */
namespace GetSetupPINResponse {
inline constexpr uint32_t Id = 0x01;
} /* GetSetupPINResponse */
namespace Login {
inline constexpr uint32_t Id = 0x02;
} /* Login */
namespace Logout {
inline constexpr uint32_t Id = 0x03;
} /* Logout */
} /* command */
namespace event {
namespace LoggedOut {
inline constexpr uint32_t Id = 0x00;
} /* LoggedOut */
} /* event */
} /* account_login */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,185 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#include <esp_log.h>
#include <esp_matter_core.h>
#include <esp_matter.h>
#include <app-common/zap-generated/cluster-enums.h>
#include <app-common/zap-generated/callback.h>
#include <app/InteractionModelEngine.h>
#include <zap_common/app/PluginApplicationCallbacks.h>
#include <esp_matter_delegate_callbacks.h>
#include <actions.h>
#include <actions_ids.h>
#include <binding.h>
#include <esp_matter_data_model_priv.h>
using namespace chip::app::Clusters;
using chip::app::CommandHandler;
using chip::app::DataModel::Decode;
using chip::TLV::TLVReader;
using namespace esp_matter;
using namespace esp_matter::cluster;
using namespace esp_matter::cluster::delegate_cb;
static const char *TAG = "actions_cluster";
constexpr uint16_t cluster_revision = 1;
namespace esp_matter {
namespace cluster {
namespace actions {
namespace attribute {
attribute_t *create_action_list(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, ActionList::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_array(value, length, count));
}
attribute_t *create_endpoint_lists(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, EndpointLists::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_array(value, length, count));
}
attribute_t *create_setup_url(cluster_t *cluster, char *value, uint16_t length)
{
VerifyOrReturnValue(length <= k_max_setup_url_length + 1, NULL, ESP_LOGE(TAG, "Could not create attribute, string length out of bound"));
return esp_matter::attribute::create(cluster, SetupURL::Id, ATTRIBUTE_FLAG_NONE, esp_matter_char_str(value, length), k_max_setup_url_length + 1);
}
} /* attribute */
namespace command {
command_t *create_instant_action(cluster_t *cluster)
{
return esp_matter::command::create(cluster, InstantAction::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_instant_action_with_transition(cluster_t *cluster)
{
return esp_matter::command::create(cluster, InstantActionWithTransition::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_start_action(cluster_t *cluster)
{
return esp_matter::command::create(cluster, StartAction::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_start_action_with_duration(cluster_t *cluster)
{
return esp_matter::command::create(cluster, StartActionWithDuration::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_stop_action(cluster_t *cluster)
{
return esp_matter::command::create(cluster, StopAction::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_pause_action(cluster_t *cluster)
{
return esp_matter::command::create(cluster, PauseAction::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_pause_action_with_duration(cluster_t *cluster)
{
return esp_matter::command::create(cluster, PauseActionWithDuration::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_resume_action(cluster_t *cluster)
{
return esp_matter::command::create(cluster, ResumeAction::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_enable_action(cluster_t *cluster)
{
return esp_matter::command::create(cluster, EnableAction::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_enable_action_with_duration(cluster_t *cluster)
{
return esp_matter::command::create(cluster, EnableActionWithDuration::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_disable_action(cluster_t *cluster)
{
return esp_matter::command::create(cluster, DisableAction::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_disable_action_with_duration(cluster_t *cluster)
{
return esp_matter::command::create(cluster, DisableActionWithDuration::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
} /* command */
namespace event {
event_t *create_state_changed(cluster_t *cluster)
{
return esp_matter::event::create(cluster, StateChanged::Id);
}
event_t *create_action_failed(cluster_t *cluster)
{
return esp_matter::event::create(cluster, ActionFailed::Id);
}
} /* event */
static void create_default_binding_cluster(endpoint_t *endpoint)
{
binding::config_t config;
binding::create(endpoint, &config, CLUSTER_FLAG_SERVER);
}
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)
{
cluster_t *cluster = esp_matter::cluster::create(endpoint, actions::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, actions::Id));
if (flags & CLUSTER_FLAG_SERVER) {
VerifyOrReturnValue(config != NULL, ABORT_CLUSTER_CREATE(cluster));
if (config->delegate != nullptr) {
static const auto delegate_init_cb = ActionsDelegateInitCB;
set_delegate_and_init_callback(cluster, delegate_init_cb, config->delegate);
}
static const auto plugin_server_init_cb = CALL_ONCE(MatterActionsPluginServerInitCallback);
set_plugin_server_init_callback(cluster, plugin_server_init_cb);
add_function_list(cluster, function_list, function_flags);
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
/* Attributes not managed internally */
global::attribute::create_cluster_revision(cluster, cluster_revision);
attribute::create_action_list(cluster, NULL, 0, 0);
attribute::create_endpoint_lists(cluster, NULL, 0, 0);
/* Events */
event::create_state_changed(cluster);
event::create_action_failed(cluster);
}
if (flags & CLUSTER_FLAG_CLIENT) {
create_default_binding_cluster(endpoint);
}
return cluster;
}
} /* actions */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,60 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace actions {
const uint16_t k_max_setup_url_length = 512u;
namespace attribute {
attribute_t *create_action_list(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_endpoint_lists(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_setup_url(cluster_t *cluster, char * value, uint16_t length);
} /* attribute */
namespace command {
command_t *create_instant_action(cluster_t *cluster);
command_t *create_instant_action_with_transition(cluster_t *cluster);
command_t *create_start_action(cluster_t *cluster);
command_t *create_start_action_with_duration(cluster_t *cluster);
command_t *create_stop_action(cluster_t *cluster);
command_t *create_pause_action(cluster_t *cluster);
command_t *create_pause_action_with_duration(cluster_t *cluster);
command_t *create_resume_action(cluster_t *cluster);
command_t *create_enable_action(cluster_t *cluster);
command_t *create_enable_action_with_duration(cluster_t *cluster);
command_t *create_disable_action(cluster_t *cluster);
command_t *create_disable_action_with_duration(cluster_t *cluster);
} /* command */
namespace event {
event_t *create_state_changed(cluster_t *cluster);
event_t *create_action_failed(cluster_t *cluster);
} /* event */
typedef struct config {
void *delegate;
config() : delegate(nullptr) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* actions */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,88 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace actions {
inline constexpr uint32_t Id = 0x0025;
namespace attribute {
namespace ActionList {
inline constexpr uint32_t Id = 0x0000;
} /* ActionList */
namespace EndpointLists {
inline constexpr uint32_t Id = 0x0001;
} /* EndpointLists */
namespace SetupURL {
inline constexpr uint32_t Id = 0x0002;
} /* SetupURL */
} /* attribute */
namespace command {
namespace InstantAction {
inline constexpr uint32_t Id = 0x00;
} /* InstantAction */
namespace InstantActionWithTransition {
inline constexpr uint32_t Id = 0x01;
} /* InstantActionWithTransition */
namespace StartAction {
inline constexpr uint32_t Id = 0x02;
} /* StartAction */
namespace StartActionWithDuration {
inline constexpr uint32_t Id = 0x03;
} /* StartActionWithDuration */
namespace StopAction {
inline constexpr uint32_t Id = 0x04;
} /* StopAction */
namespace PauseAction {
inline constexpr uint32_t Id = 0x05;
} /* PauseAction */
namespace PauseActionWithDuration {
inline constexpr uint32_t Id = 0x06;
} /* PauseActionWithDuration */
namespace ResumeAction {
inline constexpr uint32_t Id = 0x07;
} /* ResumeAction */
namespace EnableAction {
inline constexpr uint32_t Id = 0x08;
} /* EnableAction */
namespace EnableActionWithDuration {
inline constexpr uint32_t Id = 0x09;
} /* EnableActionWithDuration */
namespace DisableAction {
inline constexpr uint32_t Id = 0x0A;
} /* DisableAction */
namespace DisableActionWithDuration {
inline constexpr uint32_t Id = 0x0B;
} /* DisableActionWithDuration */
} /* command */
namespace event {
namespace StateChanged {
inline constexpr uint32_t Id = 0x00;
} /* StateChanged */
namespace ActionFailed {
inline constexpr uint32_t Id = 0x01;
} /* ActionFailed */
} /* event */
} /* actions */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,191 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#include <esp_log.h>
#include <esp_matter_core.h>
#include <esp_matter.h>
#include <app-common/zap-generated/cluster-enums.h>
#include <app-common/zap-generated/callback.h>
#include <app/InteractionModelEngine.h>
#include <zap_common/app/PluginApplicationCallbacks.h>
#include <activated_carbon_filter_monitoring.h>
#include <activated_carbon_filter_monitoring_ids.h>
#include <binding.h>
#include <esp_matter_data_model_priv.h>
#include <app/ClusterCallbacks.h>
using namespace chip::app::Clusters;
using chip::app::CommandHandler;
using chip::app::DataModel::Decode;
using chip::TLV::TLVReader;
using namespace esp_matter;
using namespace esp_matter::cluster;
static const char *TAG = "activated_carbon_filter_monitoring_cluster";
constexpr uint16_t cluster_revision = 1;
namespace esp_matter {
namespace cluster {
namespace activated_carbon_filter_monitoring {
namespace feature {
namespace condition {
uint32_t get_id()
{
return Condition::Id;
}
esp_err_t add(cluster_t *cluster, config_t *config)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
VerifyOrReturnError(config, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_condition(cluster, config->condition);
attribute::create_degradation_direction(cluster, config->degradation_direction);
return ESP_OK;
}
} /* condition */
namespace warning {
uint32_t get_id()
{
return Warning::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
return ESP_OK;
}
} /* warning */
namespace replacement_product_list {
uint32_t get_id()
{
return ReplacementProductList::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_replacement_product_list(cluster, NULL, 0, 0);
return ESP_OK;
}
} /* replacement_product_list */
} /* feature */
namespace attribute {
attribute_t *create_condition(cluster_t *cluster, uint8_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(condition), NULL);
attribute_t *attribute = esp_matter::attribute::create(cluster, Condition::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint8(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint8(0), esp_matter_uint8(254));
return attribute;
}
attribute_t *create_degradation_direction(cluster_t *cluster, uint8_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(condition), NULL);
attribute_t *attribute = esp_matter::attribute::create(cluster, DegradationDirection::Id, ATTRIBUTE_FLAG_NONE, esp_matter_enum8(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_enum8(0), esp_matter_enum8(1));
return attribute;
}
attribute_t *create_change_indication(cluster_t *cluster, uint8_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, ChangeIndication::Id, ATTRIBUTE_FLAG_NONE, esp_matter_enum8(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_enum8(0), esp_matter_enum8(2));
return attribute;
}
attribute_t *create_in_place_indicator(cluster_t *cluster, bool value)
{
return esp_matter::attribute::create(cluster, InPlaceIndicator::Id, ATTRIBUTE_FLAG_NONE, esp_matter_bool(value));
}
attribute_t *create_last_changed_time(cluster_t *cluster, nullable<uint32_t> value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, LastChangedTime::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_NULLABLE | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_nullable_uint32(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_nullable_uint32(0), esp_matter_nullable_uint32(4294967294));
return attribute;
}
attribute_t *create_replacement_product_list(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(replacement_product_list), NULL);
return esp_matter::attribute::create(cluster, ReplacementProductList::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_array(value, length, count));
}
} /* attribute */
namespace command {
command_t *create_reset_condition(cluster_t *cluster)
{
return esp_matter::command::create(cluster, ResetCondition::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
} /* command */
static void create_default_binding_cluster(endpoint_t *endpoint)
{
binding::config_t config;
binding::create(endpoint, &config, CLUSTER_FLAG_SERVER);
}
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)
{
cluster_t *cluster = esp_matter::cluster::create(endpoint, activated_carbon_filter_monitoring::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, activated_carbon_filter_monitoring::Id));
if (flags & CLUSTER_FLAG_SERVER) {
VerifyOrReturnValue(config != NULL, ABORT_CLUSTER_CREATE(cluster));
static const auto plugin_server_init_cb = CALL_ONCE(MatterActivatedCarbonFilterMonitoringPluginServerInitCallback);
set_plugin_server_init_callback(cluster, plugin_server_init_cb);
add_function_list(cluster, function_list, function_flags);
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
/* Attributes not managed internally */
global::attribute::create_cluster_revision(cluster, cluster_revision);
attribute::create_change_indication(cluster, config->change_indication);
cluster::set_init_and_shutdown_callbacks(cluster, ESPMatterActivatedCarbonFilterMonitoringClusterServerInitCallback,
ESPMatterActivatedCarbonFilterMonitoringClusterServerShutdownCallback);
}
if (flags & CLUSTER_FLAG_CLIENT) {
create_default_binding_cluster(endpoint);
}
return cluster;
}
} /* activated_carbon_filter_monitoring */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,69 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace activated_carbon_filter_monitoring {
namespace feature {
namespace condition {
typedef struct config {
uint8_t condition;
uint8_t degradation_direction;
config() : condition(0), degradation_direction(0) {}
} config_t;
uint32_t get_id();
esp_err_t add(cluster_t *cluster, config_t *config);
} /* condition */
namespace warning {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* warning */
namespace replacement_product_list {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* replacement_product_list */
} /* feature */
namespace attribute {
attribute_t *create_condition(cluster_t *cluster, uint8_t value);
attribute_t *create_degradation_direction(cluster_t *cluster, uint8_t value);
attribute_t *create_change_indication(cluster_t *cluster, uint8_t value);
attribute_t *create_in_place_indicator(cluster_t *cluster, bool value);
attribute_t *create_last_changed_time(cluster_t *cluster, nullable<uint32_t> value);
attribute_t *create_replacement_product_list(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
} /* attribute */
namespace command {
command_t *create_reset_condition(cluster_t *cluster);
} /* command */
typedef struct config {
uint8_t change_indication;
config() : change_indication(0) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* activated_carbon_filter_monitoring */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,67 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace activated_carbon_filter_monitoring {
inline constexpr uint32_t Id = 0x0072;
namespace feature {
namespace Condition {
inline constexpr uint32_t Id = 0x1;
} /* Condition */
namespace Warning {
inline constexpr uint32_t Id = 0x2;
} /* Warning */
namespace ReplacementProductList {
inline constexpr uint32_t Id = 0x4;
} /* ReplacementProductList */
} /* feature */
namespace attribute {
namespace Condition {
inline constexpr uint32_t Id = 0x0000;
} /* Condition */
namespace DegradationDirection {
inline constexpr uint32_t Id = 0x0001;
} /* DegradationDirection */
namespace ChangeIndication {
inline constexpr uint32_t Id = 0x0002;
} /* ChangeIndication */
namespace InPlaceIndicator {
inline constexpr uint32_t Id = 0x0003;
} /* InPlaceIndicator */
namespace LastChangedTime {
inline constexpr uint32_t Id = 0x0004;
} /* LastChangedTime */
namespace ReplacementProductList {
inline constexpr uint32_t Id = 0x0005;
} /* ReplacementProductList */
} /* attribute */
namespace command {
namespace ResetCondition {
inline constexpr uint32_t Id = 0x00;
} /* ResetCondition */
} /* command */
} /* activated_carbon_filter_monitoring */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,142 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#include <esp_log.h>
#include <esp_matter_core.h>
#include <esp_matter.h>
#include <app-common/zap-generated/cluster-enums.h>
#include <app-common/zap-generated/callback.h>
#include <app/InteractionModelEngine.h>
#include <zap_common/app/PluginApplicationCallbacks.h>
#include <administrator_commissioning.h>
#include <administrator_commissioning_ids.h>
#include <binding.h>
#include <esp_matter_data_model_priv.h>
#include <app/ClusterCallbacks.h>
using namespace chip::app::Clusters;
using chip::app::CommandHandler;
using chip::app::DataModel::Decode;
using chip::TLV::TLVReader;
using namespace esp_matter;
using namespace esp_matter::cluster;
static const char *TAG = "administrator_commissioning_cluster";
constexpr uint16_t cluster_revision = 1;
namespace esp_matter {
namespace cluster {
namespace administrator_commissioning {
namespace feature {
namespace basic {
uint32_t get_id()
{
return Basic::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
command::create_open_basic_commissioning_window(cluster);
return ESP_OK;
}
} /* basic */
} /* feature */
namespace attribute {
attribute_t *create_window_status(cluster_t *cluster, uint8_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, WindowStatus::Id, ATTRIBUTE_FLAG_NONE, esp_matter_enum8(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_enum8(0), esp_matter_enum8(2));
return attribute;
}
attribute_t *create_admin_fabric_index(cluster_t *cluster, nullable<uint8_t> value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, AdminFabricIndex::Id, ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint8(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_nullable_uint8(0), esp_matter_nullable_uint8(254));
return attribute;
}
attribute_t *create_admin_vendor_id(cluster_t *cluster, nullable<uint16_t> value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, AdminVendorId::Id, ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_nullable_uint16(0), esp_matter_nullable_uint16(65534));
return attribute;
}
} /* attribute */
namespace command {
command_t *create_open_commissioning_window(cluster_t *cluster)
{
return esp_matter::command::create(cluster, OpenCommissioningWindow::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_open_basic_commissioning_window(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(basic), NULL);
return esp_matter::command::create(cluster, OpenBasicCommissioningWindow::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_revoke_commissioning(cluster_t *cluster)
{
return esp_matter::command::create(cluster, RevokeCommissioning::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
} /* command */
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)
{
cluster_t *cluster = esp_matter::cluster::create(endpoint, administrator_commissioning::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, administrator_commissioning::Id));
if (flags & CLUSTER_FLAG_SERVER) {
VerifyOrReturnValue(config != NULL, ABORT_CLUSTER_CREATE(cluster));
static const auto plugin_server_init_cb = CALL_ONCE(MatterAdministratorCommissioningPluginServerInitCallback);
set_plugin_server_init_callback(cluster, plugin_server_init_cb);
add_function_list(cluster, function_list, function_flags);
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
/* Attributes not managed internally */
global::attribute::create_cluster_revision(cluster, cluster_revision);
attribute::create_window_status(cluster, config->window_status);
attribute::create_admin_fabric_index(cluster, config->admin_fabric_index);
attribute::create_admin_vendor_id(cluster, config->admin_vendor_id);
command::create_open_commissioning_window(cluster);
command::create_revoke_commissioning(cluster);
cluster::set_init_and_shutdown_callbacks(cluster, ESPMatterAdministratorCommissioningClusterServerInitCallback,
ESPMatterAdministratorCommissioningClusterServerShutdownCallback);
}
return cluster;
}
} /* administrator_commissioning */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,55 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace administrator_commissioning {
namespace feature {
namespace basic {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* basic */
} /* feature */
namespace attribute {
attribute_t *create_window_status(cluster_t *cluster, uint8_t value);
attribute_t *create_admin_fabric_index(cluster_t *cluster, nullable<uint8_t> value);
attribute_t *create_admin_vendor_id(cluster_t *cluster, nullable<uint16_t> value);
} /* attribute */
namespace command {
command_t *create_open_commissioning_window(cluster_t *cluster);
command_t *create_open_basic_commissioning_window(cluster_t *cluster);
command_t *create_revoke_commissioning(cluster_t *cluster);
} /* command */
typedef struct config {
uint8_t window_status;
nullable<uint8_t> admin_fabric_index;
nullable<uint16_t> admin_vendor_id;
config() : window_status(0), admin_fabric_index(0), admin_vendor_id(0) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* administrator_commissioning */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,58 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace administrator_commissioning {
inline constexpr uint32_t Id = 0x003C;
namespace feature {
namespace Basic {
inline constexpr uint32_t Id = 0x1;
} /* Basic */
} /* feature */
namespace attribute {
namespace WindowStatus {
inline constexpr uint32_t Id = 0x0000;
} /* WindowStatus */
namespace AdminFabricIndex {
inline constexpr uint32_t Id = 0x0001;
} /* AdminFabricIndex */
namespace AdminVendorId {
inline constexpr uint32_t Id = 0x0002;
} /* AdminVendorId */
} /* attribute */
namespace command {
namespace OpenCommissioningWindow {
inline constexpr uint32_t Id = 0x00;
} /* OpenCommissioningWindow */
namespace OpenBasicCommissioningWindow {
inline constexpr uint32_t Id = 0x01;
} /* OpenBasicCommissioningWindow */
namespace RevokeCommissioning {
inline constexpr uint32_t Id = 0x02;
} /* RevokeCommissioning */
} /* command */
} /* administrator_commissioning */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,154 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#include <esp_log.h>
#include <esp_matter_core.h>
#include <esp_matter.h>
#include <app-common/zap-generated/cluster-enums.h>
#include <app-common/zap-generated/callback.h>
#include <app/InteractionModelEngine.h>
#include <zap_common/app/PluginApplicationCallbacks.h>
#include <air_quality.h>
#include <air_quality_ids.h>
#include <binding.h>
#include <esp_matter_data_model_priv.h>
using namespace chip::app::Clusters;
using chip::app::CommandHandler;
using chip::app::DataModel::Decode;
using chip::TLV::TLVReader;
using namespace esp_matter;
using namespace esp_matter::cluster;
static const char *TAG = "air_quality_cluster";
constexpr uint16_t cluster_revision = 1;
namespace esp_matter {
namespace cluster {
namespace air_quality {
namespace feature {
namespace fair {
uint32_t get_id()
{
return Fair::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
return ESP_OK;
}
} /* fair */
namespace moderate {
uint32_t get_id()
{
return Moderate::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
return ESP_OK;
}
} /* moderate */
namespace very_poor {
uint32_t get_id()
{
return VeryPoor::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
return ESP_OK;
}
} /* very_poor */
namespace extremely_poor {
uint32_t get_id()
{
return ExtremelyPoor::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
return ESP_OK;
}
} /* extremely_poor */
} /* feature */
namespace attribute {
attribute_t *create_air_quality(cluster_t *cluster, uint8_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, AirQuality::Id, ATTRIBUTE_FLAG_NONE, esp_matter_enum8(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_enum8(0), esp_matter_enum8(6));
return attribute;
}
} /* attribute */
static void create_default_binding_cluster(endpoint_t *endpoint)
{
binding::config_t config;
binding::create(endpoint, &config, CLUSTER_FLAG_SERVER);
}
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)
{
cluster_t *cluster = esp_matter::cluster::create(endpoint, air_quality::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, air_quality::Id));
if (flags & CLUSTER_FLAG_SERVER) {
VerifyOrReturnValue(config != NULL, ABORT_CLUSTER_CREATE(cluster));
static const auto plugin_server_init_cb = CALL_ONCE(MatterAirQualityPluginServerInitCallback);
set_plugin_server_init_callback(cluster, plugin_server_init_cb);
add_function_list(cluster, function_list, function_flags);
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
/* Attributes not managed internally */
global::attribute::create_cluster_revision(cluster, cluster_revision);
attribute::create_air_quality(cluster, config->air_quality);
}
if (flags & CLUSTER_FLAG_CLIENT) {
create_default_binding_cluster(endpoint);
}
return cluster;
}
} /* air_quality */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,60 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace air_quality {
namespace feature {
namespace fair {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* fair */
namespace moderate {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* moderate */
namespace very_poor {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* very_poor */
namespace extremely_poor {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* extremely_poor */
} /* feature */
namespace attribute {
attribute_t *create_air_quality(cluster_t *cluster, uint8_t value);
} /* attribute */
typedef struct config {
uint8_t air_quality;
config() : air_quality(0) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* air_quality */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,49 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace air_quality {
inline constexpr uint32_t Id = 0x005B;
namespace feature {
namespace Fair {
inline constexpr uint32_t Id = 0x1;
} /* Fair */
namespace Moderate {
inline constexpr uint32_t Id = 0x2;
} /* Moderate */
namespace VeryPoor {
inline constexpr uint32_t Id = 0x4;
} /* VeryPoor */
namespace ExtremelyPoor {
inline constexpr uint32_t Id = 0x8;
} /* ExtremelyPoor */
} /* feature */
namespace attribute {
namespace AirQuality {
inline constexpr uint32_t Id = 0x0000;
} /* AirQuality */
} /* attribute */
} /* air_quality */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,122 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#include <esp_log.h>
#include <esp_matter_core.h>
#include <esp_matter.h>
#include <app-common/zap-generated/cluster-enums.h>
#include <app-common/zap-generated/callback.h>
#include <app/InteractionModelEngine.h>
#include <zap_common/app/PluginApplicationCallbacks.h>
#include <alarm_base.h>
#include <alarm_base_ids.h>
#include <binding.h>
#include <esp_matter_data_model_priv.h>
using namespace chip::app::Clusters;
using chip::app::CommandHandler;
using chip::app::DataModel::Decode;
using chip::TLV::TLVReader;
using namespace esp_matter;
using namespace esp_matter::cluster;
static const char *TAG = "alarm_base_cluster";
constexpr uint16_t cluster_revision = 2;
namespace esp_matter {
namespace cluster {
namespace alarm_base {
namespace feature {
namespace reset {
uint32_t get_id()
{
return Reset::Id;
}
esp_err_t add(cluster_t *cluster, config_t *config)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
VerifyOrReturnError(config, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_latch(cluster, config->latch);
command::create_reset(cluster);
return ESP_OK;
}
} /* reset */
} /* feature */
namespace attribute {
attribute_t *create_mask(cluster_t *cluster, uint32_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, Mask::Id, ATTRIBUTE_FLAG_NONE, esp_matter_bitmap32(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_bitmap32(0), esp_matter_bitmap32(4294967295));
return attribute;
}
attribute_t *create_latch(cluster_t *cluster, uint32_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(reset), NULL);
attribute_t *attribute = esp_matter::attribute::create(cluster, Latch::Id, ATTRIBUTE_FLAG_NONE, esp_matter_bitmap32(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_bitmap32(0), esp_matter_bitmap32(4294967295));
return attribute;
}
attribute_t *create_state(cluster_t *cluster, uint32_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, State::Id, ATTRIBUTE_FLAG_NONE, esp_matter_bitmap32(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_bitmap32(0), esp_matter_bitmap32(4294967295));
return attribute;
}
attribute_t *create_supported(cluster_t *cluster, uint32_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, Supported::Id, ATTRIBUTE_FLAG_NONE, esp_matter_bitmap32(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_bitmap32(0), esp_matter_bitmap32(4294967295));
return attribute;
}
} /* attribute */
namespace command {
command_t *create_reset(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(reset), NULL);
return esp_matter::command::create(cluster, Reset::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_modify_enabled_alarms(cluster_t *cluster)
{
return esp_matter::command::create(cluster, ModifyEnabledAlarms::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
} /* command */
namespace event {
event_t *create_notify(cluster_t *cluster)
{
return esp_matter::event::create(cluster, Notify::Id);
}
} /* event */
} /* alarm_base */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,54 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace alarm_base {
namespace feature {
namespace reset {
typedef struct config {
uint32_t latch;
config() : latch(0) {}
} config_t;
uint32_t get_id();
esp_err_t add(cluster_t *cluster, config_t *config);
} /* reset */
} /* feature */
namespace attribute {
attribute_t *create_mask(cluster_t *cluster, uint32_t value);
attribute_t *create_latch(cluster_t *cluster, uint32_t value);
attribute_t *create_state(cluster_t *cluster, uint32_t value);
attribute_t *create_supported(cluster_t *cluster, uint32_t value);
} /* attribute */
namespace command {
command_t *create_reset(cluster_t *cluster);
command_t *create_modify_enabled_alarms(cluster_t *cluster);
} /* command */
namespace event {
event_t *create_notify(cluster_t *cluster);
} /* event */
} /* alarm_base */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,64 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace alarm_base {
inline constexpr uint32_t Id = 0xffff;
namespace feature {
namespace Reset {
inline constexpr uint32_t Id = 0x1;
} /* Reset */
} /* feature */
namespace attribute {
namespace Mask {
inline constexpr uint32_t Id = 0x0000;
} /* Mask */
namespace Latch {
inline constexpr uint32_t Id = 0x0001;
} /* Latch */
namespace State {
inline constexpr uint32_t Id = 0x0002;
} /* State */
namespace Supported {
inline constexpr uint32_t Id = 0x0003;
} /* Supported */
} /* attribute */
namespace command {
namespace Reset {
inline constexpr uint32_t Id = 0x00;
} /* Reset */
namespace ModifyEnabledAlarms {
inline constexpr uint32_t Id = 0x01;
} /* ModifyEnabledAlarms */
} /* command */
namespace event {
namespace Notify {
inline constexpr uint32_t Id = 0x00;
} /* Notify */
} /* event */
} /* alarm_base */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,152 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include "access_control.h"
#include "account_login.h"
#include "actions.h"
#include "activated_carbon_filter_monitoring.h"
#include "administrator_commissioning.h"
#include "air_quality.h"
#include "alarm_base.h"
#include "application_basic.h"
#include "application_launcher.h"
#include "audio_output.h"
#include "basic_information.h"
#include "binding.h"
#include "boolean_state.h"
#include "boolean_state_configuration.h"
#include "bridged_device_basic_information.h"
#include "camera_av_settings_user_level_management.h"
#include "camera_av_stream_management.h"
#include "carbon_dioxide_concentration_measurement.h"
#include "carbon_monoxide_concentration_measurement.h"
#include "channel.h"
#include "chime.h"
#include "closure_control.h"
#include "closure_dimension.h"
#include "color_control.h"
#include "commissioner_control.h"
#include "commodity_metering.h"
#include "commodity_price.h"
#include "commodity_tariff.h"
#include "content_app_observer.h"
#include "content_control.h"
#include "content_launcher.h"
#include "descriptor.h"
#include "device_energy_management.h"
#include "device_energy_management_mode.h"
#include "diagnostic_logs.h"
#include "dish_washer_alarm.h"
#include "dish_washer_mode.h"
#include "door_lock.h"
#include "ecosystem_information.h"
#include "electrical_energy_measurement.h"
#include "electrical_grid_conditions.h"
#include "electrical_power_measurement.h"
#include "energy_evse.h"
#include "energy_evse_mode.h"
#include "energy_preference.h"
#include "ethernet_network_diagnostics.h"
#include "fan_control.h"
#include "fixed_label.h"
#include "flow_measurement.h"
#include "formaldehyde_concentration_measurement.h"
#include "general_commissioning.h"
#include "general_diagnostics.h"
#include "group_key_management.h"
#include "groups.h"
#include "hepa_filter_monitoring.h"
#include "icd_management.h"
#include "identify.h"
#include "illuminance_measurement.h"
#include "joint_fabric_administrator.h"
#include "joint_fabric_datastore.h"
#include "keypad_input.h"
#include "label.h"
#include "laundry_dryer_controls.h"
#include "laundry_washer_controls.h"
#include "laundry_washer_mode.h"
#include "level_control.h"
#include "localization_configuration.h"
#include "low_power.h"
#include "media_input.h"
#include "media_playback.h"
#include "messages.h"
#include "meter_identification.h"
#include "microwave_oven_control.h"
#include "microwave_oven_mode.h"
#include "mode_base.h"
#include "mode_select.h"
#include "network_commissioning.h"
#include "nitrogen_dioxide_concentration_measurement.h"
#include "occupancy_sensing.h"
#include "on_off.h"
#include "operational_credentials.h"
#include "operational_state.h"
#include "ota_software_update_provider.h"
#include "ota_software_update_requestor.h"
#include "oven_cavity_operational_state.h"
#include "oven_mode.h"
#include "ozone_concentration_measurement.h"
#include "pm10_concentration_measurement.h"
#include "pm1_concentration_measurement.h"
#include "pm2_5_concentration_measurement.h"
#include "power_source.h"
#include "power_source_configuration.h"
#include "power_topology.h"
#include "pressure_measurement.h"
#include "pump_configuration_and_control.h"
#include "push_av_stream_transport.h"
#include "radon_concentration_measurement.h"
#include "refrigerator_alarm.h"
#include "refrigerator_and_temperature_controlled_cabinet_mode.h"
#include "relative_humidity_measurement.h"
#include "rvc_clean_mode.h"
#include "rvc_operational_state.h"
#include "rvc_run_mode.h"
#include "scenes_management.h"
#include "service_area.h"
#include "smoke_co_alarm.h"
#include "software_diagnostics.h"
#include "soil_measurement.h"
#include "switch_cluster.h"
#include "target_navigator.h"
#include "temperature_control.h"
#include "temperature_measurement.h"
#include "thermostat.h"
#include "thermostat_user_interface_configuration.h"
#include "thread_border_router_management.h"
#include "thread_network_diagnostics.h"
#include "thread_network_directory.h"
#include "time_format_localization.h"
#include "time_synchronization.h"
#include "tls_certificate_management.h"
#include "tls_client_management.h"
#include "total_volatile_organic_compounds_concentration_measurement.h"
#include "unit_localization.h"
#include "user_label.h"
#include "valve_configuration_and_control.h"
#include "wake_on_lan.h"
#include "water_heater_management.h"
#include "water_heater_mode.h"
#include "water_tank_level_monitoring.h"
#include "webrtc_transport_provider.h"
#include "webrtc_transport_requestor.h"
#include "wi_fi_network_diagnostics.h"
#include "wi_fi_network_management.h"
#include "window_covering.h"
#include "zone_management.h"
@@ -0,0 +1,134 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#include <esp_log.h>
#include <esp_matter_core.h>
#include <esp_matter.h>
#include <app-common/zap-generated/cluster-enums.h>
#include <app-common/zap-generated/callback.h>
#include <app/InteractionModelEngine.h>
#include <zap_common/app/PluginApplicationCallbacks.h>
#include <esp_matter_delegate_callbacks.h>
#include <application_basic.h>
#include <application_basic_ids.h>
#include <binding.h>
#include <esp_matter_data_model_priv.h>
using namespace chip::app::Clusters;
using chip::app::CommandHandler;
using chip::app::DataModel::Decode;
using chip::TLV::TLVReader;
using namespace esp_matter;
using namespace esp_matter::cluster;
using namespace esp_matter::cluster::delegate_cb;
static const char *TAG = "application_basic_cluster";
constexpr uint16_t cluster_revision = 1;
namespace esp_matter {
namespace cluster {
namespace application_basic {
namespace attribute {
attribute_t *create_vendor_name(cluster_t *cluster, char *value, uint16_t length)
{
return esp_matter::attribute::create(cluster, VendorName::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_char_str(value, length));
}
attribute_t *create_vendor_id(cluster_t *cluster, uint16_t value)
{
return esp_matter::attribute::create(cluster, VendorID::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint16(value));
}
attribute_t *create_application_name(cluster_t *cluster, char *value, uint16_t length)
{
return esp_matter::attribute::create(cluster, ApplicationName::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_char_str(value, length));
}
attribute_t *create_product_id(cluster_t *cluster, uint16_t value)
{
return esp_matter::attribute::create(cluster, ProductID::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint16(value));
}
attribute_t *create_application(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, Application::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_array(value, length, count));
}
attribute_t *create_status(cluster_t *cluster, uint8_t value)
{
return esp_matter::attribute::create(cluster, Status::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_enum8(value));
}
attribute_t *create_application_version(cluster_t *cluster, char *value, uint16_t length)
{
return esp_matter::attribute::create(cluster, ApplicationVersion::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_char_str(value, length));
}
attribute_t *create_allowed_vendor_list(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, AllowedVendorList::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_array(value, length, count));
}
} /* attribute */
static void create_default_binding_cluster(endpoint_t *endpoint)
{
binding::config_t config;
binding::create(endpoint, &config, CLUSTER_FLAG_SERVER);
}
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)
{
cluster_t *cluster = esp_matter::cluster::create(endpoint, application_basic::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, application_basic::Id));
if (flags & CLUSTER_FLAG_SERVER) {
VerifyOrReturnValue(config != NULL, ABORT_CLUSTER_CREATE(cluster));
if (config->delegate != nullptr) {
static const auto delegate_init_cb = ApplicationBasicDelegateInitCB;
set_delegate_and_init_callback(cluster, delegate_init_cb, config->delegate);
}
static const auto plugin_server_init_cb = CALL_ONCE(MatterApplicationBasicPluginServerInitCallback);
set_plugin_server_init_callback(cluster, plugin_server_init_cb);
add_function_list(cluster, function_list, function_flags);
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
/* Attributes not managed internally */
global::attribute::create_cluster_revision(cluster, cluster_revision);
attribute::create_application_name(cluster, NULL, 0);
attribute::create_application(cluster, NULL, 0, 0);
attribute::create_status(cluster, 0);
attribute::create_application_version(cluster, NULL, 0);
attribute::create_allowed_vendor_list(cluster, NULL, 0, 0);
}
if (flags & CLUSTER_FLAG_CLIENT) {
create_default_binding_cluster(endpoint);
}
return cluster;
}
} /* application_basic */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,44 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace application_basic {
namespace attribute {
attribute_t *create_vendor_name(cluster_t *cluster, char * value, uint16_t length);
attribute_t *create_vendor_id(cluster_t *cluster, uint16_t value);
attribute_t *create_application_name(cluster_t *cluster, char * value, uint16_t length);
attribute_t *create_product_id(cluster_t *cluster, uint16_t value);
attribute_t *create_application(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_status(cluster_t *cluster, uint8_t value);
attribute_t *create_application_version(cluster_t *cluster, char * value, uint16_t length);
attribute_t *create_allowed_vendor_list(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
} /* attribute */
typedef struct config {
void *delegate;
config() : delegate(nullptr) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* application_basic */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,55 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace application_basic {
inline constexpr uint32_t Id = 0x050D;
namespace attribute {
namespace VendorName {
inline constexpr uint32_t Id = 0x0000;
} /* VendorName */
namespace VendorID {
inline constexpr uint32_t Id = 0x0001;
} /* VendorID */
namespace ApplicationName {
inline constexpr uint32_t Id = 0x0002;
} /* ApplicationName */
namespace ProductID {
inline constexpr uint32_t Id = 0x0003;
} /* ProductID */
namespace Application {
inline constexpr uint32_t Id = 0x0004;
} /* Application */
namespace Status {
inline constexpr uint32_t Id = 0x0005;
} /* Status */
namespace ApplicationVersion {
inline constexpr uint32_t Id = 0x0006;
} /* ApplicationVersion */
namespace AllowedVendorList {
inline constexpr uint32_t Id = 0x0007;
} /* AllowedVendorList */
} /* attribute */
} /* application_basic */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,179 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#include <esp_log.h>
#include <esp_matter_core.h>
#include <esp_matter.h>
#include <app-common/zap-generated/cluster-enums.h>
#include <app-common/zap-generated/callback.h>
#include <app/InteractionModelEngine.h>
#include <zap_common/app/PluginApplicationCallbacks.h>
#include <esp_matter_delegate_callbacks.h>
#include <application_launcher.h>
#include <application_launcher_ids.h>
#include <binding.h>
#include <esp_matter_data_model_priv.h>
using namespace chip::app::Clusters;
using chip::app::CommandHandler;
using chip::app::DataModel::Decode;
using chip::TLV::TLVReader;
using namespace esp_matter;
using namespace esp_matter::cluster;
using namespace esp_matter::cluster::delegate_cb;
static const char *TAG = "application_launcher_cluster";
constexpr uint16_t cluster_revision = 2;
static esp_err_t esp_matter_command_callback_launch_app(const ConcreteCommandPath &command_path, TLVReader &tlv_data,
void *opaque_ptr)
{
chip::app::Clusters::ApplicationLauncher::Commands::LaunchApp::DecodableType command_data;
CHIP_ERROR error = Decode(tlv_data, command_data);
if (error == CHIP_NO_ERROR) {
emberAfApplicationLauncherClusterLaunchAppCallback((CommandHandler *)opaque_ptr, command_path, command_data);
}
return ESP_OK;
}
static esp_err_t esp_matter_command_callback_stop_app(const ConcreteCommandPath &command_path, TLVReader &tlv_data,
void *opaque_ptr)
{
chip::app::Clusters::ApplicationLauncher::Commands::StopApp::DecodableType command_data;
CHIP_ERROR error = Decode(tlv_data, command_data);
if (error == CHIP_NO_ERROR) {
emberAfApplicationLauncherClusterStopAppCallback((CommandHandler *)opaque_ptr, command_path, command_data);
}
return ESP_OK;
}
static esp_err_t esp_matter_command_callback_hide_app(const ConcreteCommandPath &command_path, TLVReader &tlv_data,
void *opaque_ptr)
{
chip::app::Clusters::ApplicationLauncher::Commands::HideApp::DecodableType command_data;
CHIP_ERROR error = Decode(tlv_data, command_data);
if (error == CHIP_NO_ERROR) {
emberAfApplicationLauncherClusterHideAppCallback((CommandHandler *)opaque_ptr, command_path, command_data);
}
return ESP_OK;
}
namespace esp_matter {
namespace cluster {
namespace application_launcher {
namespace feature {
namespace application_platform {
uint32_t get_id()
{
return ApplicationPlatform::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_catalog_list(cluster, NULL, 0, 0);
return ESP_OK;
}
} /* application_platform */
} /* feature */
namespace attribute {
attribute_t *create_catalog_list(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(application_platform), NULL);
return esp_matter::attribute::create(cluster, CatalogList::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_array(value, length, count));
}
attribute_t *create_current_app(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, CurrentApp::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_array(value, length, count));
}
} /* attribute */
namespace command {
command_t *create_launch_app(cluster_t *cluster)
{
return esp_matter::command::create(cluster, LaunchApp::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_launch_app);
}
command_t *create_stop_app(cluster_t *cluster)
{
return esp_matter::command::create(cluster, StopApp::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_stop_app);
}
command_t *create_hide_app(cluster_t *cluster)
{
return esp_matter::command::create(cluster, HideApp::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_hide_app);
}
command_t *create_launcher_response(cluster_t *cluster)
{
return esp_matter::command::create(cluster, LauncherResponse::Id, COMMAND_FLAG_GENERATED, NULL);
}
} /* command */
static void create_default_binding_cluster(endpoint_t *endpoint)
{
binding::config_t config;
binding::create(endpoint, &config, CLUSTER_FLAG_SERVER);
}
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)
{
cluster_t *cluster = esp_matter::cluster::create(endpoint, application_launcher::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, application_launcher::Id));
if (flags & CLUSTER_FLAG_SERVER) {
VerifyOrReturnValue(config != NULL, ABORT_CLUSTER_CREATE(cluster));
if (config->delegate != nullptr) {
static const auto delegate_init_cb = ApplicationLauncherDelegateInitCB;
set_delegate_and_init_callback(cluster, delegate_init_cb, config->delegate);
}
static const auto plugin_server_init_cb = CALL_ONCE(MatterApplicationLauncherPluginServerInitCallback);
set_plugin_server_init_callback(cluster, plugin_server_init_cb);
add_function_list(cluster, function_list, function_flags);
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
/* Attributes not managed internally */
global::attribute::create_cluster_revision(cluster, cluster_revision);
command::create_launch_app(cluster);
command::create_stop_app(cluster);
command::create_hide_app(cluster);
command::create_launcher_response(cluster);
}
if (flags & CLUSTER_FLAG_CLIENT) {
create_default_binding_cluster(endpoint);
}
return cluster;
}
} /* application_launcher */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,53 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace application_launcher {
namespace feature {
namespace application_platform {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* application_platform */
} /* feature */
namespace attribute {
attribute_t *create_catalog_list(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_current_app(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
} /* attribute */
namespace command {
command_t *create_launch_app(cluster_t *cluster);
command_t *create_stop_app(cluster_t *cluster);
command_t *create_hide_app(cluster_t *cluster);
command_t *create_launcher_response(cluster_t *cluster);
} /* command */
typedef struct config {
void *delegate;
config() : delegate(nullptr) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* application_launcher */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,58 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace application_launcher {
inline constexpr uint32_t Id = 0x050C;
namespace feature {
namespace ApplicationPlatform {
inline constexpr uint32_t Id = 0x1;
} /* ApplicationPlatform */
} /* feature */
namespace attribute {
namespace CatalogList {
inline constexpr uint32_t Id = 0x0000;
} /* CatalogList */
namespace CurrentApp {
inline constexpr uint32_t Id = 0x0001;
} /* CurrentApp */
} /* attribute */
namespace command {
namespace LaunchApp {
inline constexpr uint32_t Id = 0x00;
} /* LaunchApp */
namespace StopApp {
inline constexpr uint32_t Id = 0x01;
} /* StopApp */
namespace HideApp {
inline constexpr uint32_t Id = 0x02;
} /* HideApp */
namespace LauncherResponse {
inline constexpr uint32_t Id = 0x03;
} /* LauncherResponse */
} /* command */
} /* application_launcher */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,157 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#include <esp_log.h>
#include <esp_matter_core.h>
#include <esp_matter.h>
#include <app-common/zap-generated/cluster-enums.h>
#include <app-common/zap-generated/callback.h>
#include <app/InteractionModelEngine.h>
#include <zap_common/app/PluginApplicationCallbacks.h>
#include <esp_matter_delegate_callbacks.h>
#include <audio_output.h>
#include <audio_output_ids.h>
#include <binding.h>
#include <esp_matter_data_model_priv.h>
using namespace chip::app::Clusters;
using chip::app::CommandHandler;
using chip::app::DataModel::Decode;
using chip::TLV::TLVReader;
using namespace esp_matter;
using namespace esp_matter::cluster;
using namespace esp_matter::cluster::delegate_cb;
static const char *TAG = "audio_output_cluster";
constexpr uint16_t cluster_revision = 1;
static esp_err_t esp_matter_command_callback_select_output(const ConcreteCommandPath &command_path, TLVReader &tlv_data,
void *opaque_ptr)
{
chip::app::Clusters::AudioOutput::Commands::SelectOutput::DecodableType command_data;
CHIP_ERROR error = Decode(tlv_data, command_data);
if (error == CHIP_NO_ERROR) {
emberAfAudioOutputClusterSelectOutputCallback((CommandHandler *)opaque_ptr, command_path, command_data);
}
return ESP_OK;
}
static esp_err_t esp_matter_command_callback_rename_output(const ConcreteCommandPath &command_path, TLVReader &tlv_data,
void *opaque_ptr)
{
chip::app::Clusters::AudioOutput::Commands::RenameOutput::DecodableType command_data;
CHIP_ERROR error = Decode(tlv_data, command_data);
if (error == CHIP_NO_ERROR) {
emberAfAudioOutputClusterRenameOutputCallback((CommandHandler *)opaque_ptr, command_path, command_data);
}
return ESP_OK;
}
namespace esp_matter {
namespace cluster {
namespace audio_output {
namespace feature {
namespace name_updates {
uint32_t get_id()
{
return NameUpdates::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
command::create_rename_output(cluster);
return ESP_OK;
}
} /* name_updates */
} /* feature */
namespace attribute {
attribute_t *create_output_list(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, OutputList::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_array(value, length, count));
}
attribute_t *create_current_output(cluster_t *cluster, uint8_t value)
{
return esp_matter::attribute::create(cluster, CurrentOutput::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint8(value));
}
} /* attribute */
namespace command {
command_t *create_select_output(cluster_t *cluster)
{
return esp_matter::command::create(cluster, SelectOutput::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_select_output);
}
command_t *create_rename_output(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(name_updates), NULL);
return esp_matter::command::create(cluster, RenameOutput::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_rename_output);
}
} /* command */
static void create_default_binding_cluster(endpoint_t *endpoint)
{
binding::config_t config;
binding::create(endpoint, &config, CLUSTER_FLAG_SERVER);
}
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)
{
cluster_t *cluster = esp_matter::cluster::create(endpoint, audio_output::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, audio_output::Id));
if (flags & CLUSTER_FLAG_SERVER) {
VerifyOrReturnValue(config != NULL, ABORT_CLUSTER_CREATE(cluster));
if (config->delegate != nullptr) {
static const auto delegate_init_cb = AudioOutputDelegateInitCB;
set_delegate_and_init_callback(cluster, delegate_init_cb, config->delegate);
}
static const auto plugin_server_init_cb = CALL_ONCE(MatterAudioOutputPluginServerInitCallback);
set_plugin_server_init_callback(cluster, plugin_server_init_cb);
add_function_list(cluster, function_list, function_flags);
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
/* Attributes not managed internally */
global::attribute::create_cluster_revision(cluster, cluster_revision);
attribute::create_output_list(cluster, NULL, 0, 0);
attribute::create_current_output(cluster, 0);
command::create_select_output(cluster);
}
if (flags & CLUSTER_FLAG_CLIENT) {
create_default_binding_cluster(endpoint);
}
return cluster;
}
} /* audio_output */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,51 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace audio_output {
namespace feature {
namespace name_updates {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* name_updates */
} /* feature */
namespace attribute {
attribute_t *create_output_list(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_current_output(cluster_t *cluster, uint8_t value);
} /* attribute */
namespace command {
command_t *create_select_output(cluster_t *cluster);
command_t *create_rename_output(cluster_t *cluster);
} /* command */
typedef struct config {
void *delegate;
config() : delegate(nullptr) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* audio_output */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,52 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace audio_output {
inline constexpr uint32_t Id = 0x050B;
namespace feature {
namespace NameUpdates {
inline constexpr uint32_t Id = 0x1;
} /* NameUpdates */
} /* feature */
namespace attribute {
namespace OutputList {
inline constexpr uint32_t Id = 0x0000;
} /* OutputList */
namespace CurrentOutput {
inline constexpr uint32_t Id = 0x0001;
} /* CurrentOutput */
} /* attribute */
namespace command {
namespace SelectOutput {
inline constexpr uint32_t Id = 0x00;
} /* SelectOutput */
namespace RenameOutput {
inline constexpr uint32_t Id = 0x01;
} /* RenameOutput */
} /* command */
} /* audio_output */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,256 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#include <esp_log.h>
#include <esp_matter_core.h>
#include <esp_matter.h>
#include <app-common/zap-generated/cluster-enums.h>
#include <app-common/zap-generated/callback.h>
#include <app/InteractionModelEngine.h>
#include <zap_common/app/PluginApplicationCallbacks.h>
#include <basic_information.h>
#include <basic_information_ids.h>
#include <binding.h>
#include <esp_matter_data_model_priv.h>
#include <app/ClusterCallbacks.h>
using namespace chip::app::Clusters;
using chip::app::CommandHandler;
using chip::app::DataModel::Decode;
using chip::TLV::TLVReader;
using namespace esp_matter;
using namespace esp_matter::cluster;
static const char *TAG = "basic_information_cluster";
constexpr uint16_t cluster_revision = 5;
namespace esp_matter {
namespace cluster {
namespace basic_information {
namespace attribute {
attribute_t *create_data_model_revision(cluster_t *cluster, uint16_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, DataModelRevision::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(0), esp_matter_uint16(65534));
return attribute;
}
attribute_t *create_vendor_name(cluster_t *cluster, char *value, uint16_t length)
{
VerifyOrReturnValue(length <= k_max_vendor_name_length + 1, NULL, ESP_LOGE(TAG, "Could not create attribute, string length out of bound"));
return esp_matter::attribute::create(cluster, VendorName::Id, ATTRIBUTE_FLAG_NONE, esp_matter_char_str(value, length), k_max_vendor_name_length + 1);
}
attribute_t *create_vendor_id(cluster_t *cluster, uint16_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, VendorID::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(0), esp_matter_uint16(65534));
return attribute;
}
attribute_t *create_product_name(cluster_t *cluster, char *value, uint16_t length)
{
VerifyOrReturnValue(length <= k_max_product_name_length + 1, NULL, ESP_LOGE(TAG, "Could not create attribute, string length out of bound"));
return esp_matter::attribute::create(cluster, ProductName::Id, ATTRIBUTE_FLAG_NONE, esp_matter_char_str(value, length), k_max_product_name_length + 1);
}
attribute_t *create_product_id(cluster_t *cluster, uint16_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, ProductID::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(0), esp_matter_uint16(65534));
return attribute;
}
attribute_t *create_node_label(cluster_t *cluster, char *value, uint16_t length)
{
VerifyOrReturnValue(length <= k_max_node_label_length + 1, NULL, ESP_LOGE(TAG, "Could not create attribute, string length out of bound"));
return esp_matter::attribute::create(cluster, NodeLabel::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_char_str(value, length), k_max_node_label_length + 1);
}
attribute_t *create_location(cluster_t *cluster, char *value, uint16_t length)
{
return esp_matter::attribute::create(cluster, Location::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_char_str(value, length), k_max_location_length + 1);
}
attribute_t *create_hardware_version(cluster_t *cluster, uint16_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, HardwareVersion::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(0), esp_matter_uint16(65534));
return attribute;
}
attribute_t *create_hardware_version_string(cluster_t *cluster, char *value, uint16_t length)
{
return esp_matter::attribute::create(cluster, HardwareVersionString::Id, ATTRIBUTE_FLAG_NONE, esp_matter_char_str(value, length), k_max_hardware_version_string_length + 1);
}
attribute_t *create_software_version(cluster_t *cluster, uint32_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, SoftwareVersion::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint32(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint32(0), esp_matter_uint32(4294967294));
return attribute;
}
attribute_t *create_software_version_string(cluster_t *cluster, char *value, uint16_t length)
{
return esp_matter::attribute::create(cluster, SoftwareVersionString::Id, ATTRIBUTE_FLAG_NONE, esp_matter_char_str(value, length), k_max_software_version_string_length + 1);
}
attribute_t *create_manufacturing_date(cluster_t *cluster, char *value, uint16_t length)
{
return esp_matter::attribute::create(cluster, ManufacturingDate::Id, ATTRIBUTE_FLAG_NONE, esp_matter_char_str(value, length), k_max_manufacturing_date_length + 1);
}
attribute_t *create_part_number(cluster_t *cluster, char *value, uint16_t length)
{
VerifyOrReturnValue(length <= k_max_part_number_length + 1, NULL, ESP_LOGE(TAG, "Could not create attribute, string length out of bound"));
return esp_matter::attribute::create(cluster, PartNumber::Id, ATTRIBUTE_FLAG_NONE, esp_matter_char_str(value, length), k_max_part_number_length + 1);
}
attribute_t *create_product_url(cluster_t *cluster, char *value, uint16_t length)
{
VerifyOrReturnValue(length <= k_max_product_url_length + 1, NULL, ESP_LOGE(TAG, "Could not create attribute, string length out of bound"));
return esp_matter::attribute::create(cluster, ProductURL::Id, ATTRIBUTE_FLAG_NONE, esp_matter_char_str(value, length), k_max_product_url_length + 1);
}
attribute_t *create_product_label(cluster_t *cluster, char *value, uint16_t length)
{
VerifyOrReturnValue(length <= k_max_product_label_length + 1, NULL, ESP_LOGE(TAG, "Could not create attribute, string length out of bound"));
return esp_matter::attribute::create(cluster, ProductLabel::Id, ATTRIBUTE_FLAG_NONE, esp_matter_char_str(value, length), k_max_product_label_length + 1);
}
attribute_t *create_serial_number(cluster_t *cluster, char *value, uint16_t length)
{
VerifyOrReturnValue(length <= k_max_serial_number_length + 1, NULL, ESP_LOGE(TAG, "Could not create attribute, string length out of bound"));
return esp_matter::attribute::create(cluster, SerialNumber::Id, ATTRIBUTE_FLAG_NONE, esp_matter_char_str(value, length), k_max_serial_number_length + 1);
}
attribute_t *create_local_config_disabled(cluster_t *cluster, bool value)
{
return esp_matter::attribute::create(cluster, LocalConfigDisabled::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_bool(value));
}
attribute_t *create_reachable(cluster_t *cluster, bool value)
{
return esp_matter::attribute::create(cluster, Reachable::Id, ATTRIBUTE_FLAG_NONE, esp_matter_bool(value));
}
attribute_t *create_unique_id(cluster_t *cluster, char *value, uint16_t length)
{
VerifyOrReturnValue(length <= k_max_unique_id_length + 1, NULL, ESP_LOGE(TAG, "Could not create attribute, string length out of bound"));
return esp_matter::attribute::create(cluster, UniqueID::Id, ATTRIBUTE_FLAG_NONE, esp_matter_char_str(value, length), k_max_unique_id_length + 1);
}
attribute_t *create_capability_minima(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, CapabilityMinima::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_array(value, length, count));
}
attribute_t *create_product_appearance(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, ProductAppearance::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_array(value, length, count));
}
attribute_t *create_specification_version(cluster_t *cluster, uint32_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, SpecificationVersion::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint32(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint32(0), esp_matter_uint32(4294967294));
return attribute;
}
attribute_t *create_max_paths_per_invoke(cluster_t *cluster, uint16_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, MaxPathsPerInvoke::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(1), esp_matter_uint16(65534));
return attribute;
}
} /* attribute */
namespace event {
event_t *create_start_up(cluster_t *cluster)
{
return esp_matter::event::create(cluster, StartUp::Id);
}
event_t *create_shut_down(cluster_t *cluster)
{
return esp_matter::event::create(cluster, ShutDown::Id);
}
event_t *create_leave(cluster_t *cluster)
{
return esp_matter::event::create(cluster, Leave::Id);
}
event_t *create_reachable_changed(cluster_t *cluster)
{
VerifyOrReturnValue(has_attribute(Reachable), NULL);
return esp_matter::event::create(cluster, ReachableChanged::Id);
}
} /* event */
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)
{
cluster_t *cluster = esp_matter::cluster::create(endpoint, basic_information::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, basic_information::Id));
if (flags & CLUSTER_FLAG_SERVER) {
VerifyOrReturnValue(config != NULL, ABORT_CLUSTER_CREATE(cluster));
static const auto plugin_server_init_cb = CALL_ONCE(MatterBasicInformationPluginServerInitCallback);
set_plugin_server_init_callback(cluster, plugin_server_init_cb);
add_function_list(cluster, function_list, function_flags);
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
/* Attributes not managed internally */
global::attribute::create_cluster_revision(cluster, cluster_revision);
attribute::create_data_model_revision(cluster, config->data_model_revision);
attribute::create_vendor_name(cluster, config->vendor_name, sizeof(config->vendor_name));
attribute::create_vendor_id(cluster, config->vendor_id);
attribute::create_product_name(cluster, config->product_name, sizeof(config->product_name));
attribute::create_product_id(cluster, config->product_id);
attribute::create_node_label(cluster, config->node_label, sizeof(config->node_label));
attribute::create_location(cluster, config->location, sizeof(config->location));
attribute::create_hardware_version(cluster, config->hardware_version);
attribute::create_hardware_version_string(cluster, config->hardware_version_string, sizeof(config->hardware_version_string));
attribute::create_software_version(cluster, config->software_version);
attribute::create_software_version_string(cluster, config->software_version_string, sizeof(config->software_version_string));
attribute::create_unique_id(cluster, config->unique_id, sizeof(config->unique_id));
attribute::create_specification_version(cluster, config->specification_version);
attribute::create_max_paths_per_invoke(cluster, config->max_paths_per_invoke);
attribute::create_capability_minima(cluster, NULL, 0, 0);
/* Events */
event::create_start_up(cluster);
cluster::set_init_and_shutdown_callbacks(cluster, ESPMatterBasicInformationClusterServerInitCallback,
ESPMatterBasicInformationClusterServerShutdownCallback);
}
return cluster;
}
} /* basic_information */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,91 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace basic_information {
const uint8_t k_max_vendor_name_length = 32u;
const uint8_t k_max_product_name_length = 32u;
const uint8_t k_max_node_label_length = 32u;
const uint8_t k_max_location_length = 2u;
const uint8_t k_max_hardware_version_string_length = 64u;
const uint8_t k_max_software_version_string_length = 64u;
const uint8_t k_max_manufacturing_date_length = 16u;
const uint8_t k_max_part_number_length = 32u;
const uint16_t k_max_product_url_length = 256u;
const uint8_t k_max_product_label_length = 64u;
const uint8_t k_max_serial_number_length = 32u;
const uint8_t k_max_unique_id_length = 32u;
namespace attribute {
attribute_t *create_data_model_revision(cluster_t *cluster, uint16_t value);
attribute_t *create_vendor_name(cluster_t *cluster, char * value, uint16_t length);
attribute_t *create_vendor_id(cluster_t *cluster, uint16_t value);
attribute_t *create_product_name(cluster_t *cluster, char * value, uint16_t length);
attribute_t *create_product_id(cluster_t *cluster, uint16_t value);
attribute_t *create_node_label(cluster_t *cluster, char * value, uint16_t length);
attribute_t *create_location(cluster_t *cluster, char * value, uint16_t length);
attribute_t *create_hardware_version(cluster_t *cluster, uint16_t value);
attribute_t *create_hardware_version_string(cluster_t *cluster, char * value, uint16_t length);
attribute_t *create_software_version(cluster_t *cluster, uint32_t value);
attribute_t *create_software_version_string(cluster_t *cluster, char * value, uint16_t length);
attribute_t *create_manufacturing_date(cluster_t *cluster, char * value, uint16_t length);
attribute_t *create_part_number(cluster_t *cluster, char * value, uint16_t length);
attribute_t *create_product_url(cluster_t *cluster, char * value, uint16_t length);
attribute_t *create_product_label(cluster_t *cluster, char * value, uint16_t length);
attribute_t *create_serial_number(cluster_t *cluster, char * value, uint16_t length);
attribute_t *create_local_config_disabled(cluster_t *cluster, bool value);
attribute_t *create_reachable(cluster_t *cluster, bool value);
attribute_t *create_unique_id(cluster_t *cluster, char * value, uint16_t length);
attribute_t *create_capability_minima(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_product_appearance(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_specification_version(cluster_t *cluster, uint32_t value);
attribute_t *create_max_paths_per_invoke(cluster_t *cluster, uint16_t value);
} /* attribute */
namespace event {
event_t *create_start_up(cluster_t *cluster);
event_t *create_shut_down(cluster_t *cluster);
event_t *create_leave(cluster_t *cluster);
event_t *create_reachable_changed(cluster_t *cluster);
} /* event */
typedef struct config {
uint16_t data_model_revision;
char vendor_name[k_max_vendor_name_length + 1];
uint16_t vendor_id;
char product_name[k_max_product_name_length + 1];
uint16_t product_id;
char node_label[k_max_node_label_length + 1];
char location[k_max_location_length + 1];
uint16_t hardware_version;
char hardware_version_string[k_max_hardware_version_string_length + 1];
uint32_t software_version;
char software_version_string[k_max_software_version_string_length + 1];
char unique_id[k_max_unique_id_length + 1];
uint32_t specification_version;
uint16_t max_paths_per_invoke;
config() : data_model_revision(0), vendor_name{0}, vendor_id(0), product_name{0}, product_id(0), node_label{0}, location{0}, hardware_version(0), hardware_version_string{0}, software_version(0), software_version_string{0}, unique_id{0}, specification_version(0), max_paths_per_invoke(1) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* basic_information */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,115 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace basic_information {
inline constexpr uint32_t Id = 0x0028;
namespace attribute {
namespace DataModelRevision {
inline constexpr uint32_t Id = 0x0000;
} /* DataModelRevision */
namespace VendorName {
inline constexpr uint32_t Id = 0x0001;
} /* VendorName */
namespace VendorID {
inline constexpr uint32_t Id = 0x0002;
} /* VendorID */
namespace ProductName {
inline constexpr uint32_t Id = 0x0003;
} /* ProductName */
namespace ProductID {
inline constexpr uint32_t Id = 0x0004;
} /* ProductID */
namespace NodeLabel {
inline constexpr uint32_t Id = 0x0005;
} /* NodeLabel */
namespace Location {
inline constexpr uint32_t Id = 0x0006;
} /* Location */
namespace HardwareVersion {
inline constexpr uint32_t Id = 0x0007;
} /* HardwareVersion */
namespace HardwareVersionString {
inline constexpr uint32_t Id = 0x0008;
} /* HardwareVersionString */
namespace SoftwareVersion {
inline constexpr uint32_t Id = 0x0009;
} /* SoftwareVersion */
namespace SoftwareVersionString {
inline constexpr uint32_t Id = 0x000A;
} /* SoftwareVersionString */
namespace ManufacturingDate {
inline constexpr uint32_t Id = 0x000B;
} /* ManufacturingDate */
namespace PartNumber {
inline constexpr uint32_t Id = 0x000C;
} /* PartNumber */
namespace ProductURL {
inline constexpr uint32_t Id = 0x000D;
} /* ProductURL */
namespace ProductLabel {
inline constexpr uint32_t Id = 0x000E;
} /* ProductLabel */
namespace SerialNumber {
inline constexpr uint32_t Id = 0x000F;
} /* SerialNumber */
namespace LocalConfigDisabled {
inline constexpr uint32_t Id = 0x0010;
} /* LocalConfigDisabled */
namespace Reachable {
inline constexpr uint32_t Id = 0x0011;
} /* Reachable */
namespace UniqueID {
inline constexpr uint32_t Id = 0x0012;
} /* UniqueID */
namespace CapabilityMinima {
inline constexpr uint32_t Id = 0x0013;
} /* CapabilityMinima */
namespace ProductAppearance {
inline constexpr uint32_t Id = 0x0014;
} /* ProductAppearance */
namespace SpecificationVersion {
inline constexpr uint32_t Id = 0x0015;
} /* SpecificationVersion */
namespace MaxPathsPerInvoke {
inline constexpr uint32_t Id = 0x0016;
} /* MaxPathsPerInvoke */
} /* attribute */
namespace event {
namespace StartUp {
inline constexpr uint32_t Id = 0x00;
} /* StartUp */
namespace ShutDown {
inline constexpr uint32_t Id = 0x01;
} /* ShutDown */
namespace Leave {
inline constexpr uint32_t Id = 0x02;
} /* Leave */
namespace ReachableChanged {
inline constexpr uint32_t Id = 0x03;
} /* ReachableChanged */
} /* event */
} /* basic_information */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,84 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#include <esp_log.h>
#include <esp_matter_core.h>
#include <esp_matter.h>
#include <app-common/zap-generated/cluster-enums.h>
#include <app-common/zap-generated/callback.h>
#include <app/InteractionModelEngine.h>
#include <zap_common/app/PluginApplicationCallbacks.h>
#include <binding.h>
#include <binding_ids.h>
#include <binding.h>
#include <esp_matter_data_model_priv.h>
#include <app/ClusterCallbacks.h>
using namespace chip::app::Clusters;
using chip::app::CommandHandler;
using chip::app::DataModel::Decode;
using chip::TLV::TLVReader;
using namespace esp_matter;
using namespace esp_matter::cluster;
static const char *TAG = "binding_cluster";
constexpr uint16_t cluster_revision = 1;
namespace esp_matter {
namespace cluster {
namespace binding {
namespace attribute {
attribute_t *create_binding(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, Binding::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_array(value, length, count));
}
} /* attribute */
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)
{
cluster_t *cluster = esp_matter::cluster::create(endpoint, binding::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, binding::Id));
if (flags & CLUSTER_FLAG_SERVER) {
VerifyOrReturnValue(config != NULL, ABORT_CLUSTER_CREATE(cluster));
static const auto plugin_server_init_cb = CALL_ONCE(MatterBindingPluginServerInitCallback);
set_plugin_server_init_callback(cluster, plugin_server_init_cb);
add_function_list(cluster, function_list, function_flags);
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
/* Attributes not managed internally */
global::attribute::create_cluster_revision(cluster, cluster_revision);
attribute::create_binding(cluster, NULL, 0, 0);
cluster::set_init_and_shutdown_callbacks(cluster, ESPMatterBindingClusterServerInitCallback,
ESPMatterBindingClusterServerShutdownCallback);
}
return cluster;
}
} /* binding */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,36 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace binding {
namespace attribute {
attribute_t *create_binding(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
} /* attribute */
typedef struct config {
config() {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* binding */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,34 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace binding {
inline constexpr uint32_t Id = 0x001E;
namespace attribute {
namespace Binding {
inline constexpr uint32_t Id = 0x0000;
} /* Binding */
} /* attribute */
} /* binding */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,99 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#include <esp_log.h>
#include <esp_matter_core.h>
#include <esp_matter.h>
#include <app-common/zap-generated/cluster-enums.h>
#include <app-common/zap-generated/callback.h>
#include <app/InteractionModelEngine.h>
#include <zap_common/app/PluginApplicationCallbacks.h>
#include <boolean_state.h>
#include <boolean_state_ids.h>
#include <binding.h>
#include <esp_matter_data_model_priv.h>
#include <app/ClusterCallbacks.h>
using namespace chip::app::Clusters;
using chip::app::CommandHandler;
using chip::app::DataModel::Decode;
using chip::TLV::TLVReader;
using namespace esp_matter;
using namespace esp_matter::cluster;
static const char *TAG = "boolean_state_cluster";
constexpr uint16_t cluster_revision = 1;
namespace esp_matter {
namespace cluster {
namespace boolean_state {
namespace attribute {
attribute_t *create_state_value(cluster_t *cluster, bool value)
{
return esp_matter::attribute::create(cluster, StateValue::Id, ATTRIBUTE_FLAG_NONE, esp_matter_bool(value));
}
} /* attribute */
namespace event {
event_t *create_state_change(cluster_t *cluster)
{
return esp_matter::event::create(cluster, StateChange::Id);
}
} /* event */
static void create_default_binding_cluster(endpoint_t *endpoint)
{
binding::config_t config;
binding::create(endpoint, &config, CLUSTER_FLAG_SERVER);
}
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)
{
cluster_t *cluster = esp_matter::cluster::create(endpoint, boolean_state::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, boolean_state::Id));
if (flags & CLUSTER_FLAG_SERVER) {
VerifyOrReturnValue(config != NULL, ABORT_CLUSTER_CREATE(cluster));
add_function_list(cluster, function_list, function_flags);
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
/* Attributes not managed internally */
global::attribute::create_cluster_revision(cluster, cluster_revision);
attribute::create_state_value(cluster, config->state_value);
cluster::set_init_and_shutdown_callbacks(cluster, ESPMatterBooleanStateClusterServerInitCallback,
ESPMatterBooleanStateClusterServerShutdownCallback);
}
if (flags & CLUSTER_FLAG_CLIENT) {
create_default_binding_cluster(endpoint);
}
return cluster;
}
} /* boolean_state */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,41 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace boolean_state {
namespace attribute {
attribute_t *create_state_value(cluster_t *cluster, bool value);
} /* attribute */
namespace event {
event_t *create_state_change(cluster_t *cluster);
} /* event */
typedef struct config {
bool state_value;
config() : state_value(false) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* boolean_state */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,40 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace boolean_state {
inline constexpr uint32_t Id = 0x0045;
namespace attribute {
namespace StateValue {
inline constexpr uint32_t Id = 0x0000;
} /* StateValue */
} /* attribute */
namespace event {
namespace StateChange {
inline constexpr uint32_t Id = 0x00;
} /* StateChange */
} /* event */
} /* boolean_state */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,270 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#include <esp_log.h>
#include <esp_matter_core.h>
#include <esp_matter.h>
#include <app-common/zap-generated/cluster-enums.h>
#include <app-common/zap-generated/callback.h>
#include <app/InteractionModelEngine.h>
#include <zap_common/app/PluginApplicationCallbacks.h>
#include <esp_matter_delegate_callbacks.h>
#include <boolean_state_configuration.h>
#include <boolean_state_configuration_ids.h>
#include <binding.h>
#include <esp_matter_data_model_priv.h>
#include <app/ClusterCallbacks.h>
using namespace chip::app::Clusters;
using chip::app::CommandHandler;
using chip::app::DataModel::Decode;
using chip::TLV::TLVReader;
using namespace esp_matter;
using namespace esp_matter::cluster;
using namespace esp_matter::cluster::delegate_cb;
static const char *TAG = "boolean_state_configuration_cluster";
constexpr uint16_t cluster_revision = 1;
namespace esp_matter {
namespace cluster {
namespace boolean_state_configuration {
namespace feature {
namespace visual {
uint32_t get_id()
{
return Visual::Id;
}
esp_err_t add(cluster_t *cluster, config_t *config)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
VerifyOrReturnError(config, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_alarms_active(cluster, config->alarms_active);
attribute::create_alarms_supported(cluster, config->alarms_supported);
command::create_enable_disable_alarm(cluster);
event::create_alarms_state_changed(cluster);
return ESP_OK;
}
} /* visual */
namespace audible {
uint32_t get_id()
{
return Audible::Id;
}
esp_err_t add(cluster_t *cluster, config_t *config)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
VerifyOrReturnError(config, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_alarms_active(cluster, config->alarms_active);
attribute::create_alarms_supported(cluster, config->alarms_supported);
command::create_enable_disable_alarm(cluster);
event::create_alarms_state_changed(cluster);
return ESP_OK;
}
} /* audible */
namespace alarm_suppress {
uint32_t get_id()
{
return AlarmSuppress::Id;
}
esp_err_t add(cluster_t *cluster, config_t *config)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
VerifyOrReturnError(config, ESP_ERR_INVALID_ARG);
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnError(((has_feature(visual)) || (has_feature(audible))), ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_alarms_suppressed(cluster, config->alarms_suppressed);
command::create_suppress_alarm(cluster);
return ESP_OK;
}
} /* alarm_suppress */
namespace sensitivity_level {
uint32_t get_id()
{
return SensitivityLevel::Id;
}
esp_err_t add(cluster_t *cluster, config_t *config)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
VerifyOrReturnError(config, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_current_sensitivity_level(cluster, config->current_sensitivity_level);
attribute::create_supported_sensitivity_levels(cluster, config->supported_sensitivity_levels);
return ESP_OK;
}
} /* sensitivity_level */
} /* feature */
namespace attribute {
attribute_t *create_current_sensitivity_level(cluster_t *cluster, uint8_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(sensitivity_level), NULL);
attribute_t *attribute = esp_matter::attribute::create(cluster, CurrentSensitivityLevel::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_uint8(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint8(0), esp_matter_uint8(254));
return attribute;
}
attribute_t *create_supported_sensitivity_levels(cluster_t *cluster, uint8_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(sensitivity_level), NULL);
attribute_t *attribute = esp_matter::attribute::create(cluster, SupportedSensitivityLevels::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint8(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint8(2), esp_matter_uint8(10));
return attribute;
}
attribute_t *create_default_sensitivity_level(cluster_t *cluster, uint8_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, DefaultSensitivityLevel::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint8(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint8(0), esp_matter_uint8(254));
return attribute;
}
attribute_t *create_alarms_active(cluster_t *cluster, uint8_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(((has_feature(visual)) || (has_feature(audible))), NULL);
attribute_t *attribute = esp_matter::attribute::create(cluster, AlarmsActive::Id, ATTRIBUTE_FLAG_NONE, esp_matter_bitmap8(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_bitmap8(0), esp_matter_bitmap8(3));
return attribute;
}
attribute_t *create_alarms_suppressed(cluster_t *cluster, uint8_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(alarm_suppress), NULL);
attribute_t *attribute = esp_matter::attribute::create(cluster, AlarmsSuppressed::Id, ATTRIBUTE_FLAG_NONE, esp_matter_bitmap8(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_bitmap8(0), esp_matter_bitmap8(3));
return attribute;
}
attribute_t *create_alarms_enabled(cluster_t *cluster, uint8_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, AlarmsEnabled::Id, ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_bitmap8(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_bitmap8(0), esp_matter_bitmap8(3));
return attribute;
}
attribute_t *create_alarms_supported(cluster_t *cluster, uint8_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(((has_feature(visual)) || (has_feature(audible))), NULL);
attribute_t *attribute = esp_matter::attribute::create(cluster, AlarmsSupported::Id, ATTRIBUTE_FLAG_NONE, esp_matter_bitmap8(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_bitmap8(0), esp_matter_bitmap8(3));
return attribute;
}
attribute_t *create_sensor_fault(cluster_t *cluster, uint8_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, SensorFault::Id, ATTRIBUTE_FLAG_NONE, esp_matter_bitmap8(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_bitmap8(0), esp_matter_bitmap8(1));
return attribute;
}
} /* attribute */
namespace command {
command_t *create_suppress_alarm(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(alarm_suppress), NULL);
return esp_matter::command::create(cluster, SuppressAlarm::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_enable_disable_alarm(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(((has_feature(visual)) || (has_feature(audible))), NULL);
return esp_matter::command::create(cluster, EnableDisableAlarm::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
} /* command */
namespace event {
event_t *create_alarms_state_changed(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(((has_feature(visual)) || (has_feature(audible))), NULL);
return esp_matter::event::create(cluster, AlarmsStateChanged::Id);
}
event_t *create_sensor_fault(cluster_t *cluster)
{
return esp_matter::event::create(cluster, SensorFault::Id);
}
} /* event */
static void create_default_binding_cluster(endpoint_t *endpoint)
{
binding::config_t config;
binding::create(endpoint, &config, CLUSTER_FLAG_SERVER);
}
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)
{
cluster_t *cluster = esp_matter::cluster::create(endpoint, boolean_state_configuration::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, boolean_state_configuration::Id));
if (flags & CLUSTER_FLAG_SERVER) {
VerifyOrReturnValue(config != NULL, ABORT_CLUSTER_CREATE(cluster));
if (config->delegate != nullptr) {
static const auto delegate_init_cb = BooleanStateConfigurationDelegateInitCB;
set_delegate_and_init_callback(cluster, delegate_init_cb, config->delegate);
}
static const auto plugin_server_init_cb = CALL_ONCE(MatterBooleanStateConfigurationPluginServerInitCallback);
set_plugin_server_init_callback(cluster, plugin_server_init_cb);
add_function_list(cluster, function_list, function_flags);
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
/* Attributes not managed internally */
global::attribute::create_cluster_revision(cluster, cluster_revision);
cluster::set_init_and_shutdown_callbacks(cluster, ESPMatterBooleanStateConfigurationClusterServerInitCallback,
ESPMatterBooleanStateConfigurationClusterServerShutdownCallback);
}
if (flags & CLUSTER_FLAG_CLIENT) {
create_default_binding_cluster(endpoint);
}
return cluster;
}
} /* boolean_state_configuration */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,96 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace boolean_state_configuration {
namespace feature {
namespace visual {
typedef struct config {
uint8_t alarms_active;
uint8_t alarms_supported;
config() : alarms_active(0), alarms_supported(0) {}
} config_t;
uint32_t get_id();
esp_err_t add(cluster_t *cluster, config_t *config);
} /* visual */
namespace audible {
typedef struct config {
uint8_t alarms_active;
uint8_t alarms_supported;
config() : alarms_active(0), alarms_supported(0) {}
} config_t;
uint32_t get_id();
esp_err_t add(cluster_t *cluster, config_t *config);
} /* audible */
namespace alarm_suppress {
typedef struct config {
uint8_t alarms_suppressed;
config() : alarms_suppressed(0) {}
} config_t;
uint32_t get_id();
esp_err_t add(cluster_t *cluster, config_t *config);
} /* alarm_suppress */
namespace sensitivity_level {
typedef struct config {
uint8_t current_sensitivity_level;
uint8_t supported_sensitivity_levels;
config() : current_sensitivity_level(0), supported_sensitivity_levels(0) {}
} config_t;
uint32_t get_id();
esp_err_t add(cluster_t *cluster, config_t *config);
} /* sensitivity_level */
} /* feature */
namespace attribute {
attribute_t *create_current_sensitivity_level(cluster_t *cluster, uint8_t value);
attribute_t *create_supported_sensitivity_levels(cluster_t *cluster, uint8_t value);
attribute_t *create_default_sensitivity_level(cluster_t *cluster, uint8_t value);
attribute_t *create_alarms_active(cluster_t *cluster, uint8_t value);
attribute_t *create_alarms_suppressed(cluster_t *cluster, uint8_t value);
attribute_t *create_alarms_enabled(cluster_t *cluster, uint8_t value);
attribute_t *create_alarms_supported(cluster_t *cluster, uint8_t value);
attribute_t *create_sensor_fault(cluster_t *cluster, uint8_t value);
} /* attribute */
namespace command {
command_t *create_suppress_alarm(cluster_t *cluster);
command_t *create_enable_disable_alarm(cluster_t *cluster);
} /* command */
namespace event {
event_t *create_alarms_state_changed(cluster_t *cluster);
event_t *create_sensor_fault(cluster_t *cluster);
} /* event */
typedef struct config {
void *delegate;
config() : delegate(nullptr) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* boolean_state_configuration */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,88 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace boolean_state_configuration {
inline constexpr uint32_t Id = 0x0080;
namespace feature {
namespace Visual {
inline constexpr uint32_t Id = 0x1;
} /* Visual */
namespace Audible {
inline constexpr uint32_t Id = 0x2;
} /* Audible */
namespace AlarmSuppress {
inline constexpr uint32_t Id = 0x4;
} /* AlarmSuppress */
namespace SensitivityLevel {
inline constexpr uint32_t Id = 0x8;
} /* SensitivityLevel */
} /* feature */
namespace attribute {
namespace CurrentSensitivityLevel {
inline constexpr uint32_t Id = 0x0000;
} /* CurrentSensitivityLevel */
namespace SupportedSensitivityLevels {
inline constexpr uint32_t Id = 0x0001;
} /* SupportedSensitivityLevels */
namespace DefaultSensitivityLevel {
inline constexpr uint32_t Id = 0x0002;
} /* DefaultSensitivityLevel */
namespace AlarmsActive {
inline constexpr uint32_t Id = 0x0003;
} /* AlarmsActive */
namespace AlarmsSuppressed {
inline constexpr uint32_t Id = 0x0004;
} /* AlarmsSuppressed */
namespace AlarmsEnabled {
inline constexpr uint32_t Id = 0x0005;
} /* AlarmsEnabled */
namespace AlarmsSupported {
inline constexpr uint32_t Id = 0x0006;
} /* AlarmsSupported */
namespace SensorFault {
inline constexpr uint32_t Id = 0x0007;
} /* SensorFault */
} /* attribute */
namespace command {
namespace SuppressAlarm {
inline constexpr uint32_t Id = 0x00;
} /* SuppressAlarm */
namespace EnableDisableAlarm {
inline constexpr uint32_t Id = 0x01;
} /* EnableDisableAlarm */
} /* command */
namespace event {
namespace AlarmsStateChanged {
inline constexpr uint32_t Id = 0x00;
} /* AlarmsStateChanged */
namespace SensorFault {
inline constexpr uint32_t Id = 0x01;
} /* SensorFault */
} /* event */
} /* boolean_state_configuration */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,240 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#include <esp_log.h>
#include <esp_matter_core.h>
#include <esp_matter.h>
#include <app-common/zap-generated/cluster-enums.h>
#include <app-common/zap-generated/callback.h>
#include <app/InteractionModelEngine.h>
#include <zap_common/app/PluginApplicationCallbacks.h>
#include <bridged_device_basic_information.h>
#include <bridged_device_basic_information_ids.h>
#include <binding.h>
#include <esp_matter_data_model_priv.h>
using namespace chip::app::Clusters;
using chip::app::CommandHandler;
using chip::app::DataModel::Decode;
using chip::TLV::TLVReader;
using namespace esp_matter;
using namespace esp_matter::cluster;
static const char *TAG = "bridged_device_basic_information_cluster";
constexpr uint16_t cluster_revision = 5;
namespace esp_matter {
namespace cluster {
namespace bridged_device_basic_information {
namespace feature {
namespace bridged_icd_support {
uint32_t get_id()
{
return BridgedICDSupport::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
command::create_keep_active(cluster);
event::create_active_changed(cluster);
return ESP_OK;
}
} /* bridged_icd_support */
} /* feature */
namespace attribute {
attribute_t *create_vendor_name(cluster_t *cluster, char *value, uint16_t length)
{
VerifyOrReturnValue(length <= k_max_vendor_name_length + 1, NULL, ESP_LOGE(TAG, "Could not create attribute, string length out of bound"));
return esp_matter::attribute::create(cluster, VendorName::Id, ATTRIBUTE_FLAG_NONE, esp_matter_char_str(value, length), k_max_vendor_name_length + 1);
}
attribute_t *create_vendor_id(cluster_t *cluster, uint16_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, VendorID::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(0), esp_matter_uint16(65534));
return attribute;
}
attribute_t *create_product_name(cluster_t *cluster, char *value, uint16_t length)
{
VerifyOrReturnValue(length <= k_max_product_name_length + 1, NULL, ESP_LOGE(TAG, "Could not create attribute, string length out of bound"));
return esp_matter::attribute::create(cluster, ProductName::Id, ATTRIBUTE_FLAG_NONE, esp_matter_char_str(value, length), k_max_product_name_length + 1);
}
attribute_t *create_product_id(cluster_t *cluster, uint16_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, ProductID::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(0), esp_matter_uint16(65534));
return attribute;
}
attribute_t *create_node_label(cluster_t *cluster, char *value, uint16_t length)
{
VerifyOrReturnValue(length <= k_max_node_label_length + 1, NULL, ESP_LOGE(TAG, "Could not create attribute, string length out of bound"));
return esp_matter::attribute::create(cluster, NodeLabel::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_char_str(value, length), k_max_node_label_length + 1);
}
attribute_t *create_hardware_version(cluster_t *cluster, uint16_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, HardwareVersion::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(0), esp_matter_uint16(65534));
return attribute;
}
attribute_t *create_hardware_version_string(cluster_t *cluster, char *value, uint16_t length)
{
return esp_matter::attribute::create(cluster, HardwareVersionString::Id, ATTRIBUTE_FLAG_NONE, esp_matter_char_str(value, length), k_max_hardware_version_string_length + 1);
}
attribute_t *create_software_version(cluster_t *cluster, uint32_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, SoftwareVersion::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint32(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint32(0), esp_matter_uint32(4294967294));
return attribute;
}
attribute_t *create_software_version_string(cluster_t *cluster, char *value, uint16_t length)
{
return esp_matter::attribute::create(cluster, SoftwareVersionString::Id, ATTRIBUTE_FLAG_NONE, esp_matter_char_str(value, length), k_max_software_version_string_length + 1);
}
attribute_t *create_manufacturing_date(cluster_t *cluster, char *value, uint16_t length)
{
return esp_matter::attribute::create(cluster, ManufacturingDate::Id, ATTRIBUTE_FLAG_NONE, esp_matter_char_str(value, length), k_max_manufacturing_date_length + 1);
}
attribute_t *create_part_number(cluster_t *cluster, char *value, uint16_t length)
{
VerifyOrReturnValue(length <= k_max_part_number_length + 1, NULL, ESP_LOGE(TAG, "Could not create attribute, string length out of bound"));
return esp_matter::attribute::create(cluster, PartNumber::Id, ATTRIBUTE_FLAG_NONE, esp_matter_char_str(value, length), k_max_part_number_length + 1);
}
attribute_t *create_product_url(cluster_t *cluster, char *value, uint16_t length)
{
VerifyOrReturnValue(length <= k_max_product_url_length + 1, NULL, ESP_LOGE(TAG, "Could not create attribute, string length out of bound"));
return esp_matter::attribute::create(cluster, ProductURL::Id, ATTRIBUTE_FLAG_NONE, esp_matter_char_str(value, length), k_max_product_url_length + 1);
}
attribute_t *create_product_label(cluster_t *cluster, char *value, uint16_t length)
{
VerifyOrReturnValue(length <= k_max_product_label_length + 1, NULL, ESP_LOGE(TAG, "Could not create attribute, string length out of bound"));
return esp_matter::attribute::create(cluster, ProductLabel::Id, ATTRIBUTE_FLAG_NONE, esp_matter_char_str(value, length), k_max_product_label_length + 1);
}
attribute_t *create_serial_number(cluster_t *cluster, char *value, uint16_t length)
{
VerifyOrReturnValue(length <= k_max_serial_number_length + 1, NULL, ESP_LOGE(TAG, "Could not create attribute, string length out of bound"));
return esp_matter::attribute::create(cluster, SerialNumber::Id, ATTRIBUTE_FLAG_NONE, esp_matter_char_str(value, length), k_max_serial_number_length + 1);
}
attribute_t *create_reachable(cluster_t *cluster, bool value)
{
return esp_matter::attribute::create(cluster, Reachable::Id, ATTRIBUTE_FLAG_NONE, esp_matter_bool(value));
}
attribute_t *create_unique_id(cluster_t *cluster, char *value, uint16_t length)
{
VerifyOrReturnValue(length <= k_max_unique_id_length + 1, NULL, ESP_LOGE(TAG, "Could not create attribute, string length out of bound"));
return esp_matter::attribute::create(cluster, UniqueID::Id, ATTRIBUTE_FLAG_NONE, esp_matter_char_str(value, length), k_max_unique_id_length + 1);
}
attribute_t *create_product_appearance(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, ProductAppearance::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_array(value, length, count));
}
} /* attribute */
namespace command {
command_t *create_keep_active(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(bridged_icd_support), NULL);
return esp_matter::command::create(cluster, KeepActive::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
} /* command */
namespace event {
event_t *create_start_up(cluster_t *cluster)
{
return esp_matter::event::create(cluster, StartUp::Id);
}
event_t *create_shut_down(cluster_t *cluster)
{
return esp_matter::event::create(cluster, ShutDown::Id);
}
event_t *create_leave(cluster_t *cluster)
{
return esp_matter::event::create(cluster, Leave::Id);
}
event_t *create_reachable_changed(cluster_t *cluster)
{
return esp_matter::event::create(cluster, ReachableChanged::Id);
}
event_t *create_active_changed(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(bridged_icd_support), NULL);
return esp_matter::event::create(cluster, ActiveChanged::Id);
}
} /* event */
const function_generic_t function_list[] = {
(function_generic_t)MatterBridgedDeviceBasicInformationClusterServerAttributeChangedCallback,
};
const int function_flags = CLUSTER_FLAG_ATTRIBUTE_CHANGED_FUNCTION;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
{
cluster_t *cluster = esp_matter::cluster::create(endpoint, bridged_device_basic_information::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, bridged_device_basic_information::Id));
if (flags & CLUSTER_FLAG_SERVER) {
VerifyOrReturnValue(config != NULL, ABORT_CLUSTER_CREATE(cluster));
static const auto plugin_server_init_cb = CALL_ONCE(MatterBridgedDeviceBasicInformationPluginServerInitCallback);
set_plugin_server_init_callback(cluster, plugin_server_init_cb);
add_function_list(cluster, function_list, function_flags);
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
/* Attributes not managed internally */
global::attribute::create_cluster_revision(cluster, cluster_revision);
attribute::create_reachable(cluster, config->reachable);
attribute::create_unique_id(cluster, config->unique_id, sizeof(config->unique_id));
/* Events */
event::create_reachable_changed(cluster);
}
return cluster;
}
} /* bridged_device_basic_information */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,85 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace bridged_device_basic_information {
const uint8_t k_max_vendor_name_length = 32u;
const uint8_t k_max_product_name_length = 32u;
const uint8_t k_max_node_label_length = 32u;
const uint8_t k_max_hardware_version_string_length = 64u;
const uint8_t k_max_software_version_string_length = 64u;
const uint8_t k_max_manufacturing_date_length = 16u;
const uint8_t k_max_part_number_length = 32u;
const uint16_t k_max_product_url_length = 256u;
const uint8_t k_max_product_label_length = 64u;
const uint8_t k_max_serial_number_length = 32u;
const uint8_t k_max_unique_id_length = 32u;
namespace feature {
namespace bridged_icd_support {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* bridged_icd_support */
} /* feature */
namespace attribute {
attribute_t *create_vendor_name(cluster_t *cluster, char * value, uint16_t length);
attribute_t *create_vendor_id(cluster_t *cluster, uint16_t value);
attribute_t *create_product_name(cluster_t *cluster, char * value, uint16_t length);
attribute_t *create_product_id(cluster_t *cluster, uint16_t value);
attribute_t *create_node_label(cluster_t *cluster, char * value, uint16_t length);
attribute_t *create_hardware_version(cluster_t *cluster, uint16_t value);
attribute_t *create_hardware_version_string(cluster_t *cluster, char * value, uint16_t length);
attribute_t *create_software_version(cluster_t *cluster, uint32_t value);
attribute_t *create_software_version_string(cluster_t *cluster, char * value, uint16_t length);
attribute_t *create_manufacturing_date(cluster_t *cluster, char * value, uint16_t length);
attribute_t *create_part_number(cluster_t *cluster, char * value, uint16_t length);
attribute_t *create_product_url(cluster_t *cluster, char * value, uint16_t length);
attribute_t *create_product_label(cluster_t *cluster, char * value, uint16_t length);
attribute_t *create_serial_number(cluster_t *cluster, char * value, uint16_t length);
attribute_t *create_reachable(cluster_t *cluster, bool value);
attribute_t *create_unique_id(cluster_t *cluster, char * value, uint16_t length);
attribute_t *create_product_appearance(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
} /* attribute */
namespace command {
command_t *create_keep_active(cluster_t *cluster);
} /* command */
namespace event {
event_t *create_start_up(cluster_t *cluster);
event_t *create_shut_down(cluster_t *cluster);
event_t *create_leave(cluster_t *cluster);
event_t *create_reachable_changed(cluster_t *cluster);
event_t *create_active_changed(cluster_t *cluster);
} /* event */
typedef struct config {
bool reachable;
char unique_id[k_max_unique_id_length + 1];
config() : reachable(true), unique_id{0} {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* bridged_device_basic_information */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,112 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace bridged_device_basic_information {
inline constexpr uint32_t Id = 0x0039;
namespace feature {
namespace BridgedICDSupport {
inline constexpr uint32_t Id = 0x100000;
} /* BridgedICDSupport */
} /* feature */
namespace attribute {
namespace VendorName {
inline constexpr uint32_t Id = 0x0001;
} /* VendorName */
namespace VendorID {
inline constexpr uint32_t Id = 0x0002;
} /* VendorID */
namespace ProductName {
inline constexpr uint32_t Id = 0x0003;
} /* ProductName */
namespace ProductID {
inline constexpr uint32_t Id = 0x0004;
} /* ProductID */
namespace NodeLabel {
inline constexpr uint32_t Id = 0x0005;
} /* NodeLabel */
namespace HardwareVersion {
inline constexpr uint32_t Id = 0x0007;
} /* HardwareVersion */
namespace HardwareVersionString {
inline constexpr uint32_t Id = 0x0008;
} /* HardwareVersionString */
namespace SoftwareVersion {
inline constexpr uint32_t Id = 0x0009;
} /* SoftwareVersion */
namespace SoftwareVersionString {
inline constexpr uint32_t Id = 0x000A;
} /* SoftwareVersionString */
namespace ManufacturingDate {
inline constexpr uint32_t Id = 0x000B;
} /* ManufacturingDate */
namespace PartNumber {
inline constexpr uint32_t Id = 0x000C;
} /* PartNumber */
namespace ProductURL {
inline constexpr uint32_t Id = 0x000D;
} /* ProductURL */
namespace ProductLabel {
inline constexpr uint32_t Id = 0x000E;
} /* ProductLabel */
namespace SerialNumber {
inline constexpr uint32_t Id = 0x000F;
} /* SerialNumber */
namespace Reachable {
inline constexpr uint32_t Id = 0x0011;
} /* Reachable */
namespace UniqueID {
inline constexpr uint32_t Id = 0x0012;
} /* UniqueID */
namespace ProductAppearance {
inline constexpr uint32_t Id = 0x0014;
} /* ProductAppearance */
} /* attribute */
namespace command {
namespace KeepActive {
inline constexpr uint32_t Id = 0x80;
} /* KeepActive */
} /* command */
namespace event {
namespace StartUp {
inline constexpr uint32_t Id = 0x00;
} /* StartUp */
namespace ShutDown {
inline constexpr uint32_t Id = 0x01;
} /* ShutDown */
namespace Leave {
inline constexpr uint32_t Id = 0x02;
} /* Leave */
namespace ReachableChanged {
inline constexpr uint32_t Id = 0x03;
} /* ReachableChanged */
namespace ActiveChanged {
inline constexpr uint32_t Id = 0x80;
} /* ActiveChanged */
} /* event */
} /* bridged_device_basic_information */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,324 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#include <esp_log.h>
#include <esp_matter_core.h>
#include <esp_matter.h>
#include <app-common/zap-generated/cluster-enums.h>
#include <app-common/zap-generated/callback.h>
#include <app/InteractionModelEngine.h>
#include <zap_common/app/PluginApplicationCallbacks.h>
#include <camera_av_settings_user_level_management.h>
#include <camera_av_settings_user_level_management_ids.h>
#include <binding.h>
#include <esp_matter_data_model_priv.h>
using namespace chip::app::Clusters;
using chip::app::CommandHandler;
using chip::app::DataModel::Decode;
using chip::TLV::TLVReader;
using namespace esp_matter;
using namespace esp_matter::cluster;
static const char *TAG = "camera_av_settings_user_level_management_cluster";
constexpr uint16_t cluster_revision = 1;
namespace esp_matter {
namespace cluster {
namespace camera_av_settings_user_level_management {
namespace feature {
namespace digital_ptz {
uint32_t get_id()
{
return DigitalPTZ::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_dptz_streams(cluster, NULL, 0, 0);
command::create_dptz_set_viewport(cluster);
return ESP_OK;
}
} /* digital_ptz */
namespace mechanical_pan {
uint32_t get_id()
{
return MechanicalPan::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_mptz_position(cluster, NULL, 0, 0);
attribute::create_pan_min(cluster, 0);
attribute::create_pan_max(cluster, 0);
attribute::create_movement_state(cluster, 0);
command::create_mptz_set_position(cluster);
command::create_mptz_relative_move(cluster);
return ESP_OK;
}
} /* mechanical_pan */
namespace mechanical_tilt {
uint32_t get_id()
{
return MechanicalTilt::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_mptz_position(cluster, NULL, 0, 0);
attribute::create_tilt_min(cluster, 0);
attribute::create_tilt_max(cluster, 0);
attribute::create_movement_state(cluster, 0);
command::create_mptz_set_position(cluster);
command::create_mptz_relative_move(cluster);
return ESP_OK;
}
} /* mechanical_tilt */
namespace mechanical_zoom {
uint32_t get_id()
{
return MechanicalZoom::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_mptz_position(cluster, NULL, 0, 0);
attribute::create_zoom_max(cluster, 0);
attribute::create_movement_state(cluster, 0);
command::create_mptz_set_position(cluster);
command::create_mptz_relative_move(cluster);
return ESP_OK;
}
} /* mechanical_zoom */
namespace mechanical_presets {
uint32_t get_id()
{
return MechanicalPresets::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnError(((has_feature(mechanical_pan)) || (has_feature(mechanical_tilt)) || (has_feature(mechanical_zoom))), ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_max_presets(cluster, 0);
attribute::create_mptz_presets(cluster, NULL, 0, 0);
command::create_mptz_move_to_preset(cluster);
command::create_mptz_save_preset(cluster);
command::create_mptz_remove_preset(cluster);
return ESP_OK;
}
} /* mechanical_presets */
} /* feature */
namespace attribute {
attribute_t *create_mptz_position(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(((has_feature(mechanical_pan)) || (has_feature(mechanical_tilt)) || (has_feature(mechanical_zoom))), NULL);
return esp_matter::attribute::create(cluster, MPTZPosition::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_array(value, length, count));
}
attribute_t *create_max_presets(cluster_t *cluster, uint8_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(mechanical_presets), NULL);
return esp_matter::attribute::create(cluster, MaxPresets::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint8(value));
}
attribute_t *create_mptz_presets(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(mechanical_presets), NULL);
return esp_matter::attribute::create(cluster, MPTZPresets::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_array(value, length, count));
}
attribute_t *create_dptz_streams(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(digital_ptz), NULL);
return esp_matter::attribute::create(cluster, DPTZStreams::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_array(value, length, count));
}
attribute_t *create_zoom_max(cluster_t *cluster, uint8_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(mechanical_zoom), NULL);
return esp_matter::attribute::create(cluster, ZoomMax::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint8(value));
}
attribute_t *create_tilt_min(cluster_t *cluster, int16_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(mechanical_tilt), NULL);
return esp_matter::attribute::create(cluster, TiltMin::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_int16(value));
}
attribute_t *create_tilt_max(cluster_t *cluster, int16_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(mechanical_tilt), NULL);
return esp_matter::attribute::create(cluster, TiltMax::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_int16(value));
}
attribute_t *create_pan_min(cluster_t *cluster, int16_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(mechanical_pan), NULL);
return esp_matter::attribute::create(cluster, PanMin::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_int16(value));
}
attribute_t *create_pan_max(cluster_t *cluster, int16_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(mechanical_pan), NULL);
return esp_matter::attribute::create(cluster, PanMax::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_int16(value));
}
attribute_t *create_movement_state(cluster_t *cluster, uint8_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(((has_feature(mechanical_pan)) || (has_feature(mechanical_tilt)) || (has_feature(mechanical_zoom))), NULL);
return esp_matter::attribute::create(cluster, MovementState::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_enum8(value));
}
} /* attribute */
namespace command {
command_t *create_mptz_set_position(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(((has_feature(mechanical_pan)) || (has_feature(mechanical_tilt)) || (has_feature(mechanical_zoom))), NULL);
return esp_matter::command::create(cluster, MPTZSetPosition::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_mptz_relative_move(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(((has_feature(mechanical_pan)) || (has_feature(mechanical_tilt)) || (has_feature(mechanical_zoom))), NULL);
return esp_matter::command::create(cluster, MPTZRelativeMove::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_mptz_move_to_preset(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(mechanical_presets), NULL);
return esp_matter::command::create(cluster, MPTZMoveToPreset::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_mptz_save_preset(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(mechanical_presets), NULL);
return esp_matter::command::create(cluster, MPTZSavePreset::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_mptz_remove_preset(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(mechanical_presets), NULL);
return esp_matter::command::create(cluster, MPTZRemovePreset::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_dptz_set_viewport(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(digital_ptz), NULL);
return esp_matter::command::create(cluster, DPTZSetViewport::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_dptz_relative_move(cluster_t *cluster)
{
return esp_matter::command::create(cluster, DPTZRelativeMove::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
} /* command */
static void create_default_binding_cluster(endpoint_t *endpoint)
{
binding::config_t config;
binding::create(endpoint, &config, CLUSTER_FLAG_SERVER);
}
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)
{
cluster_t *cluster = esp_matter::cluster::create(endpoint, camera_av_settings_user_level_management::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, camera_av_settings_user_level_management::Id));
if (flags & CLUSTER_FLAG_SERVER) {
VerifyOrReturnValue(config != NULL, ABORT_CLUSTER_CREATE(cluster));
static const auto plugin_server_init_cb = CALL_ONCE(MatterCameraAvSettingsUserLevelManagementPluginServerInitCallback);
set_plugin_server_init_callback(cluster, plugin_server_init_cb);
add_function_list(cluster, function_list, function_flags);
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, config->feature_flags);
/* Attributes not managed internally */
global::attribute::create_cluster_revision(cluster, cluster_revision);
uint32_t feature_map = config->feature_flags;
VALIDATE_FEATURES_AT_LEAST_ONE("DigitalPTZ,MechanicalPan,MechanicalTilt,MechanicalZoom",
feature::digital_ptz::get_id(), feature::mechanical_pan::get_id(), feature::mechanical_tilt::get_id(), feature::mechanical_zoom::get_id());
if (feature_map & feature::digital_ptz::get_id()) {
VerifyOrReturnValue(feature::digital_ptz::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::mechanical_pan::get_id()) {
VerifyOrReturnValue(feature::mechanical_pan::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::mechanical_tilt::get_id()) {
VerifyOrReturnValue(feature::mechanical_tilt::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::mechanical_zoom::get_id()) {
VerifyOrReturnValue(feature::mechanical_zoom::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::mechanical_presets::get_id()) {
VerifyOrReturnValue(feature::mechanical_presets::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
}
if (flags & CLUSTER_FLAG_CLIENT) {
create_default_binding_cluster(endpoint);
}
return cluster;
}
} /* camera_av_settings_user_level_management */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,84 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace camera_av_settings_user_level_management {
namespace feature {
namespace digital_ptz {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* digital_ptz */
namespace mechanical_pan {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* mechanical_pan */
namespace mechanical_tilt {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* mechanical_tilt */
namespace mechanical_zoom {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* mechanical_zoom */
namespace mechanical_presets {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* mechanical_presets */
} /* feature */
namespace attribute {
attribute_t *create_mptz_position(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_max_presets(cluster_t *cluster, uint8_t value);
attribute_t *create_mptz_presets(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_dptz_streams(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_zoom_max(cluster_t *cluster, uint8_t value);
attribute_t *create_tilt_min(cluster_t *cluster, int16_t value);
attribute_t *create_tilt_max(cluster_t *cluster, int16_t value);
attribute_t *create_pan_min(cluster_t *cluster, int16_t value);
attribute_t *create_pan_max(cluster_t *cluster, int16_t value);
attribute_t *create_movement_state(cluster_t *cluster, uint8_t value);
} /* attribute */
namespace command {
command_t *create_mptz_set_position(cluster_t *cluster);
command_t *create_mptz_relative_move(cluster_t *cluster);
command_t *create_mptz_move_to_preset(cluster_t *cluster);
command_t *create_mptz_save_preset(cluster_t *cluster);
command_t *create_mptz_remove_preset(cluster_t *cluster);
command_t *create_dptz_set_viewport(cluster_t *cluster);
command_t *create_dptz_relative_move(cluster_t *cluster);
} /* command */
typedef struct config {
uint32_t feature_flags;
config() : feature_flags(0) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* camera_av_settings_user_level_management */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,103 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace camera_av_settings_user_level_management {
inline constexpr uint32_t Id = 0x0552;
namespace feature {
namespace DigitalPTZ {
inline constexpr uint32_t Id = 0x1;
} /* DigitalPTZ */
namespace MechanicalPan {
inline constexpr uint32_t Id = 0x2;
} /* MechanicalPan */
namespace MechanicalTilt {
inline constexpr uint32_t Id = 0x4;
} /* MechanicalTilt */
namespace MechanicalZoom {
inline constexpr uint32_t Id = 0x8;
} /* MechanicalZoom */
namespace MechanicalPresets {
inline constexpr uint32_t Id = 0x10;
} /* MechanicalPresets */
} /* feature */
namespace attribute {
namespace MPTZPosition {
inline constexpr uint32_t Id = 0x0000;
} /* MPTZPosition */
namespace MaxPresets {
inline constexpr uint32_t Id = 0x0001;
} /* MaxPresets */
namespace MPTZPresets {
inline constexpr uint32_t Id = 0x0002;
} /* MPTZPresets */
namespace DPTZStreams {
inline constexpr uint32_t Id = 0x0003;
} /* DPTZStreams */
namespace ZoomMax {
inline constexpr uint32_t Id = 0x0004;
} /* ZoomMax */
namespace TiltMin {
inline constexpr uint32_t Id = 0x0005;
} /* TiltMin */
namespace TiltMax {
inline constexpr uint32_t Id = 0x0006;
} /* TiltMax */
namespace PanMin {
inline constexpr uint32_t Id = 0x0007;
} /* PanMin */
namespace PanMax {
inline constexpr uint32_t Id = 0x0008;
} /* PanMax */
namespace MovementState {
inline constexpr uint32_t Id = 0x0009;
} /* MovementState */
} /* attribute */
namespace command {
namespace MPTZSetPosition {
inline constexpr uint32_t Id = 0x00;
} /* MPTZSetPosition */
namespace MPTZRelativeMove {
inline constexpr uint32_t Id = 0x01;
} /* MPTZRelativeMove */
namespace MPTZMoveToPreset {
inline constexpr uint32_t Id = 0x02;
} /* MPTZMoveToPreset */
namespace MPTZSavePreset {
inline constexpr uint32_t Id = 0x03;
} /* MPTZSavePreset */
namespace MPTZRemovePreset {
inline constexpr uint32_t Id = 0x04;
} /* MPTZRemovePreset */
namespace DPTZSetViewport {
inline constexpr uint32_t Id = 0x05;
} /* DPTZSetViewport */
namespace DPTZRelativeMove {
inline constexpr uint32_t Id = 0x06;
} /* DPTZRelativeMove */
} /* command */
} /* camera_av_settings_user_level_management */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,716 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#include <esp_log.h>
#include <esp_matter_core.h>
#include <esp_matter.h>
#include <app-common/zap-generated/cluster-enums.h>
#include <app-common/zap-generated/callback.h>
#include <app/InteractionModelEngine.h>
#include <zap_common/app/PluginApplicationCallbacks.h>
#include <camera_av_stream_management.h>
#include <camera_av_stream_management_ids.h>
#include <binding.h>
#include <esp_matter_data_model_priv.h>
using namespace chip::app::Clusters;
using chip::app::CommandHandler;
using chip::app::DataModel::Decode;
using chip::TLV::TLVReader;
using namespace esp_matter;
using namespace esp_matter::cluster;
static const char *TAG = "camera_av_stream_management_cluster";
constexpr uint16_t cluster_revision = 1;
namespace esp_matter {
namespace cluster {
namespace camera_av_stream_management {
namespace feature {
namespace audio {
uint32_t get_id()
{
return Audio::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_microphone_capabilities(cluster, NULL, 0, 0);
attribute::create_allocated_audio_streams(cluster, NULL, 0, 0);
attribute::create_microphone_muted(cluster, false);
attribute::create_microphone_volume_level(cluster, 0);
attribute::create_microphone_max_level(cluster, 0);
attribute::create_microphone_min_level(cluster, 0);
command::create_audio_stream_allocate(cluster);
command::create_audio_stream_allocate_response(cluster);
command::create_audio_stream_deallocate(cluster);
return ESP_OK;
}
} /* audio */
namespace video {
uint32_t get_id()
{
return Video::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_max_concurrent_encoders(cluster, 0);
attribute::create_max_encoded_pixel_rate(cluster, 0);
attribute::create_video_sensor_params(cluster, NULL, 0, 0);
attribute::create_min_viewport_resolution(cluster, NULL, 0, 0);
attribute::create_rate_distortion_trade_off_points(cluster, NULL, 0, 0);
attribute::create_current_frame_rate(cluster, 0);
attribute::create_allocated_video_streams(cluster, NULL, 0, 0);
attribute::create_viewport(cluster, NULL, 0, 0);
attribute::create_local_video_recording_enabled(cluster, false);
command::create_video_stream_allocate(cluster);
command::create_video_stream_allocate_response(cluster);
command::create_video_stream_modify(cluster);
command::create_video_stream_deallocate(cluster);
return ESP_OK;
}
} /* video */
namespace snapshot {
uint32_t get_id()
{
return Snapshot::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_max_concurrent_encoders(cluster, 0);
attribute::create_max_encoded_pixel_rate(cluster, 0);
attribute::create_snapshot_capabilities(cluster, NULL, 0, 0);
attribute::create_allocated_snapshot_streams(cluster, NULL, 0, 0);
attribute::create_local_snapshot_recording_enabled(cluster, false);
command::create_snapshot_stream_allocate(cluster);
command::create_snapshot_stream_allocate_response(cluster);
command::create_snapshot_stream_modify(cluster);
command::create_snapshot_stream_deallocate(cluster);
command::create_capture_snapshot(cluster);
command::create_capture_snapshot_response(cluster);
return ESP_OK;
}
} /* snapshot */
namespace privacy {
uint32_t get_id()
{
return Privacy::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_soft_recording_privacy_mode_enabled(cluster, false);
attribute::create_soft_livestream_privacy_mode_enabled(cluster, false);
return ESP_OK;
}
} /* privacy */
namespace speaker {
uint32_t get_id()
{
return Speaker::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnError(has_feature(audio), ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_speaker_capabilities(cluster, NULL, 0, 0);
attribute::create_two_way_talk_support(cluster, 0);
attribute::create_speaker_muted(cluster, false);
attribute::create_speaker_volume_level(cluster, 0);
attribute::create_speaker_max_level(cluster, 0);
attribute::create_speaker_min_level(cluster, 0);
return ESP_OK;
}
} /* speaker */
namespace image_control {
uint32_t get_id()
{
return ImageControl::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnError(((has_feature(video)) || (has_feature(snapshot))), ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
return ESP_OK;
}
} /* image_control */
namespace watermark {
uint32_t get_id()
{
return Watermark::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnError(((has_feature(video)) || (has_feature(snapshot))), ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
command::create_video_stream_modify(cluster);
command::create_snapshot_stream_modify(cluster);
return ESP_OK;
}
} /* watermark */
namespace on_screen_display {
uint32_t get_id()
{
return OnScreenDisplay::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnError(((has_feature(video)) || (has_feature(snapshot))), ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
command::create_video_stream_modify(cluster);
command::create_snapshot_stream_modify(cluster);
return ESP_OK;
}
} /* on_screen_display */
namespace local_storage {
uint32_t get_id()
{
return LocalStorage::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_local_video_recording_enabled(cluster, false);
attribute::create_local_snapshot_recording_enabled(cluster, false);
return ESP_OK;
}
} /* local_storage */
namespace high_dynamic_range {
uint32_t get_id()
{
return HighDynamicRange::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnError(((has_feature(video)) || (has_feature(snapshot))), ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_hdr_mode_enabled(cluster, false);
return ESP_OK;
}
} /* high_dynamic_range */
namespace night_vision {
uint32_t get_id()
{
return NightVision::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnError(((has_feature(video)) || (has_feature(snapshot))), ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_night_vision_uses_infrared(cluster, false);
attribute::create_night_vision(cluster, 0);
return ESP_OK;
}
} /* night_vision */
} /* feature */
namespace attribute {
attribute_t *create_max_concurrent_encoders(cluster_t *cluster, uint8_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(((has_feature(video)) || (has_feature(snapshot))), NULL);
return esp_matter::attribute::create(cluster, MaxConcurrentEncoders::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint8(value));
}
attribute_t *create_max_encoded_pixel_rate(cluster_t *cluster, uint32_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(((has_feature(video)) || (has_feature(snapshot))), NULL);
return esp_matter::attribute::create(cluster, MaxEncodedPixelRate::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_video_sensor_params(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(video), NULL);
return esp_matter::attribute::create(cluster, VideoSensorParams::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_array(value, length, count));
}
attribute_t *create_night_vision_uses_infrared(cluster_t *cluster, bool value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(night_vision), NULL);
return esp_matter::attribute::create(cluster, NightVisionUsesInfrared::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_bool(value));
}
attribute_t *create_min_viewport_resolution(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(video), NULL);
return esp_matter::attribute::create(cluster, MinViewportResolution::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_array(value, length, count));
}
attribute_t *create_rate_distortion_trade_off_points(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(video), NULL);
return esp_matter::attribute::create(cluster, RateDistortionTradeOffPoints::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_array(value, length, count));
}
attribute_t *create_max_content_buffer_size(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, MaxContentBufferSize::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_microphone_capabilities(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(audio), NULL);
return esp_matter::attribute::create(cluster, MicrophoneCapabilities::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_array(value, length, count));
}
attribute_t *create_speaker_capabilities(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(speaker), NULL);
return esp_matter::attribute::create(cluster, SpeakerCapabilities::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_array(value, length, count));
}
attribute_t *create_two_way_talk_support(cluster_t *cluster, uint8_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(speaker), NULL);
return esp_matter::attribute::create(cluster, TwoWayTalkSupport::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_enum8(value));
}
attribute_t *create_snapshot_capabilities(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(snapshot), NULL);
return esp_matter::attribute::create(cluster, SnapshotCapabilities::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_array(value, length, count));
}
attribute_t *create_max_network_bandwidth(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, MaxNetworkBandwidth::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_current_frame_rate(cluster_t *cluster, uint16_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(video), NULL);
return esp_matter::attribute::create(cluster, CurrentFrameRate::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint16(value));
}
attribute_t *create_hdr_mode_enabled(cluster_t *cluster, bool value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(high_dynamic_range), NULL);
return esp_matter::attribute::create(cluster, HDRModeEnabled::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_bool(value));
}
attribute_t *create_supported_stream_usages(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, SupportedStreamUsages::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_array(value, length, count));
}
attribute_t *create_allocated_video_streams(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(video), NULL);
return esp_matter::attribute::create(cluster, AllocatedVideoStreams::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_array(value, length, count));
}
attribute_t *create_allocated_audio_streams(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(audio), NULL);
return esp_matter::attribute::create(cluster, AllocatedAudioStreams::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_array(value, length, count));
}
attribute_t *create_allocated_snapshot_streams(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(snapshot), NULL);
return esp_matter::attribute::create(cluster, AllocatedSnapshotStreams::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_array(value, length, count));
}
attribute_t *create_stream_usage_priorities(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, StreamUsagePriorities::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_array(value, length, count));
}
attribute_t *create_soft_recording_privacy_mode_enabled(cluster_t *cluster, bool value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(privacy), NULL);
return esp_matter::attribute::create(cluster, SoftRecordingPrivacyModeEnabled::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_bool(value));
}
attribute_t *create_soft_livestream_privacy_mode_enabled(cluster_t *cluster, bool value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(privacy), NULL);
return esp_matter::attribute::create(cluster, SoftLivestreamPrivacyModeEnabled::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_bool(value));
}
attribute_t *create_hard_privacy_mode_on(cluster_t *cluster, bool value)
{
return esp_matter::attribute::create(cluster, HardPrivacyModeOn::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_bool(value));
}
attribute_t *create_night_vision(cluster_t *cluster, uint8_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(night_vision), NULL);
return esp_matter::attribute::create(cluster, NightVision::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_enum8(value));
}
attribute_t *create_night_vision_illum(cluster_t *cluster, uint8_t value)
{
return esp_matter::attribute::create(cluster, NightVisionIllum::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_enum8(value));
}
attribute_t *create_viewport(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(video), NULL);
return esp_matter::attribute::create(cluster, Viewport::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_array(value, length, count));
}
attribute_t *create_speaker_muted(cluster_t *cluster, bool value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(speaker), NULL);
return esp_matter::attribute::create(cluster, SpeakerMuted::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_bool(value));
}
attribute_t *create_speaker_volume_level(cluster_t *cluster, uint8_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(speaker), NULL);
return esp_matter::attribute::create(cluster, SpeakerVolumeLevel::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_uint8(value));
}
attribute_t *create_speaker_max_level(cluster_t *cluster, uint8_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(speaker), NULL);
return esp_matter::attribute::create(cluster, SpeakerMaxLevel::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint8(value));
}
attribute_t *create_speaker_min_level(cluster_t *cluster, uint8_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(speaker), NULL);
return esp_matter::attribute::create(cluster, SpeakerMinLevel::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint8(value));
}
attribute_t *create_microphone_muted(cluster_t *cluster, bool value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(audio), NULL);
return esp_matter::attribute::create(cluster, MicrophoneMuted::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_bool(value));
}
attribute_t *create_microphone_volume_level(cluster_t *cluster, uint8_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(audio), NULL);
return esp_matter::attribute::create(cluster, MicrophoneVolumeLevel::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_uint8(value));
}
attribute_t *create_microphone_max_level(cluster_t *cluster, uint8_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(audio), NULL);
return esp_matter::attribute::create(cluster, MicrophoneMaxLevel::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint8(value));
}
attribute_t *create_microphone_min_level(cluster_t *cluster, uint8_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(audio), NULL);
return esp_matter::attribute::create(cluster, MicrophoneMinLevel::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint8(value));
}
attribute_t *create_microphone_agc_enabled(cluster_t *cluster, bool value)
{
return esp_matter::attribute::create(cluster, MicrophoneAGCEnabled::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_bool(value));
}
attribute_t *create_image_rotation(cluster_t *cluster, uint16_t value)
{
return esp_matter::attribute::create(cluster, ImageRotation::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_uint16(value));
}
attribute_t *create_image_flip_horizontal(cluster_t *cluster, bool value)
{
return esp_matter::attribute::create(cluster, ImageFlipHorizontal::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_bool(value));
}
attribute_t *create_image_flip_vertical(cluster_t *cluster, bool value)
{
return esp_matter::attribute::create(cluster, ImageFlipVertical::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_bool(value));
}
attribute_t *create_local_video_recording_enabled(cluster_t *cluster, bool value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(((has_feature(video)) && (has_feature(local_storage))), NULL);
return esp_matter::attribute::create(cluster, LocalVideoRecordingEnabled::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_bool(value));
}
attribute_t *create_local_snapshot_recording_enabled(cluster_t *cluster, bool value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(((has_feature(snapshot)) && (has_feature(local_storage))), NULL);
return esp_matter::attribute::create(cluster, LocalSnapshotRecordingEnabled::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_bool(value));
}
attribute_t *create_status_light_enabled(cluster_t *cluster, bool value)
{
return esp_matter::attribute::create(cluster, StatusLightEnabled::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_bool(value));
}
attribute_t *create_status_light_brightness(cluster_t *cluster, uint8_t value)
{
return esp_matter::attribute::create(cluster, StatusLightBrightness::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_enum8(value));
}
} /* attribute */
namespace command {
command_t *create_audio_stream_allocate(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(audio), NULL);
return esp_matter::command::create(cluster, AudioStreamAllocate::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_audio_stream_allocate_response(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(audio), NULL);
return esp_matter::command::create(cluster, AudioStreamAllocateResponse::Id, COMMAND_FLAG_GENERATED, NULL);
}
command_t *create_audio_stream_deallocate(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(audio), NULL);
return esp_matter::command::create(cluster, AudioStreamDeallocate::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_video_stream_allocate(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(video), NULL);
return esp_matter::command::create(cluster, VideoStreamAllocate::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_video_stream_allocate_response(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(video), NULL);
return esp_matter::command::create(cluster, VideoStreamAllocateResponse::Id, COMMAND_FLAG_GENERATED, NULL);
}
command_t *create_video_stream_modify(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(((has_feature(video)) && (((has_feature(watermark)) || (has_feature(on_screen_display))))), NULL);
return esp_matter::command::create(cluster, VideoStreamModify::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_video_stream_deallocate(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(video), NULL);
return esp_matter::command::create(cluster, VideoStreamDeallocate::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_snapshot_stream_allocate(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(snapshot), NULL);
return esp_matter::command::create(cluster, SnapshotStreamAllocate::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_snapshot_stream_allocate_response(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(snapshot), NULL);
return esp_matter::command::create(cluster, SnapshotStreamAllocateResponse::Id, COMMAND_FLAG_GENERATED, NULL);
}
command_t *create_snapshot_stream_modify(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(((has_feature(snapshot)) && (((has_feature(watermark)) || (has_feature(on_screen_display))))), NULL);
return esp_matter::command::create(cluster, SnapshotStreamModify::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_snapshot_stream_deallocate(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(snapshot), NULL);
return esp_matter::command::create(cluster, SnapshotStreamDeallocate::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_set_stream_priorities(cluster_t *cluster)
{
return esp_matter::command::create(cluster, SetStreamPriorities::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_capture_snapshot(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(snapshot), NULL);
return esp_matter::command::create(cluster, CaptureSnapshot::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_capture_snapshot_response(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(snapshot), NULL);
return esp_matter::command::create(cluster, CaptureSnapshotResponse::Id, COMMAND_FLAG_GENERATED, NULL);
}
} /* command */
static void create_default_binding_cluster(endpoint_t *endpoint)
{
binding::config_t config;
binding::create(endpoint, &config, CLUSTER_FLAG_SERVER);
}
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)
{
cluster_t *cluster = esp_matter::cluster::create(endpoint, camera_av_stream_management::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, camera_av_stream_management::Id));
if (flags & CLUSTER_FLAG_SERVER) {
VerifyOrReturnValue(config != NULL, ABORT_CLUSTER_CREATE(cluster));
static const auto plugin_server_init_cb = CALL_ONCE(MatterCameraAvStreamManagementPluginServerInitCallback);
set_plugin_server_init_callback(cluster, plugin_server_init_cb);
add_function_list(cluster, function_list, function_flags);
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, config->feature_flags);
/* Attributes not managed internally */
global::attribute::create_cluster_revision(cluster, cluster_revision);
attribute::create_max_content_buffer_size(cluster, 0);
attribute::create_max_network_bandwidth(cluster, 0);
attribute::create_supported_stream_usages(cluster, NULL, 0, 0);
attribute::create_stream_usage_priorities(cluster, NULL, 0, 0);
uint32_t feature_map = config->feature_flags;
VALIDATE_FEATURES_AT_LEAST_ONE("Audio,Video,Snapshot",
feature::audio::get_id(), feature::video::get_id(), feature::snapshot::get_id());
if (feature_map & feature::audio::get_id()) {
VerifyOrReturnValue(feature::audio::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::video::get_id()) {
VerifyOrReturnValue(feature::video::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::snapshot::get_id()) {
VerifyOrReturnValue(feature::snapshot::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::privacy::get_id()) {
VerifyOrReturnValue(feature::privacy::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::speaker::get_id()) {
VerifyOrReturnValue(feature::speaker::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::image_control::get_id()) {
VerifyOrReturnValue(feature::image_control::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::watermark::get_id()) {
VerifyOrReturnValue(feature::watermark::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::on_screen_display::get_id()) {
VerifyOrReturnValue(feature::on_screen_display::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::local_storage::get_id()) {
VerifyOrReturnValue(feature::local_storage::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::high_dynamic_range::get_id()) {
VerifyOrReturnValue(feature::high_dynamic_range::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::night_vision::get_id()) {
VerifyOrReturnValue(feature::night_vision::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
command::create_set_stream_priorities(cluster);
}
if (flags & CLUSTER_FLAG_CLIENT) {
create_default_binding_cluster(endpoint);
}
return cluster;
}
} /* camera_av_stream_management */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,152 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace camera_av_stream_management {
namespace feature {
namespace audio {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* audio */
namespace video {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* video */
namespace snapshot {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* snapshot */
namespace privacy {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* privacy */
namespace speaker {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* speaker */
namespace image_control {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* image_control */
namespace watermark {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* watermark */
namespace on_screen_display {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* on_screen_display */
namespace local_storage {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* local_storage */
namespace high_dynamic_range {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* high_dynamic_range */
namespace night_vision {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* night_vision */
} /* feature */
namespace attribute {
attribute_t *create_max_concurrent_encoders(cluster_t *cluster, uint8_t value);
attribute_t *create_max_encoded_pixel_rate(cluster_t *cluster, uint32_t value);
attribute_t *create_video_sensor_params(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_night_vision_uses_infrared(cluster_t *cluster, bool value);
attribute_t *create_min_viewport_resolution(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_rate_distortion_trade_off_points(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_max_content_buffer_size(cluster_t *cluster, uint32_t value);
attribute_t *create_microphone_capabilities(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_speaker_capabilities(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_two_way_talk_support(cluster_t *cluster, uint8_t value);
attribute_t *create_snapshot_capabilities(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_max_network_bandwidth(cluster_t *cluster, uint32_t value);
attribute_t *create_current_frame_rate(cluster_t *cluster, uint16_t value);
attribute_t *create_hdr_mode_enabled(cluster_t *cluster, bool value);
attribute_t *create_supported_stream_usages(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_allocated_video_streams(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_allocated_audio_streams(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_allocated_snapshot_streams(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_stream_usage_priorities(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_soft_recording_privacy_mode_enabled(cluster_t *cluster, bool value);
attribute_t *create_soft_livestream_privacy_mode_enabled(cluster_t *cluster, bool value);
attribute_t *create_hard_privacy_mode_on(cluster_t *cluster, bool value);
attribute_t *create_night_vision(cluster_t *cluster, uint8_t value);
attribute_t *create_night_vision_illum(cluster_t *cluster, uint8_t value);
attribute_t *create_viewport(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_speaker_muted(cluster_t *cluster, bool value);
attribute_t *create_speaker_volume_level(cluster_t *cluster, uint8_t value);
attribute_t *create_speaker_max_level(cluster_t *cluster, uint8_t value);
attribute_t *create_speaker_min_level(cluster_t *cluster, uint8_t value);
attribute_t *create_microphone_muted(cluster_t *cluster, bool value);
attribute_t *create_microphone_volume_level(cluster_t *cluster, uint8_t value);
attribute_t *create_microphone_max_level(cluster_t *cluster, uint8_t value);
attribute_t *create_microphone_min_level(cluster_t *cluster, uint8_t value);
attribute_t *create_microphone_agc_enabled(cluster_t *cluster, bool value);
attribute_t *create_image_rotation(cluster_t *cluster, uint16_t value);
attribute_t *create_image_flip_horizontal(cluster_t *cluster, bool value);
attribute_t *create_image_flip_vertical(cluster_t *cluster, bool value);
attribute_t *create_local_video_recording_enabled(cluster_t *cluster, bool value);
attribute_t *create_local_snapshot_recording_enabled(cluster_t *cluster, bool value);
attribute_t *create_status_light_enabled(cluster_t *cluster, bool value);
attribute_t *create_status_light_brightness(cluster_t *cluster, uint8_t value);
} /* attribute */
namespace command {
command_t *create_audio_stream_allocate(cluster_t *cluster);
command_t *create_audio_stream_allocate_response(cluster_t *cluster);
command_t *create_audio_stream_deallocate(cluster_t *cluster);
command_t *create_video_stream_allocate(cluster_t *cluster);
command_t *create_video_stream_allocate_response(cluster_t *cluster);
command_t *create_video_stream_modify(cluster_t *cluster);
command_t *create_video_stream_deallocate(cluster_t *cluster);
command_t *create_snapshot_stream_allocate(cluster_t *cluster);
command_t *create_snapshot_stream_allocate_response(cluster_t *cluster);
command_t *create_snapshot_stream_modify(cluster_t *cluster);
command_t *create_snapshot_stream_deallocate(cluster_t *cluster);
command_t *create_set_stream_priorities(cluster_t *cluster);
command_t *create_capture_snapshot(cluster_t *cluster);
command_t *create_capture_snapshot_response(cluster_t *cluster);
} /* command */
typedef struct config {
uint32_t feature_flags;
config() : feature_flags(0) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* camera_av_stream_management */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,235 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace camera_av_stream_management {
inline constexpr uint32_t Id = 0x0551;
namespace feature {
namespace Audio {
inline constexpr uint32_t Id = 0x1;
} /* Audio */
namespace Video {
inline constexpr uint32_t Id = 0x2;
} /* Video */
namespace Snapshot {
inline constexpr uint32_t Id = 0x4;
} /* Snapshot */
namespace Privacy {
inline constexpr uint32_t Id = 0x8;
} /* Privacy */
namespace Speaker {
inline constexpr uint32_t Id = 0x10;
} /* Speaker */
namespace ImageControl {
inline constexpr uint32_t Id = 0x20;
} /* ImageControl */
namespace Watermark {
inline constexpr uint32_t Id = 0x40;
} /* Watermark */
namespace OnScreenDisplay {
inline constexpr uint32_t Id = 0x80;
} /* OnScreenDisplay */
namespace LocalStorage {
inline constexpr uint32_t Id = 0x100;
} /* LocalStorage */
namespace HighDynamicRange {
inline constexpr uint32_t Id = 0x200;
} /* HighDynamicRange */
namespace NightVision {
inline constexpr uint32_t Id = 0x400;
} /* NightVision */
} /* feature */
namespace attribute {
namespace MaxConcurrentEncoders {
inline constexpr uint32_t Id = 0x0000;
} /* MaxConcurrentEncoders */
namespace MaxEncodedPixelRate {
inline constexpr uint32_t Id = 0x0001;
} /* MaxEncodedPixelRate */
namespace VideoSensorParams {
inline constexpr uint32_t Id = 0x0002;
} /* VideoSensorParams */
namespace NightVisionUsesInfrared {
inline constexpr uint32_t Id = 0x0003;
} /* NightVisionUsesInfrared */
namespace MinViewportResolution {
inline constexpr uint32_t Id = 0x0004;
} /* MinViewportResolution */
namespace RateDistortionTradeOffPoints {
inline constexpr uint32_t Id = 0x0005;
} /* RateDistortionTradeOffPoints */
namespace MaxContentBufferSize {
inline constexpr uint32_t Id = 0x0006;
} /* MaxContentBufferSize */
namespace MicrophoneCapabilities {
inline constexpr uint32_t Id = 0x0007;
} /* MicrophoneCapabilities */
namespace SpeakerCapabilities {
inline constexpr uint32_t Id = 0x0008;
} /* SpeakerCapabilities */
namespace TwoWayTalkSupport {
inline constexpr uint32_t Id = 0x0009;
} /* TwoWayTalkSupport */
namespace SnapshotCapabilities {
inline constexpr uint32_t Id = 0x000A;
} /* SnapshotCapabilities */
namespace MaxNetworkBandwidth {
inline constexpr uint32_t Id = 0x000B;
} /* MaxNetworkBandwidth */
namespace CurrentFrameRate {
inline constexpr uint32_t Id = 0x000C;
} /* CurrentFrameRate */
namespace HDRModeEnabled {
inline constexpr uint32_t Id = 0x000D;
} /* HDRModeEnabled */
namespace SupportedStreamUsages {
inline constexpr uint32_t Id = 0x000E;
} /* SupportedStreamUsages */
namespace AllocatedVideoStreams {
inline constexpr uint32_t Id = 0x000F;
} /* AllocatedVideoStreams */
namespace AllocatedAudioStreams {
inline constexpr uint32_t Id = 0x0010;
} /* AllocatedAudioStreams */
namespace AllocatedSnapshotStreams {
inline constexpr uint32_t Id = 0x0011;
} /* AllocatedSnapshotStreams */
namespace StreamUsagePriorities {
inline constexpr uint32_t Id = 0x0012;
} /* StreamUsagePriorities */
namespace SoftRecordingPrivacyModeEnabled {
inline constexpr uint32_t Id = 0x0013;
} /* SoftRecordingPrivacyModeEnabled */
namespace SoftLivestreamPrivacyModeEnabled {
inline constexpr uint32_t Id = 0x0014;
} /* SoftLivestreamPrivacyModeEnabled */
namespace HardPrivacyModeOn {
inline constexpr uint32_t Id = 0x0015;
} /* HardPrivacyModeOn */
namespace NightVision {
inline constexpr uint32_t Id = 0x0016;
} /* NightVision */
namespace NightVisionIllum {
inline constexpr uint32_t Id = 0x0017;
} /* NightVisionIllum */
namespace Viewport {
inline constexpr uint32_t Id = 0x0018;
} /* Viewport */
namespace SpeakerMuted {
inline constexpr uint32_t Id = 0x0019;
} /* SpeakerMuted */
namespace SpeakerVolumeLevel {
inline constexpr uint32_t Id = 0x001A;
} /* SpeakerVolumeLevel */
namespace SpeakerMaxLevel {
inline constexpr uint32_t Id = 0x001B;
} /* SpeakerMaxLevel */
namespace SpeakerMinLevel {
inline constexpr uint32_t Id = 0x001C;
} /* SpeakerMinLevel */
namespace MicrophoneMuted {
inline constexpr uint32_t Id = 0x001D;
} /* MicrophoneMuted */
namespace MicrophoneVolumeLevel {
inline constexpr uint32_t Id = 0x001E;
} /* MicrophoneVolumeLevel */
namespace MicrophoneMaxLevel {
inline constexpr uint32_t Id = 0x001F;
} /* MicrophoneMaxLevel */
namespace MicrophoneMinLevel {
inline constexpr uint32_t Id = 0x0020;
} /* MicrophoneMinLevel */
namespace MicrophoneAGCEnabled {
inline constexpr uint32_t Id = 0x0021;
} /* MicrophoneAGCEnabled */
namespace ImageRotation {
inline constexpr uint32_t Id = 0x0022;
} /* ImageRotation */
namespace ImageFlipHorizontal {
inline constexpr uint32_t Id = 0x0023;
} /* ImageFlipHorizontal */
namespace ImageFlipVertical {
inline constexpr uint32_t Id = 0x0024;
} /* ImageFlipVertical */
namespace LocalVideoRecordingEnabled {
inline constexpr uint32_t Id = 0x0025;
} /* LocalVideoRecordingEnabled */
namespace LocalSnapshotRecordingEnabled {
inline constexpr uint32_t Id = 0x0026;
} /* LocalSnapshotRecordingEnabled */
namespace StatusLightEnabled {
inline constexpr uint32_t Id = 0x0027;
} /* StatusLightEnabled */
namespace StatusLightBrightness {
inline constexpr uint32_t Id = 0x0028;
} /* StatusLightBrightness */
} /* attribute */
namespace command {
namespace AudioStreamAllocate {
inline constexpr uint32_t Id = 0x00;
} /* AudioStreamAllocate */
namespace AudioStreamAllocateResponse {
inline constexpr uint32_t Id = 0x01;
} /* AudioStreamAllocateResponse */
namespace AudioStreamDeallocate {
inline constexpr uint32_t Id = 0x02;
} /* AudioStreamDeallocate */
namespace VideoStreamAllocate {
inline constexpr uint32_t Id = 0x03;
} /* VideoStreamAllocate */
namespace VideoStreamAllocateResponse {
inline constexpr uint32_t Id = 0x04;
} /* VideoStreamAllocateResponse */
namespace VideoStreamModify {
inline constexpr uint32_t Id = 0x05;
} /* VideoStreamModify */
namespace VideoStreamDeallocate {
inline constexpr uint32_t Id = 0x06;
} /* VideoStreamDeallocate */
namespace SnapshotStreamAllocate {
inline constexpr uint32_t Id = 0x07;
} /* SnapshotStreamAllocate */
namespace SnapshotStreamAllocateResponse {
inline constexpr uint32_t Id = 0x08;
} /* SnapshotStreamAllocateResponse */
namespace SnapshotStreamModify {
inline constexpr uint32_t Id = 0x09;
} /* SnapshotStreamModify */
namespace SnapshotStreamDeallocate {
inline constexpr uint32_t Id = 0x0A;
} /* SnapshotStreamDeallocate */
namespace SetStreamPriorities {
inline constexpr uint32_t Id = 0x0B;
} /* SetStreamPriorities */
namespace CaptureSnapshot {
inline constexpr uint32_t Id = 0x0C;
} /* CaptureSnapshot */
namespace CaptureSnapshotResponse {
inline constexpr uint32_t Id = 0x0D;
} /* CaptureSnapshotResponse */
} /* command */
} /* camera_av_stream_management */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,289 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#include <esp_log.h>
#include <esp_matter_core.h>
#include <esp_matter.h>
#include <app-common/zap-generated/cluster-enums.h>
#include <app-common/zap-generated/callback.h>
#include <app/InteractionModelEngine.h>
#include <zap_common/app/PluginApplicationCallbacks.h>
#include <carbon_dioxide_concentration_measurement.h>
#include <carbon_dioxide_concentration_measurement_ids.h>
#include <binding.h>
#include <esp_matter_data_model_priv.h>
using namespace chip::app::Clusters;
using chip::app::CommandHandler;
using chip::app::DataModel::Decode;
using chip::TLV::TLVReader;
using namespace esp_matter;
using namespace esp_matter::cluster;
static const char *TAG = "carbon_dioxide_concentration_measurement_cluster";
constexpr uint16_t cluster_revision = 3;
namespace esp_matter {
namespace cluster {
namespace carbon_dioxide_concentration_measurement {
namespace feature {
namespace numeric_measurement {
uint32_t get_id()
{
return NumericMeasurement::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_measured_value(cluster, 0);
attribute::create_min_measured_value(cluster, 0);
attribute::create_max_measured_value(cluster, 0);
attribute::create_measurement_unit(cluster, 0);
return ESP_OK;
}
} /* numeric_measurement */
namespace level_indication {
uint32_t get_id()
{
return LevelIndication::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_level_value(cluster, 0);
return ESP_OK;
}
} /* level_indication */
namespace medium_level {
uint32_t get_id()
{
return MediumLevel::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnError(has_feature(level_indication), ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
return ESP_OK;
}
} /* medium_level */
namespace critical_level {
uint32_t get_id()
{
return CriticalLevel::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnError(has_feature(level_indication), ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
return ESP_OK;
}
} /* critical_level */
namespace peak_measurement {
uint32_t get_id()
{
return PeakMeasurement::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnError(has_feature(numeric_measurement), ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_peak_measured_value(cluster, 0);
attribute::create_peak_measured_value_window(cluster, 0);
return ESP_OK;
}
} /* peak_measurement */
namespace average_measurement {
uint32_t get_id()
{
return AverageMeasurement::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnError(has_feature(numeric_measurement), ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_average_measured_value(cluster, 0);
attribute::create_average_measured_value_window(cluster, 0);
return ESP_OK;
}
} /* average_measurement */
} /* feature */
namespace attribute {
attribute_t *create_measured_value(cluster_t *cluster, nullable<float> value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(numeric_measurement), NULL);
return esp_matter::attribute::create(cluster, MeasuredValue::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<float> value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(numeric_measurement), NULL);
return esp_matter::attribute::create(cluster, MinMeasuredValue::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<float> value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(numeric_measurement), NULL);
return esp_matter::attribute::create(cluster, MaxMeasuredValue::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<float> value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(peak_measurement), NULL);
return esp_matter::attribute::create(cluster, PeakMeasuredValue::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_peak_measured_value_window(cluster_t *cluster, uint32_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(peak_measurement), NULL);
return esp_matter::attribute::create(cluster, PeakMeasuredValueWindow::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<float> value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(average_measurement), NULL);
return esp_matter::attribute::create(cluster, AverageMeasuredValue::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_average_measured_value_window(cluster_t *cluster, uint32_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(average_measurement), NULL);
return esp_matter::attribute::create(cluster, AverageMeasuredValueWindow::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_uncertainty(cluster_t *cluster, float value)
{
return esp_matter::attribute::create(cluster, Uncertainty::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_float(value));
}
attribute_t *create_measurement_unit(cluster_t *cluster, uint8_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(numeric_measurement), NULL);
return esp_matter::attribute::create(cluster, MeasurementUnit::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_enum8(value));
}
attribute_t *create_measurement_medium(cluster_t *cluster, uint8_t value)
{
return esp_matter::attribute::create(cluster, MeasurementMedium::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_enum8(value));
}
attribute_t *create_level_value(cluster_t *cluster, uint8_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(level_indication), NULL);
return esp_matter::attribute::create(cluster, LevelValue::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_enum8(value));
}
} /* attribute */
static void create_default_binding_cluster(endpoint_t *endpoint)
{
binding::config_t config;
binding::create(endpoint, &config, CLUSTER_FLAG_SERVER);
}
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)
{
cluster_t *cluster = esp_matter::cluster::create(endpoint, carbon_dioxide_concentration_measurement::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, carbon_dioxide_concentration_measurement::Id));
if (flags & CLUSTER_FLAG_SERVER) {
VerifyOrReturnValue(config != NULL, ABORT_CLUSTER_CREATE(cluster));
static const auto plugin_server_init_cb = CALL_ONCE(MatterCarbonDioxideConcentrationMeasurementPluginServerInitCallback);
set_plugin_server_init_callback(cluster, plugin_server_init_cb);
add_function_list(cluster, function_list, function_flags);
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, config->feature_flags);
/* Attributes not managed internally */
global::attribute::create_cluster_revision(cluster, cluster_revision);
attribute::create_measurement_medium(cluster, 0);
uint32_t feature_map = config->feature_flags;
VALIDATE_FEATURES_AT_LEAST_ONE("NumericMeasurement,LevelIndication",
feature::numeric_measurement::get_id(), feature::level_indication::get_id());
if (feature_map & feature::numeric_measurement::get_id()) {
VerifyOrReturnValue(feature::numeric_measurement::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::level_indication::get_id()) {
VerifyOrReturnValue(feature::level_indication::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::medium_level::get_id()) {
VerifyOrReturnValue(feature::medium_level::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::critical_level::get_id()) {
VerifyOrReturnValue(feature::critical_level::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::peak_measurement::get_id()) {
VerifyOrReturnValue(feature::peak_measurement::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::average_measurement::get_id()) {
VerifyOrReturnValue(feature::average_measurement::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
}
if (flags & CLUSTER_FLAG_CLIENT) {
create_default_binding_cluster(endpoint);
}
return cluster;
}
} /* carbon_dioxide_concentration_measurement */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,80 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace carbon_dioxide_concentration_measurement {
namespace feature {
namespace numeric_measurement {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* numeric_measurement */
namespace level_indication {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* level_indication */
namespace medium_level {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* medium_level */
namespace critical_level {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* critical_level */
namespace peak_measurement {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* peak_measurement */
namespace average_measurement {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* average_measurement */
} /* feature */
namespace attribute {
attribute_t *create_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_peak_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_average_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_uncertainty(cluster_t *cluster, float value);
attribute_t *create_measurement_unit(cluster_t *cluster, uint8_t value);
attribute_t *create_measurement_medium(cluster_t *cluster, uint8_t value);
attribute_t *create_level_value(cluster_t *cluster, uint8_t value);
} /* attribute */
typedef struct config {
uint32_t feature_flags;
config() : feature_flags(0) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* carbon_dioxide_concentration_measurement */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,85 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace carbon_dioxide_concentration_measurement {
inline constexpr uint32_t Id = 0x040D;
namespace feature {
namespace NumericMeasurement {
inline constexpr uint32_t Id = 0x1;
} /* NumericMeasurement */
namespace LevelIndication {
inline constexpr uint32_t Id = 0x2;
} /* LevelIndication */
namespace MediumLevel {
inline constexpr uint32_t Id = 0x4;
} /* MediumLevel */
namespace CriticalLevel {
inline constexpr uint32_t Id = 0x8;
} /* CriticalLevel */
namespace PeakMeasurement {
inline constexpr uint32_t Id = 0x10;
} /* PeakMeasurement */
namespace AverageMeasurement {
inline constexpr uint32_t Id = 0x20;
} /* AverageMeasurement */
} /* feature */
namespace attribute {
namespace MeasuredValue {
inline constexpr uint32_t Id = 0x0000;
} /* MeasuredValue */
namespace MinMeasuredValue {
inline constexpr uint32_t Id = 0x0001;
} /* MinMeasuredValue */
namespace MaxMeasuredValue {
inline constexpr uint32_t Id = 0x0002;
} /* MaxMeasuredValue */
namespace PeakMeasuredValue {
inline constexpr uint32_t Id = 0x0003;
} /* PeakMeasuredValue */
namespace PeakMeasuredValueWindow {
inline constexpr uint32_t Id = 0x0004;
} /* PeakMeasuredValueWindow */
namespace AverageMeasuredValue {
inline constexpr uint32_t Id = 0x0005;
} /* AverageMeasuredValue */
namespace AverageMeasuredValueWindow {
inline constexpr uint32_t Id = 0x0006;
} /* AverageMeasuredValueWindow */
namespace Uncertainty {
inline constexpr uint32_t Id = 0x0007;
} /* Uncertainty */
namespace MeasurementUnit {
inline constexpr uint32_t Id = 0x0008;
} /* MeasurementUnit */
namespace MeasurementMedium {
inline constexpr uint32_t Id = 0x0009;
} /* MeasurementMedium */
namespace LevelValue {
inline constexpr uint32_t Id = 0x000A;
} /* LevelValue */
} /* attribute */
} /* carbon_dioxide_concentration_measurement */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,289 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#include <esp_log.h>
#include <esp_matter_core.h>
#include <esp_matter.h>
#include <app-common/zap-generated/cluster-enums.h>
#include <app-common/zap-generated/callback.h>
#include <app/InteractionModelEngine.h>
#include <zap_common/app/PluginApplicationCallbacks.h>
#include <carbon_monoxide_concentration_measurement.h>
#include <carbon_monoxide_concentration_measurement_ids.h>
#include <binding.h>
#include <esp_matter_data_model_priv.h>
using namespace chip::app::Clusters;
using chip::app::CommandHandler;
using chip::app::DataModel::Decode;
using chip::TLV::TLVReader;
using namespace esp_matter;
using namespace esp_matter::cluster;
static const char *TAG = "carbon_monoxide_concentration_measurement_cluster";
constexpr uint16_t cluster_revision = 3;
namespace esp_matter {
namespace cluster {
namespace carbon_monoxide_concentration_measurement {
namespace feature {
namespace numeric_measurement {
uint32_t get_id()
{
return NumericMeasurement::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_measured_value(cluster, 0);
attribute::create_min_measured_value(cluster, 0);
attribute::create_max_measured_value(cluster, 0);
attribute::create_measurement_unit(cluster, 0);
return ESP_OK;
}
} /* numeric_measurement */
namespace level_indication {
uint32_t get_id()
{
return LevelIndication::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_level_value(cluster, 0);
return ESP_OK;
}
} /* level_indication */
namespace medium_level {
uint32_t get_id()
{
return MediumLevel::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnError(has_feature(level_indication), ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
return ESP_OK;
}
} /* medium_level */
namespace critical_level {
uint32_t get_id()
{
return CriticalLevel::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnError(has_feature(level_indication), ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
return ESP_OK;
}
} /* critical_level */
namespace peak_measurement {
uint32_t get_id()
{
return PeakMeasurement::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnError(has_feature(numeric_measurement), ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_peak_measured_value(cluster, 0);
attribute::create_peak_measured_value_window(cluster, 0);
return ESP_OK;
}
} /* peak_measurement */
namespace average_measurement {
uint32_t get_id()
{
return AverageMeasurement::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnError(has_feature(numeric_measurement), ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_average_measured_value(cluster, 0);
attribute::create_average_measured_value_window(cluster, 0);
return ESP_OK;
}
} /* average_measurement */
} /* feature */
namespace attribute {
attribute_t *create_measured_value(cluster_t *cluster, nullable<float> value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(numeric_measurement), NULL);
return esp_matter::attribute::create(cluster, MeasuredValue::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<float> value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(numeric_measurement), NULL);
return esp_matter::attribute::create(cluster, MinMeasuredValue::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<float> value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(numeric_measurement), NULL);
return esp_matter::attribute::create(cluster, MaxMeasuredValue::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<float> value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(peak_measurement), NULL);
return esp_matter::attribute::create(cluster, PeakMeasuredValue::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_peak_measured_value_window(cluster_t *cluster, uint32_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(peak_measurement), NULL);
return esp_matter::attribute::create(cluster, PeakMeasuredValueWindow::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<float> value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(average_measurement), NULL);
return esp_matter::attribute::create(cluster, AverageMeasuredValue::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_average_measured_value_window(cluster_t *cluster, uint32_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(average_measurement), NULL);
return esp_matter::attribute::create(cluster, AverageMeasuredValueWindow::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_uncertainty(cluster_t *cluster, float value)
{
return esp_matter::attribute::create(cluster, Uncertainty::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_float(value));
}
attribute_t *create_measurement_unit(cluster_t *cluster, uint8_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(numeric_measurement), NULL);
return esp_matter::attribute::create(cluster, MeasurementUnit::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_enum8(value));
}
attribute_t *create_measurement_medium(cluster_t *cluster, uint8_t value)
{
return esp_matter::attribute::create(cluster, MeasurementMedium::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_enum8(value));
}
attribute_t *create_level_value(cluster_t *cluster, uint8_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(level_indication), NULL);
return esp_matter::attribute::create(cluster, LevelValue::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_enum8(value));
}
} /* attribute */
static void create_default_binding_cluster(endpoint_t *endpoint)
{
binding::config_t config;
binding::create(endpoint, &config, CLUSTER_FLAG_SERVER);
}
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)
{
cluster_t *cluster = esp_matter::cluster::create(endpoint, carbon_monoxide_concentration_measurement::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, carbon_monoxide_concentration_measurement::Id));
if (flags & CLUSTER_FLAG_SERVER) {
VerifyOrReturnValue(config != NULL, ABORT_CLUSTER_CREATE(cluster));
static const auto plugin_server_init_cb = CALL_ONCE(MatterCarbonMonoxideConcentrationMeasurementPluginServerInitCallback);
set_plugin_server_init_callback(cluster, plugin_server_init_cb);
add_function_list(cluster, function_list, function_flags);
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, config->feature_flags);
/* Attributes not managed internally */
global::attribute::create_cluster_revision(cluster, cluster_revision);
attribute::create_measurement_medium(cluster, 0);
uint32_t feature_map = config->feature_flags;
VALIDATE_FEATURES_AT_LEAST_ONE("NumericMeasurement,LevelIndication",
feature::numeric_measurement::get_id(), feature::level_indication::get_id());
if (feature_map & feature::numeric_measurement::get_id()) {
VerifyOrReturnValue(feature::numeric_measurement::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::level_indication::get_id()) {
VerifyOrReturnValue(feature::level_indication::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::medium_level::get_id()) {
VerifyOrReturnValue(feature::medium_level::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::critical_level::get_id()) {
VerifyOrReturnValue(feature::critical_level::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::peak_measurement::get_id()) {
VerifyOrReturnValue(feature::peak_measurement::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::average_measurement::get_id()) {
VerifyOrReturnValue(feature::average_measurement::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
}
if (flags & CLUSTER_FLAG_CLIENT) {
create_default_binding_cluster(endpoint);
}
return cluster;
}
} /* carbon_monoxide_concentration_measurement */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,80 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace carbon_monoxide_concentration_measurement {
namespace feature {
namespace numeric_measurement {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* numeric_measurement */
namespace level_indication {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* level_indication */
namespace medium_level {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* medium_level */
namespace critical_level {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* critical_level */
namespace peak_measurement {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* peak_measurement */
namespace average_measurement {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* average_measurement */
} /* feature */
namespace attribute {
attribute_t *create_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_peak_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_average_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_uncertainty(cluster_t *cluster, float value);
attribute_t *create_measurement_unit(cluster_t *cluster, uint8_t value);
attribute_t *create_measurement_medium(cluster_t *cluster, uint8_t value);
attribute_t *create_level_value(cluster_t *cluster, uint8_t value);
} /* attribute */
typedef struct config {
uint32_t feature_flags;
config() : feature_flags(0) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* carbon_monoxide_concentration_measurement */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,85 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace carbon_monoxide_concentration_measurement {
inline constexpr uint32_t Id = 0x040C;
namespace feature {
namespace NumericMeasurement {
inline constexpr uint32_t Id = 0x1;
} /* NumericMeasurement */
namespace LevelIndication {
inline constexpr uint32_t Id = 0x2;
} /* LevelIndication */
namespace MediumLevel {
inline constexpr uint32_t Id = 0x4;
} /* MediumLevel */
namespace CriticalLevel {
inline constexpr uint32_t Id = 0x8;
} /* CriticalLevel */
namespace PeakMeasurement {
inline constexpr uint32_t Id = 0x10;
} /* PeakMeasurement */
namespace AverageMeasurement {
inline constexpr uint32_t Id = 0x20;
} /* AverageMeasurement */
} /* feature */
namespace attribute {
namespace MeasuredValue {
inline constexpr uint32_t Id = 0x0000;
} /* MeasuredValue */
namespace MinMeasuredValue {
inline constexpr uint32_t Id = 0x0001;
} /* MinMeasuredValue */
namespace MaxMeasuredValue {
inline constexpr uint32_t Id = 0x0002;
} /* MaxMeasuredValue */
namespace PeakMeasuredValue {
inline constexpr uint32_t Id = 0x0003;
} /* PeakMeasuredValue */
namespace PeakMeasuredValueWindow {
inline constexpr uint32_t Id = 0x0004;
} /* PeakMeasuredValueWindow */
namespace AverageMeasuredValue {
inline constexpr uint32_t Id = 0x0005;
} /* AverageMeasuredValue */
namespace AverageMeasuredValueWindow {
inline constexpr uint32_t Id = 0x0006;
} /* AverageMeasuredValueWindow */
namespace Uncertainty {
inline constexpr uint32_t Id = 0x0007;
} /* Uncertainty */
namespace MeasurementUnit {
inline constexpr uint32_t Id = 0x0008;
} /* MeasurementUnit */
namespace MeasurementMedium {
inline constexpr uint32_t Id = 0x0009;
} /* MeasurementMedium */
namespace LevelValue {
inline constexpr uint32_t Id = 0x000A;
} /* LevelValue */
} /* attribute */
} /* carbon_monoxide_concentration_measurement */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,305 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#include <esp_log.h>
#include <esp_matter_core.h>
#include <esp_matter.h>
#include <app-common/zap-generated/cluster-enums.h>
#include <app-common/zap-generated/callback.h>
#include <app/InteractionModelEngine.h>
#include <zap_common/app/PluginApplicationCallbacks.h>
#include <esp_matter_delegate_callbacks.h>
#include <channel.h>
#include <channel_ids.h>
#include <binding.h>
#include <esp_matter_data_model_priv.h>
using namespace chip::app::Clusters;
using chip::app::CommandHandler;
using chip::app::DataModel::Decode;
using chip::TLV::TLVReader;
using namespace esp_matter;
using namespace esp_matter::cluster;
using namespace esp_matter::cluster::delegate_cb;
static const char *TAG = "channel_cluster";
constexpr uint16_t cluster_revision = 2;
static esp_err_t esp_matter_command_callback_change_channel(const ConcreteCommandPath &command_path, TLVReader &tlv_data,
void *opaque_ptr)
{
chip::app::Clusters::Channel::Commands::ChangeChannel::DecodableType command_data;
CHIP_ERROR error = Decode(tlv_data, command_data);
if (error == CHIP_NO_ERROR) {
emberAfChannelClusterChangeChannelCallback((CommandHandler *)opaque_ptr, command_path, command_data);
}
return ESP_OK;
}
static esp_err_t esp_matter_command_callback_change_channel_by_number(const ConcreteCommandPath &command_path, TLVReader &tlv_data,
void *opaque_ptr)
{
chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::DecodableType command_data;
CHIP_ERROR error = Decode(tlv_data, command_data);
if (error == CHIP_NO_ERROR) {
emberAfChannelClusterChangeChannelByNumberCallback((CommandHandler *)opaque_ptr, command_path, command_data);
}
return ESP_OK;
}
static esp_err_t esp_matter_command_callback_skip_channel(const ConcreteCommandPath &command_path, TLVReader &tlv_data,
void *opaque_ptr)
{
chip::app::Clusters::Channel::Commands::SkipChannel::DecodableType command_data;
CHIP_ERROR error = Decode(tlv_data, command_data);
if (error == CHIP_NO_ERROR) {
emberAfChannelClusterSkipChannelCallback((CommandHandler *)opaque_ptr, command_path, command_data);
}
return ESP_OK;
}
static esp_err_t esp_matter_command_callback_get_program_guide(const ConcreteCommandPath &command_path, TLVReader &tlv_data,
void *opaque_ptr)
{
chip::app::Clusters::Channel::Commands::GetProgramGuide::DecodableType command_data;
CHIP_ERROR error = Decode(tlv_data, command_data);
if (error == CHIP_NO_ERROR) {
emberAfChannelClusterGetProgramGuideCallback((CommandHandler *)opaque_ptr, command_path, command_data);
}
return ESP_OK;
}
static esp_err_t esp_matter_command_callback_record_program(const ConcreteCommandPath &command_path, TLVReader &tlv_data,
void *opaque_ptr)
{
chip::app::Clusters::Channel::Commands::RecordProgram::DecodableType command_data;
CHIP_ERROR error = Decode(tlv_data, command_data);
if (error == CHIP_NO_ERROR) {
emberAfChannelClusterRecordProgramCallback((CommandHandler *)opaque_ptr, command_path, command_data);
}
return ESP_OK;
}
static esp_err_t esp_matter_command_callback_cancel_record_program(const ConcreteCommandPath &command_path, TLVReader &tlv_data,
void *opaque_ptr)
{
chip::app::Clusters::Channel::Commands::CancelRecordProgram::DecodableType command_data;
CHIP_ERROR error = Decode(tlv_data, command_data);
if (error == CHIP_NO_ERROR) {
emberAfChannelClusterCancelRecordProgramCallback((CommandHandler *)opaque_ptr, command_path, command_data);
}
return ESP_OK;
}
namespace esp_matter {
namespace cluster {
namespace channel {
namespace feature {
namespace channel_list {
uint32_t get_id()
{
return ChannelList::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_channel_list(cluster, NULL, 0, 0);
command::create_change_channel(cluster);
command::create_change_channel_response(cluster);
return ESP_OK;
}
} /* channel_list */
namespace lineup_info {
uint32_t get_id()
{
return LineupInfo::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_lineup(cluster, NULL, 0, 0);
command::create_change_channel(cluster);
command::create_change_channel_response(cluster);
return ESP_OK;
}
} /* lineup_info */
namespace electronic_guide {
uint32_t get_id()
{
return ElectronicGuide::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
command::create_get_program_guide(cluster);
command::create_program_guide_response(cluster);
command::create_record_program(cluster);
command::create_cancel_record_program(cluster);
return ESP_OK;
}
} /* electronic_guide */
namespace record_program {
uint32_t get_id()
{
return RecordProgram::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
command::create_record_program(cluster);
command::create_cancel_record_program(cluster);
return ESP_OK;
}
} /* record_program */
} /* feature */
namespace attribute {
attribute_t *create_channel_list(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(channel_list), NULL);
return esp_matter::attribute::create(cluster, ChannelList::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_array(value, length, count));
}
attribute_t *create_lineup(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(lineup_info), NULL);
return esp_matter::attribute::create(cluster, Lineup::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_array(value, length, count));
}
attribute_t *create_current_channel(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, CurrentChannel::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_array(value, length, count));
}
} /* attribute */
namespace command {
command_t *create_change_channel(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(((has_feature(channel_list)) || (has_feature(lineup_info))), NULL);
return esp_matter::command::create(cluster, ChangeChannel::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_change_channel);
}
command_t *create_change_channel_response(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(((has_feature(channel_list)) || (has_feature(lineup_info))), NULL);
return esp_matter::command::create(cluster, ChangeChannelResponse::Id, COMMAND_FLAG_GENERATED, NULL);
}
command_t *create_change_channel_by_number(cluster_t *cluster)
{
return esp_matter::command::create(cluster, ChangeChannelByNumber::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_change_channel_by_number);
}
command_t *create_skip_channel(cluster_t *cluster)
{
return esp_matter::command::create(cluster, SkipChannel::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_skip_channel);
}
command_t *create_get_program_guide(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(electronic_guide), NULL);
return esp_matter::command::create(cluster, GetProgramGuide::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_get_program_guide);
}
command_t *create_program_guide_response(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(electronic_guide), NULL);
return esp_matter::command::create(cluster, ProgramGuideResponse::Id, COMMAND_FLAG_GENERATED, NULL);
}
command_t *create_record_program(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(((has_feature(record_program)) && (has_feature(electronic_guide))), NULL);
return esp_matter::command::create(cluster, RecordProgram::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_record_program);
}
command_t *create_cancel_record_program(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(((has_feature(record_program)) && (has_feature(electronic_guide))), NULL);
return esp_matter::command::create(cluster, CancelRecordProgram::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_cancel_record_program);
}
} /* command */
static void create_default_binding_cluster(endpoint_t *endpoint)
{
binding::config_t config;
binding::create(endpoint, &config, CLUSTER_FLAG_SERVER);
}
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)
{
cluster_t *cluster = esp_matter::cluster::create(endpoint, channel::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, channel::Id));
if (flags & CLUSTER_FLAG_SERVER) {
VerifyOrReturnValue(config != NULL, ABORT_CLUSTER_CREATE(cluster));
if (config->delegate != nullptr) {
static const auto delegate_init_cb = ChannelDelegateInitCB;
set_delegate_and_init_callback(cluster, delegate_init_cb, config->delegate);
}
static const auto plugin_server_init_cb = CALL_ONCE(MatterChannelPluginServerInitCallback);
set_plugin_server_init_callback(cluster, plugin_server_init_cb);
add_function_list(cluster, function_list, function_flags);
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
/* Attributes not managed internally */
global::attribute::create_cluster_revision(cluster, cluster_revision);
command::create_change_channel_by_number(cluster);
command::create_skip_channel(cluster);
}
if (flags & CLUSTER_FLAG_CLIENT) {
create_default_binding_cluster(endpoint);
}
return cluster;
}
} /* channel */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,73 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace channel {
namespace feature {
namespace channel_list {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* channel_list */
namespace lineup_info {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* lineup_info */
namespace electronic_guide {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* electronic_guide */
namespace record_program {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* record_program */
} /* feature */
namespace attribute {
attribute_t *create_channel_list(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_lineup(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_current_channel(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
} /* attribute */
namespace command {
command_t *create_change_channel(cluster_t *cluster);
command_t *create_change_channel_response(cluster_t *cluster);
command_t *create_change_channel_by_number(cluster_t *cluster);
command_t *create_skip_channel(cluster_t *cluster);
command_t *create_get_program_guide(cluster_t *cluster);
command_t *create_program_guide_response(cluster_t *cluster);
command_t *create_record_program(cluster_t *cluster);
command_t *create_cancel_record_program(cluster_t *cluster);
} /* command */
typedef struct config {
void *delegate;
config() : delegate(nullptr) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* channel */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,82 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace channel {
inline constexpr uint32_t Id = 0x0504;
namespace feature {
namespace ChannelList {
inline constexpr uint32_t Id = 0x1;
} /* ChannelList */
namespace LineupInfo {
inline constexpr uint32_t Id = 0x2;
} /* LineupInfo */
namespace ElectronicGuide {
inline constexpr uint32_t Id = 0x4;
} /* ElectronicGuide */
namespace RecordProgram {
inline constexpr uint32_t Id = 0x8;
} /* RecordProgram */
} /* feature */
namespace attribute {
namespace ChannelList {
inline constexpr uint32_t Id = 0x0000;
} /* ChannelList */
namespace Lineup {
inline constexpr uint32_t Id = 0x0001;
} /* Lineup */
namespace CurrentChannel {
inline constexpr uint32_t Id = 0x0002;
} /* CurrentChannel */
} /* attribute */
namespace command {
namespace ChangeChannel {
inline constexpr uint32_t Id = 0x00;
} /* ChangeChannel */
namespace ChangeChannelResponse {
inline constexpr uint32_t Id = 0x01;
} /* ChangeChannelResponse */
namespace ChangeChannelByNumber {
inline constexpr uint32_t Id = 0x02;
} /* ChangeChannelByNumber */
namespace SkipChannel {
inline constexpr uint32_t Id = 0x03;
} /* SkipChannel */
namespace GetProgramGuide {
inline constexpr uint32_t Id = 0x04;
} /* GetProgramGuide */
namespace ProgramGuideResponse {
inline constexpr uint32_t Id = 0x05;
} /* ProgramGuideResponse */
namespace RecordProgram {
inline constexpr uint32_t Id = 0x06;
} /* RecordProgram */
namespace CancelRecordProgram {
inline constexpr uint32_t Id = 0x07;
} /* CancelRecordProgram */
} /* command */
} /* channel */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,121 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#include <esp_log.h>
#include <esp_matter_core.h>
#include <esp_matter.h>
#include <app-common/zap-generated/cluster-enums.h>
#include <app-common/zap-generated/callback.h>
#include <app/InteractionModelEngine.h>
#include <zap_common/app/PluginApplicationCallbacks.h>
#include <esp_matter_delegate_callbacks.h>
#include <chime.h>
#include <chime_ids.h>
#include <binding.h>
#include <esp_matter_data_model_priv.h>
#include <app/ClusterCallbacks.h>
using namespace chip::app::Clusters;
using chip::app::CommandHandler;
using chip::app::DataModel::Decode;
using chip::TLV::TLVReader;
using namespace esp_matter;
using namespace esp_matter::cluster;
using namespace esp_matter::cluster::delegate_cb;
static const char *TAG = "chime_cluster";
constexpr uint16_t cluster_revision = 1;
namespace esp_matter {
namespace cluster {
namespace chime {
namespace attribute {
attribute_t *create_installed_chime_sounds(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, InstalledChimeSounds::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_array(value, length, count));
}
attribute_t *create_selected_chime(cluster_t *cluster, uint8_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, SelectedChime::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_uint8(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint8(0), esp_matter_uint8(254));
return attribute;
}
attribute_t *create_enabled(cluster_t *cluster, bool value)
{
return esp_matter::attribute::create(cluster, Enabled::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_bool(value));
}
} /* attribute */
namespace command {
command_t *create_play_chime_sound(cluster_t *cluster)
{
return esp_matter::command::create(cluster, PlayChimeSound::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
} /* command */
static void create_default_binding_cluster(endpoint_t *endpoint)
{
binding::config_t config;
binding::create(endpoint, &config, CLUSTER_FLAG_SERVER);
}
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)
{
cluster_t *cluster = esp_matter::cluster::create(endpoint, chime::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, chime::Id));
if (flags & CLUSTER_FLAG_SERVER) {
VerifyOrReturnValue(config != NULL, ABORT_CLUSTER_CREATE(cluster));
if (config->delegate != nullptr) {
static const auto delegate_init_cb = ChimeDelegateInitCB;
set_delegate_and_init_callback(cluster, delegate_init_cb, config->delegate);
}
static const auto plugin_server_init_cb = CALL_ONCE(MatterChimePluginServerInitCallback);
set_plugin_server_init_callback(cluster, plugin_server_init_cb);
add_function_list(cluster, function_list, function_flags);
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
/* Attributes not managed internally */
global::attribute::create_cluster_revision(cluster, cluster_revision);
attribute::create_selected_chime(cluster, config->selected_chime);
attribute::create_enabled(cluster, config->enabled);
attribute::create_installed_chime_sounds(cluster, NULL, 0, 0);
command::create_play_chime_sound(cluster);
cluster::set_init_and_shutdown_callbacks(cluster, ESPMatterChimeClusterServerInitCallback,
ESPMatterChimeClusterServerShutdownCallback);
}
if (flags & CLUSTER_FLAG_CLIENT) {
create_default_binding_cluster(endpoint);
}
return cluster;
}
} /* chime */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,45 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace chime {
namespace attribute {
attribute_t *create_installed_chime_sounds(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_selected_chime(cluster_t *cluster, uint8_t value);
attribute_t *create_enabled(cluster_t *cluster, bool value);
} /* attribute */
namespace command {
command_t *create_play_chime_sound(cluster_t *cluster);
} /* command */
typedef struct config {
uint8_t selected_chime;
bool enabled;
void *delegate;
config() : selected_chime(0), enabled(false), delegate(nullptr) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* chime */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,46 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace chime {
inline constexpr uint32_t Id = 0x0556;
namespace attribute {
namespace InstalledChimeSounds {
inline constexpr uint32_t Id = 0x0000;
} /* InstalledChimeSounds */
namespace SelectedChime {
inline constexpr uint32_t Id = 0x0001;
} /* SelectedChime */
namespace Enabled {
inline constexpr uint32_t Id = 0x0002;
} /* Enabled */
} /* attribute */
namespace command {
namespace PlayChimeSound {
inline constexpr uint32_t Id = 0x00;
} /* PlayChimeSound */
} /* command */
} /* chime */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,367 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#include <esp_log.h>
#include <esp_matter_core.h>
#include <esp_matter.h>
#include <app-common/zap-generated/cluster-enums.h>
#include <app-common/zap-generated/callback.h>
#include <app/InteractionModelEngine.h>
#include <zap_common/app/PluginApplicationCallbacks.h>
#include <esp_matter_delegate_callbacks.h>
#include <closure_control.h>
#include <closure_control_ids.h>
#include <binding.h>
#include <esp_matter_data_model_priv.h>
using namespace chip::app::Clusters;
using chip::app::CommandHandler;
using chip::app::DataModel::Decode;
using chip::TLV::TLVReader;
using namespace esp_matter;
using namespace esp_matter::cluster;
using namespace esp_matter::cluster::delegate_cb;
static const char *TAG = "closure_control_cluster";
constexpr uint16_t cluster_revision = 1;
namespace esp_matter {
namespace cluster {
namespace closure_control {
namespace feature {
namespace positioning {
uint32_t get_id()
{
return Positioning::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
return ESP_OK;
}
} /* positioning */
namespace motion_latching {
uint32_t get_id()
{
return MotionLatching::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_latch_control_modes(cluster, 0);
return ESP_OK;
}
} /* motion_latching */
namespace instantaneous {
uint32_t get_id()
{
return Instantaneous::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
command_t *stop = esp_matter::command::get(cluster, command::Stop::Id, COMMAND_FLAG_ACCEPTED);
if (stop) {
esp_matter::command::destroy(cluster, stop);
}
event_t *movement_completed = esp_matter::event::get(cluster, event::MovementCompleted::Id);
if (movement_completed) {
esp_matter::event::destroy(cluster, movement_completed);
}
return ESP_OK;
}
} /* instantaneous */
namespace speed {
uint32_t get_id()
{
return Speed::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnError(((has_feature(positioning)) && (!(has_feature(instantaneous)))), ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
return ESP_OK;
}
} /* speed */
namespace ventilation {
uint32_t get_id()
{
return Ventilation::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnError(has_feature(positioning), ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
return ESP_OK;
}
} /* ventilation */
namespace pedestrian {
uint32_t get_id()
{
return Pedestrian::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnError(has_feature(positioning), ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
return ESP_OK;
}
} /* pedestrian */
namespace calibration {
uint32_t get_id()
{
return Calibration::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnError(has_feature(positioning), ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
command::create_calibrate(cluster);
return ESP_OK;
}
} /* calibration */
namespace protection {
uint32_t get_id()
{
return Protection::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
return ESP_OK;
}
} /* protection */
namespace manually_operable {
uint32_t get_id()
{
return ManuallyOperable::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
event::create_engage_state_changed(cluster);
return ESP_OK;
}
} /* manually_operable */
} /* feature */
namespace attribute {
attribute_t *create_countdown_time(cluster_t *cluster, nullable<uint32_t> value)
{
return esp_matter::attribute::create(cluster, CountdownTime::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint32(value));
}
attribute_t *create_main_state(cluster_t *cluster, uint8_t value)
{
return esp_matter::attribute::create(cluster, MainState::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_enum8(value));
}
attribute_t *create_current_error_list(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, CurrentErrorList::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_array(value, length, count));
}
attribute_t *create_overall_current_state(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, OverallCurrentState::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_array(value, length, count));
}
attribute_t *create_overall_target_state(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, OverallTargetState::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_array(value, length, count));
}
attribute_t *create_latch_control_modes(cluster_t *cluster, uint8_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(motion_latching), NULL);
return esp_matter::attribute::create(cluster, LatchControlModes::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_bitmap8(value));
}
} /* attribute */
namespace command {
command_t *create_stop(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(!(has_feature(instantaneous)), NULL);
return esp_matter::command::create(cluster, Stop::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_move_to(cluster_t *cluster)
{
return esp_matter::command::create(cluster, MoveTo::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_calibrate(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(calibration), NULL);
return esp_matter::command::create(cluster, Calibrate::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
} /* command */
namespace event {
event_t *create_operational_error(cluster_t *cluster)
{
return esp_matter::event::create(cluster, OperationalError::Id);
}
event_t *create_movement_completed(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(!(has_feature(instantaneous)), NULL);
return esp_matter::event::create(cluster, MovementCompleted::Id);
}
event_t *create_engage_state_changed(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(manually_operable), NULL);
return esp_matter::event::create(cluster, EngageStateChanged::Id);
}
event_t *create_secure_state_changed(cluster_t *cluster)
{
return esp_matter::event::create(cluster, SecureStateChanged::Id);
}
} /* event */
static void create_default_binding_cluster(endpoint_t *endpoint)
{
binding::config_t config;
binding::create(endpoint, &config, CLUSTER_FLAG_SERVER);
}
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)
{
cluster_t *cluster = esp_matter::cluster::create(endpoint, closure_control::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, closure_control::Id));
if (flags & CLUSTER_FLAG_SERVER) {
VerifyOrReturnValue(config != NULL, ABORT_CLUSTER_CREATE(cluster));
if (config->delegate != nullptr) {
static const auto delegate_init_cb = ClosureControlDelegateInitCB;
set_delegate_and_init_callback(cluster, delegate_init_cb, config->delegate);
}
static const auto plugin_server_init_cb = CALL_ONCE(MatterClosureControlPluginServerInitCallback);
set_plugin_server_init_callback(cluster, plugin_server_init_cb);
add_function_list(cluster, function_list, function_flags);
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, config->feature_flags);
/* Attributes not managed internally */
global::attribute::create_cluster_revision(cluster, cluster_revision);
attribute::create_main_state(cluster, 0);
attribute::create_current_error_list(cluster, NULL, 0, 0);
attribute::create_overall_current_state(cluster, NULL, 0, 0);
attribute::create_overall_target_state(cluster, NULL, 0, 0);
uint32_t feature_map = config->feature_flags;
VALIDATE_FEATURES_AT_LEAST_ONE("Positioning,MotionLatching",
feature::positioning::get_id(), feature::motion_latching::get_id());
if (feature_map & feature::positioning::get_id()) {
VerifyOrReturnValue(feature::positioning::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::motion_latching::get_id()) {
VerifyOrReturnValue(feature::motion_latching::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::instantaneous::get_id()) {
VerifyOrReturnValue(feature::instantaneous::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::speed::get_id()) {
VerifyOrReturnValue(feature::speed::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::ventilation::get_id()) {
VerifyOrReturnValue(feature::ventilation::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::pedestrian::get_id()) {
VerifyOrReturnValue(feature::pedestrian::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::calibration::get_id()) {
VerifyOrReturnValue(feature::calibration::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::protection::get_id()) {
VerifyOrReturnValue(feature::protection::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::manually_operable::get_id()) {
VerifyOrReturnValue(feature::manually_operable::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
command::create_stop(cluster);
command::create_move_to(cluster);
/* Events */
event::create_operational_error(cluster);
event::create_movement_completed(cluster);
event::create_secure_state_changed(cluster);
}
if (flags & CLUSTER_FLAG_CLIENT) {
create_default_binding_cluster(endpoint);
}
return cluster;
}
} /* closure_control */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,104 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace closure_control {
namespace feature {
namespace positioning {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* positioning */
namespace motion_latching {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* motion_latching */
namespace instantaneous {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* instantaneous */
namespace speed {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* speed */
namespace ventilation {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* ventilation */
namespace pedestrian {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* pedestrian */
namespace calibration {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* calibration */
namespace protection {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* protection */
namespace manually_operable {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* manually_operable */
} /* feature */
namespace attribute {
attribute_t *create_countdown_time(cluster_t *cluster, nullable<uint32_t> value);
attribute_t *create_main_state(cluster_t *cluster, uint8_t value);
attribute_t *create_current_error_list(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_overall_current_state(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_overall_target_state(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_latch_control_modes(cluster_t *cluster, uint8_t value);
} /* attribute */
namespace command {
command_t *create_stop(cluster_t *cluster);
command_t *create_move_to(cluster_t *cluster);
command_t *create_calibrate(cluster_t *cluster);
} /* command */
namespace event {
event_t *create_operational_error(cluster_t *cluster);
event_t *create_movement_completed(cluster_t *cluster);
event_t *create_engage_state_changed(cluster_t *cluster);
event_t *create_secure_state_changed(cluster_t *cluster);
} /* event */
typedef struct config {
void *delegate;
uint32_t feature_flags;
config() : delegate(nullptr), feature_flags(0) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* closure_control */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,106 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace closure_control {
inline constexpr uint32_t Id = 0x0104;
namespace feature {
namespace Positioning {
inline constexpr uint32_t Id = 0x1;
} /* Positioning */
namespace MotionLatching {
inline constexpr uint32_t Id = 0x2;
} /* MotionLatching */
namespace Instantaneous {
inline constexpr uint32_t Id = 0x4;
} /* Instantaneous */
namespace Speed {
inline constexpr uint32_t Id = 0x8;
} /* Speed */
namespace Ventilation {
inline constexpr uint32_t Id = 0x10;
} /* Ventilation */
namespace Pedestrian {
inline constexpr uint32_t Id = 0x20;
} /* Pedestrian */
namespace Calibration {
inline constexpr uint32_t Id = 0x40;
} /* Calibration */
namespace Protection {
inline constexpr uint32_t Id = 0x80;
} /* Protection */
namespace ManuallyOperable {
inline constexpr uint32_t Id = 0x100;
} /* ManuallyOperable */
} /* feature */
namespace attribute {
namespace CountdownTime {
inline constexpr uint32_t Id = 0x0000;
} /* CountdownTime */
namespace MainState {
inline constexpr uint32_t Id = 0x0001;
} /* MainState */
namespace CurrentErrorList {
inline constexpr uint32_t Id = 0x0002;
} /* CurrentErrorList */
namespace OverallCurrentState {
inline constexpr uint32_t Id = 0x0003;
} /* OverallCurrentState */
namespace OverallTargetState {
inline constexpr uint32_t Id = 0x0004;
} /* OverallTargetState */
namespace LatchControlModes {
inline constexpr uint32_t Id = 0x0005;
} /* LatchControlModes */
} /* attribute */
namespace command {
namespace Stop {
inline constexpr uint32_t Id = 0x00;
} /* Stop */
namespace MoveTo {
inline constexpr uint32_t Id = 0x01;
} /* MoveTo */
namespace Calibrate {
inline constexpr uint32_t Id = 0x02;
} /* Calibrate */
} /* command */
namespace event {
namespace OperationalError {
inline constexpr uint32_t Id = 0x00;
} /* OperationalError */
namespace MovementCompleted {
inline constexpr uint32_t Id = 0x01;
} /* MovementCompleted */
namespace EngageStateChanged {
inline constexpr uint32_t Id = 0x02;
} /* EngageStateChanged */
namespace SecureStateChanged {
inline constexpr uint32_t Id = 0x03;
} /* SecureStateChanged */
} /* event */
} /* closure_control */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,364 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#include <esp_log.h>
#include <esp_matter_core.h>
#include <esp_matter.h>
#include <app-common/zap-generated/cluster-enums.h>
#include <app-common/zap-generated/callback.h>
#include <app/InteractionModelEngine.h>
#include <zap_common/app/PluginApplicationCallbacks.h>
#include <esp_matter_delegate_callbacks.h>
#include <closure_dimension.h>
#include <closure_dimension_ids.h>
#include <binding.h>
#include <esp_matter_data_model_priv.h>
using namespace chip::app::Clusters;
using chip::app::CommandHandler;
using chip::app::DataModel::Decode;
using chip::TLV::TLVReader;
using namespace esp_matter;
using namespace esp_matter::cluster;
using namespace esp_matter::cluster::delegate_cb;
static const char *TAG = "closure_dimension_cluster";
constexpr uint16_t cluster_revision = 1;
namespace esp_matter {
namespace cluster {
namespace closure_dimension {
namespace feature {
namespace positioning {
uint32_t get_id()
{
return Positioning::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_resolution(cluster, 0);
attribute::create_step_value(cluster, 0);
command::create_step(cluster);
return ESP_OK;
}
} /* positioning */
namespace motion_latching {
uint32_t get_id()
{
return MotionLatching::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_latch_control_modes(cluster, 0);
return ESP_OK;
}
} /* motion_latching */
namespace unit {
uint32_t get_id()
{
return Unit::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnError(has_feature(positioning), ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_unit(cluster, 0);
attribute::create_unit_range(cluster, NULL, 0, 0);
return ESP_OK;
}
} /* unit */
namespace limitation {
uint32_t get_id()
{
return Limitation::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnError(has_feature(positioning), ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_limit_range(cluster, NULL, 0, 0);
return ESP_OK;
}
} /* limitation */
namespace speed {
uint32_t get_id()
{
return Speed::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnError(has_feature(positioning), ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
return ESP_OK;
}
} /* speed */
namespace translation {
uint32_t get_id()
{
return Translation::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnError(has_feature(positioning), ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_translation_direction(cluster, 0);
return ESP_OK;
}
} /* translation */
namespace rotation {
uint32_t get_id()
{
return Rotation::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnError(has_feature(positioning), ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_rotation_axis(cluster, 0);
attribute::create_overflow(cluster, 0);
return ESP_OK;
}
} /* rotation */
namespace modulation {
uint32_t get_id()
{
return Modulation::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnError(has_feature(positioning), ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_modulation_type(cluster, 0);
return ESP_OK;
}
} /* modulation */
} /* feature */
namespace attribute {
attribute_t *create_current_state(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, CurrentState::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_array(value, length, count));
}
attribute_t *create_target_state(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, TargetState::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_array(value, length, count));
}
attribute_t *create_resolution(cluster_t *cluster, uint16_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(positioning), NULL);
return esp_matter::attribute::create(cluster, Resolution::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint16(value));
}
attribute_t *create_step_value(cluster_t *cluster, uint16_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(positioning), NULL);
return esp_matter::attribute::create(cluster, StepValue::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint16(value));
}
attribute_t *create_unit(cluster_t *cluster, uint8_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(unit), NULL);
return esp_matter::attribute::create(cluster, Unit::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_enum8(value));
}
attribute_t *create_unit_range(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(unit), NULL);
return esp_matter::attribute::create(cluster, UnitRange::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_array(value, length, count));
}
attribute_t *create_limit_range(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(limitation), NULL);
return esp_matter::attribute::create(cluster, LimitRange::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_array(value, length, count));
}
attribute_t *create_translation_direction(cluster_t *cluster, uint8_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(translation), NULL);
return esp_matter::attribute::create(cluster, TranslationDirection::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_enum8(value));
}
attribute_t *create_rotation_axis(cluster_t *cluster, uint8_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(rotation), NULL);
return esp_matter::attribute::create(cluster, RotationAxis::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_enum8(value));
}
attribute_t *create_overflow(cluster_t *cluster, uint8_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(rotation), NULL);
return esp_matter::attribute::create(cluster, Overflow::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_enum8(value));
}
attribute_t *create_modulation_type(cluster_t *cluster, uint8_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(modulation), NULL);
return esp_matter::attribute::create(cluster, ModulationType::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_enum8(value));
}
attribute_t *create_latch_control_modes(cluster_t *cluster, uint8_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(motion_latching), NULL);
return esp_matter::attribute::create(cluster, LatchControlModes::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_bitmap8(value));
}
} /* attribute */
namespace command {
command_t *create_set_target(cluster_t *cluster)
{
return esp_matter::command::create(cluster, SetTarget::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_step(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(positioning), NULL);
return esp_matter::command::create(cluster, Step::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
} /* command */
static void create_default_binding_cluster(endpoint_t *endpoint)
{
binding::config_t config;
binding::create(endpoint, &config, CLUSTER_FLAG_SERVER);
}
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)
{
cluster_t *cluster = esp_matter::cluster::create(endpoint, closure_dimension::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, closure_dimension::Id));
if (flags & CLUSTER_FLAG_SERVER) {
VerifyOrReturnValue(config != NULL, ABORT_CLUSTER_CREATE(cluster));
if (config->delegate != nullptr) {
static const auto delegate_init_cb = ClosureDimensionDelegateInitCB;
set_delegate_and_init_callback(cluster, delegate_init_cb, config->delegate);
}
static const auto plugin_server_init_cb = CALL_ONCE(MatterClosureDimensionPluginServerInitCallback);
set_plugin_server_init_callback(cluster, plugin_server_init_cb);
add_function_list(cluster, function_list, function_flags);
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, config->feature_flags);
/* Attributes not managed internally */
global::attribute::create_cluster_revision(cluster, cluster_revision);
attribute::create_current_state(cluster, NULL, 0, 0);
attribute::create_target_state(cluster, NULL, 0, 0);
uint32_t feature_map = config->feature_flags;
if (feature_map & feature::positioning::get_id()) {
VALIDATE_FEATURES_EXACT_ONE("Translation,Rotation,Modulation",
feature::translation::get_id(), feature::rotation::get_id(), feature::modulation::get_id());
if (feature_map & feature::translation::get_id()) {
VerifyOrReturnValue(feature::translation::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::rotation::get_id()) {
VerifyOrReturnValue(feature::rotation::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::modulation::get_id()) {
VerifyOrReturnValue(feature::modulation::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
}
VALIDATE_FEATURES_AT_LEAST_ONE("Positioning,MotionLatching",
feature::positioning::get_id(), feature::motion_latching::get_id());
if (feature_map & feature::positioning::get_id()) {
VerifyOrReturnValue(feature::positioning::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::motion_latching::get_id()) {
VerifyOrReturnValue(feature::motion_latching::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::unit::get_id()) {
VerifyOrReturnValue(feature::unit::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::limitation::get_id()) {
VerifyOrReturnValue(feature::limitation::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::speed::get_id()) {
VerifyOrReturnValue(feature::speed::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
command::create_set_target(cluster);
}
if (flags & CLUSTER_FLAG_CLIENT) {
create_default_binding_cluster(endpoint);
}
return cluster;
}
} /* closure_dimension */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,97 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace closure_dimension {
namespace feature {
namespace positioning {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* positioning */
namespace motion_latching {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* motion_latching */
namespace unit {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* unit */
namespace limitation {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* limitation */
namespace speed {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* speed */
namespace translation {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* translation */
namespace rotation {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* rotation */
namespace modulation {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* modulation */
} /* feature */
namespace attribute {
attribute_t *create_current_state(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_target_state(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_resolution(cluster_t *cluster, uint16_t value);
attribute_t *create_step_value(cluster_t *cluster, uint16_t value);
attribute_t *create_unit(cluster_t *cluster, uint8_t value);
attribute_t *create_unit_range(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_limit_range(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_translation_direction(cluster_t *cluster, uint8_t value);
attribute_t *create_rotation_axis(cluster_t *cluster, uint8_t value);
attribute_t *create_overflow(cluster_t *cluster, uint8_t value);
attribute_t *create_modulation_type(cluster_t *cluster, uint8_t value);
attribute_t *create_latch_control_modes(cluster_t *cluster, uint8_t value);
} /* attribute */
namespace command {
command_t *create_set_target(cluster_t *cluster);
command_t *create_step(cluster_t *cluster);
} /* command */
typedef struct config {
void *delegate;
uint32_t feature_flags;
config() : delegate(nullptr), feature_flags(0) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* closure_dimension */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,103 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace closure_dimension {
inline constexpr uint32_t Id = 0x0105;
namespace feature {
namespace Positioning {
inline constexpr uint32_t Id = 0x1;
} /* Positioning */
namespace MotionLatching {
inline constexpr uint32_t Id = 0x2;
} /* MotionLatching */
namespace Unit {
inline constexpr uint32_t Id = 0x4;
} /* Unit */
namespace Limitation {
inline constexpr uint32_t Id = 0x8;
} /* Limitation */
namespace Speed {
inline constexpr uint32_t Id = 0x10;
} /* Speed */
namespace Translation {
inline constexpr uint32_t Id = 0x20;
} /* Translation */
namespace Rotation {
inline constexpr uint32_t Id = 0x40;
} /* Rotation */
namespace Modulation {
inline constexpr uint32_t Id = 0x80;
} /* Modulation */
} /* feature */
namespace attribute {
namespace CurrentState {
inline constexpr uint32_t Id = 0x0000;
} /* CurrentState */
namespace TargetState {
inline constexpr uint32_t Id = 0x0001;
} /* TargetState */
namespace Resolution {
inline constexpr uint32_t Id = 0x0002;
} /* Resolution */
namespace StepValue {
inline constexpr uint32_t Id = 0x0003;
} /* StepValue */
namespace Unit {
inline constexpr uint32_t Id = 0x0004;
} /* Unit */
namespace UnitRange {
inline constexpr uint32_t Id = 0x0005;
} /* UnitRange */
namespace LimitRange {
inline constexpr uint32_t Id = 0x0006;
} /* LimitRange */
namespace TranslationDirection {
inline constexpr uint32_t Id = 0x0007;
} /* TranslationDirection */
namespace RotationAxis {
inline constexpr uint32_t Id = 0x0008;
} /* RotationAxis */
namespace Overflow {
inline constexpr uint32_t Id = 0x0009;
} /* Overflow */
namespace ModulationType {
inline constexpr uint32_t Id = 0x000A;
} /* ModulationType */
namespace LatchControlModes {
inline constexpr uint32_t Id = 0x000B;
} /* LatchControlModes */
} /* attribute */
namespace command {
namespace SetTarget {
inline constexpr uint32_t Id = 0x00;
} /* SetTarget */
namespace Step {
inline constexpr uint32_t Id = 0x01;
} /* Step */
} /* command */
} /* closure_dimension */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,965 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#include <esp_log.h>
#include <esp_matter_core.h>
#include <esp_matter.h>
#include <app-common/zap-generated/cluster-enums.h>
#include <app-common/zap-generated/callback.h>
#include <app/InteractionModelEngine.h>
#include <zap_common/app/PluginApplicationCallbacks.h>
#include <color_control.h>
#include <color_control_ids.h>
#include <binding.h>
#include <esp_matter_data_model_priv.h>
using namespace chip::app::Clusters;
using chip::app::CommandHandler;
using chip::app::DataModel::Decode;
using chip::TLV::TLVReader;
using namespace esp_matter;
using namespace esp_matter::cluster;
static const char *TAG = "color_control_cluster";
constexpr uint16_t cluster_revision = 8;
static esp_err_t esp_matter_command_callback_move_to_hue(const ConcreteCommandPath &command_path, TLVReader &tlv_data,
void *opaque_ptr)
{
chip::app::Clusters::ColorControl::Commands::MoveToHue::DecodableType command_data;
CHIP_ERROR error = Decode(tlv_data, command_data);
if (error == CHIP_NO_ERROR) {
emberAfColorControlClusterMoveToHueCallback((CommandHandler *)opaque_ptr, command_path, command_data);
}
return ESP_OK;
}
static esp_err_t esp_matter_command_callback_move_hue(const ConcreteCommandPath &command_path, TLVReader &tlv_data,
void *opaque_ptr)
{
chip::app::Clusters::ColorControl::Commands::MoveHue::DecodableType command_data;
CHIP_ERROR error = Decode(tlv_data, command_data);
if (error == CHIP_NO_ERROR) {
emberAfColorControlClusterMoveHueCallback((CommandHandler *)opaque_ptr, command_path, command_data);
}
return ESP_OK;
}
static esp_err_t esp_matter_command_callback_step_hue(const ConcreteCommandPath &command_path, TLVReader &tlv_data,
void *opaque_ptr)
{
chip::app::Clusters::ColorControl::Commands::StepHue::DecodableType command_data;
CHIP_ERROR error = Decode(tlv_data, command_data);
if (error == CHIP_NO_ERROR) {
emberAfColorControlClusterStepHueCallback((CommandHandler *)opaque_ptr, command_path, command_data);
}
return ESP_OK;
}
static esp_err_t esp_matter_command_callback_move_to_saturation(const ConcreteCommandPath &command_path, TLVReader &tlv_data,
void *opaque_ptr)
{
chip::app::Clusters::ColorControl::Commands::MoveToSaturation::DecodableType command_data;
CHIP_ERROR error = Decode(tlv_data, command_data);
if (error == CHIP_NO_ERROR) {
emberAfColorControlClusterMoveToSaturationCallback((CommandHandler *)opaque_ptr, command_path, command_data);
}
return ESP_OK;
}
static esp_err_t esp_matter_command_callback_move_saturation(const ConcreteCommandPath &command_path, TLVReader &tlv_data,
void *opaque_ptr)
{
chip::app::Clusters::ColorControl::Commands::MoveSaturation::DecodableType command_data;
CHIP_ERROR error = Decode(tlv_data, command_data);
if (error == CHIP_NO_ERROR) {
emberAfColorControlClusterMoveSaturationCallback((CommandHandler *)opaque_ptr, command_path, command_data);
}
return ESP_OK;
}
static esp_err_t esp_matter_command_callback_step_saturation(const ConcreteCommandPath &command_path, TLVReader &tlv_data,
void *opaque_ptr)
{
chip::app::Clusters::ColorControl::Commands::StepSaturation::DecodableType command_data;
CHIP_ERROR error = Decode(tlv_data, command_data);
if (error == CHIP_NO_ERROR) {
emberAfColorControlClusterStepSaturationCallback((CommandHandler *)opaque_ptr, command_path, command_data);
}
return ESP_OK;
}
static esp_err_t esp_matter_command_callback_move_to_hue_and_saturation(const ConcreteCommandPath &command_path, TLVReader &tlv_data,
void *opaque_ptr)
{
chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::DecodableType command_data;
CHIP_ERROR error = Decode(tlv_data, command_data);
if (error == CHIP_NO_ERROR) {
emberAfColorControlClusterMoveToHueAndSaturationCallback((CommandHandler *)opaque_ptr, command_path, command_data);
}
return ESP_OK;
}
static esp_err_t esp_matter_command_callback_move_to_color(const ConcreteCommandPath &command_path, TLVReader &tlv_data,
void *opaque_ptr)
{
chip::app::Clusters::ColorControl::Commands::MoveToColor::DecodableType command_data;
CHIP_ERROR error = Decode(tlv_data, command_data);
if (error == CHIP_NO_ERROR) {
emberAfColorControlClusterMoveToColorCallback((CommandHandler *)opaque_ptr, command_path, command_data);
}
return ESP_OK;
}
static esp_err_t esp_matter_command_callback_move_color(const ConcreteCommandPath &command_path, TLVReader &tlv_data,
void *opaque_ptr)
{
chip::app::Clusters::ColorControl::Commands::MoveColor::DecodableType command_data;
CHIP_ERROR error = Decode(tlv_data, command_data);
if (error == CHIP_NO_ERROR) {
emberAfColorControlClusterMoveColorCallback((CommandHandler *)opaque_ptr, command_path, command_data);
}
return ESP_OK;
}
static esp_err_t esp_matter_command_callback_step_color(const ConcreteCommandPath &command_path, TLVReader &tlv_data,
void *opaque_ptr)
{
chip::app::Clusters::ColorControl::Commands::StepColor::DecodableType command_data;
CHIP_ERROR error = Decode(tlv_data, command_data);
if (error == CHIP_NO_ERROR) {
emberAfColorControlClusterStepColorCallback((CommandHandler *)opaque_ptr, command_path, command_data);
}
return ESP_OK;
}
static esp_err_t esp_matter_command_callback_move_to_color_temperature(const ConcreteCommandPath &command_path, TLVReader &tlv_data,
void *opaque_ptr)
{
chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::DecodableType command_data;
CHIP_ERROR error = Decode(tlv_data, command_data);
if (error == CHIP_NO_ERROR) {
emberAfColorControlClusterMoveToColorTemperatureCallback((CommandHandler *)opaque_ptr, command_path, command_data);
}
return ESP_OK;
}
static esp_err_t esp_matter_command_callback_enhanced_move_to_hue(const ConcreteCommandPath &command_path, TLVReader &tlv_data,
void *opaque_ptr)
{
chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::DecodableType command_data;
CHIP_ERROR error = Decode(tlv_data, command_data);
if (error == CHIP_NO_ERROR) {
emberAfColorControlClusterEnhancedMoveToHueCallback((CommandHandler *)opaque_ptr, command_path, command_data);
}
return ESP_OK;
}
static esp_err_t esp_matter_command_callback_enhanced_move_hue(const ConcreteCommandPath &command_path, TLVReader &tlv_data,
void *opaque_ptr)
{
chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::DecodableType command_data;
CHIP_ERROR error = Decode(tlv_data, command_data);
if (error == CHIP_NO_ERROR) {
emberAfColorControlClusterEnhancedMoveHueCallback((CommandHandler *)opaque_ptr, command_path, command_data);
}
return ESP_OK;
}
static esp_err_t esp_matter_command_callback_enhanced_step_hue(const ConcreteCommandPath &command_path, TLVReader &tlv_data,
void *opaque_ptr)
{
chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::DecodableType command_data;
CHIP_ERROR error = Decode(tlv_data, command_data);
if (error == CHIP_NO_ERROR) {
emberAfColorControlClusterEnhancedStepHueCallback((CommandHandler *)opaque_ptr, command_path, command_data);
}
return ESP_OK;
}
static esp_err_t esp_matter_command_callback_enhanced_move_to_hue_and_saturation(const ConcreteCommandPath &command_path, TLVReader &tlv_data,
void *opaque_ptr)
{
chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::DecodableType command_data;
CHIP_ERROR error = Decode(tlv_data, command_data);
if (error == CHIP_NO_ERROR) {
emberAfColorControlClusterEnhancedMoveToHueAndSaturationCallback((CommandHandler *)opaque_ptr, command_path, command_data);
}
return ESP_OK;
}
static esp_err_t esp_matter_command_callback_color_loop_set(const ConcreteCommandPath &command_path, TLVReader &tlv_data,
void *opaque_ptr)
{
chip::app::Clusters::ColorControl::Commands::ColorLoopSet::DecodableType command_data;
CHIP_ERROR error = Decode(tlv_data, command_data);
if (error == CHIP_NO_ERROR) {
emberAfColorControlClusterColorLoopSetCallback((CommandHandler *)opaque_ptr, command_path, command_data);
}
return ESP_OK;
}
static esp_err_t esp_matter_command_callback_stop_move_step(const ConcreteCommandPath &command_path, TLVReader &tlv_data,
void *opaque_ptr)
{
chip::app::Clusters::ColorControl::Commands::StopMoveStep::DecodableType command_data;
CHIP_ERROR error = Decode(tlv_data, command_data);
if (error == CHIP_NO_ERROR) {
emberAfColorControlClusterStopMoveStepCallback((CommandHandler *)opaque_ptr, command_path, command_data);
}
return ESP_OK;
}
static esp_err_t esp_matter_command_callback_move_color_temperature(const ConcreteCommandPath &command_path, TLVReader &tlv_data,
void *opaque_ptr)
{
chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::DecodableType command_data;
CHIP_ERROR error = Decode(tlv_data, command_data);
if (error == CHIP_NO_ERROR) {
emberAfColorControlClusterMoveColorTemperatureCallback((CommandHandler *)opaque_ptr, command_path, command_data);
}
return ESP_OK;
}
static esp_err_t esp_matter_command_callback_step_color_temperature(const ConcreteCommandPath &command_path, TLVReader &tlv_data,
void *opaque_ptr)
{
chip::app::Clusters::ColorControl::Commands::StepColorTemperature::DecodableType command_data;
CHIP_ERROR error = Decode(tlv_data, command_data);
if (error == CHIP_NO_ERROR) {
emberAfColorControlClusterStepColorTemperatureCallback((CommandHandler *)opaque_ptr, command_path, command_data);
}
return ESP_OK;
}
namespace esp_matter {
namespace cluster {
namespace color_control {
namespace feature {
namespace hue_saturation {
uint32_t get_id()
{
return HueSaturation::Id;
}
esp_err_t add(cluster_t *cluster, config_t *config)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
VerifyOrReturnError(config, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_current_hue(cluster, config->current_hue);
attribute::create_current_saturation(cluster, config->current_saturation);
command::create_move_to_hue(cluster);
command::create_move_hue(cluster);
command::create_step_hue(cluster);
command::create_move_to_saturation(cluster);
command::create_move_saturation(cluster);
command::create_step_saturation(cluster);
command::create_move_to_hue_and_saturation(cluster);
command::create_stop_move_step(cluster);
return ESP_OK;
}
} /* hue_saturation */
namespace enhanced_hue {
uint32_t get_id()
{
return EnhancedHue::Id;
}
esp_err_t add(cluster_t *cluster, config_t *config)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
VerifyOrReturnError(config, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_enhanced_current_hue(cluster, config->enhanced_current_hue);
command::create_enhanced_move_to_hue(cluster);
command::create_enhanced_move_hue(cluster);
command::create_enhanced_step_hue(cluster);
command::create_enhanced_move_to_hue_and_saturation(cluster);
return ESP_OK;
}
} /* enhanced_hue */
namespace color_loop {
uint32_t get_id()
{
return ColorLoop::Id;
}
esp_err_t add(cluster_t *cluster, config_t *config)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
VerifyOrReturnError(config, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_color_loop_active(cluster, config->color_loop_active);
attribute::create_color_loop_direction(cluster, config->color_loop_direction);
attribute::create_color_loop_time(cluster, config->color_loop_time);
attribute::create_color_loop_start_enhanced_hue(cluster, config->color_loop_start_enhanced_hue);
attribute::create_color_loop_stored_enhanced_hue(cluster, config->color_loop_stored_enhanced_hue);
command::create_color_loop_set(cluster);
return ESP_OK;
}
} /* color_loop */
namespace xy {
uint32_t get_id()
{
return XY::Id;
}
esp_err_t add(cluster_t *cluster, config_t *config)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
VerifyOrReturnError(config, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_current_x(cluster, config->current_x);
attribute::create_current_y(cluster, config->current_y);
command::create_move_to_color(cluster);
command::create_move_color(cluster);
command::create_step_color(cluster);
command::create_stop_move_step(cluster);
return ESP_OK;
}
} /* xy */
namespace color_temperature {
uint32_t get_id()
{
return ColorTemperature::Id;
}
esp_err_t add(cluster_t *cluster, config_t *config)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
VerifyOrReturnError(config, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_color_temperature_mireds(cluster, config->color_temperature_mireds);
attribute::create_color_temp_physical_min_mireds(cluster, config->color_temp_physical_min_mireds);
attribute::create_color_temp_physical_max_mireds(cluster, config->color_temp_physical_max_mireds);
attribute::create_couple_color_temp_to_level_min_mireds(cluster, config->couple_color_temp_to_level_min_mireds);
attribute::create_start_up_color_temperature_mireds(cluster, config->start_up_color_temperature_mireds);
command::create_move_to_color_temperature(cluster);
command::create_stop_move_step(cluster);
command::create_move_color_temperature(cluster);
command::create_step_color_temperature(cluster);
return ESP_OK;
}
} /* color_temperature */
} /* feature */
namespace attribute {
attribute_t *create_current_hue(cluster_t *cluster, uint8_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(hue_saturation), NULL);
attribute_t *attribute = esp_matter::attribute::create(cluster, CurrentHue::Id, ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_uint8(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint8(0), esp_matter_uint8(254));
return attribute;
}
attribute_t *create_current_saturation(cluster_t *cluster, uint8_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(hue_saturation), NULL);
attribute_t *attribute = esp_matter::attribute::create(cluster, CurrentSaturation::Id, ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_uint8(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint8(0), esp_matter_uint8(254));
return attribute;
}
attribute_t *create_remaining_time(cluster_t *cluster, uint16_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, RemainingTime::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(0), esp_matter_uint16(65534));
return attribute;
}
attribute_t *create_current_x(cluster_t *cluster, uint16_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(xy), NULL);
attribute_t *attribute = esp_matter::attribute::create(cluster, CurrentX::Id, ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(0), esp_matter_uint16(65279));
return attribute;
}
attribute_t *create_current_y(cluster_t *cluster, uint16_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(xy), NULL);
attribute_t *attribute = esp_matter::attribute::create(cluster, CurrentY::Id, ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(0), esp_matter_uint16(65279));
return attribute;
}
attribute_t *create_drift_compensation(cluster_t *cluster, uint8_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, DriftCompensation::Id, ATTRIBUTE_FLAG_NONE, esp_matter_enum8(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_enum8(0), esp_matter_enum8(4));
return attribute;
}
attribute_t *create_compensation_text(cluster_t *cluster, char *value, uint16_t length)
{
VerifyOrReturnValue(length <= k_max_compensation_text_length + 1, NULL, ESP_LOGE(TAG, "Could not create attribute, string length out of bound"));
return esp_matter::attribute::create(cluster, CompensationText::Id, ATTRIBUTE_FLAG_NONE, esp_matter_char_str(value, length), k_max_compensation_text_length + 1);
}
attribute_t *create_color_temperature_mireds(cluster_t *cluster, uint16_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(color_temperature), NULL);
attribute_t *attribute = esp_matter::attribute::create(cluster, ColorTemperatureMireds::Id, ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(0), esp_matter_uint16(65279));
return attribute;
}
attribute_t *create_color_mode(cluster_t *cluster, uint8_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, ColorMode::Id, ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_enum8(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_enum8(0), esp_matter_enum8(2));
return attribute;
}
attribute_t *create_options(cluster_t *cluster, uint8_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, Options::Id, ATTRIBUTE_FLAG_WRITABLE, esp_matter_bitmap8(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_bitmap8(0), esp_matter_bitmap8(1));
return attribute;
}
attribute_t *create_number_of_primaries(cluster_t *cluster, nullable<uint8_t> value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, NumberOfPrimaries::Id, ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint8(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_nullable_uint8(0), esp_matter_nullable_uint8(6));
return attribute;
}
attribute_t *create_primary_1_x(cluster_t *cluster, uint16_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, Primary1X::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(0), esp_matter_uint16(65279));
return attribute;
}
attribute_t *create_primary_1_y(cluster_t *cluster, uint16_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, Primary1Y::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(0), esp_matter_uint16(65279));
return attribute;
}
attribute_t *create_primary_1_intensity(cluster_t *cluster, nullable<uint8_t> value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, Primary1Intensity::Id, ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint8(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_nullable_uint8(0), esp_matter_nullable_uint8(254));
return attribute;
}
attribute_t *create_primary_2_x(cluster_t *cluster, uint16_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, Primary2X::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(0), esp_matter_uint16(65279));
return attribute;
}
attribute_t *create_primary_2_y(cluster_t *cluster, uint16_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, Primary2Y::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(0), esp_matter_uint16(65279));
return attribute;
}
attribute_t *create_primary_2_intensity(cluster_t *cluster, nullable<uint8_t> value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, Primary2Intensity::Id, ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint8(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_nullable_uint8(0), esp_matter_nullable_uint8(254));
return attribute;
}
attribute_t *create_primary_3_x(cluster_t *cluster, uint16_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, Primary3X::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(0), esp_matter_uint16(65279));
return attribute;
}
attribute_t *create_primary_3_y(cluster_t *cluster, uint16_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, Primary3Y::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(0), esp_matter_uint16(65279));
return attribute;
}
attribute_t *create_primary_3_intensity(cluster_t *cluster, nullable<uint8_t> value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, Primary3Intensity::Id, ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint8(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_nullable_uint8(0), esp_matter_nullable_uint8(254));
return attribute;
}
attribute_t *create_primary_4_x(cluster_t *cluster, uint16_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, Primary4X::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(0), esp_matter_uint16(65279));
return attribute;
}
attribute_t *create_primary_4_y(cluster_t *cluster, uint16_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, Primary4Y::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(0), esp_matter_uint16(65279));
return attribute;
}
attribute_t *create_primary_4_intensity(cluster_t *cluster, nullable<uint8_t> value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, Primary4Intensity::Id, ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint8(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_nullable_uint8(0), esp_matter_nullable_uint8(254));
return attribute;
}
attribute_t *create_primary_5_x(cluster_t *cluster, uint16_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, Primary5X::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(0), esp_matter_uint16(65279));
return attribute;
}
attribute_t *create_primary_5_y(cluster_t *cluster, uint16_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, Primary5Y::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(0), esp_matter_uint16(65279));
return attribute;
}
attribute_t *create_primary_5_intensity(cluster_t *cluster, nullable<uint8_t> value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, Primary5Intensity::Id, ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint8(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_nullable_uint8(0), esp_matter_nullable_uint8(254));
return attribute;
}
attribute_t *create_primary_6_x(cluster_t *cluster, uint16_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, Primary6X::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(0), esp_matter_uint16(65279));
return attribute;
}
attribute_t *create_primary_6_y(cluster_t *cluster, uint16_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, Primary6Y::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(0), esp_matter_uint16(65279));
return attribute;
}
attribute_t *create_primary_6_intensity(cluster_t *cluster, nullable<uint8_t> value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, Primary6Intensity::Id, ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint8(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_nullable_uint8(0), esp_matter_nullable_uint8(254));
return attribute;
}
attribute_t *create_white_point_x(cluster_t *cluster, uint16_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, WhitePointX::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(0), esp_matter_uint16(65279));
return attribute;
}
attribute_t *create_white_point_y(cluster_t *cluster, uint16_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, WhitePointY::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(0), esp_matter_uint16(65279));
return attribute;
}
attribute_t *create_color_point_rx(cluster_t *cluster, uint16_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, ColorPointRX::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(0), esp_matter_uint16(65279));
return attribute;
}
attribute_t *create_color_point_ry(cluster_t *cluster, uint16_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, ColorPointRY::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(0), esp_matter_uint16(65279));
return attribute;
}
attribute_t *create_color_point_r_intensity(cluster_t *cluster, nullable<uint8_t> value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, ColorPointRIntensity::Id, ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint8(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_nullable_uint8(0), esp_matter_nullable_uint8(254));
return attribute;
}
attribute_t *create_color_point_gx(cluster_t *cluster, uint16_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, ColorPointGX::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(0), esp_matter_uint16(65279));
return attribute;
}
attribute_t *create_color_point_gy(cluster_t *cluster, uint16_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, ColorPointGY::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(0), esp_matter_uint16(65279));
return attribute;
}
attribute_t *create_color_point_g_intensity(cluster_t *cluster, nullable<uint8_t> value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, ColorPointGIntensity::Id, ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint8(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_nullable_uint8(0), esp_matter_nullable_uint8(254));
return attribute;
}
attribute_t *create_color_point_bx(cluster_t *cluster, uint16_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, ColorPointBX::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(0), esp_matter_uint16(65279));
return attribute;
}
attribute_t *create_color_point_by(cluster_t *cluster, uint16_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, ColorPointBY::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(0), esp_matter_uint16(65279));
return attribute;
}
attribute_t *create_color_point_b_intensity(cluster_t *cluster, nullable<uint8_t> value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, ColorPointBIntensity::Id, ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint8(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_nullable_uint8(0), esp_matter_nullable_uint8(254));
return attribute;
}
attribute_t *create_enhanced_current_hue(cluster_t *cluster, uint16_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(enhanced_hue), NULL);
attribute_t *attribute = esp_matter::attribute::create(cluster, EnhancedCurrentHue::Id, ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(0), esp_matter_uint16(65534));
return attribute;
}
attribute_t *create_enhanced_color_mode(cluster_t *cluster, uint8_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, EnhancedColorMode::Id, ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_enum8(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_enum8(0), esp_matter_enum8(3));
return attribute;
}
attribute_t *create_color_loop_active(cluster_t *cluster, uint8_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(color_loop), NULL);
attribute_t *attribute = esp_matter::attribute::create(cluster, ColorLoopActive::Id, ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_uint8(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint8(0), esp_matter_uint8(1));
return attribute;
}
attribute_t *create_color_loop_direction(cluster_t *cluster, uint8_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(color_loop), NULL);
attribute_t *attribute = esp_matter::attribute::create(cluster, ColorLoopDirection::Id, ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_enum8(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_enum8(0), esp_matter_enum8(1));
return attribute;
}
attribute_t *create_color_loop_time(cluster_t *cluster, uint16_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(color_loop), NULL);
attribute_t *attribute = esp_matter::attribute::create(cluster, ColorLoopTime::Id, ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(0), esp_matter_uint16(65534));
return attribute;
}
attribute_t *create_color_loop_start_enhanced_hue(cluster_t *cluster, uint16_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(color_loop), NULL);
attribute_t *attribute = esp_matter::attribute::create(cluster, ColorLoopStartEnhancedHue::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(0), esp_matter_uint16(65534));
return attribute;
}
attribute_t *create_color_loop_stored_enhanced_hue(cluster_t *cluster, uint16_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(color_loop), NULL);
attribute_t *attribute = esp_matter::attribute::create(cluster, ColorLoopStoredEnhancedHue::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(0), esp_matter_uint16(65534));
return attribute;
}
attribute_t *create_color_capabilities(cluster_t *cluster, uint16_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, ColorCapabilities::Id, ATTRIBUTE_FLAG_NONE, esp_matter_bitmap16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_bitmap16(0), esp_matter_bitmap16(65535));
return attribute;
}
attribute_t *create_color_temp_physical_min_mireds(cluster_t *cluster, uint16_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(color_temperature), NULL);
attribute_t *attribute = esp_matter::attribute::create(cluster, ColorTempPhysicalMinMireds::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(1), esp_matter_uint16(65279));
return attribute;
}
attribute_t *create_color_temp_physical_max_mireds(cluster_t *cluster, uint16_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(color_temperature), NULL);
attribute_t *attribute = esp_matter::attribute::create(cluster, ColorTempPhysicalMaxMireds::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(0), esp_matter_uint16(65279));
return attribute;
}
attribute_t *create_couple_color_temp_to_level_min_mireds(cluster_t *cluster, uint16_t value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(color_temperature), NULL);
attribute_t *attribute = esp_matter::attribute::create(cluster, CoupleColorTempToLevelMinMireds::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_uint16(0), esp_matter_uint16(65534));
return attribute;
}
attribute_t *create_start_up_color_temperature_mireds(cluster_t *cluster, nullable<uint16_t> value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(color_temperature), NULL);
attribute_t *attribute = esp_matter::attribute::create(cluster, StartUpColorTemperatureMireds::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_NULLABLE | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_nullable_uint16(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_nullable_uint16(1), esp_matter_nullable_uint16(65279));
return attribute;
}
} /* attribute */
namespace command {
command_t *create_move_to_hue(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(hue_saturation), NULL);
return esp_matter::command::create(cluster, MoveToHue::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_move_to_hue);
}
command_t *create_move_hue(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(hue_saturation), NULL);
return esp_matter::command::create(cluster, MoveHue::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_move_hue);
}
command_t *create_step_hue(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(hue_saturation), NULL);
return esp_matter::command::create(cluster, StepHue::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_step_hue);
}
command_t *create_move_to_saturation(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(hue_saturation), NULL);
return esp_matter::command::create(cluster, MoveToSaturation::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_move_to_saturation);
}
command_t *create_move_saturation(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(hue_saturation), NULL);
return esp_matter::command::create(cluster, MoveSaturation::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_move_saturation);
}
command_t *create_step_saturation(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(hue_saturation), NULL);
return esp_matter::command::create(cluster, StepSaturation::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_step_saturation);
}
command_t *create_move_to_hue_and_saturation(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(hue_saturation), NULL);
return esp_matter::command::create(cluster, MoveToHueAndSaturation::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_move_to_hue_and_saturation);
}
command_t *create_move_to_color(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(xy), NULL);
return esp_matter::command::create(cluster, MoveToColor::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_move_to_color);
}
command_t *create_move_color(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(xy), NULL);
return esp_matter::command::create(cluster, MoveColor::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_move_color);
}
command_t *create_step_color(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(xy), NULL);
return esp_matter::command::create(cluster, StepColor::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_step_color);
}
command_t *create_move_to_color_temperature(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(color_temperature), NULL);
return esp_matter::command::create(cluster, MoveToColorTemperature::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_move_to_color_temperature);
}
command_t *create_enhanced_move_to_hue(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(enhanced_hue), NULL);
return esp_matter::command::create(cluster, EnhancedMoveToHue::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_enhanced_move_to_hue);
}
command_t *create_enhanced_move_hue(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(enhanced_hue), NULL);
return esp_matter::command::create(cluster, EnhancedMoveHue::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_enhanced_move_hue);
}
command_t *create_enhanced_step_hue(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(enhanced_hue), NULL);
return esp_matter::command::create(cluster, EnhancedStepHue::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_enhanced_step_hue);
}
command_t *create_enhanced_move_to_hue_and_saturation(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(enhanced_hue), NULL);
return esp_matter::command::create(cluster, EnhancedMoveToHueAndSaturation::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_enhanced_move_to_hue_and_saturation);
}
command_t *create_color_loop_set(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(color_loop), NULL);
return esp_matter::command::create(cluster, ColorLoopSet::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_color_loop_set);
}
command_t *create_stop_move_step(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(((has_feature(hue_saturation)) || (has_feature(xy)) || (has_feature(color_temperature))), NULL);
return esp_matter::command::create(cluster, StopMoveStep::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_stop_move_step);
}
command_t *create_move_color_temperature(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(color_temperature), NULL);
return esp_matter::command::create(cluster, MoveColorTemperature::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_move_color_temperature);
}
command_t *create_step_color_temperature(cluster_t *cluster)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(color_temperature), NULL);
return esp_matter::command::create(cluster, StepColorTemperature::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_step_color_temperature);
}
} /* command */
static void create_default_binding_cluster(endpoint_t *endpoint)
{
binding::config_t config;
binding::create(endpoint, &config, CLUSTER_FLAG_SERVER);
}
const function_generic_t function_list[] = {
(function_generic_t)emberAfColorControlClusterServerInitCallback,
(function_generic_t)MatterColorControlClusterServerShutdownCallback,
};
const int function_flags = CLUSTER_FLAG_INIT_FUNCTION | CLUSTER_FLAG_SHUTDOWN_FUNCTION;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
{
cluster_t *cluster = esp_matter::cluster::create(endpoint, color_control::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, color_control::Id));
if (flags & CLUSTER_FLAG_SERVER) {
VerifyOrReturnValue(config != NULL, ABORT_CLUSTER_CREATE(cluster));
static const auto plugin_server_init_cb = CALL_ONCE(MatterColorControlPluginServerInitCallback);
set_plugin_server_init_callback(cluster, plugin_server_init_cb);
add_function_list(cluster, function_list, function_flags);
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
/* Attributes not managed internally */
global::attribute::create_cluster_revision(cluster, cluster_revision);
attribute::create_color_mode(cluster, config->color_mode);
attribute::create_options(cluster, config->options);
attribute::create_number_of_primaries(cluster, config->number_of_primaries);
attribute::create_primary_1_x(cluster, config->primary_1_x);
attribute::create_primary_1_y(cluster, config->primary_1_y);
attribute::create_primary_1_intensity(cluster, config->primary_1_intensity);
attribute::create_primary_2_x(cluster, config->primary_2_x);
attribute::create_primary_2_y(cluster, config->primary_2_y);
attribute::create_primary_2_intensity(cluster, config->primary_2_intensity);
attribute::create_primary_3_x(cluster, config->primary_3_x);
attribute::create_primary_3_y(cluster, config->primary_3_y);
attribute::create_primary_3_intensity(cluster, config->primary_3_intensity);
attribute::create_primary_4_x(cluster, config->primary_4_x);
attribute::create_primary_4_y(cluster, config->primary_4_y);
attribute::create_primary_4_intensity(cluster, config->primary_4_intensity);
attribute::create_primary_5_x(cluster, config->primary_5_x);
attribute::create_primary_5_y(cluster, config->primary_5_y);
attribute::create_primary_5_intensity(cluster, config->primary_5_intensity);
attribute::create_primary_6_x(cluster, config->primary_6_x);
attribute::create_primary_6_y(cluster, config->primary_6_y);
attribute::create_primary_6_intensity(cluster, config->primary_6_intensity);
attribute::create_enhanced_color_mode(cluster, config->enhanced_color_mode);
attribute::create_color_capabilities(cluster, config->color_capabilities);
}
if (flags & CLUSTER_FLAG_CLIENT) {
create_default_binding_cluster(endpoint);
}
return cluster;
}
} /* color_control */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,191 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace color_control {
const uint8_t k_max_compensation_text_length = 254u;
namespace feature {
namespace hue_saturation {
typedef struct config {
uint8_t current_hue;
uint8_t current_saturation;
config() : current_hue(0), current_saturation(0) {}
} config_t;
uint32_t get_id();
esp_err_t add(cluster_t *cluster, config_t *config);
} /* hue_saturation */
namespace enhanced_hue {
typedef struct config {
uint16_t enhanced_current_hue;
config() : enhanced_current_hue(0) {}
} config_t;
uint32_t get_id();
esp_err_t add(cluster_t *cluster, config_t *config);
} /* enhanced_hue */
namespace color_loop {
typedef struct config {
uint8_t color_loop_active;
uint8_t color_loop_direction;
uint16_t color_loop_time;
uint16_t color_loop_start_enhanced_hue;
uint16_t color_loop_stored_enhanced_hue;
config() : color_loop_active(0), color_loop_direction(0), color_loop_time(0), color_loop_start_enhanced_hue(0), color_loop_stored_enhanced_hue(0) {}
} config_t;
uint32_t get_id();
esp_err_t add(cluster_t *cluster, config_t *config);
} /* color_loop */
namespace xy {
typedef struct config {
uint16_t current_x;
uint16_t current_y;
config() : current_x(0), current_y(0) {}
} config_t;
uint32_t get_id();
esp_err_t add(cluster_t *cluster, config_t *config);
} /* xy */
namespace color_temperature {
typedef struct config {
uint16_t color_temperature_mireds;
uint16_t color_temp_physical_min_mireds;
uint16_t color_temp_physical_max_mireds;
uint16_t couple_color_temp_to_level_min_mireds;
nullable<uint16_t> start_up_color_temperature_mireds;
config() : color_temperature_mireds(0), color_temp_physical_min_mireds(0), color_temp_physical_max_mireds(0), couple_color_temp_to_level_min_mireds(0), start_up_color_temperature_mireds(0) {}
} config_t;
uint32_t get_id();
esp_err_t add(cluster_t *cluster, config_t *config);
} /* color_temperature */
} /* feature */
namespace attribute {
attribute_t *create_current_hue(cluster_t *cluster, uint8_t value);
attribute_t *create_current_saturation(cluster_t *cluster, uint8_t value);
attribute_t *create_remaining_time(cluster_t *cluster, uint16_t value);
attribute_t *create_current_x(cluster_t *cluster, uint16_t value);
attribute_t *create_current_y(cluster_t *cluster, uint16_t value);
attribute_t *create_drift_compensation(cluster_t *cluster, uint8_t value);
attribute_t *create_compensation_text(cluster_t *cluster, char * value, uint16_t length);
attribute_t *create_color_temperature_mireds(cluster_t *cluster, uint16_t value);
attribute_t *create_color_mode(cluster_t *cluster, uint8_t value);
attribute_t *create_options(cluster_t *cluster, uint8_t value);
attribute_t *create_number_of_primaries(cluster_t *cluster, nullable<uint8_t> value);
attribute_t *create_primary_1_x(cluster_t *cluster, uint16_t value);
attribute_t *create_primary_1_y(cluster_t *cluster, uint16_t value);
attribute_t *create_primary_1_intensity(cluster_t *cluster, nullable<uint8_t> value);
attribute_t *create_primary_2_x(cluster_t *cluster, uint16_t value);
attribute_t *create_primary_2_y(cluster_t *cluster, uint16_t value);
attribute_t *create_primary_2_intensity(cluster_t *cluster, nullable<uint8_t> value);
attribute_t *create_primary_3_x(cluster_t *cluster, uint16_t value);
attribute_t *create_primary_3_y(cluster_t *cluster, uint16_t value);
attribute_t *create_primary_3_intensity(cluster_t *cluster, nullable<uint8_t> value);
attribute_t *create_primary_4_x(cluster_t *cluster, uint16_t value);
attribute_t *create_primary_4_y(cluster_t *cluster, uint16_t value);
attribute_t *create_primary_4_intensity(cluster_t *cluster, nullable<uint8_t> value);
attribute_t *create_primary_5_x(cluster_t *cluster, uint16_t value);
attribute_t *create_primary_5_y(cluster_t *cluster, uint16_t value);
attribute_t *create_primary_5_intensity(cluster_t *cluster, nullable<uint8_t> value);
attribute_t *create_primary_6_x(cluster_t *cluster, uint16_t value);
attribute_t *create_primary_6_y(cluster_t *cluster, uint16_t value);
attribute_t *create_primary_6_intensity(cluster_t *cluster, nullable<uint8_t> value);
attribute_t *create_white_point_x(cluster_t *cluster, uint16_t value);
attribute_t *create_white_point_y(cluster_t *cluster, uint16_t value);
attribute_t *create_color_point_rx(cluster_t *cluster, uint16_t value);
attribute_t *create_color_point_ry(cluster_t *cluster, uint16_t value);
attribute_t *create_color_point_r_intensity(cluster_t *cluster, nullable<uint8_t> value);
attribute_t *create_color_point_gx(cluster_t *cluster, uint16_t value);
attribute_t *create_color_point_gy(cluster_t *cluster, uint16_t value);
attribute_t *create_color_point_g_intensity(cluster_t *cluster, nullable<uint8_t> value);
attribute_t *create_color_point_bx(cluster_t *cluster, uint16_t value);
attribute_t *create_color_point_by(cluster_t *cluster, uint16_t value);
attribute_t *create_color_point_b_intensity(cluster_t *cluster, nullable<uint8_t> value);
attribute_t *create_enhanced_current_hue(cluster_t *cluster, uint16_t value);
attribute_t *create_enhanced_color_mode(cluster_t *cluster, uint8_t value);
attribute_t *create_color_loop_active(cluster_t *cluster, uint8_t value);
attribute_t *create_color_loop_direction(cluster_t *cluster, uint8_t value);
attribute_t *create_color_loop_time(cluster_t *cluster, uint16_t value);
attribute_t *create_color_loop_start_enhanced_hue(cluster_t *cluster, uint16_t value);
attribute_t *create_color_loop_stored_enhanced_hue(cluster_t *cluster, uint16_t value);
attribute_t *create_color_capabilities(cluster_t *cluster, uint16_t value);
attribute_t *create_color_temp_physical_min_mireds(cluster_t *cluster, uint16_t value);
attribute_t *create_color_temp_physical_max_mireds(cluster_t *cluster, uint16_t value);
attribute_t *create_couple_color_temp_to_level_min_mireds(cluster_t *cluster, uint16_t value);
attribute_t *create_start_up_color_temperature_mireds(cluster_t *cluster, nullable<uint16_t> value);
} /* attribute */
namespace command {
command_t *create_move_to_hue(cluster_t *cluster);
command_t *create_move_hue(cluster_t *cluster);
command_t *create_step_hue(cluster_t *cluster);
command_t *create_move_to_saturation(cluster_t *cluster);
command_t *create_move_saturation(cluster_t *cluster);
command_t *create_step_saturation(cluster_t *cluster);
command_t *create_move_to_hue_and_saturation(cluster_t *cluster);
command_t *create_move_to_color(cluster_t *cluster);
command_t *create_move_color(cluster_t *cluster);
command_t *create_step_color(cluster_t *cluster);
command_t *create_move_to_color_temperature(cluster_t *cluster);
command_t *create_enhanced_move_to_hue(cluster_t *cluster);
command_t *create_enhanced_move_hue(cluster_t *cluster);
command_t *create_enhanced_step_hue(cluster_t *cluster);
command_t *create_enhanced_move_to_hue_and_saturation(cluster_t *cluster);
command_t *create_color_loop_set(cluster_t *cluster);
command_t *create_stop_move_step(cluster_t *cluster);
command_t *create_move_color_temperature(cluster_t *cluster);
command_t *create_step_color_temperature(cluster_t *cluster);
} /* command */
typedef struct config {
uint8_t color_mode;
uint8_t options;
nullable<uint8_t> number_of_primaries;
uint16_t primary_1_x;
uint16_t primary_1_y;
nullable<uint8_t> primary_1_intensity;
uint16_t primary_2_x;
uint16_t primary_2_y;
nullable<uint8_t> primary_2_intensity;
uint16_t primary_3_x;
uint16_t primary_3_y;
nullable<uint8_t> primary_3_intensity;
uint16_t primary_4_x;
uint16_t primary_4_y;
nullable<uint8_t> primary_4_intensity;
uint16_t primary_5_x;
uint16_t primary_5_y;
nullable<uint8_t> primary_5_intensity;
uint16_t primary_6_x;
uint16_t primary_6_y;
nullable<uint8_t> primary_6_intensity;
uint8_t enhanced_color_mode;
uint16_t color_capabilities;
config() : color_mode(0), options(0), number_of_primaries(0), primary_1_x(0), primary_1_y(0), primary_1_intensity(0), primary_2_x(0), primary_2_y(0), primary_2_intensity(0), primary_3_x(0), primary_3_y(0), primary_3_intensity(0), primary_4_x(0), primary_4_y(0), primary_4_intensity(0), primary_5_x(0), primary_5_y(0), primary_5_intensity(0), primary_6_x(0), primary_6_y(0), primary_6_intensity(0), enhanced_color_mode(0), color_capabilities(0) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* color_control */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,265 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace color_control {
inline constexpr uint32_t Id = 0x0300;
namespace feature {
namespace HueSaturation {
inline constexpr uint32_t Id = 0x1;
} /* HueSaturation */
namespace EnhancedHue {
inline constexpr uint32_t Id = 0x2;
} /* EnhancedHue */
namespace ColorLoop {
inline constexpr uint32_t Id = 0x4;
} /* ColorLoop */
namespace XY {
inline constexpr uint32_t Id = 0x8;
} /* XY */
namespace ColorTemperature {
inline constexpr uint32_t Id = 0x10;
} /* ColorTemperature */
} /* feature */
namespace attribute {
namespace CurrentHue {
inline constexpr uint32_t Id = 0x0000;
} /* CurrentHue */
namespace CurrentSaturation {
inline constexpr uint32_t Id = 0x0001;
} /* CurrentSaturation */
namespace RemainingTime {
inline constexpr uint32_t Id = 0x0002;
} /* RemainingTime */
namespace CurrentX {
inline constexpr uint32_t Id = 0x0003;
} /* CurrentX */
namespace CurrentY {
inline constexpr uint32_t Id = 0x0004;
} /* CurrentY */
namespace DriftCompensation {
inline constexpr uint32_t Id = 0x0005;
} /* DriftCompensation */
namespace CompensationText {
inline constexpr uint32_t Id = 0x0006;
} /* CompensationText */
namespace ColorTemperatureMireds {
inline constexpr uint32_t Id = 0x0007;
} /* ColorTemperatureMireds */
namespace ColorMode {
inline constexpr uint32_t Id = 0x0008;
} /* ColorMode */
namespace Options {
inline constexpr uint32_t Id = 0x000F;
} /* Options */
namespace NumberOfPrimaries {
inline constexpr uint32_t Id = 0x0010;
} /* NumberOfPrimaries */
namespace Primary1X {
inline constexpr uint32_t Id = 0x0011;
} /* Primary1X */
namespace Primary1Y {
inline constexpr uint32_t Id = 0x0012;
} /* Primary1Y */
namespace Primary1Intensity {
inline constexpr uint32_t Id = 0x0013;
} /* Primary1Intensity */
namespace Primary2X {
inline constexpr uint32_t Id = 0x0015;
} /* Primary2X */
namespace Primary2Y {
inline constexpr uint32_t Id = 0x0016;
} /* Primary2Y */
namespace Primary2Intensity {
inline constexpr uint32_t Id = 0x0017;
} /* Primary2Intensity */
namespace Primary3X {
inline constexpr uint32_t Id = 0x0019;
} /* Primary3X */
namespace Primary3Y {
inline constexpr uint32_t Id = 0x001A;
} /* Primary3Y */
namespace Primary3Intensity {
inline constexpr uint32_t Id = 0x001B;
} /* Primary3Intensity */
namespace Primary4X {
inline constexpr uint32_t Id = 0x0020;
} /* Primary4X */
namespace Primary4Y {
inline constexpr uint32_t Id = 0x0021;
} /* Primary4Y */
namespace Primary4Intensity {
inline constexpr uint32_t Id = 0x0022;
} /* Primary4Intensity */
namespace Primary5X {
inline constexpr uint32_t Id = 0x0024;
} /* Primary5X */
namespace Primary5Y {
inline constexpr uint32_t Id = 0x0025;
} /* Primary5Y */
namespace Primary5Intensity {
inline constexpr uint32_t Id = 0x0026;
} /* Primary5Intensity */
namespace Primary6X {
inline constexpr uint32_t Id = 0x0028;
} /* Primary6X */
namespace Primary6Y {
inline constexpr uint32_t Id = 0x0029;
} /* Primary6Y */
namespace Primary6Intensity {
inline constexpr uint32_t Id = 0x002A;
} /* Primary6Intensity */
namespace WhitePointX {
inline constexpr uint32_t Id = 0x0030;
} /* WhitePointX */
namespace WhitePointY {
inline constexpr uint32_t Id = 0x0031;
} /* WhitePointY */
namespace ColorPointRX {
inline constexpr uint32_t Id = 0x0032;
} /* ColorPointRX */
namespace ColorPointRY {
inline constexpr uint32_t Id = 0x0033;
} /* ColorPointRY */
namespace ColorPointRIntensity {
inline constexpr uint32_t Id = 0x0034;
} /* ColorPointRIntensity */
namespace ColorPointGX {
inline constexpr uint32_t Id = 0x0036;
} /* ColorPointGX */
namespace ColorPointGY {
inline constexpr uint32_t Id = 0x0037;
} /* ColorPointGY */
namespace ColorPointGIntensity {
inline constexpr uint32_t Id = 0x0038;
} /* ColorPointGIntensity */
namespace ColorPointBX {
inline constexpr uint32_t Id = 0x003A;
} /* ColorPointBX */
namespace ColorPointBY {
inline constexpr uint32_t Id = 0x003B;
} /* ColorPointBY */
namespace ColorPointBIntensity {
inline constexpr uint32_t Id = 0x003C;
} /* ColorPointBIntensity */
namespace EnhancedCurrentHue {
inline constexpr uint32_t Id = 0x4000;
} /* EnhancedCurrentHue */
namespace EnhancedColorMode {
inline constexpr uint32_t Id = 0x4001;
} /* EnhancedColorMode */
namespace ColorLoopActive {
inline constexpr uint32_t Id = 0x4002;
} /* ColorLoopActive */
namespace ColorLoopDirection {
inline constexpr uint32_t Id = 0x4003;
} /* ColorLoopDirection */
namespace ColorLoopTime {
inline constexpr uint32_t Id = 0x4004;
} /* ColorLoopTime */
namespace ColorLoopStartEnhancedHue {
inline constexpr uint32_t Id = 0x4005;
} /* ColorLoopStartEnhancedHue */
namespace ColorLoopStoredEnhancedHue {
inline constexpr uint32_t Id = 0x4006;
} /* ColorLoopStoredEnhancedHue */
namespace ColorCapabilities {
inline constexpr uint32_t Id = 0x400A;
} /* ColorCapabilities */
namespace ColorTempPhysicalMinMireds {
inline constexpr uint32_t Id = 0x400B;
} /* ColorTempPhysicalMinMireds */
namespace ColorTempPhysicalMaxMireds {
inline constexpr uint32_t Id = 0x400C;
} /* ColorTempPhysicalMaxMireds */
namespace CoupleColorTempToLevelMinMireds {
inline constexpr uint32_t Id = 0x400D;
} /* CoupleColorTempToLevelMinMireds */
namespace StartUpColorTemperatureMireds {
inline constexpr uint32_t Id = 0x4010;
} /* StartUpColorTemperatureMireds */
} /* attribute */
namespace command {
namespace MoveToHue {
inline constexpr uint32_t Id = 0x00;
} /* MoveToHue */
namespace MoveHue {
inline constexpr uint32_t Id = 0x01;
} /* MoveHue */
namespace StepHue {
inline constexpr uint32_t Id = 0x02;
} /* StepHue */
namespace MoveToSaturation {
inline constexpr uint32_t Id = 0x03;
} /* MoveToSaturation */
namespace MoveSaturation {
inline constexpr uint32_t Id = 0x04;
} /* MoveSaturation */
namespace StepSaturation {
inline constexpr uint32_t Id = 0x05;
} /* StepSaturation */
namespace MoveToHueAndSaturation {
inline constexpr uint32_t Id = 0x06;
} /* MoveToHueAndSaturation */
namespace MoveToColor {
inline constexpr uint32_t Id = 0x07;
} /* MoveToColor */
namespace MoveColor {
inline constexpr uint32_t Id = 0x08;
} /* MoveColor */
namespace StepColor {
inline constexpr uint32_t Id = 0x09;
} /* StepColor */
namespace MoveToColorTemperature {
inline constexpr uint32_t Id = 0x0A;
} /* MoveToColorTemperature */
namespace EnhancedMoveToHue {
inline constexpr uint32_t Id = 0x40;
} /* EnhancedMoveToHue */
namespace EnhancedMoveHue {
inline constexpr uint32_t Id = 0x41;
} /* EnhancedMoveHue */
namespace EnhancedStepHue {
inline constexpr uint32_t Id = 0x42;
} /* EnhancedStepHue */
namespace EnhancedMoveToHueAndSaturation {
inline constexpr uint32_t Id = 0x43;
} /* EnhancedMoveToHueAndSaturation */
namespace ColorLoopSet {
inline constexpr uint32_t Id = 0x44;
} /* ColorLoopSet */
namespace StopMoveStep {
inline constexpr uint32_t Id = 0x47;
} /* StopMoveStep */
namespace MoveColorTemperature {
inline constexpr uint32_t Id = 0x4B;
} /* MoveColorTemperature */
namespace StepColorTemperature {
inline constexpr uint32_t Id = 0x4C;
} /* StepColorTemperature */
} /* command */
} /* color_control */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,118 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#include <esp_log.h>
#include <esp_matter_core.h>
#include <esp_matter.h>
#include <app-common/zap-generated/cluster-enums.h>
#include <app-common/zap-generated/callback.h>
#include <app/InteractionModelEngine.h>
#include <zap_common/app/PluginApplicationCallbacks.h>
#include <esp_matter_delegate_callbacks.h>
#include <commissioner_control.h>
#include <commissioner_control_ids.h>
#include <binding.h>
#include <esp_matter_data_model_priv.h>
using namespace chip::app::Clusters;
using chip::app::CommandHandler;
using chip::app::DataModel::Decode;
using chip::TLV::TLVReader;
using namespace esp_matter;
using namespace esp_matter::cluster;
using namespace esp_matter::cluster::delegate_cb;
static const char *TAG = "commissioner_control_cluster";
constexpr uint16_t cluster_revision = 1;
namespace esp_matter {
namespace cluster {
namespace commissioner_control {
namespace attribute {
attribute_t *create_supported_device_categories(cluster_t *cluster, uint32_t value)
{
attribute_t *attribute = esp_matter::attribute::create(cluster, SupportedDeviceCategories::Id, ATTRIBUTE_FLAG_NONE, esp_matter_bitmap32(value));
esp_matter::attribute::add_bounds(attribute, esp_matter_bitmap32(0), esp_matter_bitmap32(4294967295));
return attribute;
}
} /* attribute */
namespace command {
command_t *create_request_commissioning_approval(cluster_t *cluster)
{
return esp_matter::command::create(cluster, RequestCommissioningApproval::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_commission_node(cluster_t *cluster)
{
return esp_matter::command::create(cluster, CommissionNode::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_reverse_open_commissioning_window(cluster_t *cluster)
{
return esp_matter::command::create(cluster, ReverseOpenCommissioningWindow::Id, COMMAND_FLAG_GENERATED, NULL);
}
} /* command */
namespace event {
event_t *create_commissioning_request_result(cluster_t *cluster)
{
return esp_matter::event::create(cluster, CommissioningRequestResult::Id);
}
} /* event */
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)
{
cluster_t *cluster = esp_matter::cluster::create(endpoint, commissioner_control::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, commissioner_control::Id));
if (flags & CLUSTER_FLAG_SERVER) {
VerifyOrReturnValue(config != NULL, ABORT_CLUSTER_CREATE(cluster));
if (config->delegate != nullptr) {
static const auto delegate_init_cb = CommissionerControlDelegateInitCB;
set_delegate_and_init_callback(cluster, delegate_init_cb, config->delegate);
}
static const auto plugin_server_init_cb = CALL_ONCE(MatterCommissionerControlPluginServerInitCallback);
set_plugin_server_init_callback(cluster, plugin_server_init_cb);
add_function_list(cluster, function_list, function_flags);
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
/* Attributes not managed internally */
global::attribute::create_cluster_revision(cluster, cluster_revision);
attribute::create_supported_device_categories(cluster, config->supported_device_categories);
command::create_request_commissioning_approval(cluster);
command::create_commission_node(cluster);
command::create_reverse_open_commissioning_window(cluster);
/* Events */
event::create_commissioning_request_result(cluster);
}
return cluster;
}
} /* commissioner_control */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,48 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace commissioner_control {
namespace attribute {
attribute_t *create_supported_device_categories(cluster_t *cluster, uint32_t value);
} /* attribute */
namespace command {
command_t *create_request_commissioning_approval(cluster_t *cluster);
command_t *create_commission_node(cluster_t *cluster);
command_t *create_reverse_open_commissioning_window(cluster_t *cluster);
} /* command */
namespace event {
event_t *create_commissioning_request_result(cluster_t *cluster);
} /* event */
typedef struct config {
uint32_t supported_device_categories;
void *delegate;
config() : supported_device_categories(0), delegate(nullptr) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* commissioner_control */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,52 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace commissioner_control {
inline constexpr uint32_t Id = 0x0751;
namespace attribute {
namespace SupportedDeviceCategories {
inline constexpr uint32_t Id = 0x0000;
} /* SupportedDeviceCategories */
} /* attribute */
namespace command {
namespace RequestCommissioningApproval {
inline constexpr uint32_t Id = 0x00;
} /* RequestCommissioningApproval */
namespace CommissionNode {
inline constexpr uint32_t Id = 0x01;
} /* CommissionNode */
namespace ReverseOpenCommissioningWindow {
inline constexpr uint32_t Id = 0x02;
} /* ReverseOpenCommissioningWindow */
} /* command */
namespace event {
namespace CommissioningRequestResult {
inline constexpr uint32_t Id = 0x00;
} /* CommissioningRequestResult */
} /* event */
} /* commissioner_control */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,107 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#include <esp_log.h>
#include <esp_matter_core.h>
#include <esp_matter.h>
#include <app-common/zap-generated/cluster-enums.h>
#include <app-common/zap-generated/callback.h>
#include <app/InteractionModelEngine.h>
#include <zap_common/app/PluginApplicationCallbacks.h>
#include <commodity_metering.h>
#include <commodity_metering_ids.h>
#include <binding.h>
#include <esp_matter_data_model_priv.h>
using namespace chip::app::Clusters;
using chip::app::CommandHandler;
using chip::app::DataModel::Decode;
using chip::TLV::TLVReader;
using namespace esp_matter;
using namespace esp_matter::cluster;
static const char *TAG = "commodity_metering_cluster";
constexpr uint16_t cluster_revision = 1;
namespace esp_matter {
namespace cluster {
namespace commodity_metering {
namespace attribute {
attribute_t *create_metered_quantity(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, MeteredQuantity::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_array(value, length, count));
}
attribute_t *create_metered_quantity_timestamp(cluster_t *cluster, nullable<uint32_t> value)
{
return esp_matter::attribute::create(cluster, MeteredQuantityTimestamp::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint32(value));
}
attribute_t *create_tariff_unit(cluster_t *cluster, nullable<uint8_t> value)
{
return esp_matter::attribute::create(cluster, TariffUnit::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_enum8(value));
}
attribute_t *create_maximum_metered_quantities(cluster_t *cluster, nullable<uint16_t> value)
{
return esp_matter::attribute::create(cluster, MaximumMeteredQuantities::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
}
} /* attribute */
static void create_default_binding_cluster(endpoint_t *endpoint)
{
binding::config_t config;
binding::create(endpoint, &config, CLUSTER_FLAG_SERVER);
}
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)
{
cluster_t *cluster = esp_matter::cluster::create(endpoint, commodity_metering::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, commodity_metering::Id));
if (flags & CLUSTER_FLAG_SERVER) {
VerifyOrReturnValue(config != NULL, ABORT_CLUSTER_CREATE(cluster));
static const auto plugin_server_init_cb = CALL_ONCE(MatterCommodityMeteringPluginServerInitCallback);
set_plugin_server_init_callback(cluster, plugin_server_init_cb);
add_function_list(cluster, function_list, function_flags);
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
/* Attributes not managed internally */
global::attribute::create_cluster_revision(cluster, cluster_revision);
attribute::create_metered_quantity(cluster, NULL, 0, 0);
attribute::create_metered_quantity_timestamp(cluster, 0);
attribute::create_tariff_unit(cluster, 0);
attribute::create_maximum_metered_quantities(cluster, 0);
}
if (flags & CLUSTER_FLAG_CLIENT) {
create_default_binding_cluster(endpoint);
}
return cluster;
}
} /* commodity_metering */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,39 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace commodity_metering {
namespace attribute {
attribute_t *create_metered_quantity(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_metered_quantity_timestamp(cluster_t *cluster, nullable<uint32_t> value);
attribute_t *create_tariff_unit(cluster_t *cluster, nullable<uint8_t> value);
attribute_t *create_maximum_metered_quantities(cluster_t *cluster, nullable<uint16_t> value);
} /* attribute */
typedef struct config {
config() {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* commodity_metering */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,43 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace commodity_metering {
inline constexpr uint32_t Id = 0x0B07;
namespace attribute {
namespace MeteredQuantity {
inline constexpr uint32_t Id = 0x0000;
} /* MeteredQuantity */
namespace MeteredQuantityTimestamp {
inline constexpr uint32_t Id = 0x0001;
} /* MeteredQuantityTimestamp */
namespace TariffUnit {
inline constexpr uint32_t Id = 0x0002;
} /* TariffUnit */
namespace MaximumMeteredQuantities {
inline constexpr uint32_t Id = 0x0003;
} /* MaximumMeteredQuantities */
} /* attribute */
} /* commodity_metering */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,165 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#include <esp_log.h>
#include <esp_matter_core.h>
#include <esp_matter.h>
#include <app-common/zap-generated/cluster-enums.h>
#include <app-common/zap-generated/callback.h>
#include <app/InteractionModelEngine.h>
#include <zap_common/app/PluginApplicationCallbacks.h>
#include <esp_matter_delegate_callbacks.h>
#include <commodity_price.h>
#include <commodity_price_ids.h>
#include <binding.h>
#include <esp_matter_data_model_priv.h>
using namespace chip::app::Clusters;
using chip::app::CommandHandler;
using chip::app::DataModel::Decode;
using chip::TLV::TLVReader;
using namespace esp_matter;
using namespace esp_matter::cluster;
using namespace esp_matter::cluster::delegate_cb;
static const char *TAG = "commodity_price_cluster";
constexpr uint16_t cluster_revision = 4;
namespace esp_matter {
namespace cluster {
namespace commodity_price {
namespace feature {
namespace forecasting {
uint32_t get_id()
{
return Forecasting::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_price_forecast(cluster, NULL, 0, 0);
return ESP_OK;
}
} /* forecasting */
} /* feature */
namespace attribute {
attribute_t *create_tariff_unit(cluster_t *cluster, uint8_t value)
{
return esp_matter::attribute::create(cluster, TariffUnit::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_enum8(value));
}
attribute_t *create_currency(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, Currency::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_array(value, length, count));
}
attribute_t *create_current_price(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, CurrentPrice::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_array(value, length, count));
}
attribute_t *create_price_forecast(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(forecasting), NULL);
return esp_matter::attribute::create(cluster, PriceForecast::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_array(value, length, count));
}
} /* attribute */
namespace command {
command_t *create_get_detailed_price_request(cluster_t *cluster)
{
return esp_matter::command::create(cluster, GetDetailedPriceRequest::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_get_detailed_price_response(cluster_t *cluster)
{
VerifyOrReturnValue(has_command(GetDetailedPriceRequest, COMMAND_FLAG_ACCEPTED), NULL);
return esp_matter::command::create(cluster, GetDetailedPriceResponse::Id, COMMAND_FLAG_GENERATED, NULL);
}
command_t *create_get_detailed_forecast_request(cluster_t *cluster)
{
return esp_matter::command::create(cluster, GetDetailedForecastRequest::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_get_detailed_forecast_response(cluster_t *cluster)
{
VerifyOrReturnValue(has_command(GetDetailedForecastRequest, COMMAND_FLAG_ACCEPTED), NULL);
return esp_matter::command::create(cluster, GetDetailedForecastResponse::Id, COMMAND_FLAG_GENERATED, NULL);
}
} /* command */
namespace event {
event_t *create_price_change(cluster_t *cluster)
{
return esp_matter::event::create(cluster, PriceChange::Id);
}
} /* event */
static void create_default_binding_cluster(endpoint_t *endpoint)
{
binding::config_t config;
binding::create(endpoint, &config, CLUSTER_FLAG_SERVER);
}
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)
{
cluster_t *cluster = esp_matter::cluster::create(endpoint, commodity_price::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, commodity_price::Id));
if (flags & CLUSTER_FLAG_SERVER) {
VerifyOrReturnValue(config != NULL, ABORT_CLUSTER_CREATE(cluster));
if (config->delegate != nullptr) {
static const auto delegate_init_cb = CommodityPriceDelegateInitCB;
set_delegate_and_init_callback(cluster, delegate_init_cb, config->delegate);
}
static const auto plugin_server_init_cb = CALL_ONCE(MatterCommodityPricePluginServerInitCallback);
set_plugin_server_init_callback(cluster, plugin_server_init_cb);
add_function_list(cluster, function_list, function_flags);
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
/* Attributes not managed internally */
global::attribute::create_cluster_revision(cluster, cluster_revision);
attribute::create_tariff_unit(cluster, 0);
attribute::create_currency(cluster, NULL, 0, 0);
attribute::create_current_price(cluster, NULL, 0, 0);
}
if (flags & CLUSTER_FLAG_CLIENT) {
create_default_binding_cluster(endpoint);
}
return cluster;
}
} /* commodity_price */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,59 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace commodity_price {
namespace feature {
namespace forecasting {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* forecasting */
} /* feature */
namespace attribute {
attribute_t *create_tariff_unit(cluster_t *cluster, uint8_t value);
attribute_t *create_currency(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_current_price(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_price_forecast(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
} /* attribute */
namespace command {
command_t *create_get_detailed_price_request(cluster_t *cluster);
command_t *create_get_detailed_price_response(cluster_t *cluster);
command_t *create_get_detailed_forecast_request(cluster_t *cluster);
command_t *create_get_detailed_forecast_response(cluster_t *cluster);
} /* command */
namespace event {
event_t *create_price_change(cluster_t *cluster);
} /* event */
typedef struct config {
void *delegate;
config() : delegate(nullptr) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* commodity_price */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,70 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace commodity_price {
inline constexpr uint32_t Id = 0x0095;
namespace feature {
namespace Forecasting {
inline constexpr uint32_t Id = 0x1;
} /* Forecasting */
} /* feature */
namespace attribute {
namespace TariffUnit {
inline constexpr uint32_t Id = 0x0000;
} /* TariffUnit */
namespace Currency {
inline constexpr uint32_t Id = 0x0001;
} /* Currency */
namespace CurrentPrice {
inline constexpr uint32_t Id = 0x0002;
} /* CurrentPrice */
namespace PriceForecast {
inline constexpr uint32_t Id = 0x0003;
} /* PriceForecast */
} /* attribute */
namespace command {
namespace GetDetailedPriceRequest {
inline constexpr uint32_t Id = 0x00;
} /* GetDetailedPriceRequest */
namespace GetDetailedPriceResponse {
inline constexpr uint32_t Id = 0x01;
} /* GetDetailedPriceResponse */
namespace GetDetailedForecastRequest {
inline constexpr uint32_t Id = 0x02;
} /* GetDetailedForecastRequest */
namespace GetDetailedForecastResponse {
inline constexpr uint32_t Id = 0x03;
} /* GetDetailedForecastResponse */
} /* command */
namespace event {
namespace PriceChange {
inline constexpr uint32_t Id = 0x00;
} /* PriceChange */
} /* event */
} /* commodity_price */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,348 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#include <esp_log.h>
#include <esp_matter_core.h>
#include <esp_matter.h>
#include <app-common/zap-generated/cluster-enums.h>
#include <app-common/zap-generated/callback.h>
#include <app/InteractionModelEngine.h>
#include <zap_common/app/PluginApplicationCallbacks.h>
#include <esp_matter_delegate_callbacks.h>
#include <commodity_tariff.h>
#include <commodity_tariff_ids.h>
#include <binding.h>
#include <esp_matter_data_model_priv.h>
using namespace chip::app::Clusters;
using chip::app::CommandHandler;
using chip::app::DataModel::Decode;
using chip::TLV::TLVReader;
using namespace esp_matter;
using namespace esp_matter::cluster;
using namespace esp_matter::cluster::delegate_cb;
static const char *TAG = "commodity_tariff_cluster";
constexpr uint16_t cluster_revision = 1;
namespace esp_matter {
namespace cluster {
namespace commodity_tariff {
namespace feature {
namespace pricing {
uint32_t get_id()
{
return Pricing::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
return ESP_OK;
}
} /* pricing */
namespace friendly_credit {
uint32_t get_id()
{
return FriendlyCredit::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
return ESP_OK;
}
} /* friendly_credit */
namespace auxiliary_load {
uint32_t get_id()
{
return AuxiliaryLoad::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
return ESP_OK;
}
} /* auxiliary_load */
namespace peak_period {
uint32_t get_id()
{
return PeakPeriod::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
return ESP_OK;
}
} /* peak_period */
namespace power_threshold {
uint32_t get_id()
{
return PowerThreshold::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
return ESP_OK;
}
} /* power_threshold */
namespace randomization {
uint32_t get_id()
{
return Randomization::Id;
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
update_feature_map(cluster, get_id());
attribute::create_default_randomization_offset(cluster, 0);
attribute::create_default_randomization_type(cluster, 0);
return ESP_OK;
}
} /* randomization */
} /* feature */
namespace attribute {
attribute_t *create_tariff_info(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, TariffInfo::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_array(value, length, count));
}
attribute_t *create_tariff_unit(cluster_t *cluster, nullable<uint8_t> value)
{
return esp_matter::attribute::create(cluster, TariffUnit::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_enum8(value));
}
attribute_t *create_start_date(cluster_t *cluster, nullable<uint32_t> value)
{
return esp_matter::attribute::create(cluster, StartDate::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint32(value));
}
attribute_t *create_day_entries(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, DayEntries::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_array(value, length, count));
}
attribute_t *create_day_patterns(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, DayPatterns::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_array(value, length, count));
}
attribute_t *create_calendar_periods(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, CalendarPeriods::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_array(value, length, count));
}
attribute_t *create_individual_days(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, IndividualDays::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_array(value, length, count));
}
attribute_t *create_current_day(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, CurrentDay::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_array(value, length, count));
}
attribute_t *create_next_day(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, NextDay::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_array(value, length, count));
}
attribute_t *create_current_day_entry(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, CurrentDayEntry::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_array(value, length, count));
}
attribute_t *create_current_day_entry_date(cluster_t *cluster, nullable<uint32_t> value)
{
return esp_matter::attribute::create(cluster, CurrentDayEntryDate::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint32(value));
}
attribute_t *create_next_day_entry(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, NextDayEntry::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_array(value, length, count));
}
attribute_t *create_next_day_entry_date(cluster_t *cluster, nullable<uint32_t> value)
{
return esp_matter::attribute::create(cluster, NextDayEntryDate::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint32(value));
}
attribute_t *create_tariff_components(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, TariffComponents::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_array(value, length, count));
}
attribute_t *create_tariff_periods(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, TariffPeriods::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_array(value, length, count));
}
attribute_t *create_current_tariff_components(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, CurrentTariffComponents::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_array(value, length, count));
}
attribute_t *create_next_tariff_components(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, NextTariffComponents::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_array(value, length, count));
}
attribute_t *create_default_randomization_offset(cluster_t *cluster, nullable<int16_t> value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(randomization), NULL);
return esp_matter::attribute::create(cluster, DefaultRandomizationOffset::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_int16(value));
}
attribute_t *create_default_randomization_type(cluster_t *cluster, nullable<uint8_t> value)
{
uint32_t feature_map = get_feature_map_value(cluster);
VerifyOrReturnValue(has_feature(randomization), NULL);
return esp_matter::attribute::create(cluster, DefaultRandomizationType::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_enum8(value));
}
} /* attribute */
namespace command {
command_t *create_get_tariff_component(cluster_t *cluster)
{
return esp_matter::command::create(cluster, GetTariffComponent::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_get_tariff_component_response(cluster_t *cluster)
{
return esp_matter::command::create(cluster, GetTariffComponentResponse::Id, COMMAND_FLAG_GENERATED, NULL);
}
command_t *create_get_day_entry(cluster_t *cluster)
{
return esp_matter::command::create(cluster, GetDayEntry::Id, COMMAND_FLAG_ACCEPTED, NULL);
}
command_t *create_get_day_entry_response(cluster_t *cluster)
{
return esp_matter::command::create(cluster, GetDayEntryResponse::Id, COMMAND_FLAG_GENERATED, NULL);
}
} /* command */
static void create_default_binding_cluster(endpoint_t *endpoint)
{
binding::config_t config;
binding::create(endpoint, &config, CLUSTER_FLAG_SERVER);
}
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)
{
cluster_t *cluster = esp_matter::cluster::create(endpoint, commodity_tariff::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, commodity_tariff::Id));
if (flags & CLUSTER_FLAG_SERVER) {
VerifyOrReturnValue(config != NULL, ABORT_CLUSTER_CREATE(cluster));
if (config->delegate != nullptr) {
static const auto delegate_init_cb = CommodityTariffDelegateInitCB;
set_delegate_and_init_callback(cluster, delegate_init_cb, config->delegate);
}
static const auto plugin_server_init_cb = CALL_ONCE(MatterCommodityTariffPluginServerInitCallback);
set_plugin_server_init_callback(cluster, plugin_server_init_cb);
add_function_list(cluster, function_list, function_flags);
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, config->feature_flags);
/* Attributes not managed internally */
global::attribute::create_cluster_revision(cluster, cluster_revision);
attribute::create_tariff_info(cluster, NULL, 0, 0);
attribute::create_tariff_unit(cluster, 0);
attribute::create_start_date(cluster, 0);
attribute::create_day_entries(cluster, NULL, 0, 0);
attribute::create_day_patterns(cluster, NULL, 0, 0);
attribute::create_calendar_periods(cluster, NULL, 0, 0);
attribute::create_individual_days(cluster, NULL, 0, 0);
attribute::create_current_day(cluster, NULL, 0, 0);
attribute::create_next_day(cluster, NULL, 0, 0);
attribute::create_current_day_entry(cluster, NULL, 0, 0);
attribute::create_current_day_entry_date(cluster, 0);
attribute::create_next_day_entry(cluster, NULL, 0, 0);
attribute::create_next_day_entry_date(cluster, 0);
attribute::create_tariff_components(cluster, NULL, 0, 0);
attribute::create_tariff_periods(cluster, NULL, 0, 0);
attribute::create_current_tariff_components(cluster, NULL, 0, 0);
attribute::create_next_tariff_components(cluster, NULL, 0, 0);
uint32_t feature_map = config->feature_flags;
VALIDATE_FEATURES_AT_LEAST_ONE("Pricing,FriendlyCredit,AuxiliaryLoad",
feature::pricing::get_id(), feature::friendly_credit::get_id(), feature::auxiliary_load::get_id());
if (feature_map & feature::pricing::get_id()) {
VerifyOrReturnValue(feature::pricing::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::friendly_credit::get_id()) {
VerifyOrReturnValue(feature::friendly_credit::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::auxiliary_load::get_id()) {
VerifyOrReturnValue(feature::auxiliary_load::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::peak_period::get_id()) {
VerifyOrReturnValue(feature::peak_period::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::power_threshold::get_id()) {
VerifyOrReturnValue(feature::power_threshold::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
if (feature_map & feature::randomization::get_id()) {
VerifyOrReturnValue(feature::randomization::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
}
command::create_get_tariff_component(cluster);
command::create_get_tariff_component_response(cluster);
command::create_get_day_entry(cluster);
command::create_get_day_entry_response(cluster);
}
if (flags & CLUSTER_FLAG_CLIENT) {
create_default_binding_cluster(endpoint);
}
return cluster;
}
} /* commodity_tariff */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,96 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace commodity_tariff {
namespace feature {
namespace pricing {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* pricing */
namespace friendly_credit {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* friendly_credit */
namespace auxiliary_load {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* auxiliary_load */
namespace peak_period {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* peak_period */
namespace power_threshold {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* power_threshold */
namespace randomization {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* randomization */
} /* feature */
namespace attribute {
attribute_t *create_tariff_info(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_tariff_unit(cluster_t *cluster, nullable<uint8_t> value);
attribute_t *create_start_date(cluster_t *cluster, nullable<uint32_t> value);
attribute_t *create_day_entries(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_day_patterns(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_calendar_periods(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_individual_days(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_current_day(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_next_day(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_current_day_entry(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_current_day_entry_date(cluster_t *cluster, nullable<uint32_t> value);
attribute_t *create_next_day_entry(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_next_day_entry_date(cluster_t *cluster, nullable<uint32_t> value);
attribute_t *create_tariff_components(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_tariff_periods(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_current_tariff_components(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_next_tariff_components(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
attribute_t *create_default_randomization_offset(cluster_t *cluster, nullable<int16_t> value);
attribute_t *create_default_randomization_type(cluster_t *cluster, nullable<uint8_t> value);
} /* attribute */
namespace command {
command_t *create_get_tariff_component(cluster_t *cluster);
command_t *create_get_tariff_component_response(cluster_t *cluster);
command_t *create_get_day_entry(cluster_t *cluster);
command_t *create_get_day_entry_response(cluster_t *cluster);
} /* command */
typedef struct config {
void *delegate;
uint32_t feature_flags;
config() : delegate(nullptr), feature_flags(0) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* commodity_tariff */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,124 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace commodity_tariff {
inline constexpr uint32_t Id = 0x0700;
namespace feature {
namespace Pricing {
inline constexpr uint32_t Id = 0x1;
} /* Pricing */
namespace FriendlyCredit {
inline constexpr uint32_t Id = 0x2;
} /* FriendlyCredit */
namespace AuxiliaryLoad {
inline constexpr uint32_t Id = 0x4;
} /* AuxiliaryLoad */
namespace PeakPeriod {
inline constexpr uint32_t Id = 0x8;
} /* PeakPeriod */
namespace PowerThreshold {
inline constexpr uint32_t Id = 0x10;
} /* PowerThreshold */
namespace Randomization {
inline constexpr uint32_t Id = 0x20;
} /* Randomization */
} /* feature */
namespace attribute {
namespace TariffInfo {
inline constexpr uint32_t Id = 0x0000;
} /* TariffInfo */
namespace TariffUnit {
inline constexpr uint32_t Id = 0x0001;
} /* TariffUnit */
namespace StartDate {
inline constexpr uint32_t Id = 0x0002;
} /* StartDate */
namespace DayEntries {
inline constexpr uint32_t Id = 0x0003;
} /* DayEntries */
namespace DayPatterns {
inline constexpr uint32_t Id = 0x0004;
} /* DayPatterns */
namespace CalendarPeriods {
inline constexpr uint32_t Id = 0x0005;
} /* CalendarPeriods */
namespace IndividualDays {
inline constexpr uint32_t Id = 0x0006;
} /* IndividualDays */
namespace CurrentDay {
inline constexpr uint32_t Id = 0x0007;
} /* CurrentDay */
namespace NextDay {
inline constexpr uint32_t Id = 0x0008;
} /* NextDay */
namespace CurrentDayEntry {
inline constexpr uint32_t Id = 0x0009;
} /* CurrentDayEntry */
namespace CurrentDayEntryDate {
inline constexpr uint32_t Id = 0x000A;
} /* CurrentDayEntryDate */
namespace NextDayEntry {
inline constexpr uint32_t Id = 0x000B;
} /* NextDayEntry */
namespace NextDayEntryDate {
inline constexpr uint32_t Id = 0x000C;
} /* NextDayEntryDate */
namespace TariffComponents {
inline constexpr uint32_t Id = 0x000D;
} /* TariffComponents */
namespace TariffPeriods {
inline constexpr uint32_t Id = 0x000E;
} /* TariffPeriods */
namespace CurrentTariffComponents {
inline constexpr uint32_t Id = 0x000F;
} /* CurrentTariffComponents */
namespace NextTariffComponents {
inline constexpr uint32_t Id = 0x0010;
} /* NextTariffComponents */
namespace DefaultRandomizationOffset {
inline constexpr uint32_t Id = 0x0011;
} /* DefaultRandomizationOffset */
namespace DefaultRandomizationType {
inline constexpr uint32_t Id = 0x0012;
} /* DefaultRandomizationType */
} /* attribute */
namespace command {
namespace GetTariffComponent {
inline constexpr uint32_t Id = 0x00;
} /* GetTariffComponent */
namespace GetTariffComponentResponse {
inline constexpr uint32_t Id = 0x00;
} /* GetTariffComponentResponse */
namespace GetDayEntry {
inline constexpr uint32_t Id = 0x01;
} /* GetDayEntry */
namespace GetDayEntryResponse {
inline constexpr uint32_t Id = 0x01;
} /* GetDayEntryResponse */
} /* command */
} /* commodity_tariff */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,112 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#include <esp_log.h>
#include <esp_matter_core.h>
#include <esp_matter.h>
#include <app-common/zap-generated/cluster-enums.h>
#include <app-common/zap-generated/callback.h>
#include <app/InteractionModelEngine.h>
#include <zap_common/app/PluginApplicationCallbacks.h>
#include <esp_matter_delegate_callbacks.h>
#include <content_app_observer.h>
#include <content_app_observer_ids.h>
#include <binding.h>
#include <esp_matter_data_model_priv.h>
using namespace chip::app::Clusters;
using chip::app::CommandHandler;
using chip::app::DataModel::Decode;
using chip::TLV::TLVReader;
using namespace esp_matter;
using namespace esp_matter::cluster;
using namespace esp_matter::cluster::delegate_cb;
static const char *TAG = "content_app_observer_cluster";
constexpr uint16_t cluster_revision = 1;
static esp_err_t esp_matter_command_callback_content_app_message(const ConcreteCommandPath &command_path, TLVReader &tlv_data,
void *opaque_ptr)
{
chip::app::Clusters::ContentAppObserver::Commands::ContentAppMessage::DecodableType command_data;
CHIP_ERROR error = Decode(tlv_data, command_data);
if (error == CHIP_NO_ERROR) {
emberAfContentAppObserverClusterContentAppMessageCallback((CommandHandler *)opaque_ptr, command_path, command_data);
}
return ESP_OK;
}
namespace esp_matter {
namespace cluster {
namespace content_app_observer {
namespace command {
command_t *create_content_app_message(cluster_t *cluster)
{
return esp_matter::command::create(cluster, ContentAppMessage::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_content_app_message);
}
command_t *create_content_app_message_response(cluster_t *cluster)
{
return esp_matter::command::create(cluster, ContentAppMessageResponse::Id, COMMAND_FLAG_GENERATED, NULL);
}
} /* command */
static void create_default_binding_cluster(endpoint_t *endpoint)
{
binding::config_t config;
binding::create(endpoint, &config, CLUSTER_FLAG_SERVER);
}
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)
{
cluster_t *cluster = esp_matter::cluster::create(endpoint, content_app_observer::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, content_app_observer::Id));
if (flags & CLUSTER_FLAG_SERVER) {
VerifyOrReturnValue(config != NULL, ABORT_CLUSTER_CREATE(cluster));
if (config->delegate != nullptr) {
static const auto delegate_init_cb = ContentAppObserverDelegateInitCB;
set_delegate_and_init_callback(cluster, delegate_init_cb, config->delegate);
}
static const auto plugin_server_init_cb = CALL_ONCE(MatterContentAppObserverPluginServerInitCallback);
set_plugin_server_init_callback(cluster, plugin_server_init_cb);
add_function_list(cluster, function_list, function_flags);
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
/* Attributes not managed internally */
global::attribute::create_cluster_revision(cluster, cluster_revision);
command::create_content_app_message(cluster);
command::create_content_app_message_response(cluster);
}
if (flags & CLUSTER_FLAG_CLIENT) {
create_default_binding_cluster(endpoint);
}
return cluster;
}
} /* content_app_observer */
} /* cluster */
} /* esp_matter */
@@ -0,0 +1,38 @@
// Copyright 2026 Espressif Systems (Shanghai) PTE LTD
//
// 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 IS A GENERATED FILE, DO NOT EDIT */
#pragma once
#include <esp_matter_data_model.h>
namespace esp_matter {
namespace cluster {
namespace content_app_observer {
namespace command {
command_t *create_content_app_message(cluster_t *cluster);
command_t *create_content_app_message_response(cluster_t *cluster);
} /* command */
typedef struct config {
void *delegate;
config() : delegate(nullptr) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* content_app_observer */
} /* cluster */
} /* esp_matter */

Some files were not shown because too many files have changed in this diff Show More