Skip to content

Commit

Permalink
Merge branch 'release/esp-zigbee-sdk-v1.2.0' into 'main'
Browse files Browse the repository at this point in the history
esp-zigbee-sdk: release/v1.2.0(9d7e9ff2)

See merge request espressif/esp-zigbee-sdk!110
  • Loading branch information
chshu committed Mar 8, 2024
2 parents 4d68ccf + 2fe15ba commit 1ed3b72
Show file tree
Hide file tree
Showing 58 changed files with 282 additions and 117 deletions.
20 changes: 10 additions & 10 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ before_script:

.setup_idf: &setup_idf
- cd $CI_PROJECT_DIR
- git clone --depth=1 -b $CI_COMMIT_REF_NAME ${IDF_GIT_REPO_URL} || git clone --depth=1 -b master ${IDF_GIT_REPO_URL}
- git clone --depth=1 -b $CI_COMMIT_REF_NAME ${IDF_GIT_REPO_URL} || git clone --depth=1 -b v5.1.3 ${IDF_GIT_REPO_URL}
- cd esp-idf
- ./install.sh
- . ./export.sh
Expand Down Expand Up @@ -62,7 +62,7 @@ before_script:

build_non_pytest_examples:
stage: build
image: ${CI_DOCKER_REGISTRY}/esp-env-v5.3:1
image: ${CI_DOCKER_REGISTRY}/esp-env-v5.1:1
artifacts:
paths:
- "**/build*/*.bin"
Expand All @@ -83,7 +83,7 @@ build_non_pytest_examples:

build_non_pytest_host:
stage: build
image: ${CI_DOCKER_REGISTRY}/esp-env-v5.3:1
image: ${CI_DOCKER_REGISTRY}/esp-env-v5.1:1
artifacts:
when: always
expire_in: 4 days
Expand All @@ -96,7 +96,7 @@ build_non_pytest_host:

build_pytest_examples:
stage: build
image: ${CI_DOCKER_REGISTRY}/esp-env-v5.3:1
image: ${CI_DOCKER_REGISTRY}/esp-env-v5.1:1
artifacts:
paths:
- "**/build*/*.bin"
Expand All @@ -117,7 +117,7 @@ build_pytest_examples:

build_pytest_gateway:
stage: build
image: ${CI_DOCKER_REGISTRY}/esp-env-v5.3:1
image: ${CI_DOCKER_REGISTRY}/esp-env-v5.1:1
artifacts:
paths:
- "**/build*/*.bin"
Expand All @@ -139,7 +139,7 @@ build_pytest_gateway:

build_docs:
stage: build
image: $CI_DOCKER_REGISTRY/esp-idf-doc-env-v5.3:1-1
image: $CI_DOCKER_REGISTRY/esp-idf-doc-env-v5.1:1-1
variables:
ESP_DOCS_LATEST_BRANCH_NAME: "main"
artifacts:
Expand All @@ -154,7 +154,7 @@ build_docs:

pytest_esp32h2_i154_zigbee_multi_dut:
stage: target_test
image: ${CI_DOCKER_REGISTRY}/target-test-env-v5.3:1
image: ${CI_DOCKER_REGISTRY}/target-test-env-v5.1:1
needs:
- build_pytest_examples
script:
Expand All @@ -164,7 +164,7 @@ pytest_esp32h2_i154_zigbee_multi_dut:

pytest_esp32c6_i154_zigbee_multi_dut:
stage: target_test
image: ${CI_DOCKER_REGISTRY}/target-test-env-v5.3:1
image: ${CI_DOCKER_REGISTRY}/target-test-env-v5.1:1
needs:
- build_pytest_examples
script:
Expand All @@ -174,7 +174,7 @@ pytest_esp32c6_i154_zigbee_multi_dut:

pytest_esp32s3_i154_zigbee_multi_dut:
stage: target_test
image: ${CI_DOCKER_REGISTRY}/target-test-env-v5.3:1
image: ${CI_DOCKER_REGISTRY}/target-test-env-v5.1:1
needs:
- build_pytest_gateway
script:
Expand All @@ -184,7 +184,7 @@ pytest_esp32s3_i154_zigbee_multi_dut:

