Skip to content

Commit

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

See merge request espressif/esp-zigbee-sdk!106
  • Loading branch information
chshu committed Feb 23, 2024
2 parents 2be543e + a67793c commit 4d68ccf
Show file tree
Hide file tree
Showing 22 changed files with 175 additions and 11 deletions.
23 changes: 23 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,27 @@
# Espressif Zigbee SDK Release Notes

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

### Features
- Updated esp-zboss-lib to v1.1.2
- Updated esp-zigbee-lib to v1.1.2
- Added on/off off_with_effect, on_with_recall_global_scene and on_with_timed_off command
- Added zcl custom cluster handler update API
- Added device joining network minimum lqi setting API
- Added beacon scan duration setting API
- Changed the minimum custom cluster value to 0x8000

### Bug Fixes
- Fixed green power attribute setting
- Fixed green power device type
- Fixed assert of zcl malformed packet
- Fixed distributed router formation capability, when it reboots
- Closes: https://github.com/espressif/esp-zigbee-sdk/issues/212
- Closes: https://github.com/espressif/esp-zigbee-sdk/issues/209
- Closes: https://github.com/espressif/esp-zigbee-sdk/issues/193


## 6-Feb-2024
1.1.1 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.1"
version: "1.1.2"
description: esp-zigbee library component
url: https://github.com/espressif/esp-zigbee-sdk
dependencies:
Expand Down
17 changes: 16 additions & 1 deletion components/esp-zigbee-lib/include/esp_zigbee_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ extern "C" {
#endif /** CONFIG_ZB_ZED */

#ifdef CONFIG_ZB_GP_ENABLED
#define ESP_ZGP_GPBB_DEFAULT_FUNCTIONALITY 0x9ac3f /*!< GPP functionality, refer to esp_zgp_gpp_functionality_t */
#define ESP_ZGP_GPPB_DEFAULT_FUNCTIONALITY 0x9ac2f /*!< GPP functionality, refer to esp_zgp_gpp_functionality_t */
#define ESP_ZGP_GPS_DEFAULT_FUNCTIONALITY 0x9ac2f /*!< GPS functionality, refer to esp_zgp_gps_functionality_t */
#endif /* CONFIG_ZB_GP_ENABLED */

/** Enum of the Zigbee network device type
Expand Down Expand Up @@ -383,6 +384,20 @@ void esp_zb_set_rx_on_when_idle(bool rx_on);
*/
bool esp_zb_bdb_is_factory_new(void);

/**
* @brief Get the scan duration of beacon
*
* @return Scan duration
*/
uint8_t esp_zb_bdb_get_scan_duration(void);

/**
* @brief Set the scan duration of beacon
*
* @param[in] duration Scan time is ((1 << duration) + 1) * 15.36 ms
*/
void esp_zb_bdb_set_scan_duration(uint8_t duration);

/**
* @brief Open Zigbee network
*
Expand Down
14 changes: 14 additions & 0 deletions components/esp-zigbee-lib/include/esp_zigbee_secur.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,20 @@ esp_err_t esp_zb_secur_primary_network_key_get(uint8_t *key);
*/
esp_err_t esp_zb_secur_network_key_set(uint8_t *key);

/**
* @brief Get the minimum LQI values for device joining the network
*
* @return The minimum LQI values
*/
uint8_t esp_zb_secur_network_min_join_lqi_get(void);

/**
* @brief Set the minimum LQI value for device joining the network
*
* @param[in] lqi The LQI values
*/
void esp_zb_secur_network_min_join_lqi_set(uint8_t lqi);

#ifdef __cplusplus
}
#endif
107 changes: 98 additions & 9 deletions components/esp-zigbee-lib/include/zcl/esp_zigbee_zcl_command.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,17 @@ typedef struct esp_zb_zcl_attribute_s {
esp_zb_zcl_attribute_data_t data; /*!< The data fo attribute */
} esp_zb_zcl_attribute_t;

