diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 56a2e30..6940ca4 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,5 +1,29 @@ # Espressif Zigbee SDK Release Notes +## 26-Apr-2024 +1.3.0 version release of ESP-ZIGBEE-SDK is based on esp-idf v5.1.3 + +### Features +- Updated esp-zboss-lib to v1.3.0 +- Updated esp-zigbee-lib to v1.3.0 +- Supported ZCL commissioning cluster +- Supported devive sleep before join network +- Supported the parameter of pointer type for scheduler_alarm +- Supported event fd setting in application + +### Bug Fixes +- Fixed the transition id checking for touchlink identify command +- Fixed the zdo binding user callback +- Disabled response default command for broadcasted frame +- Closes: https://github.com/espressif/esp-zigbee-sdk/issues/276 +- Closes: https://github.com/espressif/esp-zigbee-sdk/issues/310 +- Closes: https://github.com/espressif/esp-zigbee-sdk/issues/314 +- Closes: https://github.com/espressif/esp-zigbee-sdk/issues/318 +- Closes: https://github.com/espressif/esp-zigbee-sdk/issues/325 + +### Break Changes +- Renamed `esp_zb_radio_mode_t`, `esp_zb_host_connection_mode_t`, `zb_esp_uart_init_mode` and `esp_zb_serial_mode_t` + ## 12-Apr-2024 1.2.3 version release of ESP-ZIGBEE-SDK is based on esp-idf v5.1.3 diff --git a/components/esp-zigbee-lib/idf_component.yml b/components/esp-zigbee-lib/idf_component.yml index dd6677a..c7ba820 100644 --- a/components/esp-zigbee-lib/idf_component.yml +++ b/components/esp-zigbee-lib/idf_component.yml @@ -1,4 +1,4 @@ -version: "1.2.3" +version: "1.3.0" description: esp-zigbee library component url: https://github.com/espressif/esp-zigbee-sdk dependencies: diff --git a/components/esp-zigbee-lib/include/cli/zb_esp_cli.h b/components/esp-zigbee-lib/include/cli/zb_esp_cli.h index 22699c0..c4f2356 100644 --- a/components/esp-zigbee-lib/include/cli/zb_esp_cli.h +++ b/components/esp-zigbee-lib/include/cli/zb_esp_cli.h @@ -120,6 +120,12 @@ bool esp_zb_cli_agent_ep_handler_report(uint8_t bufid); */ bool esp_zb_cli_agent_ep_handler_ping(uint8_t bufid); +/** + * @brief Register the esp zigbee cli command + * + */ +void zb_cli_register_command(void); + #ifdef __cplusplus } #endif diff --git a/components/esp-zigbee-lib/include/esp_zigbee_attribute.h b/components/esp-zigbee-lib/include/esp_zigbee_attribute.h index aed02c8..b488764 100644 --- a/components/esp-zigbee-lib/include/esp_zigbee_attribute.h +++ b/components/esp-zigbee-lib/include/esp_zigbee_attribute.h @@ -242,6 +242,20 @@ esp_err_t esp_zb_time_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint1 */ esp_err_t esp_zb_binary_input_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p); +/** + * @brief Add an attribute in Commissioning cluster. + * + * @param[in] attr_list A pointer to attribute list @ref esp_zb_attribute_list_s + * @param[in] attr_id An attribute id to be added + * @param[in] value_p A pointer to attribute value wants to add + * + * @return + * - ESP_OK on success + * - ESP_ERR_INVALID_ARG if attribute is existed or unsupported + * + */ +esp_err_t esp_zb_commissioning_cluster_add_attr(esp_zb_attribute_list_t *attr_list, uint16_t attr_id, void *value_p); + /** * @brief Add an attribute in shade config cluster. * diff --git a/components/esp-zigbee-lib/include/esp_zigbee_cluster.h b/components/esp-zigbee-lib/include/esp_zigbee_cluster.h index 1a43629..2383a9d 100644 --- a/components/esp-zigbee-lib/include/esp_zigbee_cluster.h +++ b/components/esp-zigbee-lib/include/esp_zigbee_cluster.h @@ -168,6 +168,19 @@ esp_zb_attribute_list_t *esp_zb_shade_config_cluster_create(esp_zb_shade_config_ */ esp_zb_attribute_list_t *esp_zb_binary_input_cluster_create(esp_zb_binary_input_cluster_cfg_t *binary_input_cfg); +/** + * @brief Create a standard commissioning cluster attribute list. + * + * @note This only contains the mandatory attribute. The ZCL spec 13.2.1.1 strongly recommended that this cluster only + * be deplayed on a single device endpoint, so we only supports single cluster instance for time being. Creating + * multiple clusters on different endpoints may cause unexpected behaviour. + * @param[in] commissioning_cfg Configuration parameters for this cluster defined by @ref esp_zb_commissioning_cluster_cfg_s + * + * @return Pointer to attribute list @ref esp_zb_attribute_list_s + * + */ +esp_zb_attribute_list_t *esp_zb_commissioning_cluster_create(esp_zb_commissioning_cluster_cfg_t *commissioning_cfg); + /** * @brief Create a standard door lock cluster attribute list. * @@ -588,6 +601,20 @@ esp_err_t esp_zb_cluster_list_add_shade_config_cluster(esp_zb_cluster_list_t *cl */ esp_err_t esp_zb_cluster_list_add_binary_input_cluster(esp_zb_cluster_list_t *cluster_list, esp_zb_attribute_list_t *attr_list, uint8_t role_mask); +/** + * @brief Add Commissioning cluster (attribute list) in a cluster list. + * + * @param[in] cluster_list A pointer to cluster list @ref esp_zb_cluster_list_s + * @param[in] attr_list An attribute list which wants to add + * @param[in] role_mask A role of server or client for this cluster (attribute list) refer to esp_zb_zcl_cluster_role_t + * + * @return + * - ESP_OK on success + * - ESP_ERR_INVALID_ARG if cluster list not initialized + * + */ +esp_err_t esp_zb_cluster_list_add_commissioning_cluster(esp_zb_cluster_list_t *cluster_list, esp_zb_attribute_list_t *attr_list, uint8_t role_mask); + /** * @brief Add ias zone cluster (attribute list) in a cluster list. * @@ -1126,6 +1153,20 @@ esp_err_t esp_zb_cluster_list_update_shade_config_cluster(esp_zb_cluster_list_t */ esp_err_t esp_zb_cluster_list_update_binary_input_cluster(esp_zb_cluster_list_t *cluster_list, esp_zb_attribute_list_t *attr_list, uint8_t role_mask); +/** + * @brief Update Commissioning cluster (attribute list) in a cluster list. + * + * @param[in] cluster_list A pointer to cluster list @ref esp_zb_cluster_list_s + * @param[in] attr_list An attribute list which wants to update + * @param[in] role_mask A role of server or client for this cluster (attribute list) refer to esp_zb_zcl_cluster_role_t + * + * @return + * - ESP_OK on success + * - ESP_ERR_INVALID_ARG if cluster list not initialized + * + */ +esp_err_t esp_zb_cluster_list_update_commissioning_cluster(esp_zb_cluster_list_t *cluster_list, esp_zb_attribute_list_t *attr_list, uint8_t role_mask); + /** * @brief Update ias zone cluster (attribute list) in a cluster list. * diff --git a/components/esp-zigbee-lib/include/esp_zigbee_core.h b/components/esp-zigbee-lib/include/esp_zigbee_core.h index af0efb8..3d32a27 100644 --- a/components/esp-zigbee-lib/include/esp_zigbee_core.h +++ b/components/esp-zigbee-lib/include/esp_zigbee_core.h @@ -99,6 +99,9 @@ typedef enum esp_zb_core_action_callback_id_s { ESP_ZB_CORE_PRICE_PUBLISH_PRICE_CB_ID = 0x0017, /*!< Price publish price, refer to esp_zb_zcl_price_publish_price_message_t */ ESP_ZB_CORE_PRICE_PUBLISH_TIER_LABELS_CB_ID = 0x0018, /*!< Price publish tier labels, refer to esp_zb_zcl_price_publish_tier_labels_message_t */ ESP_ZB_CORE_PRICE_PRICE_ACK_CB_ID = 0x0019, /*!< Price price acknowledgement, refer to esp_zb_zcl_price_ack_message_t */ + ESP_ZB_CORE_COMM_RESTART_DEVICE_CB_ID = 0x001a, /*!< Commissioning restart device, refer to esp_zigbee_zcl_commissioning_restart_device_message_t */ + ESP_ZB_CORE_COMM_OPERATE_STARTUP_PARAMS_CB_ID = 0x001b, /*!< Commissioning operate startup parameters, refer to esp_zigbee_zcl_commissioning_operate_startup_parameters_message_t */ + ESP_ZB_CORE_COMM_COMMAND_RESP_CB_ID = 0x001c, /*!< Commissioning command response, refer to esp_zigbee_zcl_commissioning_command_response_message_t */ ESP_ZB_CORE_CMD_READ_ATTR_RESP_CB_ID = 0x1000, /*!< Read attribute response, refer to esp_zb_zcl_cmd_read_attr_resp_message_t */ ESP_ZB_CORE_CMD_WRITE_ATTR_RESP_CB_ID = 0x1001, /*!< Write attribute response, refer to esp_zb_zcl_cmd_write_attr_resp_message_t */ ESP_ZB_CORE_CMD_REPORT_CONFIG_RESP_CB_ID = 0x1002, /*!< Configure report response, refer to esp_zb_zcl_cmd_config_report_resp_message_t */ @@ -278,7 +281,7 @@ void esp_zb_identify_notify_handler_register(uint8_t endpoint, esp_zb_identify_n * @param[in] endpoint The specific endpoint for @p cluster * @param[in] cluster The specific cluster for @p command * @param[in] command The specific command ID is required to handle for users. - * @return + * @return * - ESP_OK: on success * - ESP_FAIL: on failure */ @@ -768,6 +771,33 @@ void esp_zb_scheduler_alarm(esp_zb_callback_t cb, uint8_t param, uint32_t time); */ void esp_zb_scheduler_alarm_cancel(esp_zb_callback_t cb, uint8_t param); +/** + * @brief Schedule user alarm - callback to be executed after timeout. + * + * @note Function will be called via scheduler after timeout expired in millisecond. Timer resolution depends on implementation. Same callback can be scheduled for execution more then once. + * + * @param[in] cb - function to call via scheduler + * @param[in] param - parameter to pass to the function + * @param[in] time - timeout, in millisecond + * + * @return + * - the handle used to cancel the user alarm + */ +esp_zb_user_cb_handle_t esp_zb_scheduler_user_alarm(esp_zb_user_callback_t cb, void *param, uint32_t time); + +/** + * @brief Cancel scheduled user alarm. + * + * @note This function cancel previously scheduled user alarm. + * + * @param[in] handle - the handle returned by esp_zb_scheduler_user_alarm + * + * @return + * - ESP_OK: on success + * - ESP_ERR_NOT_FOUND: not found the user alarm + */ +esp_err_t esp_zb_scheduler_user_alarm_cancel(esp_zb_user_cb_handle_t handle); + /** * @brief Set BDB commissioning mode. * diff --git a/components/esp-zigbee-lib/include/esp_zigbee_type.h b/components/esp-zigbee-lib/include/esp_zigbee_type.h index 24a3f7a..1cf6335 100644 --- a/components/esp-zigbee-lib/include/esp_zigbee_type.h +++ b/components/esp-zigbee-lib/include/esp_zigbee_type.h @@ -19,6 +19,9 @@ typedef uint8_t esp_zb_64bit_addr_t[8]; typedef esp_zb_64bit_addr_t esp_zb_ieee_addr_t; typedef void (*esp_zb_zcl_cluster_init_t)(void); typedef void (*esp_zb_callback_t)(uint8_t param); +typedef void (*esp_zb_user_callback_t)(void* param); +typedef uint8_t esp_zb_user_cb_handle_t; +#define ESP_ZB_USER_CB_HANDLE_INVALID (0x00) /** * @brief The Zigbee address union consist of 16 bit short address and 64 bit long address. @@ -427,6 +430,27 @@ typedef struct esp_zb_binary_input_cluster_cfg_s { uint8_t status_flags; /*!< Status flags */ } esp_zb_binary_input_cluster_cfg_t; +/** + * @brief Zigbee default attribute for Commissioning cluster. + * + */ +typedef struct esp_zb_commissioning_cluster_cfg_s { + uint16_t short_address; /**< Short Address */ + esp_zb_ieee_addr_t extended_panid; /**< Extended Panid */ + uint16_t panid; /**< Panid */ + uint32_t channel_mask; /**< Channel Mask */ + uint8_t protocol_version; /**< Protocol Version */ + uint8_t stack_profile; /**< Stack Profile */ + uint8_t startup_control; /**< Startup Control */ + esp_zb_ieee_addr_t trust_center_address; /**< Trust Center Address */ + uint8_t network_key[16]; /**< Network Key */ + bool use_insecure_join; /**< Use Insecure Join */ + uint8_t preconfigured_link_key[16]; /**< Preconfigured Link Key */ + uint8_t network_key_seq_num; /**< Network Key Seq Num */ + uint8_t network_key_type; /**< Network Key Type */ + uint16_t network_manager_address; /**< Network Manager Address */ +} esp_zb_commissioning_cluster_cfg_t; + /** * @brief The IAS zone application callback * diff --git a/components/esp-zigbee-lib/include/zcl/esp_zigbee_zcl_command.h b/components/esp-zigbee-lib/include/zcl/esp_zigbee_zcl_command.h index 88b16d6..2faeea4 100644 --- a/components/esp-zigbee-lib/include/zcl/esp_zigbee_zcl_command.h +++ b/components/esp-zigbee-lib/include/zcl/esp_zigbee_zcl_command.h @@ -271,6 +271,51 @@ typedef struct esp_zb_zcl_identify_query_cmd_s { esp_zb_zcl_address_mode_t address_mode; /*!< APS addressing mode constants refer to esp_zb_zcl_address_mode_t */ } esp_zb_zcl_identify_query_cmd_t; +/* ZCL commisssioning cluster */ + +/** + * @brief The Zigbee ZCL commisssioning restart device command struct + * + */ +typedef struct esp_zb_zcl_comm_restart_device_cmd_s { + esp_zb_zcl_basic_cmd_t zcl_basic_cmd; /*!< Basic command info */ + esp_zb_zcl_address_mode_t address_mode; /*!< APS addressing mode constants refer to esp_zb_zcl_address_mode_t */ + esp_zb_zcl_commissioning_restart_device_options_t options; /*!< Restart device options */ + uint8_t delay; /*!< Seconds of delay before starting the restart procedure */ + uint8_t jitter; /*!< Parameter to calculate the additional milliseconds should be added to delay */ +} esp_zb_zcl_comm_restart_device_cmd_t; + +/** + * @brief The Zigbee ZCL commisssioning save startup parameters command struct + * + */ +typedef struct esp_zb_zcl_comm_save_startup_params_cmd_s { + esp_zb_zcl_basic_cmd_t zcl_basic_cmd; /*!< Basic command info */ + esp_zb_zcl_address_mode_t address_mode; /*!< APS addressing mode constants refer to esp_zb_zcl_address_mode_t */ + uint8_t index; /*!< Index to save the parameter set */ +} esp_zb_zcl_comm_save_startup_params_cmd_t; + +/** + * @brief The Zigbee ZCL commisssioning restore startup parameters command struct + * + */ +typedef struct esp_zb_zcl_comm_restore_startup_params_cmd_s { + esp_zb_zcl_basic_cmd_t zcl_basic_cmd; /*!< Basic command info */ + esp_zb_zcl_address_mode_t address_mode; /*!< APS addressing mode constants refer to esp_zb_zcl_address_mode_t */ + uint8_t index; /*!< Index of the saved the parameter set to be restored */ +} esp_zb_zcl_comm_restore_startup_params_cmd_t; + +/** + * @brief The Zigbee ZCL commisssioning reset startup parameters command struct + * + */ +typedef struct esp_zb_zcl_comm_reset_startup_params_cmd_s { + esp_zb_zcl_basic_cmd_t zcl_basic_cmd; /*!< Basic command info */ + esp_zb_zcl_address_mode_t address_mode; /*!< APS addressing mode constants refer to esp_zb_zcl_address_mode_t */ + esp_zb_zcl_commissioning_reset_startup_param_options_t options; /*!< Reset startup parameter options */ + uint8_t index; /*!< Index of the saved parameters to be erased */ +} esp_zb_zcl_comm_reset_startup_params_cmd_t; + /* ZCL level cluster */ /** @@ -1095,7 +1140,7 @@ typedef struct esp_zb_zcl_frame_header_s { uint8_t fc; /*!< A 8-bit Frame control */ uint16_t manuf_code; /*!< Manufacturer code */ uint8_t tsn; /*!< Transaction sequence number */ - uint8_t rssi; /*!< Signal strength */ + int8_t rssi; /*!< Signal strength */ } esp_zb_zcl_frame_header_t; /** @@ -1529,6 +1574,43 @@ typedef struct esp_zb_zcl_price_publish_tier_labels_message_s { esp_zb_zcl_price_tier_label_entry_t *tier_labels; /*!< Tier labels published in the command */ } esp_zb_zcl_price_publish_tier_labels_message_t; +/** + * @brief The Zigbee ZCL commissioning restart device callback message struct + */ +typedef struct esp_zigbee_zcl_commissioning_restart_device_message_s { + esp_zb_device_cb_common_info_t info; /*!< The common information for Zigbee device callback */ + esp_zb_zcl_commissioning_restart_device_payload_t msg_in; /*!< Received restart device payload */ +} esp_zigbee_zcl_commissioning_restart_device_message_t; + +/** + * @brief The Zigbee ZCL commissioning startup parameters operation struct + */ +typedef enum { + ESP_ZB_ZCL_COMMISSIONING_STARTUP_PARAMETERS_OPERATION_SAVE, /*!< Indicates to save startup parameter set */ + ESP_ZB_ZCL_COMMISSIONING_STARTUP_PARAMETERS_OPERATION_RESTORE, /*!< Indicates to restore startup parameter set */ + ESP_ZB_ZCL_COMMISSIONING_STARTUP_PARAMETERS_OPERATION_ERASE, /*!< Indicates to erase startup parameter set */ + ESP_ZB_ZCL_COMMISSIONING_STARTUP_PARAMETERS_OPERATION_RESET, /*!< Indicates to reset startup parameter set */ + ESP_ZB_ZCL_COMMISSIONING_STARTUP_PARAMETERS_OPERATION_RESET_ALL, /*!< Indicates to reset all startup parameter set */ +} esp_zb_zcl_commissioning_startup_parameters_operation_t; + +/** + * @brief The Zigbee ZCL commissioning startup parameters operation callback message struct + */ +typedef struct esp_zigbee_zcl_commissioning_operate_startup_parameters_message_s { + esp_zb_device_cb_common_info_t info; /*!< The common information for Zigbee device callback */ + esp_zb_zcl_commissioning_startup_parameters_operation_t operation; /*!< Operation on startup parameter set */ + uint8_t index; /*!< Index of the startup parameter set to be operated on */ + esp_zb_zcl_status_t status; /*!< Result of the operation, will be sent in the response */ +} esp_zigbee_zcl_commissioning_operate_startup_parameters_message_t; + +/** + * @brief The Zigbee ZCL commissioning startup parameters operation callback message struct + */ +typedef struct esp_zigbee_zcl_commissioning_command_response_message_s { + esp_zb_device_cb_common_info_t info; /*!< The common information for Zigbee device callback */ + esp_zb_zcl_status_t status; /*!< Status of the received response */ +} esp_zigbee_zcl_commissioning_command_response_message_t; + /** * @brief The Zigbee zcl door lock callback message struct * @@ -2071,6 +2153,44 @@ uint8_t esp_zb_zcl_identify_trigger_effect_cmd_req(esp_zb_zcl_identify_trigger_e */ uint8_t esp_zb_zcl_identify_query_cmd_req(esp_zb_zcl_identify_query_cmd_t *cmd_req); +/* ZCL commissioning cluster list command */ + +/** + * @brief Send commissioning restart device command + * + * @param[in] cmd_req pointer to the commissioning restart device command @ref esp_zb_zcl_comm_restart_device_cmd_s + * + * @return The transaction sequence number + */ +uint8_t esp_zb_zcl_comm_restart_device_cmd_req(esp_zb_zcl_comm_restart_device_cmd_t *cmd_req); + +/** + * @brief Send commissioning save startup parameters command + * + * @param[in] cmd_req pointer to the commissioning save startup parameters command @ref esp_zb_zcl_comm_save_startup_params_cmd_s + * + * @return The transaction sequence number + */ +uint8_t esp_zb_zcl_comm_save_startup_params_cmd_req(esp_zb_zcl_comm_save_startup_params_cmd_t *cmd_req); + +/** + * @brief Send commissioning restore startup parameters command + * + * @param[in] cmd_req pointer to the commissioning restore startup parameters command @ref esp_zb_zcl_comm_restore_startup_params_cmd_s + * + * @return The transaction sequence number + */ +uint8_t esp_zb_zcl_comm_restore_startup_params_cmd_req(esp_zb_zcl_comm_restore_startup_params_cmd_t *cmd_req); + +/** + * @brief Send commissioning reset startup parameters command + * + * @param[in] cmd_req pointer to the commissioning reset startup parameters command @ref esp_zb_zcl_comm_reset_startup_params_cmd_s + * + * @return The transaction sequence number + */ +uint8_t esp_zb_zcl_comm_reset_startup_params_cmd_req(esp_zb_zcl_comm_reset_startup_params_cmd_t *cmd_req); + /* ZCL level control cluster list command */ /** diff --git a/components/esp-zigbee-lib/include/zcl/esp_zigbee_zcl_commissioning.h b/components/esp-zigbee-lib/include/zcl/esp_zigbee_zcl_commissioning.h new file mode 100644 index 0000000..6790993 --- /dev/null +++ b/components/esp-zigbee-lib/include/zcl/esp_zigbee_zcl_commissioning.h @@ -0,0 +1,178 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once +#ifdef __cplusplus +extern "C" { +#endif + +#include "esp_zigbee_type.h" + +/** @brief Commissioning Cluster server attribute identifiers */ +typedef enum { + ESP_ZB_ZCL_ATTR_COMMISSIONING_SHORT_ADDRESS_ID = 0x0000, /**< ShortAddress Attribute */ + ESP_ZB_ZCL_ATTR_COMMISSIONING_EXTENDED_PANID_ID = 0x0001, /**< ExtendedPANId Attribute */ + ESP_ZB_ZCL_ATTR_COMMISSIONING_PANID_ID = 0x0002, /**< PANId Attribute */ + ESP_ZB_ZCL_ATTR_COMMISSIONING_CHANNEL_MASK_ID = 0x0003, /**< ChannelMask Attribute */ + ESP_ZB_ZCL_ATTR_COMMISSIONING_PROTOCOL_VERSION_ID = 0x0004, /**< ProtocolVersion Attribute */ + ESP_ZB_ZCL_ATTR_COMMISSIONING_STACK_PROFILE_ID = 0x0005, /**< StackProfile Attribute */ + ESP_ZB_ZCL_ATTR_COMMISSIONING_STARTUP_CONTROL_ID = 0x0006, /**< StartupControl Attribute */ + ESP_ZB_ZCL_ATTR_COMMISSIONING_TRUST_CENTER_ADDRESS_ID = 0x0010, /**< TrustCenterAddress Attribute */ + ESP_ZB_ZCL_ATTR_COMMISSIONING_TRUST_CENTER_MASTER_KEY_ID = 0x0011, /**< TrustCenterMasterKey Attribute */ + ESP_ZB_ZCL_ATTR_COMMISSIONING_NETWORK_KEY_ID = 0x0012, /**< NetworkKey Attribute */ + ESP_ZB_ZCL_ATTR_COMMISSIONING_USE_INSECURE_JOIN_ID = 0x0013, /**< UseInsecureJoin Attribute */ + ESP_ZB_ZCL_ATTR_COMMISSIONING_PRECONFIGURED_LINK_KEY_ID = 0x0014, /**< PreconfiguredLinkKey Attribute */ + ESP_ZB_ZCL_ATTR_COMMISSIONING_NETWORK_KEY_SEQ_NUM_ID = 0x0015, /**< NetworkKeySeqNum Attribute */ + ESP_ZB_ZCL_ATTR_COMMISSIONING_NETWORK_KEY_TYPE_ID = 0x0016, /**< NetworkKeyType Attribute */ + ESP_ZB_ZCL_ATTR_COMMISSIONING_NETWORK_MANAGER_ADDRESS_ID = 0x0017, /**< NetworkManagerAddress Attribute */ + ESP_ZB_ZCL_ATTR_COMMISSIONING_SCAN_ATTEMPTS_ID = 0x0020, /**< ScanAttempts Attribute */ + ESP_ZB_ZCL_ATTR_COMMISSIONING_TIME_BETWEEN_SCANS_ID = 0x0021, /**< TimeBetweenScans Attribute */ + ESP_ZB_ZCL_ATTR_COMMISSIONING_REJOIN_INTERVAL_ID = 0x0022, /**< RejoinInterval Attribute */ + ESP_ZB_ZCL_ATTR_COMMISSIONING_MAX_REJOIN_INTERVAL_ID = 0x0023, /**< MaxRejoinInterval Attribute */ + ESP_ZB_ZCL_ATTR_COMMISSIONING_INDIRECT_POLL_RATE_ID = 0x0030, /**< IndirectPollRate Attribute */ + ESP_ZB_ZCL_ATTR_COMMISSIONING_PARENT_RETRY_THRESHOLD_ID = 0x0031, /**< ParentRetryThreshold Attribute */ + ESP_ZB_ZCL_ATTR_COMMISSIONING_CONCENTRATOR_FLAG_ID = 0x0040, /**< ConcentratorFlag Attribute */ + ESP_ZB_ZCL_ATTR_COMMISSIONING_CONCENTRATOR_RADIUS_ID = 0x0041, /**< ConcentratorRadius Attribute */ + ESP_ZB_ZCL_ATTR_COMMISSIONING_CONCENTRATOR_DISCOVERY_TIME_ID = 0x0042, /**< ConcentratorDiscoveryTime Attribute */ +} esp_zb_zcl_commissioning_srv_attr_t; + +/** @brief Values for valid Startup Control attribute */ +typedef enum { + ESP_ZB_ZCL_ATTR_COMMISSIONING_STARTUP_TYPE_JOINED = 0x00, + ESP_ZB_ZCL_ATTR_COMMISSIONING_STARTUP_TYPE_FORM = 0x01, + ESP_ZB_ZCL_ATTR_COMMISSIONING_STARTUP_TYPE_REJOIN = 0x02, + ESP_ZB_ZCL_ATTR_COMMISSIONING_STARTUP_TYPE_SCRATCH = 0x03, +} esp_zb_zcl_commissioning_startup_type_t; + +/** @brief Minimum value for ShortAddress attribute */ +#define ESP_ZB_ZCL_COMMISSIONING_SHORT_ADDRESS_MIN_VALUE ((uint16_t)0x0) + +/** @brief Maximum value for ShortAddress attribute */ +#define ESP_ZB_ZCL_COMMISSIONING_SHORT_ADDRESS_MAX_VALUE ((uint16_t)0xfff7) + +/** @brief Minimum value for ProtocolVersion attribute */ +#define ESP_ZB_ZCL_COMMISSIONING_PROTOCOL_VERSION_MIN_VALUE ((uint8_t)0x2) + +/** @brief Maximum value for ProtocolVersion attribute */ +#define ESP_ZB_ZCL_COMMISSIONING_PROTOCOL_VERSION_MAX_VALUE ((uint8_t)0x2) + +/** @brief Minimum value for StackProfile attribute */ +#define ESP_ZB_ZCL_COMMISSIONING_STACK_PROFILE_MIN_VALUE ((uint8_t)0x1) + +/** @brief Maximum value for StackProfile attribute */ +#define ESP_ZB_ZCL_COMMISSIONING_STACK_PROFILE_MAX_VALUE ((uint8_t)0x2) + +/** @brief Minimum value for StartupControl attribute */ +#define ESP_ZB_ZCL_COMMISSIONING_STARTUP_CONTROL_MIN_VALUE ((uint8_t)0x0) + +/** @brief Maximum value for StartupControl attribute */ +#define ESP_ZB_ZCL_COMMISSIONING_STARTUP_CONTROL_MAX_VALUE ((uint8_t)0x3) + +/** @brief Default value for ExtendedPANId attribute */ +#define ESP_ZB_ZCL_COMMISSIONING_EXTENDED_PANID_DEFAULT_VALUE {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff} + +/** @brief Default value for ProtocolVersion attribute */ +#define ESP_ZB_ZCL_COMMISSIONING_PROTOCOL_VERSION_DEFAULT_VALUE ((uint8_t)ZB_PROTOCOL_VERSION) + +/** @brief Default value for StackProfile attribute */ +#define ESP_ZB_ZCL_COMMISSIONING_STACK_PROFILE_DEFAULT_VALUE ((uint8_t)ZB_STACK_PROFILE) + +/** @brief Default value for ProtocolVersion attribute */ +#define ESP_ZB_ZCL_COMMISSIONING_STARTUP_CONTROL_DEFAULT_VALUE ((uint8_t)ESP_ZB_ZCL_ATTR_COMMISSIONING_STARTUP_TYPE_SCRATCH) + +/** @brief Default value for UseInsecureJoin attribute */ +#define ESP_ZB_ZCL_COMMISSIONING_USE_INSECURE_JOIN_DEFAULT_VALUE ((bool)0x1) + +/** @brief Commissioning Cluster server command identifiers */ +typedef enum { + ESP_ZB_ZCL_CMD_COMMISSIONING_RESTART_DEVICE_RESPONSE_ID = 0x0000, /**< "Restart Device Response" command. */ + ESP_ZB_ZCL_CMD_COMMISSIONING_SAVE_STARTUP_PARAMETERS_RESPONSE_ID = 0x0001, /**< "Save Startup Parameters Response" command. */ + ESP_ZB_ZCL_CMD_COMMISSIONING_RESTORE_STARTUP_PARAMETERS_RESPONSE_ID = 0x0002, /**< "Restore Startup Parameters Response" command. */ + ESP_ZB_ZCL_CMD_COMMISSIONING_RESET_STARTUP_PARAMETERS_RESPONSE_ID = 0x0003, /**< "Reset Startup Parameters Response" command. */ +} esp_zb_zcl_commissioning_srv_cmd_id_t; + +/** @brief Commissioning Cluster client command identifiers */ +typedef enum { + ESP_ZB_ZCL_CMD_COMMISSIONING_RESTART_DEVICE_ID = 0x0000, /**< "Restart Device" command. */ + ESP_ZB_ZCL_CMD_COMMISSIONING_SAVE_STARTUP_PARAMETERS_ID = 0x0001, /**< "Save Startup Parameters" command. */ + ESP_ZB_ZCL_CMD_COMMISSIONING_RESTORE_STARTUP_PARAMETERS_ID = 0x0002, /**< "Restore Startup Parameters" command. */ + ESP_ZB_ZCL_CMD_COMMISSIONING_RESET_STARTUP_PARAMETERS_ID = 0x0003, /**< "Reset Startup Parameters" command. */ +} esp_zb_zcl_commissioning_cli_cmd_id_t; + +/** + * @brief The values of "startup_mode" bitfield in "options" field of "esp_zb_zcl_commissioning_restart_device_payload_t" + */ +typedef enum { + ESP_ZB_ZCL_COMMISSIONING_STARTUP_MODE_USE_PARAMETER_SET = 0, + ESP_ZB_ZCL_COMMISSIONING_STARTUP_MODE_USE_CURRENT_STACK = 1, +} esp_zb_zcl_commissioning_startup_mode_t; + +/** + * @brief "options" field of "esp_zb_zcl_commissioning_restart_device_payload_t" + */ +typedef union { + uint8_t u8; /**< Restart device options */ + struct { + uint8_t startup_mode : 3; /**< startup mode: bit 0 - 2 */ + uint8_t immediate : 1; /**< immediate: bit 3 */ + uint8_t /* reserved */ : 4; /**< reserved: bit 4 - 7 */ + }; +} esp_zb_zcl_commissioning_restart_device_options_t; + +/** + * @brief "Restart Device Response" Command Payload Format + */ +typedef struct esp_zb_zcl_commissioning_restart_device_payload_s { + esp_zb_zcl_commissioning_restart_device_options_t options; /*!< Options for restart device */ + uint8_t delay; /*!< Startup procedure is to be invoked, in seconds */ + uint8_t jitter; /*!< Specifies a random jitter range, in millisecond */ +} ESP_ZB_PACKED_STRUCT esp_zb_zcl_commissioning_restart_device_payload_t; + +/** + * @brief ESP_ZB_ZCL_CMD_COMMISSIONING_SAVE_STARTUP_PARAMETERS_ID "Save Startup Parameters" Command Payload Format + */ +typedef struct esp_zb_zcl_commissioning_save_startup_parameters_payload_s { + uint8_t options; /*!< Reserved field */ + uint8_t index; /*!< The current startup parameter attribute set is to be saved */ +} ESP_ZB_PACKED_STRUCT esp_zb_zcl_commissioning_save_startup_parameters_payload_t; + +/** + * @brief ESP_ZB_ZCL_CMD_COMMISSIONING_RESTORE_STARTUP_PARAMETERS_ID "Restore Startup Parameters" Command Payload Format + */ +typedef struct esp_zb_zcl_commissioning_restore_startup_parameters_payload_s { + uint8_t options; /*!< Reserved field */ + uint8_t index; /*!< Index of the saved startup parameter attribute set to be restored to current status */ +} ESP_ZB_PACKED_STRUCT esp_zb_zcl_commissioning_restore_startup_parameters_payload_t; + +/** + * @brief "options" field of "esp_zb_zcl_commissioning_reset_startup_parameters_payload_t" + */ +typedef union { + uint8_t u8; /**< Reset startup options */ + struct { + uint8_t reset_current : 1; /**< reset current: bit 0 */ + uint8_t reset_all : 1; /**< reset all: bit 1 */ + uint8_t erase_index : 1; /**< erase index: bit 2 */ + uint8_t /* reserved */ : 5; /**< reserved: bit 3 - 7 */ + }; +} esp_zb_zcl_commissioning_reset_startup_param_options_t; + +/** + * @brief "Reset Startup Parameters" Command Payload Format + */ +typedef struct esp_zb_zcl_commissioning_reset_startup_parameters_payload_s { + esp_zb_zcl_commissioning_reset_startup_param_options_t options; /*!< The options of reset startup parameter */ + uint8_t index; /*!< Index of a saved startup parameter attribute set */ +} ESP_ZB_PACKED_STRUCT esp_zb_zcl_commissioning_reset_startup_parameters_payload_t; + +void esp_zb_zcl_commissioning_init_server(void); +void esp_zb_zcl_commissioning_init_client(void); +#define ESP_ZB_ZCL_CLUSTER_ID_COMMISSIONING_SERVER_ROLE_INIT esp_zb_zcl_commissioning_init_server +#define ESP_ZB_ZCL_CLUSTER_ID_COMMISSIONING_CLIENT_ROLE_INIT esp_zb_zcl_commissioning_init_client + +#ifdef __cplusplus +} +#endif diff --git a/components/esp-zigbee-lib/include/zcl/esp_zigbee_zcl_common.h b/components/esp-zigbee-lib/include/zcl/esp_zigbee_zcl_common.h index fb022b8..a635cd7 100644 --- a/components/esp-zigbee-lib/include/zcl/esp_zigbee_zcl_common.h +++ b/components/esp-zigbee-lib/include/zcl/esp_zigbee_zcl_common.h @@ -21,6 +21,7 @@ extern "C" { #include "esp_zigbee_zcl_color_control.h" #include "esp_zigbee_zcl_time.h" #include "esp_zigbee_zcl_binary_input.h" +#include "esp_zigbee_zcl_commissioning.h" #include "esp_zigbee_zcl_ias_zone.h" #include "esp_zigbee_zcl_shade_config.h" #include "esp_zigbee_zcl_door_lock.h" diff --git a/components/esp-zigbee-lib/lib/esp32/libesp_zb_api_zczr.a b/components/esp-zigbee-lib/lib/esp32/libesp_zb_api_zczr.a index b34471a..8fbb1a2 100644 Binary files a/components/esp-zigbee-lib/lib/esp32/libesp_zb_api_zczr.a and b/components/esp-zigbee-lib/lib/esp32/libesp_zb_api_zczr.a differ diff --git a/components/esp-zigbee-lib/lib/esp32/libesp_zb_api_zczr.debug.a b/components/esp-zigbee-lib/lib/esp32/libesp_zb_api_zczr.debug.a index bd62727..4ea7fd7 100644 Binary files a/components/esp-zigbee-lib/lib/esp32/libesp_zb_api_zczr.debug.a and b/components/esp-zigbee-lib/lib/esp32/libesp_zb_api_zczr.debug.a differ diff --git a/components/esp-zigbee-lib/lib/esp32/libesp_zb_cli_command.a b/components/esp-zigbee-lib/lib/esp32/libesp_zb_cli_command.a index 145a41d..c34ba27 100644 Binary files a/components/esp-zigbee-lib/lib/esp32/libesp_zb_cli_command.a and b/components/esp-zigbee-lib/lib/esp32/libesp_zb_cli_command.a differ diff --git a/components/esp-zigbee-lib/lib/esp32c3/libesp_zb_api_zczr.a b/components/esp-zigbee-lib/lib/esp32c3/libesp_zb_api_zczr.a index da0b17c..6539b8b 100644 Binary files a/components/esp-zigbee-lib/lib/esp32c3/libesp_zb_api_zczr.a and b/components/esp-zigbee-lib/lib/esp32c3/libesp_zb_api_zczr.a differ diff --git a/components/esp-zigbee-lib/lib/esp32c3/libesp_zb_api_zczr.debug.a b/components/esp-zigbee-lib/lib/esp32c3/libesp_zb_api_zczr.debug.a index 9ccab46..28dfbc7 100644 Binary files a/components/esp-zigbee-lib/lib/esp32c3/libesp_zb_api_zczr.debug.a and b/components/esp-zigbee-lib/lib/esp32c3/libesp_zb_api_zczr.debug.a differ diff --git a/components/esp-zigbee-lib/lib/esp32c3/libesp_zb_cli_command.a b/components/esp-zigbee-lib/lib/esp32c3/libesp_zb_cli_command.a index b761ab5..3d838bd 100644 Binary files a/components/esp-zigbee-lib/lib/esp32c3/libesp_zb_cli_command.a and b/components/esp-zigbee-lib/lib/esp32c3/libesp_zb_cli_command.a differ diff --git a/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_ed.a b/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_ed.a index 514c44a..429d8f3 100644 Binary files a/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_ed.a and b/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_ed.a differ diff --git a/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_ed.debug.a b/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_ed.debug.a index bdf91cb..aece8e3 100644 Binary files a/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_ed.debug.a and b/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_ed.debug.a differ diff --git a/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_gpd.a b/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_gpd.a index 4d0558b..8f49dbd 100644 Binary files a/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_gpd.a and b/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_gpd.a differ diff --git a/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_zczr.a b/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_zczr.a index b18d64a..b7910a4 100644 Binary files a/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_zczr.a and b/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_zczr.a differ diff --git a/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_zczr.debug.a b/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_zczr.debug.a index 844a9eb..8404d49 100644 Binary files a/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_zczr.debug.a and b/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_zczr.debug.a differ diff --git a/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_cli_command.a b/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_cli_command.a index 7e21e76..f6e1943 100644 Binary files a/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_cli_command.a and b/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_cli_command.a differ diff --git a/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_ed.a b/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_ed.a index 8ffdda8..c3ffcb0 100644 Binary files a/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_ed.a and b/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_ed.a differ diff --git a/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_ed.debug.a b/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_ed.debug.a index 602b28b..9a1c941 100644 Binary files a/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_ed.debug.a and b/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_ed.debug.a differ diff --git a/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_gpd.a b/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_gpd.a index 4d0558b..8f49dbd 100644 Binary files a/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_gpd.a and b/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_gpd.a differ diff --git a/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_zczr.a b/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_zczr.a index 4239faf..21d4b81 100644 Binary files a/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_zczr.a and b/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_zczr.a differ diff --git a/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_zczr.debug.a b/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_zczr.debug.a index 43d10ff..dc4fb00 100644 Binary files a/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_zczr.debug.a and b/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_zczr.debug.a differ diff --git a/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_cli_command.a b/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_cli_command.a index 7e21e76..f6e1943 100644 Binary files a/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_cli_command.a and b/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_cli_command.a differ diff --git a/components/esp-zigbee-lib/lib/esp32s2/libesp_zb_api_zczr.a b/components/esp-zigbee-lib/lib/esp32s2/libesp_zb_api_zczr.a index e8f03fc..e780209 100644 Binary files a/components/esp-zigbee-lib/lib/esp32s2/libesp_zb_api_zczr.a and b/components/esp-zigbee-lib/lib/esp32s2/libesp_zb_api_zczr.a differ diff --git a/components/esp-zigbee-lib/lib/esp32s2/libesp_zb_api_zczr.debug.a b/components/esp-zigbee-lib/lib/esp32s2/libesp_zb_api_zczr.debug.a index bd62727..4ea7fd7 100644 Binary files a/components/esp-zigbee-lib/lib/esp32s2/libesp_zb_api_zczr.debug.a and b/components/esp-zigbee-lib/lib/esp32s2/libesp_zb_api_zczr.debug.a differ diff --git a/components/esp-zigbee-lib/lib/esp32s2/libesp_zb_cli_command.a b/components/esp-zigbee-lib/lib/esp32s2/libesp_zb_cli_command.a index 145a41d..c34ba27 100644 Binary files a/components/esp-zigbee-lib/lib/esp32s2/libesp_zb_cli_command.a and b/components/esp-zigbee-lib/lib/esp32s2/libesp_zb_cli_command.a differ diff --git a/components/esp-zigbee-lib/lib/esp32s3/libesp_zb_api_zczr.a b/components/esp-zigbee-lib/lib/esp32s3/libesp_zb_api_zczr.a index b34471a..8fbb1a2 100644 Binary files a/components/esp-zigbee-lib/lib/esp32s3/libesp_zb_api_zczr.a and b/components/esp-zigbee-lib/lib/esp32s3/libesp_zb_api_zczr.a differ diff --git a/components/esp-zigbee-lib/lib/esp32s3/libesp_zb_api_zczr.debug.a b/components/esp-zigbee-lib/lib/esp32s3/libesp_zb_api_zczr.debug.a index bd62727..4ea7fd7 100644 Binary files a/components/esp-zigbee-lib/lib/esp32s3/libesp_zb_api_zczr.debug.a and b/components/esp-zigbee-lib/lib/esp32s3/libesp_zb_api_zczr.debug.a differ diff --git a/components/esp-zigbee-lib/lib/esp32s3/libesp_zb_cli_command.a b/components/esp-zigbee-lib/lib/esp32s3/libesp_zb_cli_command.a index 145a41d..c34ba27 100644 Binary files a/components/esp-zigbee-lib/lib/esp32s3/libesp_zb_cli_command.a and b/components/esp-zigbee-lib/lib/esp32s3/libesp_zb_cli_command.a differ diff --git a/components/esp-zigbee-ncp/src/esp_ncp_zb.c b/components/esp-zigbee-ncp/src/esp_ncp_zb.c index 3019260..9addd0e 100644 --- a/components/esp-zigbee-ncp/src/esp_ncp_zb.c +++ b/components/esp-zigbee-ncp/src/esp_ncp_zb.c @@ -695,10 +695,10 @@ static esp_err_t esp_ncp_zb_network_init_fn(const uint8_t *input, uint16_t inlen if (!s_init_flag) { esp_zb_platform_config_t config = { .radio_config = { - .radio_mode = RADIO_MODE_NATIVE, + .radio_mode = ZB_RADIO_MODE_NATIVE, }, .host_config = { - .host_connection_mode = HOST_CONNECTION_MODE_NONE, + .host_connection_mode = ZB_HOST_CONNECTION_MODE_NONE, } }; diff --git a/docs/Doxyfile b/docs/Doxyfile index cbad273..45a1848 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -69,6 +69,7 @@ INPUT = \ $(PROJECT_PATH)/components/esp-zigbee-lib/include/zcl/esp_zigbee_zcl_meter_identification.h \ $(PROJECT_PATH)/components/esp-zigbee-lib/include/zcl/esp_zigbee_zcl_flow_meas.h \ $(PROJECT_PATH)/components/esp-zigbee-lib/include/zcl/esp_zigbee_zcl_price.h \ + $(PROJECT_PATH)/components/esp-zigbee-lib/include/zcl/esp_zigbee_zcl_commissioning.h \ $(PROJECT_PATH)/components/esp-zigbee-lib/include/zdo/esp_zigbee_zdo_command.h \ $(PROJECT_PATH)/components/esp-zigbee-lib/include/zdo/esp_zigbee_zdo_common.h \ $(PROJECT_PATH)/components/esp-zigbee-lib/include/bdb/esp_zigbee_bdb_touchlink.h \ diff --git a/docs/en/api-reference/zcl/esp_zigbee_zcl_commissioning.rst b/docs/en/api-reference/zcl/esp_zigbee_zcl_commissioning.rst new file mode 100644 index 0000000..95df551 --- /dev/null +++ b/docs/en/api-reference/zcl/esp_zigbee_zcl_commissioning.rst @@ -0,0 +1,7 @@ +ZCL Commissioning +================= + +Zigbee Cluster Library (ZCL) commissioning cluster usage definition for ESP Zigbee SDK. + + +.. include-build-file:: inc/esp_zigbee_zcl_commissioning.inc diff --git a/docs/en/api-reference/zcl/index.rst b/docs/en/api-reference/zcl/index.rst index ab31384..98fe5d8 100644 --- a/docs/en/api-reference/zcl/index.rst +++ b/docs/en/api-reference/zcl/index.rst @@ -46,3 +46,4 @@ This section provides the ESP Zigbee SDK's APIs that support different kind of Z esp_zigbee_zcl_meter_identification esp_zigbee_zcl_price esp_zigbee_zcl_flow_measurement + esp_zigbee_zcl_commissioning diff --git a/docs/en/introduction.rst b/docs/en/introduction.rst index d3fca05..14b4136 100644 --- a/docs/en/introduction.rst +++ b/docs/en/introduction.rst @@ -91,6 +91,7 @@ The supported features in current ESP Zigbee SDK are listed below: analog_value 0x000e binary_input 0x000f multistate_value 0x0014 + commissioning 0x0015 ota 0x0019 green_power 0x0021 shade_config 0x0100 diff --git a/examples/esp_zigbee_HA_sample/HA_color_dimmable_light/main/esp_zb_light.h b/examples/esp_zigbee_HA_sample/HA_color_dimmable_light/main/esp_zb_light.h index aa87ebd..8e40662 100644 --- a/examples/esp_zigbee_HA_sample/HA_color_dimmable_light/main/esp_zb_light.h +++ b/examples/esp_zigbee_HA_sample/HA_color_dimmable_light/main/esp_zb_light.h @@ -32,10 +32,10 @@ #define ESP_ZB_DEFAULT_RADIO_CONFIG() \ { \ - .radio_mode = RADIO_MODE_NATIVE, \ + .radio_mode = ZB_RADIO_MODE_NATIVE, \ } #define ESP_ZB_DEFAULT_HOST_CONFIG() \ { \ - .host_connection_mode = HOST_CONNECTION_MODE_NONE, \ + .host_connection_mode = ZB_HOST_CONNECTION_MODE_NONE, \ } diff --git a/examples/esp_zigbee_HA_sample/HA_color_dimmable_light/main/idf_component.yml b/examples/esp_zigbee_HA_sample/HA_color_dimmable_light/main/idf_component.yml index 4df0e1c..ebc68a4 100644 --- a/examples/esp_zigbee_HA_sample/HA_color_dimmable_light/main/idf_component.yml +++ b/examples/esp_zigbee_HA_sample/HA_color_dimmable_light/main/idf_component.yml @@ -1,7 +1,7 @@ ## IDF Component Manager Manifest File dependencies: - espressif/esp-zboss-lib: "~1.2.0" - espressif/esp-zigbee-lib: "~1.2.0" + espressif/esp-zboss-lib: "~1.3.0" + espressif/esp-zigbee-lib: "~1.3.0" espressif/led_strip: "~2.0.0" ## Required IDF version idf: diff --git a/examples/esp_zigbee_HA_sample/HA_color_dimmable_switch/main/esp_zb_switch.h b/examples/esp_zigbee_HA_sample/HA_color_dimmable_switch/main/esp_zb_switch.h index bea9ebd..dd0b91a 100644 --- a/examples/esp_zigbee_HA_sample/HA_color_dimmable_switch/main/esp_zb_switch.h +++ b/examples/esp_zigbee_HA_sample/HA_color_dimmable_switch/main/esp_zb_switch.h @@ -31,10 +31,10 @@ #define ESP_ZB_DEFAULT_RADIO_CONFIG() \ { \ - .radio_mode = RADIO_MODE_NATIVE, \ + .radio_mode = ZB_RADIO_MODE_NATIVE, \ } #define ESP_ZB_DEFAULT_HOST_CONFIG() \ { \ - .host_connection_mode = HOST_CONNECTION_MODE_NONE, \ + .host_connection_mode = ZB_HOST_CONNECTION_MODE_NONE, \ } diff --git a/examples/esp_zigbee_HA_sample/HA_color_dimmable_switch/main/idf_component.yml b/examples/esp_zigbee_HA_sample/HA_color_dimmable_switch/main/idf_component.yml index 9574f77..55ab41e 100644 --- a/examples/esp_zigbee_HA_sample/HA_color_dimmable_switch/main/idf_component.yml +++ b/examples/esp_zigbee_HA_sample/HA_color_dimmable_switch/main/idf_component.yml @@ -1,7 +1,7 @@ ## IDF Component Manager Manifest File dependencies: - espressif/esp-zboss-lib: "~1.2.0" - espressif/esp-zigbee-lib: "~1.2.0" + espressif/esp-zboss-lib: "~1.3.0" + espressif/esp-zigbee-lib: "~1.3.0" ## Required IDF version idf: version: ">=5.0.0" diff --git a/examples/esp_zigbee_HA_sample/HA_on_off_light/main/esp_zb_light.h b/examples/esp_zigbee_HA_sample/HA_on_off_light/main/esp_zb_light.h index 9d1cdf0..a93cf78 100644 --- a/examples/esp_zigbee_HA_sample/HA_on_off_light/main/esp_zb_light.h +++ b/examples/esp_zigbee_HA_sample/HA_on_off_light/main/esp_zb_light.h @@ -34,10 +34,10 @@ #define ESP_ZB_DEFAULT_RADIO_CONFIG() \ { \ - .radio_mode = RADIO_MODE_NATIVE, \ + .radio_mode = ZB_RADIO_MODE_NATIVE, \ } #define ESP_ZB_DEFAULT_HOST_CONFIG() \ { \ - .host_connection_mode = HOST_CONNECTION_MODE_NONE, \ + .host_connection_mode = ZB_HOST_CONNECTION_MODE_NONE, \ } diff --git a/examples/esp_zigbee_HA_sample/HA_on_off_light/main/idf_component.yml b/examples/esp_zigbee_HA_sample/HA_on_off_light/main/idf_component.yml index 4df0e1c..ebc68a4 100644 --- a/examples/esp_zigbee_HA_sample/HA_on_off_light/main/idf_component.yml +++ b/examples/esp_zigbee_HA_sample/HA_on_off_light/main/idf_component.yml @@ -1,7 +1,7 @@ ## IDF Component Manager Manifest File dependencies: - espressif/esp-zboss-lib: "~1.2.0" - espressif/esp-zigbee-lib: "~1.2.0" + espressif/esp-zboss-lib: "~1.3.0" + espressif/esp-zigbee-lib: "~1.3.0" espressif/led_strip: "~2.0.0" ## Required IDF version idf: diff --git a/examples/esp_zigbee_HA_sample/HA_on_off_switch/main/esp_zb_switch.h b/examples/esp_zigbee_HA_sample/HA_on_off_switch/main/esp_zb_switch.h index 9bf6786..7a35302 100644 --- a/examples/esp_zigbee_HA_sample/HA_on_off_switch/main/esp_zb_switch.h +++ b/examples/esp_zigbee_HA_sample/HA_on_off_switch/main/esp_zb_switch.h @@ -31,10 +31,10 @@ #define ESP_ZB_DEFAULT_RADIO_CONFIG() \ { \ - .radio_mode = RADIO_MODE_NATIVE, \ + .radio_mode = ZB_RADIO_MODE_NATIVE, \ } #define ESP_ZB_DEFAULT_HOST_CONFIG() \ { \ - .host_connection_mode = HOST_CONNECTION_MODE_NONE, \ + .host_connection_mode = ZB_HOST_CONNECTION_MODE_NONE, \ } diff --git a/examples/esp_zigbee_HA_sample/HA_on_off_switch/main/idf_component.yml b/examples/esp_zigbee_HA_sample/HA_on_off_switch/main/idf_component.yml index 9574f77..55ab41e 100644 --- a/examples/esp_zigbee_HA_sample/HA_on_off_switch/main/idf_component.yml +++ b/examples/esp_zigbee_HA_sample/HA_on_off_switch/main/idf_component.yml @@ -1,7 +1,7 @@ ## IDF Component Manager Manifest File dependencies: - espressif/esp-zboss-lib: "~1.2.0" - espressif/esp-zigbee-lib: "~1.2.0" + espressif/esp-zboss-lib: "~1.3.0" + espressif/esp-zigbee-lib: "~1.3.0" ## Required IDF version idf: version: ">=5.0.0" diff --git a/examples/esp_zigbee_HA_sample/HA_temperature_sensor/main/esp_zb_temperature_sensor.h b/examples/esp_zigbee_HA_sample/HA_temperature_sensor/main/esp_zb_temperature_sensor.h index 2a02031..66b95b5 100644 --- a/examples/esp_zigbee_HA_sample/HA_temperature_sensor/main/esp_zb_temperature_sensor.h +++ b/examples/esp_zigbee_HA_sample/HA_temperature_sensor/main/esp_zb_temperature_sensor.h @@ -43,10 +43,10 @@ #define ESP_ZB_DEFAULT_RADIO_CONFIG() \ { \ - .radio_mode = RADIO_MODE_NATIVE, \ + .radio_mode = ZB_RADIO_MODE_NATIVE, \ } #define ESP_ZB_DEFAULT_HOST_CONFIG() \ { \ - .host_connection_mode = HOST_CONNECTION_MODE_NONE, \ + .host_connection_mode = ZB_HOST_CONNECTION_MODE_NONE, \ } diff --git a/examples/esp_zigbee_HA_sample/HA_temperature_sensor/main/idf_component.yml b/examples/esp_zigbee_HA_sample/HA_temperature_sensor/main/idf_component.yml index 9574f77..55ab41e 100644 --- a/examples/esp_zigbee_HA_sample/HA_temperature_sensor/main/idf_component.yml +++ b/examples/esp_zigbee_HA_sample/HA_temperature_sensor/main/idf_component.yml @@ -1,7 +1,7 @@ ## IDF Component Manager Manifest File dependencies: - espressif/esp-zboss-lib: "~1.2.0" - espressif/esp-zigbee-lib: "~1.2.0" + espressif/esp-zboss-lib: "~1.3.0" + espressif/esp-zigbee-lib: "~1.3.0" ## Required IDF version idf: version: ">=5.0.0" diff --git a/examples/esp_zigbee_HA_sample/HA_thermostat/main/esp_zb_thermostat.h b/examples/esp_zigbee_HA_sample/HA_thermostat/main/esp_zb_thermostat.h index 6891bf7..2b9fea4 100644 --- a/examples/esp_zigbee_HA_sample/HA_thermostat/main/esp_zb_thermostat.h +++ b/examples/esp_zigbee_HA_sample/HA_thermostat/main/esp_zb_thermostat.h @@ -36,10 +36,10 @@ #define ESP_ZB_DEFAULT_RADIO_CONFIG() \ { \ - .radio_mode = RADIO_MODE_NATIVE, \ + .radio_mode = ZB_RADIO_MODE_NATIVE, \ } #define ESP_ZB_DEFAULT_HOST_CONFIG() \ { \ - .host_connection_mode = HOST_CONNECTION_MODE_NONE, \ + .host_connection_mode = ZB_HOST_CONNECTION_MODE_NONE, \ } diff --git a/examples/esp_zigbee_HA_sample/HA_thermostat/main/idf_component.yml b/examples/esp_zigbee_HA_sample/HA_thermostat/main/idf_component.yml index 9574f77..55ab41e 100644 --- a/examples/esp_zigbee_HA_sample/HA_thermostat/main/idf_component.yml +++ b/examples/esp_zigbee_HA_sample/HA_thermostat/main/idf_component.yml @@ -1,7 +1,7 @@ ## IDF Component Manager Manifest File dependencies: - espressif/esp-zboss-lib: "~1.2.0" - espressif/esp-zigbee-lib: "~1.2.0" + espressif/esp-zboss-lib: "~1.3.0" + espressif/esp-zigbee-lib: "~1.3.0" ## Required IDF version idf: version: ">=5.0.0" diff --git a/examples/esp_zigbee_cli/main/esp_zigbee_cli_config.h b/examples/esp_zigbee_cli/main/esp_zigbee_cli_config.h index 887c7b2..63b0acd 100644 --- a/examples/esp_zigbee_cli/main/esp_zigbee_cli_config.h +++ b/examples/esp_zigbee_cli/main/esp_zigbee_cli_config.h @@ -24,13 +24,13 @@ #if CONFIG_SOC_IEEE802154_SUPPORTED #define ESP_ZB_DEFAULT_RADIO_CONFIG() \ { \ - .radio_mode = RADIO_MODE_NATIVE, \ + .radio_mode = ZB_RADIO_MODE_NATIVE, \ } #else #define ESP_ZB_DEFAULT_RADIO_CONFIG() \ { \ - .radio_mode = RADIO_MODE_UART_RCP, \ + .radio_mode = ZB_RADIO_MODE_UART_RCP, \ .radio_uart_config = { \ .port = 1, \ .uart_config = \ @@ -50,24 +50,24 @@ #endif -#define ESP_ZB_DEFAULT_HOST_CONFIG() \ - { \ - .host_connection_mode = HOST_CONNECTION_MODE_CLI_UART, \ - .host_uart_config = { \ - .port = 0, \ - .uart_config = \ - { \ - .baud_rate = 115200, \ - .data_bits = UART_DATA_8_BITS, \ - .parity = UART_PARITY_DISABLE, \ - .stop_bits = UART_STOP_BITS_1, \ - .flow_ctrl = UART_HW_FLOWCTRL_DISABLE, \ - .rx_flow_ctrl_thresh = 0, \ - .source_clk = UART_SCLK_DEFAULT, \ - }, \ - .rx_pin = UART_PIN_NO_CHANGE, \ - .tx_pin = UART_PIN_NO_CHANGE, \ - }, \ +#define ESP_ZB_DEFAULT_HOST_CONFIG() \ + { \ + .host_connection_mode = ZB_HOST_CONNECTION_MODE_CLI_UART, \ + .host_uart_config = { \ + .port = 0, \ + .uart_config = \ + { \ + .baud_rate = 115200, \ + .data_bits = UART_DATA_8_BITS, \ + .parity = UART_PARITY_DISABLE, \ + .stop_bits = UART_STOP_BITS_1, \ + .flow_ctrl = UART_HW_FLOWCTRL_DISABLE, \ + .rx_flow_ctrl_thresh = 0, \ + .source_clk = UART_SCLK_DEFAULT, \ + }, \ + .rx_pin = UART_PIN_NO_CHANGE, \ + .tx_pin = UART_PIN_NO_CHANGE, \ + }, \ } #define ESP_ZB_ZC_CONFIG() \ diff --git a/examples/esp_zigbee_cli/main/idf_component.yml b/examples/esp_zigbee_cli/main/idf_component.yml index 9574f77..55ab41e 100644 --- a/examples/esp_zigbee_cli/main/idf_component.yml +++ b/examples/esp_zigbee_cli/main/idf_component.yml @@ -1,7 +1,7 @@ ## IDF Component Manager Manifest File dependencies: - espressif/esp-zboss-lib: "~1.2.0" - espressif/esp-zigbee-lib: "~1.2.0" + espressif/esp-zboss-lib: "~1.3.0" + espressif/esp-zigbee-lib: "~1.3.0" ## Required IDF version idf: version: ">=5.0.0" diff --git a/examples/esp_zigbee_customized_devices/customized_client/main/esp_HA_customized_switch.h b/examples/esp_zigbee_customized_devices/customized_client/main/esp_HA_customized_switch.h index e3a9aad..f9f50a0 100644 --- a/examples/esp_zigbee_customized_devices/customized_client/main/esp_HA_customized_switch.h +++ b/examples/esp_zigbee_customized_devices/customized_client/main/esp_HA_customized_switch.h @@ -35,10 +35,10 @@ #define ESP_ZB_DEFAULT_RADIO_CONFIG() \ { \ - .radio_mode = RADIO_MODE_NATIVE, \ + .radio_mode = ZB_RADIO_MODE_NATIVE, \ } #define ESP_ZB_DEFAULT_HOST_CONFIG() \ { \ - .host_connection_mode = HOST_CONNECTION_MODE_NONE, \ + .host_connection_mode = ZB_HOST_CONNECTION_MODE_NONE, \ } diff --git a/examples/esp_zigbee_customized_devices/customized_client/main/idf_component.yml b/examples/esp_zigbee_customized_devices/customized_client/main/idf_component.yml index 9574f77..55ab41e 100644 --- a/examples/esp_zigbee_customized_devices/customized_client/main/idf_component.yml +++ b/examples/esp_zigbee_customized_devices/customized_client/main/idf_component.yml @@ -1,7 +1,7 @@ ## IDF Component Manager Manifest File dependencies: - espressif/esp-zboss-lib: "~1.2.0" - espressif/esp-zigbee-lib: "~1.2.0" + espressif/esp-zboss-lib: "~1.3.0" + espressif/esp-zigbee-lib: "~1.3.0" ## Required IDF version idf: version: ">=5.0.0" diff --git a/examples/esp_zigbee_customized_devices/customized_server/main/esp_HA_customized_light.h b/examples/esp_zigbee_customized_devices/customized_server/main/esp_HA_customized_light.h index 9c697b7..7b01f71 100644 --- a/examples/esp_zigbee_customized_devices/customized_server/main/esp_HA_customized_light.h +++ b/examples/esp_zigbee_customized_devices/customized_server/main/esp_HA_customized_light.h @@ -32,10 +32,10 @@ #define ESP_ZB_DEFAULT_RADIO_CONFIG() \ { \ - .radio_mode = RADIO_MODE_NATIVE, \ + .radio_mode = ZB_RADIO_MODE_NATIVE, \ } #define ESP_ZB_DEFAULT_HOST_CONFIG() \ { \ - .host_connection_mode = HOST_CONNECTION_MODE_NONE, \ + .host_connection_mode = ZB_HOST_CONNECTION_MODE_NONE, \ } diff --git a/examples/esp_zigbee_customized_devices/customized_server/main/idf_component.yml b/examples/esp_zigbee_customized_devices/customized_server/main/idf_component.yml index 4df0e1c..ebc68a4 100644 --- a/examples/esp_zigbee_customized_devices/customized_server/main/idf_component.yml +++ b/examples/esp_zigbee_customized_devices/customized_server/main/idf_component.yml @@ -1,7 +1,7 @@ ## IDF Component Manager Manifest File dependencies: - espressif/esp-zboss-lib: "~1.2.0" - espressif/esp-zigbee-lib: "~1.2.0" + espressif/esp-zboss-lib: "~1.3.0" + espressif/esp-zigbee-lib: "~1.3.0" espressif/led_strip: "~2.0.0" ## Required IDF version idf: diff --git a/examples/esp_zigbee_gateway/main/esp_zigbee_gateway.h b/examples/esp_zigbee_gateway/main/esp_zigbee_gateway.h index 4846d23..a94893c 100644 --- a/examples/esp_zigbee_gateway/main/esp_zigbee_gateway.h +++ b/examples/esp_zigbee_gateway/main/esp_zigbee_gateway.h @@ -38,12 +38,12 @@ #if CONFIG_ZB_RADIO_NATIVE #define ESP_ZB_DEFAULT_RADIO_CONFIG() \ { \ - .radio_mode = RADIO_MODE_NATIVE, \ + .radio_mode = ZB_RADIO_MODE_NATIVE, \ } #else #define ESP_ZB_DEFAULT_RADIO_CONFIG() \ { \ - .radio_mode = RADIO_MODE_UART_RCP, \ + .radio_mode = ZB_RADIO_MODE_UART_RCP, \ .radio_uart_config = { \ .port = 1, \ .uart_config = \ @@ -64,7 +64,7 @@ #define ESP_ZB_DEFAULT_HOST_CONFIG() \ { \ - .host_connection_mode = HOST_CONNECTION_MODE_NONE, \ + .host_connection_mode = ZB_HOST_CONNECTION_MODE_NONE, \ } #define ESP_ZB_RCP_UPDATE_CONFIG() \ diff --git a/examples/esp_zigbee_gateway/main/idf_component.yml b/examples/esp_zigbee_gateway/main/idf_component.yml index b03656b..5b77c39 100644 --- a/examples/esp_zigbee_gateway/main/idf_component.yml +++ b/examples/esp_zigbee_gateway/main/idf_component.yml @@ -1,7 +1,7 @@ ## IDF Component Manager Manifest File dependencies: - espressif/esp-zboss-lib: "~1.2.0" - espressif/esp-zigbee-lib: "~1.2.0" + espressif/esp-zboss-lib: "~1.3.0" + espressif/esp-zigbee-lib: "~1.3.0" espressif/esp_rcp_update: "~0.3.0" espressif/esp-serial-flasher: "~0.0.4" ## Required IDF version diff --git a/examples/esp_zigbee_greenpower/esp_zigbee_gpc/main/esp_zigbee_gpc.h b/examples/esp_zigbee_greenpower/esp_zigbee_gpc/main/esp_zigbee_gpc.h index d278dec..ea668a6 100644 --- a/examples/esp_zigbee_greenpower/esp_zigbee_gpc/main/esp_zigbee_gpc.h +++ b/examples/esp_zigbee_greenpower/esp_zigbee_gpc/main/esp_zigbee_gpc.h @@ -41,10 +41,10 @@ #define ESP_ZB_DEFAULT_RADIO_CONFIG() \ { \ - .radio_mode = RADIO_MODE_NATIVE, \ + .radio_mode = ZB_RADIO_MODE_NATIVE, \ } #define ESP_ZB_DEFAULT_HOST_CONFIG() \ { \ - .host_connection_mode = HOST_CONNECTION_MODE_NONE, \ + .host_connection_mode = ZB_HOST_CONNECTION_MODE_NONE, \ } diff --git a/examples/esp_zigbee_greenpower/esp_zigbee_gpc/main/idf_component.yml b/examples/esp_zigbee_greenpower/esp_zigbee_gpc/main/idf_component.yml index 4df0e1c..ebc68a4 100644 --- a/examples/esp_zigbee_greenpower/esp_zigbee_gpc/main/idf_component.yml +++ b/examples/esp_zigbee_greenpower/esp_zigbee_gpc/main/idf_component.yml @@ -1,7 +1,7 @@ ## IDF Component Manager Manifest File dependencies: - espressif/esp-zboss-lib: "~1.2.0" - espressif/esp-zigbee-lib: "~1.2.0" + espressif/esp-zboss-lib: "~1.3.0" + espressif/esp-zigbee-lib: "~1.3.0" espressif/led_strip: "~2.0.0" ## Required IDF version idf: diff --git a/examples/esp_zigbee_greenpower/esp_zigbee_gpd/main/esp_zigbee_gpd.h b/examples/esp_zigbee_greenpower/esp_zigbee_gpd/main/esp_zigbee_gpd.h index d87645c..65ade9e 100755 --- a/examples/esp_zigbee_greenpower/esp_zigbee_gpd/main/esp_zigbee_gpd.h +++ b/examples/esp_zigbee_greenpower/esp_zigbee_gpd/main/esp_zigbee_gpd.h @@ -32,10 +32,10 @@ #define ESP_ZB_DEFAULT_RADIO_CONFIG() \ { \ - .radio_mode = RADIO_MODE_NATIVE, \ + .radio_mode = ZB_RADIO_MODE_NATIVE, \ } #define ESP_ZB_DEFAULT_HOST_CONFIG() \ { \ - .host_connection_mode = HOST_CONNECTION_MODE_NONE, \ + .host_connection_mode = ZB_HOST_CONNECTION_MODE_NONE, \ } diff --git a/examples/esp_zigbee_greenpower/esp_zigbee_gpd/main/idf_component.yml b/examples/esp_zigbee_greenpower/esp_zigbee_gpd/main/idf_component.yml index 9574f77..55ab41e 100644 --- a/examples/esp_zigbee_greenpower/esp_zigbee_gpd/main/idf_component.yml +++ b/examples/esp_zigbee_greenpower/esp_zigbee_gpd/main/idf_component.yml @@ -1,7 +1,7 @@ ## IDF Component Manager Manifest File dependencies: - espressif/esp-zboss-lib: "~1.2.0" - espressif/esp-zigbee-lib: "~1.2.0" + espressif/esp-zboss-lib: "~1.3.0" + espressif/esp-zigbee-lib: "~1.3.0" ## Required IDF version idf: version: ">=5.0.0" diff --git a/examples/esp_zigbee_ncp/main/idf_component.yml b/examples/esp_zigbee_ncp/main/idf_component.yml index b4b3c07..595945c 100644 --- a/examples/esp_zigbee_ncp/main/idf_component.yml +++ b/examples/esp_zigbee_ncp/main/idf_component.yml @@ -1,7 +1,7 @@ ## IDF Component Manager Manifest File dependencies: - espressif/esp-zboss-lib: "~1.2.0" - espressif/esp-zigbee-lib: "~1.2.0" + espressif/esp-zboss-lib: "~1.3.0" + espressif/esp-zigbee-lib: "~1.3.0" espressif/esp-zigbee-ncp: version: "1.*" override_path: "../../../components/esp-zigbee-ncp" diff --git a/examples/esp_zigbee_ota/ota_client/main/esp_ota_client.h b/examples/esp_zigbee_ota/ota_client/main/esp_ota_client.h index fe965c7..83b8a7a 100644 --- a/examples/esp_zigbee_ota/ota_client/main/esp_ota_client.h +++ b/examples/esp_zigbee_ota/ota_client/main/esp_ota_client.h @@ -39,10 +39,10 @@ #define ESP_ZB_DEFAULT_RADIO_CONFIG() \ { \ - .radio_mode = RADIO_MODE_NATIVE, \ + .radio_mode = ZB_RADIO_MODE_NATIVE, \ } #define ESP_ZB_DEFAULT_HOST_CONFIG() \ { \ - .host_connection_mode = HOST_CONNECTION_MODE_NONE, \ + .host_connection_mode = ZB_HOST_CONNECTION_MODE_NONE, \ } diff --git a/examples/esp_zigbee_ota/ota_client/main/idf_component.yml b/examples/esp_zigbee_ota/ota_client/main/idf_component.yml index 9574f77..55ab41e 100644 --- a/examples/esp_zigbee_ota/ota_client/main/idf_component.yml +++ b/examples/esp_zigbee_ota/ota_client/main/idf_component.yml @@ -1,7 +1,7 @@ ## IDF Component Manager Manifest File dependencies: - espressif/esp-zboss-lib: "~1.2.0" - espressif/esp-zigbee-lib: "~1.2.0" + espressif/esp-zboss-lib: "~1.3.0" + espressif/esp-zigbee-lib: "~1.3.0" ## Required IDF version idf: version: ">=5.0.0" diff --git a/examples/esp_zigbee_ota/ota_server/main/esp_ota_server.h b/examples/esp_zigbee_ota/ota_server/main/esp_ota_server.h index b05572c..438b95f 100644 --- a/examples/esp_zigbee_ota/ota_server/main/esp_ota_server.h +++ b/examples/esp_zigbee_ota/ota_server/main/esp_ota_server.h @@ -45,10 +45,10 @@ extern const uint8_t ota_file_end[] asm("_binary_ota_file_bin_end"); #define ESP_ZB_DEFAULT_RADIO_CONFIG() \ { \ - .radio_mode = RADIO_MODE_NATIVE, \ + .radio_mode = ZB_RADIO_MODE_NATIVE, \ } #define ESP_ZB_DEFAULT_HOST_CONFIG() \ { \ - .host_connection_mode = HOST_CONNECTION_MODE_NONE, \ + .host_connection_mode = ZB_HOST_CONNECTION_MODE_NONE, \ } diff --git a/examples/esp_zigbee_ota/ota_server/main/idf_component.yml b/examples/esp_zigbee_ota/ota_server/main/idf_component.yml index 1d1b566..0df05ef 100644 --- a/examples/esp_zigbee_ota/ota_server/main/idf_component.yml +++ b/examples/esp_zigbee_ota/ota_server/main/idf_component.yml @@ -1,7 +1,7 @@ ## IDF Component Manager Manifest File dependencies: - espressif/esp-zboss-lib: "~1.2.0" - espressif/esp-zigbee-lib: "~1.2.0" + espressif/esp-zboss-lib: "~1.3.0" + espressif/esp-zigbee-lib: "~1.3.0" ## Required IDF version idf: version: ">=5.0.0" \ No newline at end of file diff --git a/examples/esp_zigbee_sleep/deep_sleep/main/esp_zb_sleepy_end_device.h b/examples/esp_zigbee_sleep/deep_sleep/main/esp_zb_sleepy_end_device.h index 9f0a0a6..2f5814c 100644 --- a/examples/esp_zigbee_sleep/deep_sleep/main/esp_zb_sleepy_end_device.h +++ b/examples/esp_zigbee_sleep/deep_sleep/main/esp_zb_sleepy_end_device.h @@ -33,10 +33,10 @@ #define ESP_ZB_DEFAULT_RADIO_CONFIG() \ { \ - .radio_mode = RADIO_MODE_NATIVE, \ + .radio_mode = ZB_RADIO_MODE_NATIVE, \ } #define ESP_ZB_DEFAULT_HOST_CONFIG() \ { \ - .host_connection_mode = HOST_CONNECTION_MODE_NONE, \ + .host_connection_mode = ZB_HOST_CONNECTION_MODE_NONE, \ } diff --git a/examples/esp_zigbee_sleep/deep_sleep/main/idf_component.yml b/examples/esp_zigbee_sleep/deep_sleep/main/idf_component.yml index 99a6a65..2f5de7f 100644 --- a/examples/esp_zigbee_sleep/deep_sleep/main/idf_component.yml +++ b/examples/esp_zigbee_sleep/deep_sleep/main/idf_component.yml @@ -1,7 +1,7 @@ ## IDF Component Manager Manifest File dependencies: - espressif/esp-zboss-lib: "~1.2.0" - espressif/esp-zigbee-lib: "~1.2.0" + espressif/esp-zboss-lib: "~1.3.0" + espressif/esp-zigbee-lib: "~1.3.0" # Required IDF version idf: version: ">=5.0.0" diff --git a/examples/esp_zigbee_sleep/light_sleep/main/esp_zb_sleepy_end_device.h b/examples/esp_zigbee_sleep/light_sleep/main/esp_zb_sleepy_end_device.h index 9f0a0a6..2f5814c 100644 --- a/examples/esp_zigbee_sleep/light_sleep/main/esp_zb_sleepy_end_device.h +++ b/examples/esp_zigbee_sleep/light_sleep/main/esp_zb_sleepy_end_device.h @@ -33,10 +33,10 @@ #define ESP_ZB_DEFAULT_RADIO_CONFIG() \ { \ - .radio_mode = RADIO_MODE_NATIVE, \ + .radio_mode = ZB_RADIO_MODE_NATIVE, \ } #define ESP_ZB_DEFAULT_HOST_CONFIG() \ { \ - .host_connection_mode = HOST_CONNECTION_MODE_NONE, \ + .host_connection_mode = ZB_HOST_CONNECTION_MODE_NONE, \ } diff --git a/examples/esp_zigbee_sleep/light_sleep/main/idf_component.yml b/examples/esp_zigbee_sleep/light_sleep/main/idf_component.yml index 99a6a65..2f5de7f 100644 --- a/examples/esp_zigbee_sleep/light_sleep/main/idf_component.yml +++ b/examples/esp_zigbee_sleep/light_sleep/main/idf_component.yml @@ -1,7 +1,7 @@ ## IDF Component Manager Manifest File dependencies: - espressif/esp-zboss-lib: "~1.2.0" - espressif/esp-zigbee-lib: "~1.2.0" + espressif/esp-zboss-lib: "~1.3.0" + espressif/esp-zigbee-lib: "~1.3.0" # Required IDF version idf: version: ">=5.0.0" diff --git a/examples/esp_zigbee_touchlink/touchlink_light/main/esp_touchlink_light.h b/examples/esp_zigbee_touchlink/touchlink_light/main/esp_touchlink_light.h index ae2f50e..d03e20b 100644 --- a/examples/esp_zigbee_touchlink/touchlink_light/main/esp_touchlink_light.h +++ b/examples/esp_zigbee_touchlink/touchlink_light/main/esp_touchlink_light.h @@ -35,11 +35,11 @@ #define ESP_ZB_DEFAULT_RADIO_CONFIG() \ { \ - .radio_mode = RADIO_MODE_NATIVE, \ + .radio_mode = ZB_RADIO_MODE_NATIVE, \ } #define ESP_ZB_DEFAULT_HOST_CONFIG() \ { \ - .host_connection_mode = HOST_CONNECTION_MODE_NONE, \ + .host_connection_mode = ZB_HOST_CONNECTION_MODE_NONE, \ } diff --git a/examples/esp_zigbee_touchlink/touchlink_light/main/idf_component.yml b/examples/esp_zigbee_touchlink/touchlink_light/main/idf_component.yml index 4df0e1c..ebc68a4 100644 --- a/examples/esp_zigbee_touchlink/touchlink_light/main/idf_component.yml +++ b/examples/esp_zigbee_touchlink/touchlink_light/main/idf_component.yml @@ -1,7 +1,7 @@ ## IDF Component Manager Manifest File dependencies: - espressif/esp-zboss-lib: "~1.2.0" - espressif/esp-zigbee-lib: "~1.2.0" + espressif/esp-zboss-lib: "~1.3.0" + espressif/esp-zigbee-lib: "~1.3.0" espressif/led_strip: "~2.0.0" ## Required IDF version idf: diff --git a/examples/esp_zigbee_touchlink/touchlink_switch/main/esp_touchlink_switch.h b/examples/esp_zigbee_touchlink/touchlink_switch/main/esp_touchlink_switch.h index 44b1cdb..e17dee0 100644 --- a/examples/esp_zigbee_touchlink/touchlink_switch/main/esp_touchlink_switch.h +++ b/examples/esp_zigbee_touchlink/touchlink_switch/main/esp_touchlink_switch.h @@ -37,10 +37,10 @@ #define ESP_ZB_DEFAULT_RADIO_CONFIG() \ { \ - .radio_mode = RADIO_MODE_NATIVE, \ + .radio_mode = ZB_RADIO_MODE_NATIVE, \ } #define ESP_ZB_DEFAULT_HOST_CONFIG() \ { \ - .host_connection_mode = HOST_CONNECTION_MODE_NONE, \ + .host_connection_mode = ZB_HOST_CONNECTION_MODE_NONE, \ } diff --git a/examples/esp_zigbee_touchlink/touchlink_switch/main/idf_component.yml b/examples/esp_zigbee_touchlink/touchlink_switch/main/idf_component.yml index 9574f77..55ab41e 100644 --- a/examples/esp_zigbee_touchlink/touchlink_switch/main/idf_component.yml +++ b/examples/esp_zigbee_touchlink/touchlink_switch/main/idf_component.yml @@ -1,7 +1,7 @@ ## IDF Component Manager Manifest File dependencies: - espressif/esp-zboss-lib: "~1.2.0" - espressif/esp-zigbee-lib: "~1.2.0" + espressif/esp-zboss-lib: "~1.3.0" + espressif/esp-zigbee-lib: "~1.3.0" ## Required IDF version idf: version: ">=5.0.0" diff --git a/tools/ci/build_apps.py b/tools/ci/build_apps.py index bbb566a..e9a544f 100644 --- a/tools/ci/build_apps.py +++ b/tools/ci/build_apps.py @@ -126,6 +126,12 @@ def update_component_yml_files(): f'cp {os.path.join(PROJECT_ROOT, "tools", "managed_component_yml", "light_idf_component.yml")} main' f'/idf_component.yml') + os.chdir(os.path.join(DEF_APP_PATH, 'esp_zigbee_HA_sample', 'HA_temperature_sensor')) + os.remove('main/idf_component.yml') + + os.chdir(os.path.join(DEF_APP_PATH, 'esp_zigbee_HA_sample', 'HA_thermostat')) + os.remove('main/idf_component.yml') + os.chdir(os.path.join(DEF_APP_PATH, 'esp_zigbee_touchlink', 'touchlink_light')) os.remove('main/idf_component.yml') os.system(