.deploy_docs_template:
stage: docs
image: $CI_DOCKER_REGISTRY/esp-idf-doc-env-v5.3:1-1
image: $CI_DOCKER_REGISTRY/esp-idf-doc-env-v5.1:1-1
needs:
- build_docs
variables:
Expand Down
25 changes: 25 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# Espressif Zigbee SDK Release Notes

## 8-Mar-2024
1.2.0 version release of ESP-ZIGBEE-SDK is based on esp-idf v5.1.3

### Features
- Updated esp-zboss-lib to v1.2.0
- Updated esp-zigbee-lib to v1.2.0
- Supported to report the level value at each step upon receiving the level change command
- Supported cli to configure green power functionality
- Supported to print assert location
- Supported 64-bit timer for stack
- Supported to configure the multiple pre-configured link key for centralized and distributed network
- Added more optional attributes support for color control

### Bug Fixes
- Fixed the group membership response
- Fixed optional hue attribute for color control
- Fixed the parameters for esp_zb_ep_list_add_ep()
- Closes: https://github.com/espressif/esp-zigbee-sdk/issues/83
- Closes: https://github.com/espressif/esp-zigbee-sdk/issues/251
- Closes: https://github.com/espressif/esp-zigbee-sdk/issues/256

### Break Changes
- The `esp_zb_ep_list_add_ep()` function now utilizes an endpoint configuration structure,instead of multi parameters.


## 22-Feb-2024
1.1.2 version release of ESP-ZIGBEE-SDK

Expand Down
2 changes: 1 addition & 1 deletion components/esp-zigbee-lib/idf_component.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "1.1.2"
version: "1.2.0"
description: esp-zigbee library component
url: https://github.com/espressif/esp-zigbee-sdk
dependencies:
Expand Down
6 changes: 2 additions & 4 deletions components/esp-zigbee-lib/include/esp_zigbee_endpoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,14 @@ esp_zb_ep_list_t *esp_zb_ep_list_create(void);
*
* @param[in] ep_list A pointer to endpoint list @ref esp_zb_ep_list_s
* @param[in] cluster_list An cluster list which wants to add to endpoint
* @param[in] endpoint A specific endpoint (cluster list)
* @param[in] profile_id A profile id
* @param[in] device_id A device id for this device
* @param[in] endpoint_config A specific endpoint config @ref esp_zb_endpoint_config_s
* @anchor esp_zb_ep_list_add_ep
* @return
* - ESP_OK on success
* - ESP_ERR_INVALID_ARG if endpoint list not initialized
*
*/
esp_err_t esp_zb_ep_list_add_ep(esp_zb_ep_list_t *ep_list, esp_zb_cluster_list_t *cluster_list, uint8_t endpoint, uint16_t profile_id, uint16_t device_id);
esp_err_t esp_zb_ep_list_add_ep(esp_zb_ep_list_t *ep_list, esp_zb_cluster_list_t *cluster_list, esp_zb_endpoint_config_t endpoint_config);

#ifdef __cplusplus
}
Expand Down
40 changes: 40 additions & 0 deletions components/esp-zigbee-lib/include/esp_zigbee_secur.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,46 @@ uint8_t esp_zb_secur_network_min_join_lqi_get(void);
*/
void esp_zb_secur_network_min_join_lqi_set(uint8_t lqi);

/**
* @brief Add the specified pre-configured TC standard link key for the device
*
* @param[in] key A pointer to 16-byte pre-configured link key to be set
* @return
* - ESP_OK: Preconfigured TC standard link key added successfully
* - ESP_FAIL: Failed to add preconfigured TC standard link key
*/
esp_err_t esp_zb_secur_multi_TC_standard_preconfigure_key_add(uint8_t *key);

/**
* @brief Remove the specified pre-configured TC standard link key from the device
*
* @param[in] key A pointer to 16-byte the pre-configured link key to be removed
* @return
* - ESP_OK: Preconfigured TC standard link key removed successfully
* - ESP_FAIL: Failed to remove preconfigured TC standard link key
*/
esp_err_t esp_zb_secur_multi_TC_standard_preconfigure_key_remove(uint8_t *key);