/**
* @brief The Zigbee zcl custom cluster handlers struct
*
*/
typedef struct esp_zb_zcl_custom_cluster_handlers_s {
uint16_t cluster_id; /*!< Cluster identifier */
uint8_t cluster_role; /*!< Cluster role */
esp_zb_zcl_cluster_check_value_callback_t check_value_cb; /*!< The callback for validating the value from ZCL command */
esp_zb_zcl_cluster_write_attr_callback_t write_attr_cb; /*!< The callback for validating the ZCL write attribute */
} esp_zb_zcl_custom_cluster_handlers_t;

/**
* @brief The Zigbee zcl cluster command properties struct
*
Expand Down Expand Up @@ -193,6 +204,41 @@ typedef struct esp_zb_zcl_on_off_cmd_s {
uint8_t on_off_cmd_id; /*!< command id for the on-off cluster command */
} esp_zb_zcl_on_off_cmd_t;

/**
* @brief The Zigbee ZCL on-off off with effect command struct
*
*/
typedef struct esp_zb_zcl_on_off_off_with_effect_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 effect_id; /*!< The field specifies the fading effect to use when switching the device off */
uint8_t effect_variant; /*!< The field is used to indicate which variant of the effect, indicated in the Effect Identifier field, SHOULD be triggered. */
} esp_zb_zcl_on_off_off_with_effect_cmd_t;


/**
* @brief The Zigbee ZCL on-off on with recall global scene command struct
*
*/
typedef struct esp_zb_zcl_on_off_on_with_recall_global_scene_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_on_off_on_with_recall_global_scene_cmd_t;

/**
* @brief The Zigbee ZCL on-off on with timed off command struct
*
*/
typedef struct esp_zb_zcl_on_off_on_with_timed_off_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 on_off_control; /*!< The field contains information on how the device is to be operated */
uint16_t on_time; /*!< The field specifies the length of time (in 1/10ths second) that the device is to remain "on", i.e.,
with its OnOff attribute equal to 0x01, before automatically turning "off".*/
uint16_t off_wait_time; /*!< The field specifies the length of time (in 1/10ths second) that the device SHALL remain "off", i.e.,
with its OnOff attribute equal to 0x00, and guarded to prevent an on command turning the device back "on" */
} esp_zb_zcl_on_off_on_with_timed_off_cmd_t;

/* ZCL identify cluster */

/**
Expand Down Expand Up @@ -1798,6 +1844,37 @@ uint8_t esp_zb_zcl_basic_factory_reset_cmd_req(esp_zb_zcl_basic_fact_reset_cmd_t
*/
uint8_t esp_zb_zcl_on_off_cmd_req(esp_zb_zcl_on_off_cmd_t *cmd_req);

/**
* @brief Send on-off Off With Effect command
*
* @note The Off With Effect command allows devices to be turned off using enhanced ways of fading
* @param[in] cmd_req pointer to the on-off off with effect command @ref esp_zb_zcl_on_off_off_with_effect_cmd_s
*
* @return The transaction sequence number
*/
uint8_t esp_zb_zcl_on_off_off_with_effect_cmd_req(esp_zb_zcl_on_off_off_with_effect_cmd_t *cmd_req);

/**
* @brief Send on-off On With Recall Global Scene command
*
* @note The On With Recall Global Scene command allows the recall of the settings when the device was turned off.
* @param[in] cmd_req pointer to the on-off on with recall global scene command @ref esp_zb_zcl_on_off_on_with_recall_global_scene_cmd_s
*
* @return The transaction sequence number
*/
uint8_t esp_zb_zcl_on_off_on_with_recall_global_scene_cmd_req(esp_zb_zcl_on_off_on_with_recall_global_scene_cmd_t *cmd_req);

/**
* @brief Send on-off On With Timed Off command
*
* @note The On With Timed Off command allows devices to be turned on for a specific duration with a guarded off
duration so that SHOULD the device be subsequently switched off.
* @param[in] cmd_req pointer to the on-off on with timed off command @ref esp_zb_zcl_on_off_on_with_timed_off_cmd_s
*
* @return The transaction sequence number
*/
uint8_t esp_zb_zcl_on_off_on_with_timed_off_cmd_req(esp_zb_zcl_on_off_on_with_timed_off_cmd_t *cmd_req);

/* ZCL identify cluster list command */

