5.1 Zigbee NCP
The Espressif Zigbee NCP Serial Protocol (ESP ZNSP) defined in this document is the protocol used by a host application processor to interact with the Zigbee stack running on a Network Co-Processor (NCP). ESP ZNSP messages are sent between the host and the Zigbee application over either a Serial Peripheral Interface (SPI) or a Universal Asynchronous Receiver/Transmitter (UART) interface.
5.1.1 Introduction
The ESP ZNSP frames which are used by the Zigbee Gateway application to communicate with the Host are encapsulated in the Serial Line Internet Protocol (SLIP).
5.1.2 SLIP
The application protocol frames which are used by the NCP application to communicate with the microcontroller are encapsulated in the Serial Line Internet Protocol (SLIP). For a comprehensive documentation and a reference implementation of SLIP, please refer to RFC 1055 <https://www.rfc-editor.org/rfc/rfc1055.txt>.
5.1.3 Byte Order
All multiple octet fields are transmitted and received with the least significant octet first, also referred to as little endian. This is the same byte order convention specified by 802.15.4 and ZigBee.
Note that EUI64 fields are treated as a 64-bit number and are therefore trans-mitted and received in little endian order. Each individual octet is transmitted and received by the SPI or UART interface.
5.1.4 16-bit CRC Calculation
As extension each frame contains a 16-bit CRC after the content, calculated over the complete frame payload.
5.1.5 Frame Format
The format of the ESP ZNSP frame is as follows:
--------------------------------------
| Frame Header | Frame Payload | FCS |
--------------------------------------
7 bytes variable byte 2 bytes
Frame Header: Mandatory, fixed size as follows:
------------------------------------------------- | Flags | Identifier | Sequence Number | Length | ------------------------------------------------- 2 byte 2 byte 1 bytes 2 byte
Flags: Defined as follows:
----------------------------------- | Version | Frame Type | Reserved | ----------------------------------- 0~3 bits 4~7 bits 8~15 bits
Version: ESP ZNSP version.
Frame Type: 0: Request, 1: Response, 2: Indication.
Reserved: Reserved.
Identify: Request or Indication ID.
Sequence Number: Request transaction sequence number, 0 - 254.
Length: Length of the frame without a header.
Frame Payload: Optional, variable size as follows:
------------------- | Data Parameters | ------------------- variable bytes
5.1.6 Frame ID Lists
Group ID |
Frame Name |
Frame ID |
Function |
Network |
NETWORK_INIT |
0x0000 |
Resume network operation after a reboot |
NETWORK_START |
0x0001 |
Start the commissioning process |
|
NETWORK_STATE |
0x0002 |
Returns a value indicating whether the node is joining, joined to, or leaving a network |
|
NETWORK_STACK_STATUS_HANDLER |
0x0003 |
Notify it when the status of the stack changes |
|
NETWORK_FORM |
0x0004 |
Forms a new network by becoming the coordinator |
|
NETWORK_PERMIT_JOINING |
0x0005 |
Allow other nodes to join the network with this node as their parent |
|
NETWORK_JOIN |
0x0006 |
Associate with the network using the specified network parameters |
|
NETWORK_LEAVE |
0x0007 |
Causes the stack to leave the current network |
|
NETWORK_START_SCAN |
0x0008 |
Active scan available network |
|
NETWORK_SCAN_COMPLETE_HANDLER |
0x0009 |
Signals that the scan has completed |
|
NETWORK_STOP_SCAN |
0x000A |
Terminates a scan in progress |
|
NETWORK_PAN_ID_GET |
0x000B |
Get the Zigbee network PAN ID |
|
NETWORK_PAN_ID_SET |
0x000C |
Set the Zigbee network PAN ID |
|
NETWORK_EXTENDED_PAN_ID_GET |
0x000D |
Get the Zigbee network extended PAN ID |
|
NETWORK_EXTENDED_PAN_ID_SET |
0x000E |
Set the Zigbee network extended PAN ID |
|
NETWORK_PRIMARY_CHANNEL_GET |
0x000F |
Get the primary channel mask |
|
NETWORK_PRIMARY_CHANNEL_SET |
0x0010 |
Set the primary channel mask |
|
NETWORK_SECONDARY_CHANNEL_GET |
0x0011 |
Get the secondary channel mask |
|
NETWORK_SECONDARY_CHANNEL_SET |
0x0012 |
Set the secondary channel mask |
|
NETWORK_CHANNEL_GET |
0x0013 |
Get the 2.4G channel |
|
NETWORK_CHANNEL_SET |
0x0014 |
Set the 2.4G channel mask |
|
NETWORK_TXPOWER_GET |
0x0015 |
Get the tx power |
|
NETWORK_TXPOWER_SET |
0x0016 |
Set the tx power |
|
NETWORK_PRIMARY_KEY_GET |
0x0017 |
Get the primary security network key |
|
NETWORK_PRIMARY_KEY_SET |
0x0018 |
Set the primary security network key |
|
NETWORK_FRAME_COUNT_GET |
0x0019 |
Get the network frame counter |
|
NETWORK_FRAME_COUNT_SET |
0x001A |
Set the network frame counter |
|
NETWORK_ROLE_GET |
0x001B |
Get the network role 0: Coordinator, 1: Router |
|
NETWORK_ROLE_SET |
0x001C |
Set the network role 0: Coordinator, 1: Router |
|
NETWORK_SHORT_ADDRESS_GET |
0x001D |
Get the Zigbee device short address |
|
NETWORK_SHORT_ADDRESS_SET |
0x001E |
Set the Zigbee device short address |
|
NETWORK_LONG_ADDRESS_GET |
0x001F |
Get the Zigbee device long address |
|
NETWORK_LONG_ADDRESS_SET |
0x0020 |
Set the Zigbee device long address |
|
NETWORK_CHANNEL_MASKS_GET |
0x0021 |
Get the channel masks |
|
NETWORK_CHANNEL_MASKS_SET |
0x0022 |
Set the channel masks |
|
NETWORK_UPDATE_ID_GET |
0x0023 |
Get the network update ID |
|
NETWORK_UPDATE_ID_SET |
0x0024 |
Set the network update ID |
|
NETWORK_TRUST_CENTER_ADDR_GET |
0x0025 |
Get the network trust center address |
|
NETWORK_TRUST_CENTER_ADDR_SET |
0x0026 |
Set the network trust center address |
|
NETWORK_LINK_KEY_GET |
0x0027 |
Get the network link key |
|
NETWORK_LINK_KEY_SET |
0x0028 |
Set the network link key |
|
NETWORK_SECURE_MODE_GET |
0x0029 |
Get the network security mode |
|
NETWORK_SECURE_MODE_SET |
0x002A |
Set the network security mode |
|
NETWORK_PREDEFINED_PANID |
0x002B |
Enable or disable predefined network panid |
|
NETWORK_SHORT_TO_IEEE |
0x002C |
Get the network IEEE address by the short address |
|
NETWORK_IEEE_TO_SHORT |
0x002D |
Get the network short address by the IEEE address |
|
ZCL |
ZCL_ENDPOINT_ADD |
0x0100 |
Configures endpoint information on the NCP |
ZCL_ENDPOINT_DEL |
0x0101 |
Remove endpoint information on the NCP |
|
ZCL_ATTR_READ |
0x0102 |
Read attribute data on NCP endpoints |
|
ZCL_ATTR_WRITE |
0x0103 |
Write attribute data on NCP endpoints |
|
ZCL_ATTR_REPORT |
0x0104 |
Report attribute data on NCP endpoints |
|
ZCL_ATTR_DISC |
0x0105 |
Discover attribute data on NCP endpoints |
|
ZCL_READ |
0x0106 |
Read APS on NCP endpoints |
|
ZCL_WRITE |
0x0107 |
Write APS on NCP endpoints |
|
ZCL_REPORT_CONFIG |
0x0108 |
Report configure on NCP endpoints |
|
ZDO |
ZDO_BIND_SET |
0x0200 |
Create a binding between two endpoints on two nodes |
ZDO_UNBIND_SET |
0x0201 |
Remove a binding between two endpoints on two nodes |
|
ZDO_FIND_MATCH |
0x0202 |
Send match desc request to find matched Zigbee device |
|
APS |
APS_DATA_REQUEST |
0x0300 |
Request the aps data |
APS_DATA_INDICATION |
0x0301 |
Indication the aps data |
|
APS_DATA_CONFIRM |
0x0302 |
Confirm the aps data |
5.1.7 Network Frame ID Details
5.1.7.1 NETWORK_INIT
Resume network operation after a reboot
|
|
|
5.1.7.2 NETWORK_PAN_ID_SET
Set the Zigbee network PAN ID
|
|
|
5.1.7.3 NETWORK_PAN_ID_GET
Get the Zigbee network PAN ID
|
|
|
5.1.7.4 NETWORK_EXTENDED_PAN_ID_SET
Set the Zigbee network extended PAN ID
|
|
|
5.1.7.5 NETWORK_EXTENDED_PAN_ID_GET
Get the Zigbee network extended PAN ID
|
|
|
5.1.7.6 NETWORK_PRIMARY_CHANNEL_SET
Set the primary channel mask
|
|
|
5.1.7.7 NETWORK_SECONDARY_CHANNEL_SET
Set the secondary channel mask
|
|
|
5.1.7.8 NETWORK_CHANNEL_SET
Set the 2.4G channel mask
|
|
|
5.1.7.9 NETWORK_TXPOWER_SET
Set the tx power
|
|
|
5.1.7.10 NETWORK_FORM
Forms a new network by becoming the coordinator
|
|
|
|
|
5.1.7.11 NETWORK_START_SCAN
Active scan available network
|
|
|
5.1.7.12 NETWORK_SCAN_COMPLETE_HANDLER
Signals that the scan has completed
|
|
|
|
|
5.1.7.13 NETWORK_STOP_SCAN
Terminates a scan in progress
|
|
|
5.1.7.14 NETWORK_START
Start the commissioning process
|
|
|
5.1.7.15 NETWORK_STATE
Returns a value indicating whether the node is joining, joined to, or leaving a network
|
|
|
5.1.7.16 NETWORK_STACK_STATUS_HANDLER
Notify it when the status of the stack changes
|
|
|
|
|
5.1.7.17 NETWORK_JOIN
Associate with the network using the specified network parameters
|
|
|
|
|
5.1.7.18 NETWORK_PERMIT_JOINING
Allow other nodes to join the network with this node as their parent
|
|
|
|
|
5.1.7.19 NETWORK_LEAVE
Causes the stack to leave the current network
|
|
|
|
|
5.1.7.20 NETWORK_SHORT_ADDRESS_GET
Get the Zigbee device short address
|
|
|
5.1.7.21 NETWORK_LONG_ADDRESS_GET
Get the Zigbee device long address
|
|
|
5.1.7.22 NETWORK_CHANNEL_GET
Get the 2.4G channel
|
|
|
5.1.7.23 NETWORK_PRIMARY_CHANNEL_GET
Get the primary channel mask
|
|
|
5.1.7.24 NETWORK_PRIMARY_KEY_GET
Get the primary security network key
|
|
|
5.1.7.25 NETWORK_PRIMARY_KEY_SET
Set the primary security network key
|
|
|
5.1.7.26 NETWORK_FRAME_COUNT_GET
Get the network frame counter
|
|
|
5.1.7.27 NETWORK_FRAME_COUNT_SET
Set the network frame counter
|
|
|
5.1.7.28 NETWORK_ROLE_GET
Get the network role 0: Coordinator, 1: Router
|
|
|
5.1.7.29 NETWORK_ROLE_SET
Set the network role 0: Coordinator, 1: Router
|
|
|
5.1.7.30 NETWORK_SHORT_ADDRESS_SET
Set the Zigbee device short address
|
|
|
5.1.7.31 NETWORK_LONG_ADDRESS_SET
Set the Zigbee device long address
|
|
|
5.1.7.32 NETWORK_CHANNEL_MASKS_GET
Get the network role 0: Coordinator, 1: Router
|
|
|
5.1.7.33 NETWORK_CHANNEL_MASKS_SET
Set the channel masks
|
|
|
5.1.7.34 NETWORK_UPDATE_ID_GET
Get the network update ID
|
|
|
5.1.7.35 NETWORK_UPDATE_ID_SET
Set the network update ID
|
|
|
5.1.7.36 NETWORK_TRUST_CENTER_ADDR_GET
Get the network trust center address
|
|
|
5.1.7.37 NETWORK_TRUST_CENTER_ADDR_SET
Set the network trust center address
|
|
|
5.1.7.38 NETWORK_LINK_KEY_GET
Get the network link key
|
|
|
5.1.7.39 NETWORK_LINK_KEY_SET
Set the network link key
|
|
|
5.1.7.40 NETWORK_SECURE_MODE_GET
Get the network security mode
|
|
|
5.1.7.41 NETWORK_SECURE_MODE_SET
Set the network security mode
|
|
|
5.1.7.42 NETWORK_PREDEFINED_PANID
Enable or disable predefined network panid
|
|
|
5.1.7.43 NETWORK_SHORT_TO_IEEE
Get the network IEEE address by the short address
|
|
|
5.1.7.44 NETWORK_IEEE_TO_SHORT
Get the network short address by the IEEE address
|
|
|
5.1.8 ZCL Frame ID Details
5.1.8.1 ZCL Command ID Lists
Cluster |
ZCL Command Name |
ZCL Command ID |
ZCL Command Payload |
ZCL Command Function |
Basic |
basic_fact_reset |
0x0000 |
None |
ZCL basic reset to factory default |
On/Off |
Turn off |
0x0000 |
None |
ZCL on-off |
Turn on |
0x0001 |
None |
ZCL on-off |
|
Toggle state |
0x0002 |
None |
ZCL on-off |
|
Identify |
identify |
0x0000 |
uint16_t identify_time : identify itself for specific time |
ZCL identify |
identify_query |
0x0001 |
None |
ZCL identify query |
|
identify_trigger_effect |
0x0040 |
uint8_t effect_id : The field specifies the identify effect to use |
ZCL identify trigger effect |
|
uint8_t effect_variant : The field is used to indicate which variant of the effect |
||||
Level control |
level_move_to_level |
0x0000 |
uint8_t level : level wants to move to |
ZCL move to level |
uint16_t transition_time : time wants to transition tenths of a second |
||||
level_move |
0x0001 |
uint8_t move_mode : move mode either up or down |
ZCL move level |
|
uint8_t rate : move rate wants to movement in units per second |
||||
level_step |
0x0002 |
uint8_t step_mode : step mode either up or down |
ZCL step level |
|
uint8_t step_size : step size wants to change |
||||
uint16_t transition_time : time wants to transition tenths of a second |
||||
level_stop |
0x0003 |
None |
ZCL stop level |
|
level_move_to_level_with_onoff |
0x0004 |
uint8_t level : level wants to move to |
ZCL move to level with on/off |
|
uint16_t transition_time : time wants to transition tenths of a second |
||||
level_move_with_onoff |
0x0005 |
uint8_t move_mode : move mode either up or down |
ZCL move level with on/off effect |
|
uint8_t rate : move rate wants to movement in units per second |
||||
level_step_with_onoff |
0x0006 |
uint8_t step_mode : step mode either up or down |
ZCL step level with on/off effect |
|
uint8_t step_size : step size wants to change |
||||
uint16_t transition_time : time wants to transition tenths of a second |
||||
Color control |
color_move_to_hue |
0x0000 |
uint8_t hue : current value of hue |
ZCL color move to hue |
uint8_t direction : direction |
||||
uint16_t transition_time : time wants to transition tenths of a second |
||||
color_move_hue |
0x0001 |
uint8_t move_mode : move mode |
ZCL color move hue |
|
uint8_t rate : rate |
||||
color_step_hue |
0x0002 |
uint8_t step_mode : step mode |
ZCL color step hue |
|
uint8_t step_size : step size |
||||
uint16_t transition_time : time wants to transition tenths of a second |
||||
color_move_to_saturation |
0x0003 |
uint8_t saturation : current value of saturation |
ZCL color move to saturation |
|
int16_t transition_time : time wants to transition tenths of a second |
||||
color_move_saturation |
0x0004 |
uint8_t move_mode : move mode |
ZCL color move saturation |
|
uint8_t rate : rate |
||||
color_step_saturation |
0x0005 |
uint8_t step_mode : step mode |
ZCL color step saturation |
|
uint8_t step_size : step size |
||||
uint16_t transition_time : time wants to transition tenths of a second |
||||
color_move_to_hue_and_saturation |
0x0006 |
uint8_t hue : current value of hue |
ZCL color move to hue/saturation |
|
uint8_t saturation : current value of saturation |
||||
uint16_t transition_time : time wants to transition tenths of a second |
||||
color_move_to_color |
0x0007 |
uint16_t color_x : current value of chromaticity value x |
ZCL color move to color |
|
uint16_t color_y : current value of chromaticity value y |
||||
uint16_t transition_time : time wants to transition tenths of a second |
||||
color_move_color |
0x0008 |
uint16_t rate_x : specifies rate of movement in steps per second of color x |
ZCL color move color |
|
uint16_t rate_y : specifies rate of movement in steps per second of color y |
||||
color_step_color |
0x0009 |
int16_t step_x : specifies the change to be added to color x |
ZCL color step color |
|
int16_t step_y : specifies the change to be added to color y |
||||
uint16_t transition_time : time wants to transition tenths of a second |
||||
color_move_to_color_temperature |
0x000A |
uint16_t color_temperature : The field indicates the color-temperature value |
ZCL color move to color temperature |
|
uint16_t transition_time : time wants to transition tenths of a second |
||||
color_enhanced_move_to_hue |
0x0040 |
uint16_t enhanced_hue : The field specifies the target enhanced hue for the lamp |
ZCL color enhanced move to hue |
|
uint8_t direction : The direction |
||||
uint16_t transition_time : time wants to transition tenths of a second |
||||
color_enhanced_move_hue |
0x0041 |
uint8_t move_mode : The Move Mode |
ZCL color enhanced move hue |
|
uint16_t rate : The rate of movement in steps per second |
||||
color_enhanced_step_hue |
0x0042 |
uint8_t step_mode : The Step Mode |
ZCL color enhanced step hue |
|
uint16_t step_size : The Step Size |
||||
uint16_t transition_time : time wants to transition tenths of a second |
||||
color_enhanced_move_to_hue_saturation |
0x0043 |
uint16_t enhanced_hue : The Enhanced Hue specifies the target extended hue |
ZCL color enhanced move to hue saturation |
|
uint8_t saturation : The value of Saturation |
||||
uint16_t transition_time : time wants to transition tenths of a second |
||||
color_color_loop_set |
0x0044 |
uint8_t update_flags : The Update Flags |
ZCL color color loop set |
|
uint8_t action : The Action to take for the color loop |
||||
uint8_t direction : The Direction field of the color loop set command |
||||
uint16_t time : The Time over which to perform a full color loop |
||||
uint16_t start_hue : The starting hue to use for the color loop |
||||
color_stop_move_step |
0x0047 |
None |
ZCL color stop |
|
color_move_color_temperature |
0x004B |
uint8_t move_mode : The Move Mode field of the Move Hue command |
ZCL color move color temperature |
|
uint16_t rate : The Rate of movement in steps per second |
||||
uint16_t color_temperature_minimum : The lower bound on the Color-Temperature attribute |
||||
uint16_t color_temperature_maximum : The upper bound on the Color-Temperature attribute |
||||
color_step_color_temperature |
0x004C |
uint8_t move_mode : The Move Mode field of the Step Hue command |
ZCL color step color temperature |
|
uint16_t step_size : The Step Size field specifies the change to be added to |
||||
uint16_t transition_time : time wants to transition tenths of a second |
||||
uint16_t color_temperature_minimum : The lower bound on the Color-Temperature attribute |
||||
uint16_t color_temperature_maximum : The upper bound on the Color-Temperature attribute |
||||
Door Lock |
lock_door |
0x0000 |
None |
ZCL lock door |
unlock_door |
0x0001 |
None |
ZCL unlock door |
|
Groups |
groups_add_group |
0x0000 |
uint16_t group_id : Group id |
ZCL groups add group |
groups_view_group |
0x0001 |
uint16_t group_id : Group id |
ZCL view group |
|
groups_get_group_membership |
0x0002 |
uint8_t group_count : Total group count |
ZCL groups get group membership |
|
uint16_t[] group_list : Group ID list |
||||
groups_remove_group |
0x0003 |
uint16_t group_id : Group id |
ZCL groups remove group |
|
groups_remove_all_groups |
0x0004 |
None |
ZCL groups remove all groups |
|
Scene |
scenes_add_scene |
0x0000 |
uint16_t group_id : Group id |
ZCL scenes add scene |
uint8_t scene_id : Scene id |
||||
uint16_t transition_time : time wants to transition tenths of a second |
||||
uint16_t extension_count : Total ZCL scenes extension field count |
||||
uint16_t cluster_id : Cluster id |
||||
uint16_t length : Length of scenes_extension_field |
||||
uint8_t[] extension_value : Extension field attribute value |
||||
uint16_t cluster_id : Cluster id |
||||
uint16_t length : Length of scenes_extension_field |
||||
uint8_t[] extension_value : Extension field attribute value |
||||
scenes_view_scene |
0x0001 |
uint16_t group_id : Group id |
ZCL scenes view scene |
|
uint8_t scene_id : Scene id |
||||
scenes_remove_scene |
0x0002 |
uint16_t group_id : Group id |
ZCL scenes remove scene |
|
uint8_t scene_id : Scene id |
||||
scenes_remove_all_scenes |
0x0003 |
uint16_t group_id : Group id |
ZCL scenes remove all scenes |
|
scenes_store_scene |
0x0004 |
uint16_t group_id : Group id |
ZCL scenes store scene |
|
uint8_t scene_id : Scene id |
||||
scenes_recall_scene |
0x0005 |
uint16_t group_id : Group id |
ZCL scenes recall scene |
|
uint8_t scene_id : Scene id |
||||
scenes_get_scene_membership |
0x0006 |
uint16_t group_id : Group id |
ZCL scenes get scene membership |
|
IAS Zone |
ias_zone_enroll_cmd_resp |
0x0000 |
uint8_t enroll_rsp_code : The enroll response code |
ZCL IAS zone enroll response |
uint8_t zone_id : Zone ID is the index of table |
||||
ias_zone_status_change_notif |
0x0000 |
uint16_t zone_status : Zone status |
ZCL IAS zone Change Notification |
|
uint8_t extend_status : Extended status for additional info |
||||
uint8_t zone_id : Zone ID is the index of table |
||||
uint16_t delay : Delay in quarter-seconds |
||||
ias_zone_enroll |
0x0001 |
uint16_t zone_type : Zone type |
ZCL IAS zone enroll request |
|
uint16_t manuf_code : Manufacturer code |
||||
Window Covering |
window_covering_cluster_send |
0x0000 |
uint16_t length : Length of the value |
ZCL window covering send |
uint8_t[] value : The value |
||||
uint16_t cluster_id : Cluster id |
||||
uint8_t cmd_id : Command id |
||||
Electrical Measurement |
electrical_measurement_cluster_get_profile_info_resp |
0x0000 |
uint8_t count : The counter for response command |
ZCL electrical profile information command |
uint8_t interval_period : The Profile interval period |
||||
uint8_t max_number_of_intervals : The Profile max number of intervals |
||||
uuint16_t attributes_size : The Profile attributes size |
||||
uint16_t[] attributes_list : The Profile attributes ID list |
||||
uint16_t cluster_id : Cluster id |
||||
electrical_measurement_cluster_get_measurement_profile_resp |
0x0001 |
uint32_t start_time : The start time for profile response command |
ZCL electrical profile responset |
|
uint32_t status : The status |
||||
uint32_t interval_period : The interval period |
||||
uint8_t interval_delivered_number : The interval delivered numbe |
||||
uint8_t attributes_id : The interval attributes id |
||||
uint8_t[] intervals : The array of atttibute values intervals id |
||||
uint16_t cluster_id : Cluster id |
||||
Thermostat |
thermostat_setpoint_raise_lower |
0x0000 |
uint8_t mode : Mode field |
ZCL thermostat setpoint raise lower |
int8_t amount : Amount field |
||||
thermostat_set_weekly_schedule |
0x0001 |
uint8_t num_of_transitions : Number of transitions for sequence field |
ZCL thermostat set weekly schedule |
|
uint8_t day_of_week : Day of week for sequence field |
||||
uint8_t mode_for_seq : Mode for sequence field |
||||
uint16_t transition_time : Transition time field |
||||
uint16_t heat_set_point : Heat set point field |
||||
uint16_t cool_set_point : Cool set point field |
||||
thermostat_get_weekly_schedule |
0x0002 |
uint8_t days_to_return : Days to return field |
ZCL thermostat get weekly schedule |
|
uint8_t mode_to_return : Mode to return field |
||||
thermostat_clear_weekly_schedule |
0x0003 |
None |
ZCL thermostat clear weekly schedule |
|
thermostat_get_relay_status_log |
0x0004 |
None |
ZCL thermostat get relay status log |
|
Metering |
metering_get_profile |
0x0000 |
uint8_t interval_channel : Interval channel |
ZCL metering get profile request |
uint32_t end_time : End time is a 32-bit value (in UTC) |
||||
uint8_t number_of_periods : Number of periods represents |
||||
metering_request_fast_poll_mode |
0x0003 |
uint8_t fast_poll_update_period : Desired fast poll period (seconds) |
ZCL metering request fast poll mode |
|
uint8_t duration : Desired duration (minutes) |
||||
metering_get_snapshot |
0x0006 |
uint32_t earliest_start_time : A UTC Timestamp indicating the earliest time |
ZCL metering get snapshot |
|
uint32_t latest_end_time : A UTC Timestamp indicating the latest time |
||||
uint8_t snapshot_offset : This field identifies the individual snapshot |
||||
uint32_t snapshot_cause : This field is used to select snapshots that were taken |
||||
metering_get_sampled_data |
0x0008 |
uint16_t sample_id : Unique identifier allocated to this Sampling session |
ZCL metering get sampled data |
|
uint32_t earliest_sample_time : A UTC Timestamp indicating the earliest time |
||||
uint8_t sample_type : Sample_type identifies the required type of sampled data |
||||
uint16_t number_of_samples : The number of samples being requested |
||||
Custom |
zb_zcl_custom_cluster_cmd_req |
0xFFFD |
uint16_t type : The type of custom data |
Custom cluster command request |
uint16_t length : The length of custom datat |
||||
uint8_t[] value : The value of custom datat |
||||
zb_zcl_custom_cluster_cmd_resp |
0xFFFE |
uint16_t type : The type of custom data |
Custom cluster command response |
|
uint16_t length : The length of custom datat |
||||
uint8_t[] value : The value of custom datat |
Note
The ZCL command payloads in ESP ZNSP are similar to the data structure defined in ZCL Command APIs
5.1.8.2 ZCL_ENDPOINT_ADD
Configures endpoint information on the NCP
|
|
|
5.1.8.3 ZCL_ENDPOINT_DEL
Remove endpoint information on the NCP
|
|
|
5.1.8.4 ZCL_ATTR_READ
Read attribute data on NCP endpoints
|
|
|
|
|
5.1.8.5 ZCL_ATTR_WRITE
Write attribute data on NCP endpoints
|
|
|
|
|
5.1.8.6 ZCL_ATTR_REPORT
Report attribute data on NCP endpoints
|
|
|
|
|
5.1.8.7 ZCL_ATTR_DISC
Discover attribute data on NCP endpoints
|
|
|
|
|
5.1.8.8 ZCL_READ
Read APS on NCP endpoints
5.1.8.9 ZCL_WRITE
Write ZCL command on NCP endpoints
|
|
|
5.1.8.10 ZCL_REPORT_CONFIG
Report configure on NCP endpoints
|
|
|
|
|
5.1.9 ZDO Frame ID Details
5.1.9.1 ZDO_BIND_SET
Create a binding between two endpoints on two nodes
|
|
|
|
|
5.1.9.2 ZDO_UNBIND_SET
Remove a binding between two endpoints on two nodes
|
|
|
|
|
5.1.9.2 ZDO_FIND_MATCH
Send match desc request to find matched Zigbee device
|
|
|
|
|
5.1.10 APS Frame ID Details
5.1.10.1 APS_DATA_REQUEST
Request the aps data
|
|
|
5.1.10.2 APS_DATA_INDICATION
Indication the aps data
|
|
|
|
|
5.1.10.3 APS_DATA_CONFIRM
Confirm the aps data
|
|
|
|
|
Note
Command: c0 00 00 09 00 09 07 00 00 00 14 00 00 00 00 FA 45 c0
Response: c0 10 00 09 00 09 01 00 00 99 00 c0
Notify: c0 20 00 09 00 1a 0b 00 f7 39 f7 fe ff f9 55 60 4b fc 0d 20 00 c0