/**
* @brief Add the specified pre-configured distributed link key for the device
*
* @param[in] key A pointer to 16-byte pre-configured distributed link key to be set
* @return
* - ESP_OK: Preconfigured distributed link key added successfully
* - ESP_FAIL: Failed to add preconfigured distributed link key
*/
esp_err_t esp_zb_secur_multi_standard_distributed_key_add(uint8_t *key);

/**
* @brief Remove the specified pre-configured distributed link key from the device
*
* @param[in] key A pointer to 16-byte pre-configured distributed link key to be removed
* @return
* - ESP_OK: Preconfigured distributed link key removed successfully
* - ESP_FAIL: Failed to remove preconfigured distributed link key
*/
esp_err_t esp_zb_secur_multi_standard_distributed_key_remove(uint8_t *key);

#ifdef __cplusplus
}
#endif
17 changes: 14 additions & 3 deletions components/esp-zigbee-lib/include/esp_zigbee_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ typedef struct esp_zb_zcl_reporting_info_s {
uint8_t cluster_role; /*!< Cluster rolo server/client */
uint16_t attr_id; /*!< Attribute ID for reporting */
uint8_t flags; /*!< Flags to inform status of reporting */
uint32_t run_time; /*!< Time to run next reporting activity */
uint64_t run_time; /*!< Time to run next reporting activity */
union {
struct {
uint16_t min_interval; /*!< Actual minimum reporting interval */
Expand Down Expand Up @@ -233,14 +233,25 @@ typedef struct esp_zb_af_simple_desc_1_1_s {
uint8_t endpoint; /*!< Endpoint */
uint16_t app_profile_id; /*!< Application profile identifier */
uint16_t app_device_id; /*!< Application device identifier */
uint32_t app_device_version: 4; /*!< Application device version */
uint32_t reserved: 4; /*!< Reserved */
uint32_t app_device_version: 4; /*!< Application device version */
uint32_t reserved: 4; /*!< Reserved */
uint8_t app_input_cluster_count; /*!< Application input cluster count */
uint8_t app_output_cluster_count; /*!< Application output cluster count */
uint16_t app_cluster_list[2]; /*!< Application input and output cluster list */
} ESP_ZB_PACKED_STRUCT
esp_zb_af_simple_desc_1_1_t;

/**
* @brief Structure of device descriptor on a endpoint
*/
typedef struct esp_zb_endpoint_config_s {
uint8_t endpoint; /*!< Endpoint */
uint16_t app_profile_id; /*!< Application profile identifier */
uint16_t app_device_id; /*!< Application device identifier */
uint32_t app_device_version: 4; /*!< Application device version */
} ESP_ZB_PACKED_STRUCT
esp_zb_endpoint_config_t;

/**
* @brief Type to represent ZCL endpoint definition structure
* @note The esp_zb_zcl_reporting_info_t defines see @ref esp_zb_zcl_reporting_info_s
Expand Down
Binary file modified components/esp-zigbee-lib/lib/esp32/libesp_zb_api_zczr.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32/libesp_zb_cli_command.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32c3/libesp_zb_api_zczr.a
Binary file not shown.
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_ed.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_gpd.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_zczr.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32c6/libesp_zb_cli_command.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_ed.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_gpd.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_zczr.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32h2/libesp_zb_cli_command.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32s2/libesp_zb_api_zczr.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32s2/libesp_zb_cli_command.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32s3/libesp_zb_api_zczr.a
Binary file not shown.
Binary file modified components/esp-zigbee-lib/lib/esp32s3/libesp_zb_cli_command.a
Binary file not shown.
12 changes: 9 additions & 3 deletions components/esp-zigbee-ncp/src/esp_ncp_zb.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ static void esp_ncp_zb_aps_data_confirm_handler(esp_zb_apsde_data_confirm_t conf

static void esp_ncp_zb_bdb_start_top_level_commissioning_cb(uint8_t mode_mask)
{
ESP_ERROR_CHECK(esp_zb_bdb_start_top_level_commissioning(mode_mask));
ESP_RETURN_ON_FALSE(esp_zb_bdb_start_top_level_commissioning(mode_mask) == ESP_OK, , TAG, "Failed to start Zigbee bdb commissioning");
}

static void esp_ncp_zb_bind_cb(esp_zb_zdp_status_t zdo_status, void *user_ctx)
Expand Down Expand Up @@ -554,7 +554,7 @@ void esp_zb_app_signal_handler(esp_zb_app_signal_t *signal_struct)
case ESP_ZB_ZDO_SIGNAL_DEFAULT_START:
break;
case ESP_ZB_ZDO_SIGNAL_SKIP_STARTUP:
ESP_LOGI(TAG, "Zigbee stack initialized");
ESP_LOGI(TAG, "Initialize Zigbee stack");
esp_zb_bdb_start_top_level_commissioning(ESP_ZB_BDB_MODE_INITIALIZATION);
break;
case ESP_ZB_ZDO_SIGNAL_DEVICE_ANNCE:
Expand Down Expand Up @@ -1026,7 +1026,13 @@ static esp_err_t esp_ncp_zb_add_endpoint_fn(const uint8_t *input, uint16_t inlen
}

esp_zb_ep_list_t *esp_zb_ep_list = esp_zb_ep_list_create();
esp_zb_ep_list_add_ep(esp_zb_ep_list, esp_zb_cluster_list, ncp_endpoint->endpoint, ncp_endpoint->profileId, ncp_endpoint->deviceId);
esp_zb_endpoint_config_t endpoint_config = {
.endpoint = ncp_endpoint->endpoint,
.app_profile_id = ncp_endpoint->profileId,
.app_device_id = ncp_endpoint->deviceId,
.app_device_version = 0
};
esp_zb_ep_list_add_ep(esp_zb_ep_list, esp_zb_cluster_list, endpoint_config);
esp_zb_device_register(esp_zb_ep_list);

if (inputClusterList) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ static const char *TAG = "ESP_ZB_COLOR_DIMM_LIGHT";
/********************* Define functions **************************/
static void bdb_start_top_level_commissioning_cb(uint8_t mode_mask)
{
ESP_ERROR_CHECK(esp_zb_bdb_start_top_level_commissioning(mode_mask));
ESP_RETURN_ON_FALSE(esp_zb_bdb_start_top_level_commissioning(mode_mask) == ESP_OK, , TAG, "Failed to start Zigbee commissioning");
}

void esp_zb_app_signal_handler(esp_zb_app_signal_t *signal_struct)
Expand All @@ -38,7 +38,7 @@ void esp_zb_app_signal_handler(esp_zb_app_signal_t *signal_struct)
esp_zb_app_signal_type_t sig_type = *p_sg_p;
switch (sig_type) {
case ESP_ZB_ZDO_SIGNAL_SKIP_STARTUP:
ESP_LOGI(TAG, "Zigbee stack initialized");
ESP_LOGI(TAG, "Initialize Zigbee stack");
esp_zb_bdb_start_top_level_commissioning(ESP_ZB_BDB_MODE_INITIALIZATION);
break;
case ESP_ZB_BDB_SIGNAL_DEVICE_FIRST_START:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## IDF Component Manager Manifest File
dependencies:
espressif/esp-zboss-lib: "~1.1.0"
espressif/esp-zigbee-lib: "~1.1.0"
espressif/esp-zboss-lib: "~1.2.0"
espressif/esp-zigbee-lib: "~1.2.0"
espressif/led_strip: "~2.0.0"
## Required IDF version
idf:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* CONDITIONS OF ANY KIND, either express or implied.
*/

#include "esp_check.h"
#include "string.h"
#include "nvs_flash.h"
#include "esp_log.h"
Expand Down Expand Up @@ -60,16 +61,20 @@ static void esp_zb_buttons_handler(switch_func_pair_t *button_func_pair)
cmd_color.transition_time = 0;
cmd_color.address_mode = ESP_ZB_APS_ADDR_MODE_DST_ADDR_ENDP_NOT_PRESENT;
cmd_color.zcl_basic_cmd.src_endpoint = HA_COLOR_DIMMABLE_SWITCH_ENDPOINT;
ESP_EARLY_LOGI(TAG, "Send command for moving light color to (0x%x, 0x%x)", refer_x, refer_y);
esp_zb_lock_acquire(portMAX_DELAY);
esp_zb_zcl_color_move_to_color_cmd_req(&cmd_color);
esp_zb_lock_release();
ESP_EARLY_LOGI(TAG, "Send command for moving light color to (0x%x, 0x%x)", refer_x, refer_y);
} else {
esp_zb_zcl_move_to_level_cmd_t cmd_level;
cmd_level.zcl_basic_cmd.src_endpoint = HA_COLOR_DIMMABLE_SWITCH_ENDPOINT;
cmd_level.address_mode = ESP_ZB_APS_ADDR_MODE_DST_ADDR_ENDP_NOT_PRESENT;
cmd_level.level = level_value;
cmd_level.transition_time = 0xffff;
ESP_EARLY_LOGI(TAG, "Send command for moving light to %d level", level_value);
esp_zb_lock_acquire(portMAX_DELAY);
esp_zb_zcl_level_move_to_level_with_onoff_cmd_req(&cmd_level);
esp_zb_lock_release();
ESP_EARLY_LOGI(TAG, "Send command for moving light to %d level", level_value);
level_value += step;
}
press_count++;
Expand All @@ -78,7 +83,7 @@ static void esp_zb_buttons_handler(switch_func_pair_t *button_func_pair)

static void bdb_start_top_level_commissioning_cb(uint8_t mode_mask)
{
ESP_ERROR_CHECK(esp_zb_bdb_start_top_level_commissioning(mode_mask));
ESP_RETURN_ON_FALSE(esp_zb_bdb_start_top_level_commissioning(mode_mask) == ESP_OK, , TAG, "Failed to start Zigbee bdb commissioning");
}

static void bind_cb(esp_zb_zdp_status_t zdo_status, void *user_ctx)
Expand Down Expand Up @@ -125,7 +130,7 @@ void esp_zb_app_signal_handler(esp_zb_app_signal_t *signal_struct)
esp_zb_zdo_signal_device_annce_params_t *dev_annce_params = NULL;
switch (sig_type) {
case ESP_ZB_ZDO_SIGNAL_SKIP_STARTUP:
ESP_LOGI(TAG, "Zigbee stack initialized");
ESP_LOGI(TAG, "Initialize Zigbee stack");
esp_zb_bdb_start_top_level_commissioning(ESP_ZB_BDB_MODE_INITIALIZATION);
break;
case ESP_ZB_BDB_SIGNAL_DEVICE_FIRST_START:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## IDF Component Manager Manifest File
dependencies:
espressif/esp-zboss-lib: "~1.1.0"
espressif/esp-zigbee-lib: "~1.1.0"
espressif/esp-zboss-lib: "~1.2.0"
espressif/esp-zigbee-lib: "~1.2.0"
## Required IDF version
idf:
version: ">=5.0.0"
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ static const char *TAG = "ESP_ZB_ON_OFF_LIGHT";
/********************* Define functions **************************/
static void bdb_start_top_level_commissioning_cb(uint8_t mode_mask)
{
ESP_ERROR_CHECK(esp_zb_bdb_start_top_level_commissioning(mode_mask));
ESP_RETURN_ON_FALSE(esp_zb_bdb_start_top_level_commissioning(mode_mask) == ESP_OK, , TAG, "Failed to start Zigbee commissioning");
}

void esp_zb_app_signal_handler(esp_zb_app_signal_t *signal_struct)
Expand All @@ -37,7 +37,7 @@ void esp_zb_app_signal_handler(esp_zb_app_signal_t *signal_struct)
esp_zb_app_signal_type_t sig_type = *p_sg_p;
switch (sig_type) {
case ESP_ZB_ZDO_SIGNAL_SKIP_STARTUP:
ESP_LOGI(TAG, "Zigbee stack initialized");
ESP_LOGI(TAG, "Initialize Zigbee stack");
esp_zb_bdb_start_top_level_commissioning(ESP_ZB_BDB_MODE_INITIALIZATION);
break;
case ESP_ZB_BDB_SIGNAL_DEVICE_FIRST_START:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## IDF Component Manager Manifest File
dependencies:
espressif/esp-zboss-lib: "~1.1.0"
espressif/esp-zigbee-lib: "~1.1.0"
espressif/esp-zboss-lib: "~1.2.0"
espressif/esp-zigbee-lib: "~1.2.0"
espressif/led_strip: "~2.0.0"
## Required IDF version
idf:
Expand Down
Loading

0 comments on commit 1ed3b72

Please sign in to comment.