/**
Expand Down Expand Up @@ -2326,15 +2403,6 @@ uint8_t esp_zb_zcl_metering_get_snapshot_cmd_req(esp_zb_metering_get_snapshot_cm
*/
uint8_t esp_zb_zcl_metering_get_sampled_data_cmd_req(esp_zb_metering_get_sampled_data_cmd_t *cmd_req);

/**
* @brief Send custom cluster command request
*
* @param[in] cmd_req pointer to the send custom cluster command request, refer to esp_zb_zcl_custom_cluster_cmd_req_t
*
* @return The transaction sequence number
*/
uint8_t esp_zb_zcl_custom_cluster_cmd_req(esp_zb_zcl_custom_cluster_cmd_req_t *cmd_req);

#ifdef CONFIG_ZB_GP_ENABLED
/**
* @brief Perform Proxy Commissioning mode enter request
Expand Down Expand Up @@ -2398,6 +2466,15 @@ uint8_t esp_zgp_zcl_gp_proxy_table_cmd_req(esp_zgp_zcl_gp_proxy_table_req_t *req
uint8_t esp_zgp_zcl_pairing_configuration_cmd_req(esp_zgp_zcl_pairing_configuration_req_t *req);
#endif /* CONFIG_ZB_GP_ENABLED */

/**
* @brief Send custom cluster command request
*
* @param[in] cmd_req pointer to the send custom cluster command request, refer to esp_zb_zcl_custom_cluster_cmd_req_t
*
* @return The transaction sequence number
*/
uint8_t esp_zb_zcl_custom_cluster_cmd_req(esp_zb_zcl_custom_cluster_cmd_req_t *cmd_req);

/**
* @brief Send custom cluster command response
*
Expand All @@ -2409,6 +2486,18 @@ uint8_t esp_zgp_zcl_pairing_configuration_cmd_req(esp_zgp_zcl_pairing_configurat
*/
uint8_t esp_zb_zcl_custom_cluster_cmd_resp(esp_zb_zcl_custom_cluster_cmd_resp_t *cmd_req);

/**
* @brief Update Zigbee ZCL custom cluster handlers
*
* @param[in] obj The object of cluster handlers will be updated in the stack if the cluster ID exists; otherwise, it will be added.
*
* @return
* - ESP_OK: On success
* - ESP_ERR_NO_MEM: Out of memory
* - ESP_ERR_INVALID_ARG: Invalid argument
*/
esp_err_t esp_zb_zcl_custom_cluster_handlers_update(esp_zb_zcl_custom_cluster_handlers_t obj);

/**
* @brief Start and enable the attribute reporting.
*
Expand Down
23 changes: 23 additions & 0 deletions components/esp-zigbee-lib/include/zcl/esp_zigbee_zcl_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,29 @@ typedef struct esp_zb_zcl_attr_location_info_s {
uint16_t attr_id; /*!< The attribute identifier */
} esp_zb_zcl_attr_location_info_t;

/**
* @brief ZCL Cluster Check Attribute Value Handler, which should be called before attribute change and checks if new value is in correct range
* and can be applied.
*
* @param[in] attr_id ZCL Attribute ID
* @param[in] endpoint Device endpoint
* @param[in] value Pointer to the new Attribute Value
*
* @return The result of check value whose value refer to esp_err_t
*/
typedef signed int (*esp_zb_zcl_cluster_check_value_callback_t)(uint16_t attr_id, uint8_t endpoint, uint8_t *value);

/**
* @brief ZCL Cluster Write Attribute Handler, which should be called before attribute change (if any cluster-specific action needs to
* be bound to attribute change, it can be placed in this handler).
*
* @param[in] endpoint Device endpoint
* @param[in] attr_id ZCL Attribute ID
* @param[in] new_value Pointer to the new Attribute Value
* @param[in] manuf_code Manufacturer specific code
*/
typedef void (*esp_zb_zcl_cluster_write_attr_callback_t)(uint8_t endpoint, uint16_t attr_id, uint8_t *new_value, uint16_t manuf_code);

/**
* @brief Get the size of ZCL attribute value
*
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 modified components/esp-zigbee-lib/lib/esp32c3/libesp_zb_cli_command.a
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.

0 comments on commit 4d68ccf

Please sign in to comment.