Skip to content

Commit

Permalink
esp-zigbee-sdk: release/v1.2.0(9d7e9ff2)
Browse files Browse the repository at this point in the history
- 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
- Fixed the group membership response
- Fixed optional hue attribute for color control
- Fixed the parameters for esp_zb_ep_list_add_ep()

- Closes: #83
- Closes: #251
- Closes: #256
  • Loading branch information
xieqinan committed Mar 8, 2024
1 parent 46d44a9 commit 2fe15ba
Show file tree
Hide file tree
Showing 48 changed files with 171 additions and 76 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.
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 @@ -47,7 +47,6 @@ static const char *TAG = "ESP_ZB_COLOR_DIMM_SWITCH";

static void esp_zb_buttons_handler(switch_func_pair_t *button_func_pair)
{
esp_zb_lock_acquire(portMAX_DELAY);
uint8_t step = 10;
static uint8_t level_value = 5;
static uint8_t press_count = 0;
Expand All @@ -62,21 +61,24 @@ 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++;
}
esp_zb_lock_release();
}

static void bdb_start_top_level_commissioning_cb(uint8_t mode_mask)
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
@@ -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 @@ -38,17 +38,17 @@ static const char *TAG = "ESP_ZB_ON_OFF_SWITCH";

static void esp_zb_buttons_handler(switch_func_pair_t *button_func_pair)
{
esp_zb_lock_acquire(portMAX_DELAY);
if (button_func_pair->func == SWITCH_ONOFF_TOGGLE_CONTROL) {
/* implemented light switch toggle functionality */
esp_zb_zcl_on_off_cmd_t cmd_req;
cmd_req.zcl_basic_cmd.src_endpoint = HA_ONOFF_SWITCH_ENDPOINT;
cmd_req.address_mode = ESP_ZB_APS_ADDR_MODE_DST_ADDR_ENDP_NOT_PRESENT;
cmd_req.on_off_cmd_id = ESP_ZB_ZCL_CMD_ON_OFF_TOGGLE_ID;
ESP_EARLY_LOGI(TAG, "Send 'on_off toggle' command");
esp_zb_lock_acquire(portMAX_DELAY);
esp_zb_zcl_on_off_cmd_req(&cmd_req);
esp_zb_lock_release();
ESP_EARLY_LOGI(TAG, "Send 'on_off toggle' command");
}
esp_zb_lock_release();
}

static void bdb_start_top_level_commissioning_cb(uint8_t mode_mask)
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"
4 changes: 2 additions & 2 deletions examples/esp_zigbee_cli/main/idf_component.yml
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 @@ -15,7 +15,6 @@
#include "esp_check.h"
#include "esp_err.h"
#include "esp_log.h"
#include "esp_zigbee_core.h"
#include "nvs_flash.h"
#include "string.h"
#include "freertos/FreeRTOS.h"
Expand Down Expand Up @@ -48,7 +47,6 @@ light_bulb_device_params_t on_off_light;

static void esp_zb_buttons_handler(switch_func_pair_t *button_func_pair)
{
esp_zb_lock_acquire(portMAX_DELAY);
switch (button_func_pair->func) {
case SWITCH_ONOFF_TOGGLE_CONTROL: {
/* send on-off toggle command to remote device */
Expand All @@ -58,13 +56,14 @@ static void esp_zb_buttons_handler(switch_func_pair_t *button_func_pair)
cmd_req.zcl_basic_cmd.src_endpoint = HA_ONOFF_SWITCH_ENDPOINT;
cmd_req.address_mode = ESP_ZB_APS_ADDR_MODE_16_ENDP_PRESENT;
cmd_req.on_off_cmd_id = ESP_ZB_ZCL_CMD_ON_OFF_TOGGLE_ID;
ESP_EARLY_LOGI(TAG, "Send 'on_off toggle' command to address(0x%x) endpoint(%d)", on_off_light.short_addr, on_off_light.endpoint);
esp_zb_lock_acquire(portMAX_DELAY);
esp_zb_zcl_on_off_cmd_req(&cmd_req);
esp_zb_lock_release();
ESP_EARLY_LOGI(TAG, "Send 'on_off toggle' command to address(0x%x) endpoint(%d)", on_off_light.short_addr, on_off_light.endpoint);
} break;
default:
break;
}
esp_zb_lock_release();
}

static void bdb_start_top_level_commissioning_cb(uint8_t mode_mask)
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
@@ -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 2fe15ba

Please sign in to comment.