diff --git a/components/esp_matter/esp_matter_attribute_utils.cpp b/components/esp_matter/esp_matter_attribute_utils.cpp index c713fe831..9fdcad328 100644 --- a/components/esp_matter/esp_matter_attribute_utils.cpp +++ b/components/esp_matter/esp_matter_attribute_utils.cpp @@ -246,9 +246,9 @@ static void *attribute_callback_priv_data = NULL; static esp_err_t console_handler(int argc, char **argv) { if (argc == 5 && strncmp(argv[0], "set", sizeof("set")) == 0) { - int endpoint_id = strtol((const char *)&argv[1][2], NULL, 16); - int cluster_id = strtol((const char *)&argv[2][2], NULL, 16); - int attribute_id = strtol((const char *)&argv[3][2], NULL, 16); + uint16_t endpoint_id = strtol((const char *)&argv[1][2], NULL, 16); + uint32_t cluster_id = strtol((const char *)&argv[2][2], NULL, 16); + uint32_t attribute_id = strtol((const char *)&argv[3][2], NULL, 16); /* Get type from matter_attribute */ const EmberAfAttributeMetadata *matter_attribute = emberAfLocateAttributeMetadata(endpoint_id, cluster_id, @@ -300,9 +300,9 @@ static esp_err_t console_handler(int argc, char **argv) } update(endpoint_id, cluster_id, attribute_id, &val); } else if (argc == 4 && strncmp(argv[0], "get", sizeof("get")) == 0) { - int endpoint_id = strtol((const char *)&argv[1][2], NULL, 16); - int cluster_id = strtol((const char *)&argv[2][2], NULL, 16); - int attribute_id = strtol((const char *)&argv[3][2], NULL, 16); + uint16_t endpoint_id = strtol((const char *)&argv[1][2], NULL, 16); + uint32_t cluster_id = strtol((const char *)&argv[2][2], NULL, 16); + uint32_t attribute_id = strtol((const char *)&argv[3][2], NULL, 16); /* Get type from matter_attribute */ const EmberAfAttributeMetadata *matter_attribute = emberAfLocateAttributeMetadata(endpoint_id, cluster_id, @@ -405,8 +405,8 @@ esp_err_t set_callback(callback_t callback, void *priv_data) return ESP_OK; } -static esp_err_t execute_callback(callback_type_t type, int endpoint_id, int cluster_id, int attribute_id, - esp_matter_attr_val_t *val) +static esp_err_t execute_callback(callback_type_t type, uint16_t endpoint_id, uint32_t cluster_id, + uint32_t attribute_id, esp_matter_attr_val_t *val) { if (attribute_callback) { return attribute_callback(type, endpoint_id, cluster_id, attribute_id, val, attribute_callback_priv_data); @@ -414,8 +414,8 @@ static esp_err_t execute_callback(callback_type_t type, int endpoint_id, int clu return ESP_OK; } -static esp_err_t execute_override_callback(attribute_t *attribute, callback_type_t type, int endpoint_id, - int cluster_id, int attribute_id, esp_matter_attr_val_t *val) +static esp_err_t execute_override_callback(attribute_t *attribute, callback_type_t type, uint16_t endpoint_id, + uint32_t cluster_id, uint32_t attribute_id, esp_matter_attr_val_t *val) { callback_t override_callback = attribute::get_override_callback(attribute); if (override_callback) { @@ -816,7 +816,7 @@ static esp_err_t get_attr_val_from_data(esp_matter_attr_val_t *val, EmberAfAttri return ESP_OK; } -void val_print(int endpoint_id, int cluster_id, int attribute_id, esp_matter_attr_val_t *val) +void val_print(uint16_t endpoint_id, uint32_t cluster_id, uint32_t attribute_id, esp_matter_attr_val_t *val) { if (val->type == ESP_MATTER_VAL_TYPE_BOOLEAN) { ESP_LOGI(TAG, "********** Endpoint 0x%04X's Cluster 0x%04X's Attribute 0x%04X is %d **********", endpoint_id, @@ -851,7 +851,8 @@ void val_print(int endpoint_id, int cluster_id, int attribute_id, esp_matter_att } } -esp_err_t get_val_raw(int endpoint_id, int cluster_id, int attribute_id, uint8_t *value, uint16_t attribute_size) +esp_err_t get_val_raw(uint16_t endpoint_id, uint32_t cluster_id, uint32_t attribute_id, uint8_t *value, + uint16_t attribute_size) { /* Take lock if not already taken */ lock::status_t lock_status = lock::chip_stack_lock(portMAX_DELAY); @@ -874,7 +875,7 @@ esp_err_t get_val_raw(int endpoint_id, int cluster_id, int attribute_id, uint8_t return ESP_OK; } -esp_err_t update(int endpoint_id, int cluster_id, int attribute_id, esp_matter_attr_val_t *val) +esp_err_t update(uint16_t endpoint_id, uint32_t cluster_id, uint32_t attribute_id, esp_matter_attr_val_t *val) { /* Take lock if not already taken */ lock::status_t lock_status = lock::chip_stack_lock(portMAX_DELAY); @@ -925,9 +926,9 @@ esp_err_t update(int endpoint_id, int cluster_id, int attribute_id, esp_matter_a Status MatterPreAttributeChangeCallback(const chip::app::ConcreteAttributePath &path, uint8_t mask, uint8_t type, uint16_t size, uint8_t *value) { - int endpoint_id = path.mEndpointId; - int cluster_id = path.mClusterId; - int attribute_id = path.mAttributeId; + uint16_t endpoint_id = path.mEndpointId; + uint32_t cluster_id = path.mClusterId; + uint32_t attribute_id = path.mAttributeId; esp_matter_attr_val_t val = esp_matter_invalid(NULL); attribute::get_attr_val_from_data(&val, type, size, value); @@ -945,9 +946,9 @@ Status MatterPreAttributeChangeCallback(const chip::app::ConcreteAttributePath & void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath &path, uint8_t mask, uint8_t type, uint16_t size, uint8_t *value) { - int endpoint_id = path.mEndpointId; - int cluster_id = path.mClusterId; - int attribute_id = path.mAttributeId; + uint16_t endpoint_id = path.mEndpointId; + uint32_t cluster_id = path.mClusterId; + uint32_t attribute_id = path.mAttributeId; esp_matter_attr_val_t val = esp_matter_invalid(NULL); attribute::get_attr_val_from_data(&val, type, size, value); @@ -960,7 +961,7 @@ EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint_id, Clust uint16_t max_read_length) { /* Get value */ - int attribute_id = matter_attribute->attributeId; + uint32_t attribute_id = matter_attribute->attributeId; node_t *node = node::get(); if (!node) { return EMBER_ZCL_STATUS_FAILURE; @@ -1002,7 +1003,7 @@ EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint_id, Clus const EmberAfAttributeMetadata *matter_attribute, uint8_t *buffer) { /* Get value */ - int attribute_id = matter_attribute->attributeId; + uint32_t attribute_id = matter_attribute->attributeId; node_t *node = node::get(); if (!node) { return EMBER_ZCL_STATUS_FAILURE; diff --git a/components/esp_matter/esp_matter_attribute_utils.h b/components/esp_matter/esp_matter_attribute_utils.h index 01f2f1166..93a7a4958 100644 --- a/components/esp_matter/esp_matter_attribute_utils.h +++ b/components/esp_matter/esp_matter_attribute_utils.h @@ -197,7 +197,7 @@ typedef enum callback_type { * @return ESP_OK on success. * @return error in case of failure. */ -typedef esp_err_t (*callback_t)(callback_type_t type, int endpoint_id, int cluster_id, int attribute_id, +typedef esp_err_t (*callback_t)(callback_type_t type, uint16_t endpoint_id, uint32_t cluster_id, uint32_t attribute_id, esp_matter_attr_val_t *val, void *priv_data); /** Set attribute callback @@ -228,7 +228,7 @@ esp_err_t set_callback(callback_t callback, void *priv_data); * @return ESP_OK on success. * @return error in case of failure. */ -esp_err_t update(int endpoint_id, int cluster_id, int attribute_id, esp_matter_attr_val_t *val); +esp_err_t update(uint16_t endpoint_id, uint32_t cluster_id, uint32_t attribute_id, esp_matter_attr_val_t *val); /** Attribute value print * @@ -239,7 +239,7 @@ esp_err_t update(int endpoint_id, int cluster_id, int attribute_id, esp_matter_a * @param[in] attribute_id Attribute ID of the attribute. * @param[in] val Pointer to `esp_matter_attr_val_t`. Appropriate elements should be used as per the value type. */ -void val_print(int endpoint_id, int cluster_id, int attribute_id, esp_matter_attr_val_t *val); +void val_print(uint16_t endpoint_id, uint32_t cluster_id, uint32_t attribute_id, esp_matter_attr_val_t *val); } /* attribute */ } /* esp_matter */ diff --git a/components/esp_matter/esp_matter_client.cpp b/components/esp_matter/esp_matter_client.cpp index c75cb09a8..5a7a3c401 100644 --- a/components/esp_matter/esp_matter_client.cpp +++ b/components/esp_matter/esp_matter_client.cpp @@ -43,7 +43,7 @@ esp_err_t set_command_callback(command_callback_t callback, void *priv_data) } /** TODO: Change g_remote_endpoint_id to something better. */ -int g_remote_endpoint_id = kInvalidEndpointId; +uint16_t g_remote_endpoint_id = kInvalidEndpointId; void esp_matter_new_connection_success_callback(void *context, OperationalDeviceProxy *peer_device) { ESP_LOGI(TAG, "New connection success"); @@ -57,7 +57,7 @@ void esp_matter_new_connection_failure_callback(void *context, PeerId peerId, CH ESP_LOGI(TAG, "New connection failure"); } -esp_err_t connect(int fabric_index, int node_id, int remote_endpoint_id) +esp_err_t connect(uint8_t fabric_index, uint64_t node_id, uint16_t remote_endpoint_id) { /* Get info */ FabricInfo *fabric_info = chip::Server::GetInstance().GetFabricTable().FindFabricWithIndex(fabric_index); @@ -95,7 +95,7 @@ static void esp_matter_command_client_binding_callback(const EmberBindingTableEn } } -esp_err_t cluster_update(int endpoint_id, int cluster_id) +esp_err_t cluster_update(uint16_t endpoint_id, uint32_t cluster_id) { chip::BindingManager::GetInstance().NotifyBoundClusterChanged(endpoint_id, cluster_id, NULL); return ESP_OK; @@ -143,7 +143,7 @@ static void send_command_failure_callback(void *context, CHIP_ERROR error) namespace on_off { namespace command { -esp_err_t send_on(peer_device_t *remote_device, int remote_endpoint_id) +esp_err_t send_on(peer_device_t *remote_device, uint16_t remote_endpoint_id) { chip::Controller::OnOffCluster cluster; OnOff::Commands::On::Type command_data; @@ -153,7 +153,7 @@ esp_err_t send_on(peer_device_t *remote_device, int remote_endpoint_id) return ESP_OK; } -esp_err_t send_off(peer_device_t *remote_device, int remote_endpoint_id) +esp_err_t send_off(peer_device_t *remote_device, uint16_t remote_endpoint_id) { chip::Controller::OnOffCluster cluster; OnOff::Commands::Off::Type command_data; @@ -163,7 +163,7 @@ esp_err_t send_off(peer_device_t *remote_device, int remote_endpoint_id) return ESP_OK; } -esp_err_t send_toggle(peer_device_t *remote_device, int remote_endpoint_id) +esp_err_t send_toggle(peer_device_t *remote_device, uint16_t remote_endpoint_id) { chip::Controller::OnOffCluster cluster; OnOff::Commands::Toggle::Type command_data; @@ -179,7 +179,7 @@ esp_err_t send_toggle(peer_device_t *remote_device, int remote_endpoint_id) namespace level_control { namespace command { -esp_err_t send_move(peer_device_t *remote_device, int remote_endpoint_id, uint8_t move_mode, uint8_t rate, +esp_err_t send_move(peer_device_t *remote_device, uint16_t remote_endpoint_id, uint8_t move_mode, uint8_t rate, uint8_t option_mask, uint8_t option_override) { chip::Controller::LevelControlCluster cluster; @@ -194,7 +194,7 @@ esp_err_t send_move(peer_device_t *remote_device, int remote_endpoint_id, uint8_ return ESP_OK; } -esp_err_t send_move_to_level(peer_device_t *remote_device, int remote_endpoint_id, uint8_t level, +esp_err_t send_move_to_level(peer_device_t *remote_device, uint16_t remote_endpoint_id, uint8_t level, uint16_t transition_time, uint8_t option_mask, uint8_t option_override) { chip::Controller::LevelControlCluster cluster; @@ -209,7 +209,7 @@ esp_err_t send_move_to_level(peer_device_t *remote_device, int remote_endpoint_i return ESP_OK; } -esp_err_t send_move_to_level_with_on_off(peer_device_t *remote_device, int remote_endpoint_id, uint8_t level, +esp_err_t send_move_to_level_with_on_off(peer_device_t *remote_device, uint16_t remote_endpoint_id, uint8_t level, uint16_t transition_time) { chip::Controller::LevelControlCluster cluster; @@ -222,7 +222,8 @@ esp_err_t send_move_to_level_with_on_off(peer_device_t *remote_device, int remot return ESP_OK; } -esp_err_t send_move_with_on_off(peer_device_t *remote_device, int remote_endpoint_id, uint8_t move_mode, uint8_t rate) +esp_err_t send_move_with_on_off(peer_device_t *remote_device, uint16_t remote_endpoint_id, uint8_t move_mode, + uint8_t rate) { chip::Controller::LevelControlCluster cluster; LevelControl::Commands::MoveWithOnOff::Type command_data; @@ -234,7 +235,7 @@ esp_err_t send_move_with_on_off(peer_device_t *remote_device, int remote_endpoin return ESP_OK; } -esp_err_t send_step(peer_device_t *remote_device, int remote_endpoint_id, uint8_t step_mode, uint8_t step_size, +esp_err_t send_step(peer_device_t *remote_device, uint16_t remote_endpoint_id, uint8_t step_mode, uint8_t step_size, uint16_t transition_time, uint8_t option_mask, uint8_t option_override) { chip::Controller::LevelControlCluster cluster; @@ -250,7 +251,7 @@ esp_err_t send_step(peer_device_t *remote_device, int remote_endpoint_id, uint8_ return ESP_OK; } -esp_err_t send_step_with_on_off(peer_device_t *remote_device, int remote_endpoint_id, uint8_t step_mode, +esp_err_t send_step_with_on_off(peer_device_t *remote_device, uint16_t remote_endpoint_id, uint8_t step_mode, uint8_t step_size, uint16_t transition_time) { chip::Controller::LevelControlCluster cluster; @@ -264,7 +265,8 @@ esp_err_t send_step_with_on_off(peer_device_t *remote_device, int remote_endpoin return ESP_OK; } -esp_err_t send_stop(peer_device_t *remote_device, int remote_endpoint_id, uint8_t option_mask, uint8_t option_override) +esp_err_t send_stop(peer_device_t *remote_device, uint16_t remote_endpoint_id, uint8_t option_mask, + uint8_t option_override) { chip::Controller::LevelControlCluster cluster; LevelControl::Commands::Stop::Type command_data; @@ -276,7 +278,7 @@ esp_err_t send_stop(peer_device_t *remote_device, int remote_endpoint_id, uint8_ return ESP_OK; } -esp_err_t send_stop_with_on_off(peer_device_t *remote_device, int remote_endpoint_id) +esp_err_t send_stop_with_on_off(peer_device_t *remote_device, uint16_t remote_endpoint_id) { chip::Controller::LevelControlCluster cluster; LevelControl::Commands::Stop::Type command_data; @@ -292,7 +294,7 @@ esp_err_t send_stop_with_on_off(peer_device_t *remote_device, int remote_endpoin namespace color_control { namespace command { -esp_err_t send_move_hue(peer_device_t *remote_device, int remote_endpoint_id, uint8_t move_mode, uint8_t rate, +esp_err_t send_move_hue(peer_device_t *remote_device, uint16_t remote_endpoint_id, uint8_t move_mode, uint8_t rate, uint8_t option_mask, uint8_t option_override) { chip::Controller::ColorControlCluster cluster; @@ -307,8 +309,8 @@ esp_err_t send_move_hue(peer_device_t *remote_device, int remote_endpoint_id, ui return ESP_OK; } -esp_err_t send_move_saturation(peer_device_t *remote_device, int remote_endpoint_id, uint8_t move_mode, uint8_t rate, - uint8_t option_mask, uint8_t option_override) +esp_err_t send_move_saturation(peer_device_t *remote_device, uint16_t remote_endpoint_id, uint8_t move_mode, + uint8_t rate, uint8_t option_mask, uint8_t option_override) { chip::Controller::ColorControlCluster cluster; ColorControl::Commands::MoveSaturation::Type command_data; @@ -322,7 +324,7 @@ esp_err_t send_move_saturation(peer_device_t *remote_device, int remote_endpoint return ESP_OK; } -esp_err_t send_move_to_hue(peer_device_t *remote_device, int remote_endpoint_id, uint8_t hue, uint8_t direction, +esp_err_t send_move_to_hue(peer_device_t *remote_device, uint16_t remote_endpoint_id, uint8_t hue, uint8_t direction, uint16_t transition_time, uint8_t option_mask, uint8_t option_override) { chip::Controller::ColorControlCluster cluster; @@ -338,7 +340,7 @@ esp_err_t send_move_to_hue(peer_device_t *remote_device, int remote_endpoint_id, return ESP_OK; } -esp_err_t send_move_to_hue_and_saturation(peer_device_t *remote_device, int remote_endpoint_id, uint8_t hue, +esp_err_t send_move_to_hue_and_saturation(peer_device_t *remote_device, uint16_t remote_endpoint_id, uint8_t hue, uint8_t saturation, uint16_t transition_time, uint8_t option_mask, uint8_t option_override) { @@ -355,7 +357,7 @@ esp_err_t send_move_to_hue_and_saturation(peer_device_t *remote_device, int remo return ESP_OK; } -esp_err_t send_move_to_saturation(peer_device_t *remote_device, int remote_endpoint_id, uint8_t saturation, +esp_err_t send_move_to_saturation(peer_device_t *remote_device, uint16_t remote_endpoint_id, uint8_t saturation, uint16_t transition_time, uint8_t option_mask, uint8_t option_override) { chip::Controller::ColorControlCluster cluster; @@ -370,7 +372,7 @@ esp_err_t send_move_to_saturation(peer_device_t *remote_device, int remote_endpo return ESP_OK; } -esp_err_t send_step_hue(peer_device_t *remote_device, int remote_endpoint_id, uint8_t step_mode, uint8_t step_size, +esp_err_t send_step_hue(peer_device_t *remote_device, uint16_t remote_endpoint_id, uint8_t step_mode, uint8_t step_size, uint16_t transition_time, uint8_t option_mask, uint8_t option_override) { chip::Controller::ColorControlCluster cluster; @@ -386,7 +388,7 @@ esp_err_t send_step_hue(peer_device_t *remote_device, int remote_endpoint_id, ui return ESP_OK; } -esp_err_t send_step_saturation(peer_device_t *remote_device, int remote_endpoint_id, uint8_t step_mode, +esp_err_t send_step_saturation(peer_device_t *remote_device, uint16_t remote_endpoint_id, uint8_t step_mode, uint8_t step_size, uint16_t transition_time, uint8_t option_mask, uint8_t option_override) { diff --git a/components/esp_matter/esp_matter_client.h b/components/esp_matter/esp_matter_client.h index 336330790..ee516caf2 100644 --- a/components/esp_matter/esp_matter_client.h +++ b/components/esp_matter/esp_matter_client.h @@ -28,46 +28,49 @@ using client::peer_device_t; namespace on_off { namespace command { -esp_err_t send_off(peer_device_t *remote_device, int remote_endpoint_id); -esp_err_t send_on(peer_device_t *remote_device, int remote_endpoint_id); -esp_err_t send_toggle(peer_device_t *remote_device, int remote_endpoint_id); +esp_err_t send_off(peer_device_t *remote_device, uint16_t remote_endpoint_id); +esp_err_t send_on(peer_device_t *remote_device, uint16_t remote_endpoint_id); +esp_err_t send_toggle(peer_device_t *remote_device, uint16_t remote_endpoint_id); } /* command */ } /* on_off */ namespace level_control { namespace command { -esp_err_t send_move(peer_device_t *remote_device, int remote_endpoint_id, uint8_t move_mode, uint8_t rate, +esp_err_t send_move(peer_device_t *remote_device, uint16_t remote_endpoint_id, uint8_t move_mode, uint8_t rate, uint8_t option_mask, uint8_t option_override); -esp_err_t send_move_to_level(peer_device_t *remote_device, int remote_endpoint_id, uint8_t level, +esp_err_t send_move_to_level(peer_device_t *remote_device, uint16_t remote_endpoint_id, uint8_t level, uint16_t transition_time, uint8_t option_mask, uint8_t option_override); -esp_err_t send_move_to_level_with_on_off(peer_device_t *remote_device, int remote_endpoint_id, uint8_t level, +esp_err_t send_move_to_level_with_on_off(peer_device_t *remote_device, uint16_t remote_endpoint_id, uint8_t level, uint16_t transition_time); -esp_err_t send_move_with_on_off(peer_device_t *remote_device, int remote_endpoint_id, uint8_t move_mode, uint8_t rate); -esp_err_t send_step(peer_device_t *remote_device, int remote_endpoint_id, uint8_t step_mode, uint8_t step_size, +esp_err_t send_move_with_on_off(peer_device_t *remote_device, uint16_t remote_endpoint_id, uint8_t move_mode, + uint8_t rate); +esp_err_t send_step(peer_device_t *remote_device, uint16_t remote_endpoint_id, uint8_t step_mode, uint8_t step_size, uint16_t transition_time, uint8_t option_mask, uint8_t option_override); -esp_err_t send_step_with_on_off(peer_device_t *remote_device, int remote_endpoint_id, uint8_t step_mode, +esp_err_t send_step_with_on_off(peer_device_t *remote_device, uint16_t remote_endpoint_id, uint8_t step_mode, uint8_t step_size, uint16_t transition_time); -esp_err_t send_stop(peer_device_t *remote_device, int remote_endpoint_id, uint8_t option_mask, uint8_t option_override); -esp_err_t send_stop_with_on_off(peer_device_t *remote_device, int remote_endpoint_id); +esp_err_t send_stop(peer_device_t *remote_device, uint16_t remote_endpoint_id, uint8_t option_mask, + uint8_t option_override); +esp_err_t send_stop_with_on_off(peer_device_t *remote_device, uint16_t remote_endpoint_id); } /* command */ } /* level_control */ namespace color_control { namespace command { -esp_err_t send_move_hue(peer_device_t *remote_device, int remote_endpoint_id, uint8_t move_mode, uint8_t rate, +esp_err_t send_move_hue(peer_device_t *remote_device, uint16_t remote_endpoint_id, uint8_t move_mode, uint8_t rate, uint8_t option_mask, uint8_t option_override); -esp_err_t send_move_saturation(peer_device_t *remote_device, int remote_endpoint_id, uint8_t move_mode, uint8_t rate, +esp_err_t send_move_saturation(peer_device_t *remote_device, uint16_t remote_endpoint_id, uint8_t move_mode, + uint8_t rate, uint8_t option_mask, uint8_t option_override); -esp_err_t send_move_to_hue(peer_device_t *remote_device, int remote_endpoint_id, uint8_t hue, uint8_t direction, +esp_err_t send_move_to_hue(peer_device_t *remote_device, uint16_t remote_endpoint_id, uint8_t hue, uint8_t direction, uint16_t transition_time, uint8_t option_mask, uint8_t option_override); -esp_err_t send_move_to_hue_and_saturation(peer_device_t *remote_device, int remote_endpoint_id, uint8_t hue, +esp_err_t send_move_to_hue_and_saturation(peer_device_t *remote_device, uint16_t remote_endpoint_id, uint8_t hue, uint8_t saturation, uint16_t transition_time, uint8_t option_mask, uint8_t option_override); -esp_err_t send_move_to_saturation(peer_device_t *remote_device, int remote_endpoint_id, uint8_t saturation, +esp_err_t send_move_to_saturation(peer_device_t *remote_device, uint16_t remote_endpoint_id, uint8_t saturation, uint16_t transition_time, uint8_t option_mask, uint8_t option_override); -esp_err_t send_step_hue(peer_device_t *remote_device, int remote_endpoint_id, uint8_t step_mode, uint8_t step_size, +esp_err_t send_step_hue(peer_device_t *remote_device, uint16_t remote_endpoint_id, uint8_t step_mode, uint8_t step_size, uint16_t transition_time, uint8_t option_mask, uint8_t option_override); -esp_err_t send_step_saturation(peer_device_t *remote_device, int remote_endpoint_id, uint8_t step_mode, +esp_err_t send_step_saturation(peer_device_t *remote_device, uint16_t remote_endpoint_id, uint8_t step_mode, uint8_t step_size, uint16_t transition_time, uint8_t option_mask, uint8_t option_override); } /* command */ diff --git a/components/esp_matter/esp_matter_command.cpp b/components/esp_matter/esp_matter_command.cpp index 0654ca5a9..a1a3b076a 100644 --- a/components/esp_matter/esp_matter_command.cpp +++ b/components/esp_matter/esp_matter_command.cpp @@ -35,9 +35,9 @@ namespace command { void DispatchSingleClusterCommandCommon(const ConcreteCommandPath &command_path, TLVReader &tlv_data, void *opaque_ptr) { - int endpoint_id = command_path.mEndpointId; - int cluster_id = command_path.mClusterId; - int command_id = command_path.mCommandId; + uint16_t endpoint_id = command_path.mEndpointId; + uint32_t cluster_id = command_path.mClusterId; + uint32_t command_id = command_path.mCommandId; ESP_LOGI(TAG, "Received command 0x%04X for enpoint 0x%04X's cluster 0x%08X", command_id, endpoint_id, cluster_id); node_t *node = node::get(); diff --git a/components/esp_matter/esp_matter_core.cpp b/components/esp_matter/esp_matter_core.cpp index b05ba1d7d..1d19b4694 100644 --- a/components/esp_matter/esp_matter_core.cpp +++ b/components/esp_matter/esp_matter_core.cpp @@ -32,7 +32,9 @@ using chip::CommandId; using chip::DataVersion; +using chip::kInvalidAttributeId; using chip::kInvalidCommandId; +using chip::kInvalidClusterId; using chip::kInvalidEndpointId; using chip::Credentials::SetDeviceAttestationCredentialsProvider; using chip::Credentials::Examples::GetExampleDACProvider; @@ -58,9 +60,9 @@ chip::DeviceLayer::ESP32FactoryDataProvider factory_data_provider; } // namespace typedef struct _attribute { - int attribute_id; - int cluster_id; - int endpoint_id; + uint32_t attribute_id; + uint32_t cluster_id; + uint16_t endpoint_id; uint16_t flags; esp_matter_attr_val_t val; esp_matter_attr_bounds_t *bounds; @@ -71,15 +73,15 @@ typedef struct _attribute { } _attribute_t; typedef struct _command { - int command_id; + uint32_t command_id; uint16_t flags; command::callback_t callback; struct _command *next; } _command_t; typedef struct _cluster { - int cluster_id; - int endpoint_id; + uint32_t cluster_id; + uint16_t endpoint_id; uint16_t flags; const cluster::function_generic_t *function_list; cluster::plugin_server_init_callback_t plugin_server_init_callback; @@ -90,8 +92,8 @@ typedef struct _cluster { } _cluster_t; typedef struct _endpoint { - int endpoint_id; - int device_type_id; + uint16_t endpoint_id; + uint32_t device_type_id; uint16_t flags; _cluster_t *cluster_list; EmberAfEndpointType *endpoint_type; @@ -102,7 +104,7 @@ typedef struct _endpoint { typedef struct _node { _endpoint_t *endpoint_list; - int current_endpoint_id; + uint16_t current_endpoint_id; } _node_t; namespace cluster { @@ -250,7 +252,7 @@ namespace endpoint { static int get_next_index() { - int endpoint_id = 0; + uint16_t endpoint_id = 0; for (int index = 0; index < MAX_ENDPOINT_COUNT; index++) { endpoint_id = emberAfEndpointFromIndex(index); if (endpoint_id == kInvalidEndpointId) { @@ -729,7 +731,7 @@ esp_err_t factory_reset() /* ESP Matter data model is used. Erase all the data that we have added in nvs. */ endpoint_t *endpoint = endpoint::get_first(node); while (endpoint) { - int endpoint_id = endpoint::get_id(endpoint); + uint16_t endpoint_id = endpoint::get_id(endpoint); char nvs_namespace[16] = {0}; snprintf(nvs_namespace, 16, "endpoint_%X", endpoint_id); /* endpoint_id */ @@ -757,7 +759,7 @@ esp_err_t factory_reset() } namespace attribute { -attribute_t *create(cluster_t *cluster, int attribute_id, uint8_t flags, esp_matter_attr_val_t val) +attribute_t *create(cluster_t *cluster, uint32_t attribute_id, uint8_t flags, esp_matter_attr_val_t val) { /* Find */ if (!cluster) { @@ -839,7 +841,7 @@ static esp_err_t destroy(attribute_t *attribute) return ESP_OK; } -attribute_t *get(cluster_t *cluster, int attribute_id) +attribute_t *get(cluster_t *cluster, uint32_t attribute_id) { if (!cluster) { ESP_LOGE(TAG, "Cluster cannot be NULL"); @@ -876,11 +878,11 @@ attribute_t *get_next(attribute_t *attribute) return (attribute_t *)current_attribute->next; } -int get_id(attribute_t *attribute) +uint32_t get_id(attribute_t *attribute) { if (!attribute) { ESP_LOGE(TAG, "Attribute cannot be NULL"); - return -1; + return kInvalidAttributeId; } _attribute_t *current_attribute = (_attribute_t *)attribute; return current_attribute->attribute_id; @@ -1022,9 +1024,9 @@ esp_err_t store_val_in_nvs(attribute_t *attribute) _attribute_t *current_attribute = (_attribute_t *)attribute; /* Get keys */ - int attribute_id = current_attribute->attribute_id; - int cluster_id = current_attribute->cluster_id; - int endpoint_id = current_attribute->endpoint_id; + uint32_t attribute_id = current_attribute->attribute_id; + uint32_t cluster_id = current_attribute->cluster_id; + uint16_t endpoint_id = current_attribute->endpoint_id; char nvs_namespace[16] = {0}; char attribute_key[16] = {0}; snprintf(nvs_namespace, 16, "endpoint_%X", endpoint_id); /* endpoint_id */ @@ -1062,9 +1064,9 @@ esp_err_t get_val_from_nvs(attribute_t *attribute, esp_matter_attr_val_t *val) _attribute_t *current_attribute = (_attribute_t *)attribute; /* Get keys */ - int attribute_id = current_attribute->attribute_id; - int cluster_id = current_attribute->cluster_id; - int endpoint_id = current_attribute->endpoint_id; + uint32_t attribute_id = current_attribute->attribute_id; + uint32_t cluster_id = current_attribute->cluster_id; + uint16_t endpoint_id = current_attribute->endpoint_id; char nvs_namespace[16] = {0}; char attribute_key[16] = {0}; snprintf(nvs_namespace, 16, "endpoint_%X", endpoint_id); /* endpoint_id */ @@ -1103,7 +1105,7 @@ esp_err_t get_val_from_nvs(attribute_t *attribute, esp_matter_attr_val_t *val) } /* attribute */ namespace command { -command_t *create(cluster_t *cluster, int command_id, uint8_t flags, callback_t callback) +command_t *create(cluster_t *cluster, uint32_t command_id, uint8_t flags, callback_t callback) { /* Find */ if (!cluster) { @@ -1153,7 +1155,7 @@ static esp_err_t destroy(command_t *command) return ESP_OK; } -command_t *get(cluster_t *cluster, int command_id) +command_t *get(cluster_t *cluster, uint32_t command_id) { if (!cluster) { ESP_LOGE(TAG, "Cluster cannot be NULL"); @@ -1190,11 +1192,11 @@ command_t *get_next(command_t *command) return (command_t *)current_command->next; } -int get_id(command_t *command) +uint32_t get_id(command_t *command) { if (!command) { ESP_LOGE(TAG, "Command cannot be NULL"); - return -1; + return kInvalidCommandId; } _command_t *current_command = (_command_t *)command; return current_command->command_id; @@ -1224,7 +1226,7 @@ uint16_t get_flags(command_t *command) namespace cluster { -cluster_t *create(endpoint_t *endpoint, int cluster_id, uint8_t flags) +cluster_t *create(endpoint_t *endpoint, uint32_t cluster_id, uint8_t flags) { /* Find */ if (!endpoint) { @@ -1290,7 +1292,7 @@ static esp_err_t destroy(cluster_t *cluster) return ESP_OK; } -cluster_t *get(endpoint_t *endpoint, int cluster_id) +cluster_t *get(endpoint_t *endpoint, uint32_t cluster_id) { if (!endpoint) { ESP_LOGE(TAG, "Endpoint cannot be NULL"); @@ -1327,11 +1329,11 @@ cluster_t *get_next(cluster_t *cluster) return (cluster_t *)current_cluster->next; } -int get_id(cluster_t *cluster) +uint32_t get_id(cluster_t *cluster) { if (!cluster) { ESP_LOGE(TAG, "Cluster cannot be NULL"); - return -1; + return kInvalidClusterId; } _cluster_t *current_cluster = (_cluster_t *)cluster; return current_cluster->cluster_id; @@ -1482,7 +1484,7 @@ esp_err_t destroy(node_t *node, endpoint_t *endpoint) return ESP_OK; } -endpoint_t *get(node_t *node, int endpoint_id) +endpoint_t *get(node_t *node, uint16_t endpoint_id) { if (!node) { ESP_LOGE(TAG, "Node cannot be NULL"); @@ -1519,17 +1521,17 @@ endpoint_t *get_next(endpoint_t *endpoint) return (endpoint_t *)current_endpoint->next; } -int get_id(endpoint_t *endpoint) +uint16_t get_id(endpoint_t *endpoint) { if (!endpoint) { ESP_LOGE(TAG, "Endpoint cannot be NULL"); - return -1; + return kInvalidEndpointId; } _endpoint_t *current_endpoint = (_endpoint_t *)endpoint; return current_endpoint->endpoint_id; } -esp_err_t set_device_type_id(endpoint_t *endpoint, int device_type_id) +esp_err_t set_device_type_id(endpoint_t *endpoint, uint32_t device_type_id) { if (!endpoint) { ESP_LOGE(TAG, "Endpoint cannot be NULL"); @@ -1540,15 +1542,14 @@ esp_err_t set_device_type_id(endpoint_t *endpoint, int device_type_id) return ESP_OK; } -int get_device_type_id(endpoint_t *endpoint) +uint32_t get_device_type_id(endpoint_t *endpoint) { if (!endpoint) { ESP_LOGE(TAG, "Endpoint cannot be NULL"); - return ESP_ERR_INVALID_ARG; + return 0xFFFF'FFFF; } _endpoint_t *current_endpoint = (_endpoint_t *)endpoint; - int device_type_id = current_endpoint->device_type_id; - return device_type_id; + return current_endpoint->device_type_id; } } /* endpoint */ diff --git a/components/esp_matter/esp_matter_core.h b/components/esp_matter/esp_matter_core.h index 621d0529a..32a52959f 100644 --- a/components/esp_matter/esp_matter_core.h +++ b/components/esp_matter/esp_matter_core.h @@ -159,7 +159,7 @@ esp_err_t destroy(node_t *node, endpoint_t *endpoint); * @return Endpoint handle on success. * @return NULL in case of failure. */ -endpoint_t *get(node_t *node, int endpoint_id); +endpoint_t *get(node_t *node, uint16_t endpoint_id); /** Get first endpoint * @@ -190,9 +190,9 @@ endpoint_t *get_next(endpoint_t *endpoint); * @param[in] endpoint Endpoint handle. * * @return Endpoint ID on success. - * @return -1 in case of failure. + * @return Invalid Endpoint ID (0xFFFF) in case of failure. */ -int get_id(endpoint_t *endpoint); +uint16_t get_id(endpoint_t *endpoint); /** Set device type ID * @@ -204,7 +204,7 @@ int get_id(endpoint_t *endpoint); * @return ESP_OK on success. * @return error in case of failure. */ -esp_err_t set_device_type_id(endpoint_t *endpoint, int device_type_id); +esp_err_t set_device_type_id(endpoint_t *endpoint, uint32_t device_type_id); /** Get device type ID * @@ -213,9 +213,9 @@ esp_err_t set_device_type_id(endpoint_t *endpoint, int device_type_id); * @param[in] endpoint Endpoint handle. * * @return device type ID on success. - * @return 0xFFFF in case of failure or if the device type ID was not set. + * @return 0xFFFF'FFFF in case of failure or if the device type ID was not set. */ -int get_device_type_id(endpoint_t *endpoint); +uint32_t get_device_type_id(endpoint_t *endpoint); /** Enable endpoint * @@ -266,7 +266,7 @@ typedef void (*function_generic_t)(); * @return Cluster handle on success. * @return NULL in case of failure. */ -cluster_t *create(endpoint_t *endpoint, int cluster_id, uint8_t flags); +cluster_t *create(endpoint_t *endpoint, uint32_t cluster_id, uint8_t flags); /** Get cluster * @@ -278,7 +278,7 @@ cluster_t *create(endpoint_t *endpoint, int cluster_id, uint8_t flags); * @return Cluster handle on success. * @return NULL in case of failure. */ -cluster_t *get(endpoint_t *endpoint, int cluster_id); +cluster_t *get(endpoint_t *endpoint, uint32_t cluster_id); /** Get first cluster * @@ -309,9 +309,9 @@ cluster_t *get_next(cluster_t *cluster); * @param[in] cluster Cluster handle. * * @return Cluster ID on success. - * @return -1 in case of failure. + * @return Invalid CLuster ID (0xFFFF'FFFF) in case of failure. */ -int get_id(cluster_t *cluster); +uint32_t get_id(cluster_t *cluster); /** Set cluster plugin server init callback * @@ -395,7 +395,7 @@ namespace attribute { * @return Attribute handle on success. * @return NULL in case of failure. */ -attribute_t *create(cluster_t *cluster, int attribute_id, uint8_t flags, esp_matter_attr_val_t val); +attribute_t *create(cluster_t *cluster, uint32_t attribute_id, uint8_t flags, esp_matter_attr_val_t val); /** Get attribute * @@ -407,7 +407,7 @@ attribute_t *create(cluster_t *cluster, int attribute_id, uint8_t flags, esp_mat * @return Attribute handle on success. * @return NULL in case of failure. */ -attribute_t *get(cluster_t *cluster, int attribute_id); +attribute_t *get(cluster_t *cluster, uint32_t attribute_id); /** Get first attribute * @@ -438,9 +438,9 @@ attribute_t *get_next(attribute_t *attribute); * @param[in] attribute Attribute handle. * * @return Attribute ID on success. - * @return -1 in case of failure. + * @return Invalid Attribute ID (0xFFFF'FFFF) in case of failure. */ -int get_id(attribute_t *attribute); +uint32_t get_id(attribute_t *attribute); /** Set attribute val * @@ -481,7 +481,8 @@ esp_err_t get_val(attribute_t *attribute, esp_matter_attr_val_t *val); * @return ESP_OK on success. * @return error in case of failure. */ -esp_err_t get_val_raw(int endpoint_id, int cluster_id, int attribute_id, uint8_t *value, uint16_t attribute_size); +esp_err_t get_val_raw(uint16_t endpoint_id, uint32_t cluster_id, uint32_t attribute_id, uint8_t *value, + uint16_t attribute_size); /** Add attribute bounds * @@ -602,7 +603,7 @@ typedef esp_err_t (*callback_t)(const ConcreteCommandPath &command_path, TLVRead * @return Command handle on success. * @return NULL in case of failure. */ -command_t *create(cluster_t *cluster, int command_id, uint8_t flags, callback_t callback); +command_t *create(cluster_t *cluster, uint32_t command_id, uint8_t flags, callback_t callback); /** Get command * @@ -614,7 +615,7 @@ command_t *create(cluster_t *cluster, int command_id, uint8_t flags, callback_t * @return Command handle on success. * @return NULL in case of failure. */ -command_t *get(cluster_t *cluster, int command_id); +command_t *get(cluster_t *cluster, uint32_t command_id); /** Get first command * @@ -645,9 +646,9 @@ command_t *get_next(command_t *command); * @param[in] command Command handle. * * @return Command ID on success. - * @return -1 in case of failure. + * @return Invalid Command ID (0xFFFF'FFFF) in case of failure. */ -int get_id(command_t *command); +uint32_t get_id(command_t *command); /** Get command callback * @@ -688,7 +689,7 @@ typedef chip::DeviceProxy peer_device_t; * @param[in] priv_data (Optional) Private data associated with the callback. This will be passed to callback. It * should stay allocated throughout the lifetime of the device. */ -typedef void (*command_callback_t)(peer_device_t *peer_device, int remote_endpoint_id, void *priv_data); +typedef void (*command_callback_t)(peer_device_t *peer_device, uint16_t remote_endpoint_id, void *priv_data); /** Initialize binding * @@ -715,7 +716,7 @@ void binding_manager_init(); * @return ESP_OK on success. * @return error in case of failure. */ -esp_err_t connect(int fabric_index, int node_id, int remote_endpoint_id); +esp_err_t connect(uint8_t fabric_index, uint64_t node_id, uint16_t remote_endpoint_id); /** Set command send callback * @@ -742,7 +743,7 @@ esp_err_t set_command_callback(command_callback_t callback, void *priv_data); * @return ESP_OK on success. * @return error in case of failure. */ -esp_err_t cluster_update(int endpoint_id, int cluster_id); +esp_err_t cluster_update(uint16_t endpoint_id, uint32_t cluster_id); } /* client */ } /* esp_matter */ diff --git a/components/esp_matter/esp_matter_endpoint.cpp b/components/esp_matter/esp_matter_endpoint.cpp index cc0dc5e56..fc67c2282 100644 --- a/components/esp_matter/esp_matter_endpoint.cpp +++ b/components/esp_matter/esp_matter_endpoint.cpp @@ -36,7 +36,7 @@ using namespace cluster; namespace endpoint { namespace root_node { -int get_device_type_id() +uint32_t get_device_type_id() { return ESP_MATTER_ROOT_NODE_DEVICE_TYPE_ID; } @@ -67,7 +67,7 @@ endpoint_t *create(node_t *node, config_t *config, uint8_t flags) } /* root_node */ namespace on_off_light { -int get_device_type_id() +uint32_t get_device_type_id() { return ESP_MATTER_ON_OFF_LIGHT_DEVICE_TYPE_ID; } @@ -93,7 +93,7 @@ endpoint_t *create(node_t *node, config_t *config, uint8_t flags) } /* on_off_light */ namespace dimmable_light { -int get_device_type_id() +uint32_t get_device_type_id() { return ESP_MATTER_DIMMABLE_LIGHT_DEVICE_TYPE_ID; } @@ -121,7 +121,7 @@ endpoint_t *create(node_t *node, config_t *config, uint8_t flags) } /* dimmable_light */ namespace color_dimmable_light { -int get_device_type_id() +uint32_t get_device_type_id() { return ESP_MATTER_COLOR_DIMMABLE_LIGHT_DEVICE_TYPE_ID; } @@ -151,7 +151,7 @@ endpoint_t *create(node_t *node, config_t *config, uint8_t flags) } /* color_dimmable_light */ namespace on_off_switch { -int get_device_type_id() +uint32_t get_device_type_id() { return ESP_MATTER_ON_OFF_SWITCH_DEVICE_TYPE_ID; } @@ -178,7 +178,7 @@ endpoint_t *create(node_t *node, config_t *config, uint8_t flags) } /* on_off_switch */ namespace fan { -int get_device_type_id() +uint32_t get_device_type_id() { return ESP_MATTER_FAN_DEVICE_TYPE_ID; } @@ -202,7 +202,7 @@ endpoint_t *create(node_t *node, config_t *config, uint8_t flags) } /* fan */ namespace thermostat { -int get_device_type_id() +uint32_t get_device_type_id() { return ESP_MATTER_THERMOSTAT_DEVICE_TYPE_ID; } @@ -228,14 +228,14 @@ endpoint_t *create(node_t *node, config_t *config, uint8_t flags) } /* thermostat */ namespace bridge { -int get_device_type_id() +uint32_t get_device_type_id() { return ESP_MATTER_BRIDGE_DEVICE_TYPE_ID; } } /* bridge */ namespace bridged_node { -int get_device_type_id() +uint32_t get_device_type_id() { return ESP_MATTER_BRIDGED_NODE_DEVICE_TYPE_ID; } @@ -260,7 +260,7 @@ endpoint_t *create(node_t *node, config_t *config, uint8_t flags) } /* bridged_node */ namespace door_lock { -int get_device_type_id() +uint32_t get_device_type_id() { return ESP_MATTER_DOOR_LOCK_DEVICE_TYPE_ID; } @@ -285,7 +285,7 @@ endpoint_t *create(node_t *node, config_t *config, uint8_t flags) } /* door_lock */ namespace temperature_sensor { -int get_device_type_id() +uint32_t get_device_type_id() { return ESP_MATTER_TEMPERATURE_SENSOR_DEVICE_TYPE_ID; } diff --git a/components/esp_matter/esp_matter_endpoint.h b/components/esp_matter/esp_matter_endpoint.h index 8f9c90e33..6a182dfe4 100644 --- a/components/esp_matter/esp_matter_endpoint.h +++ b/components/esp_matter/esp_matter_endpoint.h @@ -42,7 +42,7 @@ typedef struct config { operational_credentials::config_t operational_credentials; } config_t; -int get_device_type_id(); +uint32_t get_device_type_id(); endpoint_t *create(node_t *node, config_t *config, uint8_t flags); } /* root_node */ @@ -55,7 +55,7 @@ typedef struct config { basic::config_t basic; } config_t; -int get_device_type_id(); +uint32_t get_device_type_id(); endpoint_t *create(node_t *node, config_t *config, uint8_t flags); } /* on_off_light */ @@ -69,7 +69,7 @@ typedef struct config { basic::config_t basic; } config_t; -int get_device_type_id(); +uint32_t get_device_type_id(); endpoint_t *create(node_t *node, config_t *config, uint8_t flags); } /* dimmable_light */ @@ -84,7 +84,7 @@ typedef struct config { color_control::config_t color_control; } config_t; -int get_device_type_id(); +uint32_t get_device_type_id(); endpoint_t *create(node_t *node, config_t *config, uint8_t flags); } /* color_dimmable_light */ @@ -98,7 +98,7 @@ typedef struct config { binding::config_t binding; } config_t; -int get_device_type_id(); +uint32_t get_device_type_id(); endpoint_t *create(node_t *node, config_t *config, uint8_t flags); } /* on_off_switch */ @@ -109,7 +109,7 @@ typedef struct config { fan_control::config_t fan_control; } config_t; -int get_device_type_id(); +uint32_t get_device_type_id(); endpoint_t *create(node_t *node, config_t *config, uint8_t flags); } /* fan */ @@ -122,12 +122,12 @@ typedef struct config { cluster::thermostat::config_t thermostat; } config_t; -int get_device_type_id(); +uint32_t get_device_type_id(); endpoint_t *create(node_t *node, config_t *config, uint8_t flags); } /* thermostat */ namespace bridge { -int get_device_type_id(); +uint32_t get_device_type_id(); } /* bridge */ namespace bridged_node { @@ -136,7 +136,7 @@ typedef struct config { fixed_label::config_t fixed_label; } config_t; -int get_device_type_id(); +uint32_t get_device_type_id(); endpoint_t *create(node_t *node, config_t *config, uint8_t flags); } /* bridged_node */ @@ -147,7 +147,7 @@ typedef struct config { time_synchronization::config_t time_synchronization; } config_t; -int get_device_type_id(); +uint32_t get_device_type_id(); endpoint_t *create(node_t *node, config_t *config, uint8_t flags); } /* door_lock */ @@ -158,7 +158,7 @@ typedef struct config { temperature_measurement::config_t temperature_measurement; } config_t; -int get_device_type_id(); +uint32_t get_device_type_id(); endpoint_t *create(node_t *node, config_t *config, uint8_t flags); } /* temperature_sensor */ } /* endpoint */ diff --git a/components/esp_matter_bridge/esp_matter_bridge.h b/components/esp_matter_bridge/esp_matter_bridge.h index 891d03f80..3328f5dd6 100644 --- a/components/esp_matter_bridge/esp_matter_bridge.h +++ b/components/esp_matter_bridge/esp_matter_bridge.h @@ -26,7 +26,7 @@ using namespace esp_matter; typedef struct esp_matter_bridge_device { node_t *node; endpoint_t *endpoint; - int endpoint_id; + uint16_t endpoint_id; } esp_matter_bridge_device_t; esp_matter_bridge_device_t *esp_matter_bridge_create_device(node_t *node); diff --git a/components/esp_matter_rainmaker/esp_matter_rainmaker.cpp b/components/esp_matter_rainmaker/esp_matter_rainmaker.cpp index 6612cf7cc..c092783c0 100644 --- a/components/esp_matter_rainmaker/esp_matter_rainmaker.cpp +++ b/components/esp_matter_rainmaker/esp_matter_rainmaker.cpp @@ -81,18 +81,18 @@ static void register_commands() static esp_err_t status_attribute_update(bool status) { - int endpoint_id = cluster::rainmaker::endpoint_id; - int cluster_id = cluster::rainmaker::Id; - int attribute_id = cluster::rainmaker::attribute::status::Id; + uint16_t endpoint_id = cluster::rainmaker::endpoint_id; + uint32_t cluster_id = cluster::rainmaker::Id; + uint32_t attribute_id = cluster::rainmaker::attribute::status::Id; esp_matter_attr_val_t val = esp_matter_bool(status); return attribute::update(endpoint_id, cluster_id, attribute_id, &val); } static esp_err_t node_id_attribute_update(char *node_id) { - int endpoint_id = cluster::rainmaker::endpoint_id; - int cluster_id = cluster::rainmaker::Id; - int attribute_id = cluster::rainmaker::attribute::node_id::Id; + uint16_t endpoint_id = cluster::rainmaker::endpoint_id; + uint32_t cluster_id = cluster::rainmaker::Id; + uint32_t attribute_id = cluster::rainmaker::attribute::node_id::Id; esp_matter_attr_val_t val = esp_matter_char_str(node_id, strlen(node_id)); return attribute::update(endpoint_id, cluster_id, attribute_id, &val); } @@ -115,9 +115,9 @@ static void user_node_association_event_handler(void *arg, esp_event_base_t even static esp_err_t command_callback(const ConcreteCommandPath &command_path, TLVReader &tlv_data, void *opaque_ptr) { /* Get ids */ - int endpoint_id = command_path.mEndpointId; - int cluster_id = command_path.mClusterId; - int command_id = command_path.mCommandId; + uint16_t endpoint_id = command_path.mEndpointId; + uint32_t cluster_id = command_path.mClusterId; + uint32_t command_id = command_path.mCommandId; /* Return if this is not the rainmaker configuration command */ if (endpoint_id != cluster::rainmaker::endpoint_id || cluster_id != cluster::rainmaker::Id || diff --git a/docs/en/developing.rst b/docs/en/developing.rst index c1400d954..c71eff977 100644 --- a/docs/en/developing.rst +++ b/docs/en/developing.rst @@ -347,8 +347,8 @@ the terms like endpoints, clusters, etc. that are used in this section. :: - esp_err_t app_attribute_update_cb(callback_type_t type, int endpoint_id, int cluster_id, int attribute_id, - esp_matter_attr_val_t *val, void *priv_data) + esp_err_t app_attribute_update_cb(callback_type_t type, uint16_t endpoint_id, uint32_t cluster_id, + uint32_t attribute_id, esp_matter_attr_val_t *val, void *priv_data) { esp_err_t err = ESP_OK; @@ -393,26 +393,28 @@ the terms like endpoints, clusters, etc. that are used in this section. :: - esp_err_t app_driver_attribute_update(int endpoint_id, int cluster_id, int attribute_id, esp_matter_attr_val_t *val) { - esp_err_t err = ESP_OK; - if (endpoint_id == light_endpoint_id) { - if (cluster_id == OnOff::Id) { - if (attribute_id == OnOff::Attributes::OnOff::Id) { - err = app_driver_light_set_power(val); - } - } else if (cluster_id == LevelControl::Id) { - if (attribute_id == LevelControl::Attributes::CurrentLevel::Id) { - err = app_driver_light_set_brightness(val); - } - } else if (cluster_id == ColorControl::Id) { - if (attribute_id == ColorControl::Attributes::CurrentHue::Id) { - err = app_driver_light_set_hue(val); - } else if (attribute_id == ColorControl::Attributes::CurrentSaturation::Id) { - err = app_driver_light_set_saturation(val); - } - } - } - return err; + esp_err_t app_driver_attribute_update(uint16_t endpoint_id, uint32_t cluster_id, uint32_t attribute_id, + esp_matter_attr_val_t *val) + { + esp_err_t err = ESP_OK; + if (endpoint_id == light_endpoint_id) { + if (cluster_id == OnOff::Id) { + if (attribute_id == OnOff::Attributes::OnOff::Id) { + err = app_driver_light_set_power(val); + } + } else if (cluster_id == LevelControl::Id) { + if (attribute_id == LevelControl::Attributes::CurrentLevel::Id) { + err = app_driver_light_set_brightness(val); + } + } else if (cluster_id == ColorControl::Id) { + if (attribute_id == ColorControl::Attributes::CurrentHue::Id) { + err = app_driver_light_set_hue(val); + } else if (attribute_id == ColorControl::Attributes::CurrentSaturation::Id) { + err = app_driver_light_set_saturation(val); + } + } + } + return err; } 2.4.1.4 Matter Device Ready diff --git a/examples/common/app_bridge/app_zigbee_bridge_device.cpp b/examples/common/app_bridge/app_zigbee_bridge_device.cpp index 8afeb4b86..419137b55 100644 --- a/examples/common/app_bridge/app_zigbee_bridge_device.cpp +++ b/examples/common/app_bridge/app_zigbee_bridge_device.cpp @@ -46,7 +46,7 @@ app_zigbee_bridge_device_t *app_bridge_create_zigbee_device(node_t *node, uint8_ return new_dev; } -uint16_t app_bridge_get_zigbee_shortaddr_by_matter_endpointid(int matter_endpointid) +uint16_t app_bridge_get_zigbee_shortaddr_by_matter_endpointid(uint16_t matter_endpointid) { app_zigbee_bridge_device_t *current_dev = device_list; while (current_dev) { @@ -58,7 +58,7 @@ uint16_t app_bridge_get_zigbee_shortaddr_by_matter_endpointid(int matter_endpoin return 0xffff; } -int app_bridge_get_matter_endpointid_by_zigbee_shortaddr(uint16_t zigbee_shortaddr) +uint16_t app_bridge_get_matter_endpointid_by_zigbee_shortaddr(uint16_t zigbee_shortaddr) { app_zigbee_bridge_device_t *current_dev = device_list; while (current_dev) { @@ -67,10 +67,10 @@ int app_bridge_get_matter_endpointid_by_zigbee_shortaddr(uint16_t zigbee_shortad } current_dev = current_dev->next; } - return -1; + return 0xFFFF; } -app_zigbee_bridge_device_t *app_bridge_get_zigbee_device_by_matter_endpointid(int matter_endpointid) +app_zigbee_bridge_device_t *app_bridge_get_zigbee_device_by_matter_endpointid(uint16_t matter_endpointid) { app_zigbee_bridge_device_t *current_dev = device_list; while (current_dev) { diff --git a/examples/common/app_bridge/app_zigbee_bridge_device.h b/examples/common/app_bridge/app_zigbee_bridge_device.h index 443fcb268..11b9d62ea 100644 --- a/examples/common/app_bridge/app_zigbee_bridge_device.h +++ b/examples/common/app_bridge/app_zigbee_bridge_device.h @@ -29,11 +29,11 @@ typedef struct app_zigbee_bridge_device { app_zigbee_bridge_device_t *app_bridge_create_zigbee_device(node_t *node, uint8_t zigbee_endpointid, uint16_t zigbee_shortaddr); -uint16_t app_bridge_get_zigbee_shortaddr_by_matter_endpointid(int matter_endpointid); +uint16_t app_bridge_get_zigbee_shortaddr_by_matter_endpointid(uint16_t matter_endpointid); -int app_bridge_get_matter_endpointid_by_zigbee_shortaddr(uint16_t zigbee_shortaddr); +uint16_t app_bridge_get_matter_endpointid_by_zigbee_shortaddr(uint16_t zigbee_shortaddr); -app_zigbee_bridge_device_t *app_bridge_get_zigbee_device_by_matter_endpointid(int matter_endpointid); +app_zigbee_bridge_device_t *app_bridge_get_zigbee_device_by_matter_endpointid(uint16_t matter_endpointid); app_zigbee_bridge_device_t *app_bridge_get_zigbee_device_by_zigbee_shortaddr(uint16_t zigbee_shortaddr); diff --git a/examples/light/main/app_driver.cpp b/examples/light/main/app_driver.cpp index 9767c6210..33978032f 100644 --- a/examples/light/main/app_driver.cpp +++ b/examples/light/main/app_driver.cpp @@ -20,7 +20,7 @@ using namespace esp_matter; static const char *TAG = "app_driver"; -extern int light_endpoint_id; +extern uint16_t light_endpoint_id; /* Do any conversions/remapping for the actual value here */ static esp_err_t app_driver_light_set_power(esp_matter_attr_val_t *val) @@ -49,9 +49,9 @@ static esp_err_t app_driver_light_set_saturation(esp_matter_attr_val_t *val) static void app_driver_button_toggle_cb(void *arg) { ESP_LOGI(TAG, "Toggle button pressed"); - int endpoint_id = light_endpoint_id; - int cluster_id = OnOff::Id; - int attribute_id = OnOff::Attributes::OnOff::Id; + uint16_t endpoint_id = light_endpoint_id; + uint32_t cluster_id = OnOff::Id; + uint32_t attribute_id = OnOff::Attributes::OnOff::Id; node_t *node = node::get(); endpoint_t *endpoint = endpoint::get(node, endpoint_id); @@ -64,7 +64,8 @@ static void app_driver_button_toggle_cb(void *arg) attribute::update(endpoint_id, cluster_id, attribute_id, &val); } -esp_err_t app_driver_attribute_update(int endpoint_id, int cluster_id, int attribute_id, esp_matter_attr_val_t *val) +esp_err_t app_driver_attribute_update(uint16_t endpoint_id, uint32_t cluster_id, uint32_t attribute_id, + esp_matter_attr_val_t *val) { esp_err_t err = ESP_OK; if (endpoint_id == light_endpoint_id) { @@ -94,13 +95,13 @@ static esp_err_t app_driver_attribute_set_defaults() node_t *node = node::get(); endpoint_t *endpoint = endpoint::get_first(node); while (endpoint) { - int endpoint_id = endpoint::get_id(endpoint); + uint16_t endpoint_id = endpoint::get_id(endpoint); cluster_t *cluster = cluster::get_first(endpoint); while (cluster) { - int cluster_id = cluster::get_id(cluster); + uint32_t cluster_id = cluster::get_id(cluster); attribute_t *attribute = attribute::get_first(cluster); while (attribute) { - int attribute_id = attribute::get_id(attribute); + uint32_t attribute_id = attribute::get_id(attribute); esp_matter_attr_val_t val = esp_matter_invalid(NULL); err |= attribute::get_val(attribute, &val); err |= app_driver_attribute_update(endpoint_id, cluster_id, attribute_id, &val); diff --git a/examples/light/main/app_main.cpp b/examples/light/main/app_main.cpp index 2ca037137..48afe37b9 100644 --- a/examples/light/main/app_main.cpp +++ b/examples/light/main/app_main.cpp @@ -19,7 +19,7 @@ #include static const char *TAG = "app_main"; -int light_endpoint_id = 0; +uint16_t light_endpoint_id = 0; using namespace esp_matter; using namespace esp_matter::attribute; @@ -36,8 +36,8 @@ static void app_event_cb(const ChipDeviceEvent *event, intptr_t arg) ESP_LOGI(TAG, "Current free heap: %zu", heap_caps_get_free_size(MALLOC_CAP_8BIT)); } -static esp_err_t app_attribute_update_cb(callback_type_t type, int endpoint_id, int cluster_id, int attribute_id, - esp_matter_attr_val_t *val, void *priv_data) +static esp_err_t app_attribute_update_cb(callback_type_t type, uint16_t endpoint_id, uint32_t cluster_id, + uint32_t attribute_id, esp_matter_attr_val_t *val, void *priv_data) { esp_err_t err = ESP_OK; diff --git a/examples/light/main/app_priv.h b/examples/light/main/app_priv.h index d5274e8f6..b2f5abbc5 100644 --- a/examples/light/main/app_priv.h +++ b/examples/light/main/app_priv.h @@ -49,4 +49,5 @@ esp_err_t app_driver_init(void); * @return ESP_OK on success. * @return error in case of failure. */ -esp_err_t app_driver_attribute_update(int endpoint_id, int cluster_id, int attribute_id, esp_matter_attr_val_t *val); +esp_err_t app_driver_attribute_update(uint16_t endpoint_id, uint32_t cluster_id, uint32_t attribute_id, + esp_matter_attr_val_t *val); diff --git a/examples/rainmaker_light/main/app_driver.cpp b/examples/rainmaker_light/main/app_driver.cpp index 9767c6210..33978032f 100644 --- a/examples/rainmaker_light/main/app_driver.cpp +++ b/examples/rainmaker_light/main/app_driver.cpp @@ -20,7 +20,7 @@ using namespace esp_matter; static const char *TAG = "app_driver"; -extern int light_endpoint_id; +extern uint16_t light_endpoint_id; /* Do any conversions/remapping for the actual value here */ static esp_err_t app_driver_light_set_power(esp_matter_attr_val_t *val) @@ -49,9 +49,9 @@ static esp_err_t app_driver_light_set_saturation(esp_matter_attr_val_t *val) static void app_driver_button_toggle_cb(void *arg) { ESP_LOGI(TAG, "Toggle button pressed"); - int endpoint_id = light_endpoint_id; - int cluster_id = OnOff::Id; - int attribute_id = OnOff::Attributes::OnOff::Id; + uint16_t endpoint_id = light_endpoint_id; + uint32_t cluster_id = OnOff::Id; + uint32_t attribute_id = OnOff::Attributes::OnOff::Id; node_t *node = node::get(); endpoint_t *endpoint = endpoint::get(node, endpoint_id); @@ -64,7 +64,8 @@ static void app_driver_button_toggle_cb(void *arg) attribute::update(endpoint_id, cluster_id, attribute_id, &val); } -esp_err_t app_driver_attribute_update(int endpoint_id, int cluster_id, int attribute_id, esp_matter_attr_val_t *val) +esp_err_t app_driver_attribute_update(uint16_t endpoint_id, uint32_t cluster_id, uint32_t attribute_id, + esp_matter_attr_val_t *val) { esp_err_t err = ESP_OK; if (endpoint_id == light_endpoint_id) { @@ -94,13 +95,13 @@ static esp_err_t app_driver_attribute_set_defaults() node_t *node = node::get(); endpoint_t *endpoint = endpoint::get_first(node); while (endpoint) { - int endpoint_id = endpoint::get_id(endpoint); + uint16_t endpoint_id = endpoint::get_id(endpoint); cluster_t *cluster = cluster::get_first(endpoint); while (cluster) { - int cluster_id = cluster::get_id(cluster); + uint32_t cluster_id = cluster::get_id(cluster); attribute_t *attribute = attribute::get_first(cluster); while (attribute) { - int attribute_id = attribute::get_id(attribute); + uint32_t attribute_id = attribute::get_id(attribute); esp_matter_attr_val_t val = esp_matter_invalid(NULL); err |= attribute::get_val(attribute, &val); err |= app_driver_attribute_update(endpoint_id, cluster_id, attribute_id, &val); diff --git a/examples/rainmaker_light/main/app_main.cpp b/examples/rainmaker_light/main/app_main.cpp index 2ebdb897a..6d609eae0 100644 --- a/examples/rainmaker_light/main/app_main.cpp +++ b/examples/rainmaker_light/main/app_main.cpp @@ -19,7 +19,7 @@ #include static const char *TAG = "app_main"; -int light_endpoint_id = 0; +uint16_t light_endpoint_id = 0; using namespace esp_matter; using namespace esp_matter::attribute; @@ -36,8 +36,8 @@ static void app_event_cb(const ChipDeviceEvent *event, intptr_t arg) ESP_LOGI(TAG, "Current free heap: %zu", heap_caps_get_free_size(MALLOC_CAP_8BIT)); } -static esp_err_t app_attribute_update_cb(callback_type_t type, int endpoint_id, int cluster_id, int attribute_id, - esp_matter_attr_val_t *val, void *priv_data) +static esp_err_t app_attribute_update_cb(callback_type_t type, uint16_t endpoint_id, uint32_t cluster_id, + uint32_t attribute_id, esp_matter_attr_val_t *val, void *priv_data) { esp_err_t err = ESP_OK; diff --git a/examples/rainmaker_light/main/app_priv.h b/examples/rainmaker_light/main/app_priv.h index d5274e8f6..b2f5abbc5 100644 --- a/examples/rainmaker_light/main/app_priv.h +++ b/examples/rainmaker_light/main/app_priv.h @@ -49,4 +49,5 @@ esp_err_t app_driver_init(void); * @return ESP_OK on success. * @return error in case of failure. */ -esp_err_t app_driver_attribute_update(int endpoint_id, int cluster_id, int attribute_id, esp_matter_attr_val_t *val); +esp_err_t app_driver_attribute_update(uint16_t endpoint_id, uint32_t cluster_id, uint32_t attribute_id, + esp_matter_attr_val_t *val); diff --git a/examples/rainmaker_light/main/app_rainmaker.cpp b/examples/rainmaker_light/main/app_rainmaker.cpp index eb19e0c9c..e076097e6 100644 --- a/examples/rainmaker_light/main/app_rainmaker.cpp +++ b/examples/rainmaker_light/main/app_rainmaker.cpp @@ -28,11 +28,12 @@ using namespace esp_matter; static const char *TAG = "app_rainmaker"; -extern int light_endpoint_id; +extern uint16_t light_endpoint_id; #define DEFAULT_LIGHT_NAME "Light" -static esp_rmaker_param_val_t app_rainmaker_get_rmaker_val(esp_matter_attr_val_t *val, int cluster_id, int attribute_id) +static esp_rmaker_param_val_t app_rainmaker_get_rmaker_val(esp_matter_attr_val_t *val, uint32_t cluster_id, + uint32_t attribute_id) { /* Attributes which need to be remapped */ if (cluster_id == LevelControl::Id) { @@ -69,7 +70,8 @@ static esp_rmaker_param_val_t app_rainmaker_get_rmaker_val(esp_matter_attr_val_t return esp_rmaker_int(0); } -static esp_matter_attr_val_t app_rainmaker_get_matter_val(esp_rmaker_param_val_t *val, int cluster_id, int attribute_id) +static esp_matter_attr_val_t app_rainmaker_get_matter_val(esp_rmaker_param_val_t *val, uint32_t cluster_id, + uint32_t attribute_id) { /* Attributes which need to be remapped */ if (cluster_id == LevelControl::Id) { @@ -100,7 +102,7 @@ static esp_matter_attr_val_t app_rainmaker_get_matter_val(esp_rmaker_param_val_t return esp_matter_int(0); } -static const char *app_rainmaker_get_device_name_from_id(int endpoint_id) +static const char *app_rainmaker_get_device_name_from_id(uint32_t endpoint_id) { if (endpoint_id == light_endpoint_id) { return DEFAULT_LIGHT_NAME; @@ -108,7 +110,7 @@ static const char *app_rainmaker_get_device_name_from_id(int endpoint_id) return NULL; } -static const char *app_rainmaker_get_device_type_from_id(int device_type_id) +static const char *app_rainmaker_get_device_type_from_id(uint32_t device_type_id) { if (device_type_id == endpoint::color_dimmable_light::get_device_type_id()) { return ESP_RMAKER_DEVICE_LIGHTBULB; @@ -116,15 +118,15 @@ static const char *app_rainmaker_get_device_type_from_id(int device_type_id) return NULL; } -static int app_rainmaker_get_endpoint_id_from_name(const char *device_name) +static uint16_t app_rainmaker_get_endpoint_id_from_name(const char *device_name) { if (strcmp(device_name, DEFAULT_LIGHT_NAME) == 0) { return light_endpoint_id; } - return 0; + return 0xFFFF; } -static const char *app_rainmaker_get_param_name_from_id(int cluster_id, int attribute_id) +static const char *app_rainmaker_get_param_name_from_id(uint32_t cluster_id, uint32_t attribute_id) { if (cluster_id == OnOff::Id) { if (attribute_id == OnOff::Attributes::OnOff::Id) { @@ -144,7 +146,7 @@ static const char *app_rainmaker_get_param_name_from_id(int cluster_id, int attr return NULL; } -static const char *app_rainmaker_get_param_type_from_id(int cluster_id, int attribute_id) +static const char *app_rainmaker_get_param_type_from_id(uint32_t cluster_id, uint32_t attribute_id) { if (cluster_id == OnOff::Id) { if (attribute_id == OnOff::Attributes::OnOff::Id) { @@ -164,7 +166,7 @@ static const char *app_rainmaker_get_param_type_from_id(int cluster_id, int attr return NULL; } -static const char *app_rainmaker_get_param_ui_type_from_id(int cluster_id, int attribute_id) +static const char *app_rainmaker_get_param_ui_type_from_id(uint32_t cluster_id, uint32_t attribute_id) { if (cluster_id == OnOff::Id) { if (attribute_id == OnOff::Attributes::OnOff::Id) { @@ -184,7 +186,8 @@ static const char *app_rainmaker_get_param_ui_type_from_id(int cluster_id, int a return NULL; } -static bool app_rainmaker_get_param_bounds_from_id(int cluster_id, int attribute_id, int *min, int *max, int *step) +static bool app_rainmaker_get_param_bounds_from_id(uint32_t cluster_id, uint32_t attribute_id, int *min, int *max, + int *step) { if (cluster_id == LevelControl::Id) { if (attribute_id == LevelControl::Attributes::CurrentLevel::Id) { @@ -211,8 +214,8 @@ static bool app_rainmaker_get_param_bounds_from_id(int cluster_id, int attribute static esp_err_t app_rainmaker_param_add_ui_type(esp_rmaker_param_t *param, cluster_t *cluster, attribute_t *attribute) { - int cluster_id = cluster::get_id(cluster); - int attribute_id = attribute::get_id(attribute); + uint32_t cluster_id = cluster::get_id(cluster); + uint32_t attribute_id = attribute::get_id(attribute); const char *ui_type = app_rainmaker_get_param_ui_type_from_id(cluster_id, attribute_id); if (!ui_type) { return ESP_OK; @@ -222,8 +225,8 @@ static esp_err_t app_rainmaker_param_add_ui_type(esp_rmaker_param_t *param, clus static esp_err_t app_rainmaker_param_add_bounds(esp_rmaker_param_t *param, cluster_t *cluster, attribute_t *attribute) { - int cluster_id = cluster::get_id(cluster); - int attribute_id = attribute::get_id(attribute); + uint32_t cluster_id = cluster::get_id(cluster); + uint32_t attribute_id = attribute::get_id(attribute); esp_matter_attr_bounds_t *bounds = attribute::get_bounds(attribute); if (bounds) { esp_rmaker_param_val_t min_val = app_rainmaker_get_rmaker_val(&bounds->min, cluster_id, attribute_id); @@ -245,7 +248,7 @@ static esp_err_t app_rainmaker_param_add_bounds(esp_rmaker_param_t *param, clust return ESP_OK; } -static int app_rainmaker_get_cluster_id_from_name(const char *param_name) +static uint32_t app_rainmaker_get_cluster_id_from_name(const char *param_name) { if (strcmp(param_name, ESP_RMAKER_DEF_POWER_NAME) == 0) { return OnOff::Id; @@ -259,7 +262,7 @@ static int app_rainmaker_get_cluster_id_from_name(const char *param_name) return 0; } -static int app_rainmaker_get_attribute_id_from_name(const char *param_name) +static uint32_t app_rainmaker_get_attribute_id_from_name(const char *param_name) { if (strcmp(param_name, ESP_RMAKER_DEF_POWER_NAME) == 0) { return OnOff::Attributes::OnOff::Id; @@ -273,7 +276,8 @@ static int app_rainmaker_get_attribute_id_from_name(const char *param_name) return 0; } -esp_err_t app_rainmaker_attribute_update(int endpoint_id, int cluster_id, int attribute_id, esp_matter_attr_val_t *val) +esp_err_t app_rainmaker_attribute_update(uint16_t endpoint_id, uint32_t cluster_id, uint32_t attribute_id, + esp_matter_attr_val_t *val) { const char *device_name = app_rainmaker_get_device_name_from_id(endpoint_id); const char *param_name = app_rainmaker_get_param_name_from_id(cluster_id, attribute_id); @@ -305,9 +309,9 @@ static esp_err_t write_cb(const esp_rmaker_device_t *device, const esp_rmaker_pa const char *device_name = esp_rmaker_device_get_name(device); const char *param_name = esp_rmaker_param_get_name(param); - int endpoint_id = app_rainmaker_get_endpoint_id_from_name(device_name); - int cluster_id = app_rainmaker_get_cluster_id_from_name(param_name); - int attribute_id = app_rainmaker_get_attribute_id_from_name(param_name); + uint16_t endpoint_id = app_rainmaker_get_endpoint_id_from_name(device_name); + uint32_t cluster_id = app_rainmaker_get_cluster_id_from_name(param_name); + uint32_t attribute_id = app_rainmaker_get_attribute_id_from_name(param_name); esp_matter_attr_val_t matter_val = app_rainmaker_get_matter_val((esp_rmaker_param_val_t *)&val, cluster_id, attribute_id); @@ -316,13 +320,13 @@ static esp_err_t write_cb(const esp_rmaker_device_t *device, const esp_rmaker_pa static esp_rmaker_device_t *app_rainmaker_device_create(const esp_rmaker_node_t *node, endpoint_t *endpoint) { - int endpoint_id = endpoint::get_id(endpoint); + uint16_t endpoint_id = endpoint::get_id(endpoint); const char *device_name = app_rainmaker_get_device_name_from_id(endpoint_id); if (!device_name) { return NULL; } /* Add this device only if endpoint_id has been handled */ - int device_type_id = endpoint::get_device_type_id(endpoint); + uint32_t device_type_id = endpoint::get_device_type_id(endpoint); const char *device_type = app_rainmaker_get_device_type_from_id(device_type_id); esp_rmaker_device_t *device = esp_rmaker_device_create(device_name, device_type, NULL); if (!device) { @@ -337,8 +341,8 @@ static esp_rmaker_device_t *app_rainmaker_device_create(const esp_rmaker_node_t static esp_rmaker_param_t *app_rainmaker_param_create(esp_rmaker_device_t *device, cluster_t *cluster, attribute_t *attribute) { - int cluster_id = cluster::get_id(cluster); - int attribute_id = attribute::get_id(attribute); + uint32_t cluster_id = cluster::get_id(cluster); + uint32_t attribute_id = attribute::get_id(attribute); const char *param_name = app_rainmaker_get_param_name_from_id(cluster_id, attribute_id); if (!param_name) { return NULL; diff --git a/examples/rainmaker_light/main/app_rainmaker.h b/examples/rainmaker_light/main/app_rainmaker.h index 93ffe000a..3819a6185 100644 --- a/examples/rainmaker_light/main/app_rainmaker.h +++ b/examples/rainmaker_light/main/app_rainmaker.h @@ -47,7 +47,8 @@ esp_err_t app_rainmaker_start(void); * @return ESP_OK on success. * @return error in case of failure. */ -esp_err_t app_rainmaker_attribute_update(int endpoint_id, int cluster_id, int attribute_id, esp_matter_attr_val_t *val); +esp_err_t app_rainmaker_attribute_update(uint16_t endpoint_id, uint32_t cluster_id, uint32_t attribute_id, + esp_matter_attr_val_t *val); #ifdef __cplusplus } diff --git a/examples/rainmaker_light/main/rainmaker_light.zap b/examples/rainmaker_light/main/rainmaker_light.zap deleted file mode 100644 index e86c3cefa..000000000 --- a/examples/rainmaker_light/main/rainmaker_light.zap +++ /dev/null @@ -1,5623 +0,0 @@ -{ - "featureLevel": 67, - "creator": "zap", - "keyValuePairs": [ - { - "key": "commandDiscovery", - "value": "1" - }, - { - "key": "defaultResponsePolicy", - "value": "always" - }, - { - "key": "manufacturerCodes", - "value": "0x1002" - } - ], - "package": [ - { - "pathRelativity": "relativeToZap", - "path": "../../../connectedhomeip/connectedhomeip/src/app/zap-templates/zcl/zcl.json", - "version": "ZCL Test Data", - "type": "zcl-properties" - }, - { - "pathRelativity": "relativeToZap", - "path": "../../../connectedhomeip/connectedhomeip/src/app/zap-templates/app-templates.json", - "version": "chip-v1", - "type": "gen-templates-json" - } - ], - "endpointTypes": [ - { - "name": "MA-rootdevice", - "deviceTypeName": "MA-rootdevice", - "deviceTypeCode": 22, - "deviceTypeProfileId": 259, - "clusters": [ - { - "name": "Identify", - "code": 3, - "mfgCode": null, - "define": "IDENTIFY_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "Identify", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "IdentifyQuery", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Identify", - "code": 3, - "mfgCode": null, - "define": "IDENTIFY_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [ - { - "name": "IdentifyQueryResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "identify time", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Groups", - "code": 4, - "mfgCode": null, - "define": "GROUPS_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "AddGroup", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "ViewGroup", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "GetGroupMembership", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "RemoveGroup", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "RemoveAllGroups", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "AddGroupIfIdentifying", - "code": 5, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Groups", - "code": 4, - "mfgCode": null, - "define": "GROUPS_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [ - { - "name": "AddGroupResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "ViewGroupResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "GetGroupMembershipResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "RemoveGroupResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "name support", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Scenes", - "code": 5, - "mfgCode": null, - "define": "SCENES_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "AddScene", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "ViewScene", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "RemoveScene", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "RemoveAllScenes", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "StoreScene", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "RecallScene", - "code": 5, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "GetSceneMembership", - "code": 6, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Scenes", - "code": 5, - "mfgCode": null, - "define": "SCENES_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [ - { - "name": "AddSceneResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "ViewSceneResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "RemoveSceneResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "RemoveAllScenesResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "StoreSceneResponse", - "code": 4, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "GetSceneMembershipResponse", - "code": 6, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "scene count", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "current scene", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "current group", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "scene valid", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "name support", - "code": 4, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Descriptor", - "code": 29, - "mfgCode": null, - "define": "DESCRIPTOR_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Descriptor", - "code": 29, - "mfgCode": null, - "define": "DESCRIPTOR_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [], - "attributes": [ - { - "name": "device list", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "server list", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "client list", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "parts list", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Basic", - "code": 40, - "mfgCode": null, - "define": "BASIC_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Basic", - "code": 40, - "mfgCode": null, - "define": "BASIC_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [], - "attributes": [ - { - "name": "InteractionModelVersion", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "VendorName", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "VendorID", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ProductName", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ProductID", - "code": 4, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "NodeLabel", - "code": 5, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "Location", - "code": 6, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "HardwareVersion", - "code": 7, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "HardwareVersionString", - "code": 8, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SoftwareVersion", - "code": 9, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SoftwareVersionString", - "code": 10, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ManufacturingDate", - "code": 11, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "PartNumber", - "code": 12, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ProductURL", - "code": 13, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ProductLabel", - "code": 14, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SerialNumber", - "code": 15, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "LocalConfigDisabled", - "code": 16, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "Reachable", - "code": 17, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "UniqueID", - "code": 18, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "OTA Software Update Provider", - "code": 41, - "mfgCode": null, - "define": "OTA_PROVIDER_CLUSTER", - "side": "client", - "enabled": 1, - "commands": [ - { - "name": "QueryImage", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "ApplyUpdateRequest", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "NotifyUpdateApplied", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "OTA Software Update Provider", - "code": 41, - "mfgCode": null, - "define": "OTA_PROVIDER_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [ - { - "name": "QueryImageResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "ApplyUpdateResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [] - }, - { - "name": "OTA Software Update Requestor", - "code": 42, - "mfgCode": null, - "define": "OTA_REQUESTOR_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "AnnounceOtaProvider", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "OTA Software Update Requestor", - "code": 42, - "mfgCode": null, - "define": "OTA_REQUESTOR_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [], - "attributes": [ - { - "name": "default ota provider", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "update possible", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "General Commissioning", - "code": 48, - "mfgCode": null, - "define": "GENERAL_COMMISSIONING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ArmFailSafe", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "SetRegulatoryConfig", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "CommissioningComplete", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "General Commissioning", - "code": 48, - "mfgCode": null, - "define": "GENERAL_COMMISSIONING_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "ArmFailSafeResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "SetRegulatoryConfigResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "CommissioningCompleteResponse", - "code": 5, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "Breadcrumb", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000000000000000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "BasicCommissioningInfoList", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RegulatoryConfig", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LocationCapability", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "6", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Network Commissioning", - "code": 49, - "mfgCode": null, - "define": "NETWORK_COMMISSIONING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ScanNetworks", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "AddOrUpdateWiFiNetwork", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "AddOrUpdateThreadNetwork", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "RemoveNetwork", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "ConnectNetwork", - "code": 6, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "ReorderNetwork", - "code": 8, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Network Commissioning", - "code": 49, - "mfgCode": null, - "define": "NETWORK_COMMISSIONING_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "ScanNetworksResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "NetworkConfigResponse", - "code": 5, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "ConnectNetworkResponse", - "code": 7, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "MaxNetworks", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Networks", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ScanMaxTimeSeconds", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ConnectMaxTimeSeconds", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "InterfaceEnabled", - "code": 4, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LastNetworkingStatus", - "code": 5, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LastNetworkID", - "code": 6, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LastConnectErrorValue", - "code": 7, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Diagnostic Logs", - "code": 50, - "mfgCode": null, - "define": "DIAGNOSTIC_LOGS_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "RetrieveLogsRequest", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [] - }, - { - "name": "General Diagnostics", - "code": 51, - "mfgCode": null, - "define": "GENERAL_DIAGNOSTICS_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "General Diagnostics", - "code": 51, - "mfgCode": null, - "define": "GENERAL_DIAGNOSTICS_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [], - "attributes": [ - { - "name": "NetworkInterfaces", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RebootCount", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "UpTime", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000000000000000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "TotalOperationalHours", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00000000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "BootReasons", - "code": 4, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ActiveHardwareFaults", - "code": 5, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ActiveRadioFaults", - "code": 6, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ActiveNetworkFaults", - "code": 7, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Software Diagnostics", - "code": 52, - "mfgCode": null, - "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ResetWatermarks", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Software Diagnostics", - "code": 52, - "mfgCode": null, - "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [], - "attributes": [ - { - "name": "ThreadMetrics", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "CurrentHeapFree", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000000000000000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "CurrentHeapUsed", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000000000000000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "CurrentHeapHighWatermark", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000000000000000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Thread Network Diagnostics", - "code": 53, - "mfgCode": null, - "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ResetCounts", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Thread Network Diagnostics", - "code": 53, - "mfgCode": null, - "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [], - "attributes": [ - { - "name": "channel", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RoutingRole", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "NetworkName", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "PanId", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ExtendedPanId", - "code": 4, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000000000000000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "MeshLocalPrefix", - "code": 5, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "OverrunCount", - "code": 6, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000000000000000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "NeighborTableList", - "code": 7, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RouteTableList", - "code": 8, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "PartitionId", - "code": 9, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "weighting", - "code": 10, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "DataVersion", - "code": 11, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "StableDataVersion", - "code": 12, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "LeaderRouterId", - "code": 13, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "DetachedRoleCount", - "code": 14, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ChildRoleCount", - "code": 15, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RouterRoleCount", - "code": 16, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "LeaderRoleCount", - "code": 17, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "AttachAttemptCount", - "code": 18, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "PartitionIdChangeCount", - "code": 19, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "BetterPartitionAttachAttemptCount", - "code": 20, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ParentChangeCount", - "code": 21, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxTotalCount", - "code": 22, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxUnicastCount", - "code": 23, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxBroadcastCount", - "code": 24, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxAckRequestedCount", - "code": 25, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxAckedCount", - "code": 26, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxNoAckRequestedCount", - "code": 27, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxDataCount", - "code": 28, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxDataPollCount", - "code": 29, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxBeaconCount", - "code": 30, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxBeaconRequestCount", - "code": 31, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxOtherCount", - "code": 32, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxRetryCount", - "code": 33, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxDirectMaxRetryExpiryCount", - "code": 34, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxIndirectMaxRetryExpiryCount", - "code": 35, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxErrCcaCount", - "code": 36, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxErrAbortCount", - "code": 37, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxErrBusyChannelCount", - "code": 38, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxTotalCount", - "code": 39, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxUnicastCount", - "code": 40, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxBroadcastCount", - "code": 41, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxDataCount", - "code": 42, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxDataPollCount", - "code": 43, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxBeaconCount", - "code": 44, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxBeaconRequestCount", - "code": 45, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxOtherCount", - "code": 46, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxAddressFilteredCount", - "code": 47, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxDestAddrFilteredCount", - "code": 48, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxDuplicatedCount", - "code": 49, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxErrNoFrameCount", - "code": 50, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxErrUnknownNeighborCount", - "code": 51, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxErrInvalidSrcAddrCount", - "code": 52, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxErrSecCount", - "code": 53, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxErrFcsCount", - "code": 54, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxErrOtherCount", - "code": 55, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ActiveTimestamp", - "code": 56, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000000000000000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "PendingTimestamp", - "code": 57, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000000000000000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "delay", - "code": 58, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SecurityPolicy", - "code": 59, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ChannelMask", - "code": 60, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "OperationalDatasetComponents", - "code": 61, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ActiveNetworkFaultsList", - "code": 62, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x000F", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "WiFi Network Diagnostics", - "code": 54, - "mfgCode": null, - "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ResetCounts", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "WiFi Network Diagnostics", - "code": 54, - "mfgCode": null, - "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [], - "attributes": [ - { - "name": "bssid", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SecurityType", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "WiFiVersion", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ChannelNumber", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "Rssi", - "code": 4, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "BeaconLostCount", - "code": 5, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00000000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "BeaconRxCount", - "code": 6, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00000000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "PacketMulticastRxCount", - "code": 7, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00000000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "PacketMulticastTxCount", - "code": 8, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00000000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "PacketUnicastRxCount", - "code": 9, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00000000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "PacketUnicastTxCount", - "code": 10, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00000000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "CurrentMaxRate", - "code": 11, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000000000000000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "OverrunCount", - "code": 12, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000000000000000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "AdministratorCommissioning", - "code": 60, - "mfgCode": null, - "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "OpenCommissioningWindow", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "OpenBasicCommissioningWindow", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "RevokeCommissioning", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "AdministratorCommissioning", - "code": 60, - "mfgCode": null, - "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [], - "attributes": [ - { - "name": "WindowStatus", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AdminFabricIndex", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AdminVendorId", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Operational Credentials", - "code": 62, - "mfgCode": null, - "define": "OPERATIONAL_CREDENTIALS_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "AttestationRequest", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "CertificateChainRequest", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "OpCSRRequest", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "AddNOC", - "code": 6, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "UpdateNOC", - "code": 7, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "UpdateFabricLabel", - "code": 9, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "RemoveFabric", - "code": 10, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "AddTrustedRootCertificate", - "code": 11, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "RemoveTrustedRootCertificate", - "code": 12, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Operational Credentials", - "code": 62, - "mfgCode": null, - "define": "OPERATIONAL_CREDENTIALS_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "AttestationResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "CertificateChainResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "OpCSRResponse", - "code": 5, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "NOCResponse", - "code": 8, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "fabrics list", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SupportedFabrics", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "CommissionedFabrics", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TrustedRootCertificates", - "code": 4, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "CurrentFabricIndex", - "code": 5, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Fixed Label", - "code": 64, - "mfgCode": null, - "define": "FIXED_LABEL_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [], - "attributes": [] - }, - { - "name": "Fixed Label", - "code": 64, - "mfgCode": null, - "define": "FIXED_LABEL_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [], - "attributes": [ - { - "name": "label list", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "User Label", - "code": 65, - "mfgCode": null, - "define": "USER_LABEL_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [], - "attributes": [] - }, - { - "name": "User Label", - "code": 65, - "mfgCode": null, - "define": "USER_LABEL_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [], - "attributes": [ - { - "name": "label list", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - } - ] - }, - { - "name": "MA-dimmablelight", - "deviceTypeName": "MA-dimmablelight", - "deviceTypeCode": 257, - "deviceTypeProfileId": 259, - "clusters": [ - { - "name": "Identify", - "code": 3, - "mfgCode": null, - "define": "IDENTIFY_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "Identify", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "IdentifyQuery", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "TriggerEffect", - "code": 64, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Identify", - "code": 3, - "mfgCode": null, - "define": "IDENTIFY_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "IdentifyQueryResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "identify time", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "identify type", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Groups", - "code": 4, - "mfgCode": null, - "define": "GROUPS_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "AddGroup", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "ViewGroup", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "GetGroupMembership", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "RemoveGroup", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "RemoveAllGroups", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "AddGroupIfIdentifying", - "code": 5, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Groups", - "code": 4, - "mfgCode": null, - "define": "GROUPS_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [ - { - "name": "AddGroupResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "ViewGroupResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "GetGroupMembershipResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "RemoveGroupResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "name support", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Scenes", - "code": 5, - "mfgCode": null, - "define": "SCENES_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "AddScene", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "ViewScene", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "RemoveScene", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "RemoveAllScenes", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "StoreScene", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "RecallScene", - "code": 5, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "GetSceneMembership", - "code": 6, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "EnhancedAddScene", - "code": 64, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "EnhancedViewScene", - "code": 65, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "CopyScene", - "code": 66, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Scenes", - "code": 5, - "mfgCode": null, - "define": "SCENES_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [ - { - "name": "AddSceneResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "ViewSceneResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "RemoveSceneResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "RemoveAllScenesResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "StoreSceneResponse", - "code": 4, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "GetSceneMembershipResponse", - "code": 6, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "scene count", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "current scene", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "current group", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "scene valid", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "name support", - "code": 4, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "On/Off", - "code": 6, - "mfgCode": null, - "define": "ON_OFF_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "Off", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "On", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "Toggle", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "OffWithEffect", - "code": 64, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "OnWithRecallGlobalScene", - "code": 65, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "OnWithTimedOff", - "code": 66, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "On/Off", - "code": 6, - "mfgCode": null, - "define": "ON_OFF_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [], - "attributes": [ - { - "name": "OnOff", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "GlobalSceneControl", - "code": 16384, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x01", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "OnTime", - "code": 16385, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "OffWaitTime", - "code": 16386, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "StartUpOnOff", - "code": 16387, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Level Control", - "code": 8, - "mfgCode": null, - "define": "LEVEL_CONTROL_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "MoveToLevel", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "Move", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "Step", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "Stop", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "MoveToLevelWithOnOff", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "MoveWithOnOff", - "code": 5, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "StepWithOnOff", - "code": 6, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "StopWithOnOff", - "code": 7, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Level Control", - "code": 8, - "mfgCode": null, - "define": "LEVEL_CONTROL_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [], - "attributes": [ - { - "name": "current level", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "remaining time", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "min level", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "max level", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xFF", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "current frequency", - "code": 4, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "min frequency", - "code": 5, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "max frequency", - "code": 6, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "options", - "code": 15, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "on off transition time", - "code": 16, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "on level", - "code": 17, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xFE", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "on transition time", - "code": 18, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "off transition time", - "code": 19, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "default move rate", - "code": 20, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "start up current level", - "code": 16384, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Descriptor", - "code": 29, - "mfgCode": null, - "define": "DESCRIPTOR_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Descriptor", - "code": 29, - "mfgCode": null, - "define": "DESCRIPTOR_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [], - "attributes": [ - { - "name": "device list", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "server list", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "client list", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "parts list", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Basic", - "code": 40, - "mfgCode": null, - "define": "BASIC_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Basic", - "code": 40, - "mfgCode": null, - "define": "BASIC_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [], - "attributes": [ - { - "name": "InteractionModelVersion", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "VendorName", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "VendorID", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ProductName", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ProductID", - "code": 4, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "NodeLabel", - "code": 5, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "Location", - "code": 6, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "HardwareVersion", - "code": 7, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "HardwareVersionString", - "code": 8, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SoftwareVersion", - "code": 9, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SoftwareVersionString", - "code": 10, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Bridged Device Basic", - "code": 57, - "mfgCode": null, - "define": "BRIDGED_DEVICE_BASIC_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [], - "attributes": [ - { - "name": "ProductURL", - "code": 13, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Color Control", - "code": 768, - "mfgCode": null, - "define": "COLOR_CONTROL_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "MoveToHue", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "MoveHue", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "StepHue", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "MoveToSaturation", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "MoveSaturation", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "StepSaturation", - "code": 5, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "MoveToHueAndSaturation", - "code": 6, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "MoveToColor", - "code": 7, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "MoveColor", - "code": 8, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "StepColor", - "code": 9, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "MoveToColorTemperature", - "code": 10, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "EnhancedMoveToHue", - "code": 64, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "EnhancedMoveHue", - "code": 65, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "EnhancedStepHue", - "code": 66, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "EnhancedMoveToHueAndSaturation", - "code": 67, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "ColorLoopSet", - "code": 68, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "StopMoveStep", - "code": 71, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "MoveColorTemperature", - "code": 75, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "StepColorTemperature", - "code": 76, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Color Control", - "code": 768, - "mfgCode": null, - "define": "COLOR_CONTROL_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [], - "attributes": [ - { - "name": "current hue", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "current saturation", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "remaining time", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "current x", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x616B", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "current y", - "code": 4, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x607D", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "drift compensation", - "code": 5, - "mfgCode": null, - "side": "server", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "compensation text", - "code": 6, - "mfgCode": null, - "side": "server", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "color temperature", - "code": 7, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00FA", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "color mode", - "code": 8, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x01", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "color control options", - "code": 15, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "number of primaries", - "code": 16, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "enhanced current hue", - "code": 16384, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "enhanced color mode", - "code": 16385, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x01", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "color loop active", - "code": 16386, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "color loop direction", - "code": 16387, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "color loop time", - "code": 16388, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0019", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "color loop start enhanced hue", - "code": 16389, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x2300", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "color loop stored enhanced hue", - "code": 16390, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "color capabilities", - "code": 16394, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "color temp physical min", - "code": 16395, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "color temp physical max", - "code": 16396, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xFEFF", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "couple color temp to level min-mireds", - "code": 16397, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "start up color temperature mireds", - "code": 16400, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - } - ] - } - ], - "endpoints": [ - { - "endpointTypeName": "MA-rootdevice", - "endpointTypeIndex": 0, - "profileId": 259, - "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 - }, - { - "endpointTypeName": "MA-dimmablelight", - "endpointTypeIndex": 1, - "profileId": 259, - "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 257 - } - ], - "log": [] -} diff --git a/examples/switch/main/app_driver.cpp b/examples/switch/main/app_driver.cpp index 4929ce166..40ce2576b 100644 --- a/examples/switch/main/app_driver.cpp +++ b/examples/switch/main/app_driver.cpp @@ -25,9 +25,9 @@ using namespace esp_matter; using namespace esp_matter::cluster; static const char *TAG = "app_driver"; -extern int switch_endpoint_id; -static int g_cluster_id = kInvalidClusterId; -static int g_command_id = kInvalidCommandId; +extern uint16_t switch_endpoint_id; +static uint32_t g_cluster_id = kInvalidClusterId; +static uint32_t g_command_id = kInvalidCommandId; static esp_err_t app_driver_bound_console_handler(int argc, char **argv) { @@ -37,9 +37,9 @@ static esp_err_t app_driver_bound_console_handler(int argc, char **argv) "\tinvoke: . " "Example: matter esp bound invoke 0x0001 0x0006 0x0002.\n"); } else if (argc == 4 && strncmp(argv[0], "invoke", sizeof("invoke")) == 0) { - int endpoint_id = strtol((const char *)&argv[1][2], NULL, 16); - int cluster_id = strtol((const char *)&argv[2][2], NULL, 16); - int command_id = strtol((const char *)&argv[3][2], NULL, 16); + uint16_t endpoint_id = strtol((const char *)&argv[1][2], NULL, 16); + uint32_t cluster_id = strtol((const char *)&argv[2][2], NULL, 16); + uint32_t command_id = strtol((const char *)&argv[3][2], NULL, 16); g_cluster_id = cluster_id; g_command_id = command_id; @@ -59,11 +59,11 @@ static esp_err_t app_driver_client_console_handler(int argc, char **argv) "\tinvoke: . " "Example: matter esp client invoke 0x0001 0xBC5C01 0x0001 0x0006 0x0002.\n"); } else if (argc == 6 && strncmp(argv[0], "invoke", sizeof("invoke")) == 0) { - int fabric_index = strtol((const char *)&argv[1][2], NULL, 16); - int node_id = strtol((const char *)&argv[2][2], NULL, 16); - int remote_endpoint_id = strtol((const char *)&argv[3][2], NULL, 16); - int cluster_id = strtol((const char *)&argv[4][2], NULL, 16); - int command_id = strtol((const char *)&argv[5][2], NULL, 16); + uint8_t fabric_index = strtol((const char *)&argv[1][2], NULL, 16); + uint64_t node_id = strtol((const char *)&argv[2][2], NULL, 16); + uint16_t remote_endpoint_id = strtol((const char *)&argv[3][2], NULL, 16); + uint32_t cluster_id = strtol((const char *)&argv[4][2], NULL, 16); + uint32_t command_id = strtol((const char *)&argv[5][2], NULL, 16); g_cluster_id = cluster_id; g_command_id = command_id; @@ -98,7 +98,8 @@ static void app_driver_register_commands() esp_matter_console_add_command(&client_command); } -void app_driver_client_command_callback(client::peer_device_t *peer_device, int remote_endpoint_id, void *priv_data) +void app_driver_client_command_callback(client::peer_device_t *peer_device, uint16_t remote_endpoint_id, + void *priv_data) { /** TODO: Find a better way to get the cluster_id and command_id. Once done, move the console commands to esp_matter_client. */ @@ -116,16 +117,17 @@ void app_driver_client_command_callback(client::peer_device_t *peer_device, int static void app_driver_button_toggle_cb(void *arg) { ESP_LOGI(TAG, "Toggle button pressed"); - int endpoint_id = switch_endpoint_id; - int cluster_id = OnOff::Id; - int command_id = OnOff::Commands::Toggle::Id; + uint16_t endpoint_id = switch_endpoint_id; + uint32_t cluster_id = OnOff::Id; + uint32_t command_id = OnOff::Commands::Toggle::Id; g_cluster_id = cluster_id; g_command_id = command_id; client::cluster_update(endpoint_id, cluster_id); } -esp_err_t app_driver_attribute_update(int endpoint_id, int cluster_id, int attribute_id, esp_matter_attr_val_t *val) +esp_err_t app_driver_attribute_update(uint16_t endpoint_id, uint32_t cluster_id, uint32_t attribute_id, + esp_matter_attr_val_t *val) { /* Nothing to do here */ return ESP_OK; @@ -138,13 +140,13 @@ static esp_err_t app_driver_attribute_set_defaults() node_t *node = node::get(); endpoint_t *endpoint = endpoint::get_first(node); while (endpoint) { - int endpoint_id = endpoint::get_id(endpoint); + uint16_t endpoint_id = endpoint::get_id(endpoint); cluster_t *cluster = cluster::get_first(endpoint); while (cluster) { - int cluster_id = cluster::get_id(cluster); + uint32_t cluster_id = cluster::get_id(cluster); attribute_t *attribute = attribute::get_first(cluster); while (attribute) { - int attribute_id = attribute::get_id(attribute); + uint32_t attribute_id = attribute::get_id(attribute); esp_matter_attr_val_t val = esp_matter_invalid(NULL); err |= attribute::get_val(attribute, &val); err |= app_driver_attribute_update(endpoint_id, cluster_id, attribute_id, &val); diff --git a/examples/switch/main/app_main.cpp b/examples/switch/main/app_main.cpp index 9db0cc4fc..96e01aafa 100644 --- a/examples/switch/main/app_main.cpp +++ b/examples/switch/main/app_main.cpp @@ -19,7 +19,7 @@ #include static const char *TAG = "app_main"; -int switch_endpoint_id = 0; +uint16_t switch_endpoint_id = 0; using namespace esp_matter; using namespace esp_matter::attribute; @@ -36,8 +36,8 @@ static void app_event_cb(const ChipDeviceEvent *event, intptr_t arg) ESP_LOGI(TAG, "Current free heap: %zu", heap_caps_get_free_size(MALLOC_CAP_8BIT)); } -static esp_err_t app_attribute_update_cb(callback_type_t type, int endpoint_id, int cluster_id, int attribute_id, - esp_matter_attr_val_t *val, void *priv_data) +static esp_err_t app_attribute_update_cb(callback_type_t type, uint16_t endpoint_id, uint32_t cluster_id, + uint32_t attribute_id, esp_matter_attr_val_t *val, void *priv_data) { esp_err_t err = ESP_OK; diff --git a/examples/switch/main/app_priv.h b/examples/switch/main/app_priv.h index 6d3351821..e3c4415c6 100644 --- a/examples/switch/main/app_priv.h +++ b/examples/switch/main/app_priv.h @@ -33,4 +33,5 @@ esp_err_t app_driver_init(void); * @return ESP_OK on success. * @return error in case of failure. */ -esp_err_t app_driver_attribute_update(int endpoint_id, int cluster_id, int attribute_id, esp_matter_attr_val_t *val); +esp_err_t app_driver_attribute_update(uint16_t endpoint_id, uint32_t cluster_id, uint32_t attribute_id, + esp_matter_attr_val_t *val); diff --git a/examples/zap_light/main/app_driver.cpp b/examples/zap_light/main/app_driver.cpp index 8f0510365..b6e179982 100644 --- a/examples/zap_light/main/app_driver.cpp +++ b/examples/zap_light/main/app_driver.cpp @@ -20,7 +20,7 @@ using namespace esp_matter; static const char *TAG = "app_driver"; -extern int light_endpoint_id; +extern uint16_t light_endpoint_id; /* Do any conversions/remapping for the actual value here */ static esp_err_t app_driver_light_set_power(esp_matter_attr_val_t *val) @@ -49,9 +49,9 @@ static esp_err_t app_driver_light_set_saturation(esp_matter_attr_val_t *val) static void app_driver_button_toggle_cb(void *arg) { ESP_LOGI(TAG, "Toggle button pressed"); - int endpoint_id = light_endpoint_id; - int cluster_id = OnOff::Id; - int attribute_id = OnOff::Attributes::OnOff::Id; + uint16_t endpoint_id = light_endpoint_id; + uint32_t cluster_id = OnOff::Id; + uint32_t attribute_id = OnOff::Attributes::OnOff::Id; uint8_t value; attribute::get_val_raw(endpoint_id, cluster_id, attribute_id, &value, sizeof(uint8_t)); @@ -60,7 +60,8 @@ static void app_driver_button_toggle_cb(void *arg) attribute::update(endpoint_id, cluster_id, attribute_id, &val); } -esp_err_t app_driver_attribute_update(int endpoint_id, int cluster_id, int attribute_id, esp_matter_attr_val_t *val) +esp_err_t app_driver_attribute_update(uint16_t endpoint_id, uint32_t cluster_id, uint32_t attribute_id, + esp_matter_attr_val_t *val) { esp_err_t err = ESP_OK; if (endpoint_id == light_endpoint_id) { @@ -90,9 +91,9 @@ esp_err_t app_driver_attribute_set_defaults() /* Get the default value (current value) from matter submodule and update the app_driver */ esp_err_t err = ESP_OK; uint8_t value; - int endpoint_id = 0; - int cluster_id = 0; - int attribute_id = 0; + uint16_t endpoint_id = 0; + uint32_t cluster_id = 0; + uint32_t attribute_id = 0; esp_matter_attr_val_t val = esp_matter_invalid(NULL); endpoint_id = light_endpoint_id; diff --git a/examples/zap_light/main/app_main.cpp b/examples/zap_light/main/app_main.cpp index d6b87a27e..b24a18c7f 100644 --- a/examples/zap_light/main/app_main.cpp +++ b/examples/zap_light/main/app_main.cpp @@ -21,7 +21,7 @@ using namespace esp_matter; using namespace esp_matter::attribute; static const char *TAG = "app_main"; -int light_endpoint_id = 0; +uint16_t light_endpoint_id = 0; static void app_event_cb(const ChipDeviceEvent *event, intptr_t arg) { @@ -34,8 +34,8 @@ static void app_event_cb(const ChipDeviceEvent *event, intptr_t arg) ESP_LOGI(TAG, "Current free heap: %zu", heap_caps_get_free_size(MALLOC_CAP_8BIT)); } -static esp_err_t app_attribute_update_cb(callback_type_t type, int endpoint_id, int cluster_id, int attribute_id, - esp_matter_attr_val_t *val, void *priv_data) +static esp_err_t app_attribute_update_cb(callback_type_t type, uint16_t endpoint_id, uint32_t cluster_id, + uint32_t attribute_id, esp_matter_attr_val_t *val, void *priv_data) { esp_err_t err = ESP_OK; diff --git a/examples/zap_light/main/app_priv.h b/examples/zap_light/main/app_priv.h index 70387a317..459fcab1d 100644 --- a/examples/zap_light/main/app_priv.h +++ b/examples/zap_light/main/app_priv.h @@ -43,7 +43,8 @@ esp_err_t app_driver_init(void); * @return ESP_OK on success. * @return error in case of failure. */ -esp_err_t app_driver_attribute_update(int endpoint_id, int cluster_id, int attribute_id, esp_matter_attr_val_t *val); +esp_err_t app_driver_attribute_update(uint16_t endpoint_id, uint32_t cluster_id, uint32_t attribute_id, + esp_matter_attr_val_t *val); /** Set driver defaults * diff --git a/examples/zigbee_bridge/main/app_main.cpp b/examples/zigbee_bridge/main/app_main.cpp index 7bb95a227..50e2f6d0f 100644 --- a/examples/zigbee_bridge/main/app_main.cpp +++ b/examples/zigbee_bridge/main/app_main.cpp @@ -34,8 +34,8 @@ static void app_event_cb(const ChipDeviceEvent *event, intptr_t arg) ESP_LOGI(TAG, "Current free heap: %zu", heap_caps_get_free_size(MALLOC_CAP_8BIT)); } -static esp_err_t app_attribute_update_cb(callback_type_t type, int endpoint_id, int cluster_id, int attribute_id, - esp_matter_attr_val_t *val, void *priv_data) +static esp_err_t app_attribute_update_cb(callback_type_t type, uint16_t endpoint_id, uint32_t cluster_id, + uint32_t attribute_id, esp_matter_attr_val_t *val, void *priv_data) { esp_err_t err = ESP_OK; diff --git a/examples/zigbee_bridge/main/zigbee_bridge.cpp b/examples/zigbee_bridge/main/zigbee_bridge.cpp index dd024e626..194f3d368 100644 --- a/examples/zigbee_bridge/main/zigbee_bridge.cpp +++ b/examples/zigbee_bridge/main/zigbee_bridge.cpp @@ -120,7 +120,8 @@ void zigbee_bridge_send_off(zb_uint8_t buf, zb_uint16_t zigbee_shortaddr) ZB_ZCL_CMD_ON_OFF_OFF_ID, NULL); } -esp_err_t zigbee_bridge_attribute_update(int endpoint_id, int cluster_id, int attribute_id, esp_matter_attr_val_t *val) +esp_err_t zigbee_bridge_attribute_update(uint16_t endpoint_id, uint32_t cluster_id, uint32_t attribute_id, + esp_matter_attr_val_t *val) { app_zigbee_bridge_device_t *zigbee_device = app_bridge_get_zigbee_device_by_matter_endpointid(endpoint_id); if (zigbee_device && zigbee_device->dev && zigbee_device->dev->endpoint) { diff --git a/examples/zigbee_bridge/main/zigbee_bridge.h b/examples/zigbee_bridge/main/zigbee_bridge.h index b44fe7166..cc032c994 100644 --- a/examples/zigbee_bridge/main/zigbee_bridge.h +++ b/examples/zigbee_bridge/main/zigbee_bridge.h @@ -23,7 +23,8 @@ void zigbee_bridge_match_bridged_onoff_light(zb_bufid_t bufid); void zigbee_bridge_match_bridged_onoff_light_timeout(zb_bufid_t bufid); -esp_err_t zigbee_bridge_attribute_update(int endpoint_id, int cluster_id, int attribute_id, esp_matter_attr_val_t *val); +esp_err_t zigbee_bridge_attribute_update(uint16_t endpoint_id, uint32_t cluster_id, uint32_t attribute_id, + esp_matter_attr_val_t *val); #ifdef __cplusplus }