zigbee cluster library (for zigbee 3.0) user guide · 2018-10-18 · zigbee cluster library (for...

1390
ZigBee Cluster Library (for ZigBee 3.0) User Guide JN-UG-3115 Revision 1.5 14 September 2018

Upload: others

Post on 10-Feb-2020

92 views

Category:

Documents


2 download

TRANSCRIPT

  • ZigBee Cluster Library (for ZigBee 3.0)User Guide

    JN-UG-3115Revision 1.5

    14 September 2018

  • ZigBee Cluster Library (for ZigBee 3.0)User Guide

    2 © NXP Semiconductors 2018 JN-UG-3115 v1.5

  • ZigBee Cluster Library (for ZigBee 3.0)User Guide

    Contents

    Contents 3

    Preface 37Organisation 37Conventions 39Acronyms and Abbreviations 40Related Documents 40Support Resources 40Trademarks 40Chip Compatibility 41

    Part I: Fundamentals

    1. ZigBee Cluster Library (ZCL) 451.1 ZCL Member Clusters 45

    1.1.1 General 461.1.2 Measurement and Sensing 481.1.3 Lighting 491.1.4 Heating, Ventilation and Air-Conditioning (HVAC) 491.1.5 Closures 501.1.6 Security and Safety 501.1.7 Smart Energy 511.1.8 Commissioning 511.1.9 Appliances 521.1.10 Over-The-Air (OTA) Upgrade 52

    1.2 General ZCL Resources 531.3 ZCL Compile-time Options 54

    2. ZCL Fundamentals and Features 572.1 Initialising the ZCL 572.2 Shared Device Structures 572.3 Accessing Attributes 59

    2.3.1 Attribute Access Permissions 592.3.2 Reading Attributes 60

    2.3.2.1 Reading a Set of Attributes of a Remote Cluster 602.3.2.2 Reading an Attribute of a Local Cluster 62

    2.3.3 Writing Attributes 632.3.3.1 Writing to Attributes of a Remote Cluster 63

    JN-UG-3115 v1.5 © NXP Semiconductors 2018 3

  • Contents

    2.3.3.2 Writing an Attribute Value to a Local Cluster 662.3.4 Attribute Discovery 662.3.5 Attribute Reporting 67

    2.4 Global Attributes 682.5 Default Responses 692.6 Handling Commands for Unsupported Clusters 692.7 Handling Commands from Other Manufacturers 702.8 Bound Transmission Management 712.9 Command Discovery 72

    2.9.1 Discovering Command Sets 732.9.2 Compile-time Options 74

    3. Event Handling 753.1 Event Structure 753.2 Processing Events 763.3 Events 77

    4. Error Handling 834.1 Last Stack Error 834.2 Error/Command Status on Receiving Command 83

    Part II: Common Resources

    5. ZCL Functions 875.1 General Functions 87

    eZCL_Initialise 88eZCL_Register 89vZCL_EventHandler 90eZCL_Update100mS 91vZCL_DisableAPSACK 92eZCL_GetLastZpsError 93vZCL_RegisterHandleGeneralCmdCallBack 94vZCL_RegisterCheckForManufCodeCallBack 95

    5.2 Attribute Access Functions 96eZCL_SendReadAttributesRequest 97eZCL_SendWriteAttributesRequest 99eZCL_SendWriteAttributesNoResponseRequest 101eZCL_SendWriteAttributesUndividedRequest 103eZCL_SendDiscoverAttributesRequest 105eZCL_SendDiscoverAttributesExtendedRequest 107eZCL_SendConfigureReportingCommand 109

    4 © NXP Semiconductors 2018 JN-UG-3115 v1.5

  • ZigBee Cluster Library (for ZigBee 3.0)User Guide

    eZCL_SendReadReportingConfigurationCommand 111eZCL_ReportAllAttributes 113eZCL_ReportAttribute 114eZCL_CreateLocalReport 115eZCL_SetReportableFlag 116vZCL_SetDefaultReporting 117eZCL_HandleReadAttributesResponse 118eZCL_ReadLocalAttributeValue 119eZCL_WriteLocalAttributeValue 121eZCL_OverrideClusterControlFlags 123eZCL_SetSupportedSecurity 124

    5.3 Command Discovery Functions 125eZCL_SendDiscoverCommandReceivedRequest 126eZCL_SendDiscoverCommandGeneratedRequest 128

    6. ZCL Structures 1316.1 General Structures 131

    6.1.1 tsZCL_EndPointDefinition 1316.1.2 tsZCL_ClusterDefinition 1326.1.3 tsZCL_AttributeDefinition 1336.1.4 tsZCL_Address 1346.1.5 tsZCL_AttributeReportingConfigurationRecord 1346.1.6 tsZCL_AttributeReportingConfigurationResponse 1366.1.7 tsZCL_AttributeReadReportingConfigurationRecord 1366.1.8 tsZCL_IndividualAttributesResponse 1376.1.9 tsZCL_DefaultResponse 1376.1.10 tsZCL_AttributeDiscoveryResponse 1386.1.11 tsZCL_AttributeDiscoveryExtendedResponse 1386.1.12 tsZCL_ReportAttributeMirror 1396.1.13 tsZCL_OctetString 1406.1.14 tsZCL_CharacterString 1416.1.15 tsZCL_ClusterCustomMessage 1416.1.16 tsZCL_ClusterInstance 1426.1.17 tsZCL_CommandDiscoveryIndividualResponse 1436.1.18 tsZCL_CommandDiscoveryResponse 1436.1.19 tsZCL_CommandDefinition 1446.1.20 tsZCL_SceneExtensionTable 1446.1.21 tsZCL_WriteAttributeRecord 145

    6.2 Event Structure (tsZCL_CallBackEvent) 146

    7. Enumerations and Status Codes 1497.1 General Enumerations 149

    7.1.1 Addressing Modes (teZCL_AddressMode) 1497.1.2 Broadcast Modes (ZPS_teAplAfBroadcastMode) 1517.1.3 Attribute Types (teZCL_ZCLAttributeType) 152

    JN-UG-3115 v1.5 © NXP Semiconductors 2018 5

  • Contents

    7.1.4 Command Status (teZCL_CommandStatus) 1547.1.5 Report Attribute Status (teZCL_ReportAttributeStatus) 1567.1.6 Security Level (teZCL_ZCLSendSecurity) 157

    7.2 General Return Codes (ZCL Status) 1587.3 ZCL Event Enumerations 161

    Part III: General Clusters

    8. Basic Cluster 1678.1 Overview 1678.2 Basic Cluster Structure and Attributes 1688.3 Mandatory Attribute Settings 1728.4 Functions 173

    eCLD_BasicCreateBasic 174eCLD_BasicCommandResetToFactoryDefaultsSend 176

    8.5 Enumerations 1788.5.1 teCLD_BAS_ClusterID 1788.5.2 teCLD_BAS_PowerSource 1788.5.3 teCLD_BAS_GenericDeviceClass 1798.5.4 eCLD_BAS_GenericDeviceType 1808.5.5 teCLD_BAS_PhysicalEnvironment 181

    8.6 Compile-Time Options 183

    9. Power Configuration Cluster 1879.1 Overview 1879.2 Power Configuration Cluster Structure and Attributes 1889.3 Attributes for Default Reporting 1999.4 Functions 199

    eCLD_PowerConfigurationCreatePowerConfiguration 2009.5 Enumerations and Defines 202

    9.5.1 teCLD_PWRCFG_AttributeId 2029.5.2 teCLD_PWRCFG_BatterySize 2049.5.3 Defines for Voltage Alarms 204

    9.6 Compile-Time Options 204

    10. Device Temperature Configuration Cluster 20910.1 Overview 20910.2 Cluster Structure and Attributes 21010.3 Functions 212

    eCLD_DeviceTemperatureConfigurationCreateDeviceTemperatureConfiguration 213

    6 © NXP Semiconductors 2018 JN-UG-3115 v1.5

  • ZigBee Cluster Library (for ZigBee 3.0)User Guide

    10.4 Enumerations and Defines 21510.4.1 teCLD_DEVTEMPCFG_AttributeId 21510.4.2 Defines for Device Temperature Alarms 215

    10.5 Compile-Time Options 215

    11. Identify Cluster 21711.1 Overview 21711.2 Identify Cluster Structure and Attribute 21811.3 Initialisation 21911.4 Sending Commands 219

    11.4.1 Starting and Stopping Identification Mode 21911.4.2 Requesting Identification Effects 21911.4.3 Inquiring about Identification Mode 22011.4.4 Using EZ-mode Commissioning Features 220

    11.5 Sleeping Devices in Identification Mode 22111.6 Functions 221

    eCLD_IdentifyCreateIdentify 222eCLD_IdentifyCommandIdentifyRequestSend 224eCLD_IdentifyCommandTriggerEffectSend 226eCLD_IdentifyCommandIdentifyQueryRequestSend 228eCLD_IdentifyEZModeInvokeCommandSend 230eCLD_IdentifyUpdateCommissionStateCommandSend 232

    11.7 Structures 23411.7.1 Custom Data Structure 23411.7.2 Custom Command Payloads 23411.7.3 Custom Command Responses 23411.7.4 EZ-mode Commissioning Command Payloads 235

    11.8 Enumerations 23611.8.1 teCLD_Identify_ClusterID 236

    11.9 Compile-Time Options 236

    12. Groups Cluster 23912.1 Overview 23912.2 Groups Cluster Structure and Attributes 24012.3 Initialisation 24012.4 Sending Commands 241

    12.4.1 Adding Endpoints to Groups 24112.4.2 Removing Endpoints from Groups 24112.4.3 Obtaining Information about Groups 242

    12.5 Functions 242eCLD_GroupsCreateGroups 243eCLD_GroupsAdd 245

    JN-UG-3115 v1.5 © NXP Semiconductors 2018 7

  • Contents

    eCLD_GroupsCommandAddGroupRequestSend 246eCLD_GroupsCommandViewGroupRequestSend 248eCLD_GroupsCommandGetGroupMembershipRequestSend 250eCLD_GroupsCommandRemoveGroupRequestSend 252eCLD_GroupsCommandRemoveAllGroupsRequestSend 254eCLD_GroupsCommandAddGroupIfIdentifyingRequestSend 256

    12.6 Structures 25812.6.1 Custom Data Structure 25812.6.2 Group Table Entry 25812.6.3 Custom Command Payloads 25912.6.4 Custom Command Responses 260

    12.7 Enumerations 26112.7.1 teCLD_Groups_ClusterID 261

    12.8 Compile-Time Options 262

    13. Scenes Cluster 26313.1 Overview 26313.2 Scenes Cluster Structure and Attributes 26413.3 Initialisation 26513.4 Sending Remote Commands 265

    13.4.1 Creating a Scene 26513.4.2 Copying a Scene 26613.4.3 Applying a Scene 26613.4.4 Deleting a Scene 26713.4.5 Obtaining Information about Scenes 267

    13.5 Issuing Local Commands 26813.5.1 Creating a Scene 26813.5.2 Applying a Scene 268

    13.6 Functions 269eCLD_ScenesCreateScenes 270eCLD_ScenesAdd 272eCLD_ScenesStore 273eCLD_ScenesRecall 274eCLD_ScenesCommandAddSceneRequestSend 275eCLD_ScenesCommandViewSceneRequestSend 277eCLD_ScenesCommandRemoveSceneRequestSend 279eCLD_ScenesCommandRemoveAllScenesRequestSend 281eCLD_ScenesCommandStoreSceneRequestSend 283eCLD_ScenesCommandRecallSceneRequestSend 285eCLD_ScenesCommandGetSceneMembershipRequestSend 287eCLD_ScenesCommandEnhancedAddSceneRequestSend 289eCLD_ScenesCommandEnhancedViewSceneRequestSend 291eCLD_ScenesCommandCopySceneSceneRequestSend 293

    13.7 Structures 295

    8 © NXP Semiconductors 2018 JN-UG-3115 v1.5

  • ZigBee Cluster Library (for ZigBee 3.0)User Guide

    13.7.1 Custom Data Structure 29513.7.2 Custom Command Payloads 29513.7.3 Custom Command Responses 29913.7.4 Scenes Table Entry 303

    13.8 Enumerations 30413.8.1 teCLD_Scenes_ClusterID 304

    13.9 Compile-Time Options 304

    14. On/Off Cluster 30714.1 Overview 30714.2 On/Off Cluster Structure and Attribute 30814.3Attributes for Default Reporting 31014.4 Initialisation 31014.5 Sending Commands 310

    14.5.1 Switching On and Off 31014.5.1.1 Timeout on the ‘On’ Command 31014.5.1.2 On/Off with Transition Effect 311

    14.5.2 Switching Off Lights with Effect 31114.5.3 Switching On Timed Lights 312

    14.6 Saving Light Settings 31214.7 Functions 313

    eCLD_OnOffCreateOnOff 314eCLD_OnOffCommandSend 316eCLD_OnOffCommandOffWithEffectSend 318eCLD_OnOffCommandOnWithTimedOffSend 320

    14.8 Structures 32214.8.1 Custom Data Structure 32214.8.2 Custom Command Payloads 322

    14.9 Enumerations 32414.9.1 teCLD_OnOff_ClusterID 32414.9.2 teCLD_OOSC_SwitchType (On/Off Switch Types) 32414.9.3 teCLD_OOSC_SwitchAction (On/Off Switch Actions) 324

    14.10 Compile-Time Options 325

    15. On/Off Switch Configuration Cluster 32715.1 Overview 32715.2 On/Off Switch Config Cluster Structure and Attribute 32815.3 Initialisation 32915.4 Functions 329

    eCLD_OOSCCreateOnOffSwitchConfig 33015.5 Enumerations 332

    15.5.1 teCLD_OOSC_ClusterID 332

    JN-UG-3115 v1.5 © NXP Semiconductors 2018 9

  • Contents

    15.5.2 teCLD_OOSC_SwitchType 33215.5.3 teCLD_OOSC_SwitchAction 333

    15.6 Compile-Time Options 333

    16. Level Control Cluster 33516.1 Overview 33516.2 Level Control Cluster Structure and Attributes 33616.3 Attributes for Default Reporting 33916.4 Initialisation 33916.5 Sending Remote Commands 339

    16.5.1 Changing Level 33916.5.2 Stopping a Level Change 340

    16.6 Issuing Local Commands 34016.6.1 Setting Level 34016.6.2 Obtaining Level 341

    16.7 Functions 341eCLD_LevelControlCreateLevelControl 342eCLD_LevelControlSetLevel 344eCLD_LevelControlGetLevel 345eCLD_LevelControlCommandMoveToLevelCommandSend 346eCLD_LevelControlCommandMoveCommandSend 348eCLD_LevelControlCommandStepCommandSend 350eCLD_LevelControlCommandStopCommandSend 352

    16.8 Structures 35416.8.1 Level Control Transition Structure 35416.8.2 Custom Data Structure 35516.8.3 Custom Command Payloads 355

    16.8.3.1 Move To Level Command Payload 35516.8.3.2 Move Command Payload 35616.8.3.3 Step Command Payload 35616.8.3.4 Stop Command Payload 357

    16.9 Enumerations 35816.9.1 teCLD_LevelControl_ClusterID 35816.9.2 teCLD_LevelControl_Transition 35816.9.3 teCLD_LevelControl_MoveMode 358

    16.10 Compile-Time Options 359

    17. Alarms Cluster 36117.1 Overview 36117.2 Alarms Cluster Structure and Attributes 36217.3 Initialisation 36217.4 Alarm Operations 363

    17.4.1 Raising an Alarm 363

    10 © NXP Semiconductors 2018 JN-UG-3115 v1.5

  • ZigBee Cluster Library (for ZigBee 3.0)User Guide

    17.4.2 Resetting Alarms (from Client) 36317.5 Alarms Events 36417.6 Functions 365

    eCLD_AlarmsCreateAlarms 366eCLD_AlarmsCommandResetAlarmCommandSend 368eCLD_AlarmsCommandResetAllAlarmsCommandSend 370eCLD_AlarmsCommandGetAlarmCommandSend 372eCLD_AlarmsCommandResetAlarmLogCommandSend 374eCLD_AlarmsResetAlarmLog 376eCLD_AlarmsAddAlarmToLog 377eCLD_AlarmsGetAlarmFromLog 378eCLD_AlarmsSignalAlarm 379

    17.7 Structures 38117.7.1 Event Callback Message Structure 38117.7.2 Custom Data Structure 38217.7.3 Custom Command Payloads 382

    17.7.3.1 Reset Alarm Command Payload 38217.7.3.2 Alarm Notification Payload 383

    17.7.4 Custom Response Payloads 38317.7.4.1 Get Alarm Response Payload 383

    17.7.5 Alarms Table Entry 38417.8 Enumerations 384

    17.8.1 teCLD_Alarms_AttributeID 38417.9 Compile-Time Options 385

    18. Time Cluster and ZCL Time 38718.1 Overview 38718.2 Time Cluster Structure and Attributes 38818.3 Attribute Settings 390

    18.3.1 Mandatory Attributes 39018.3.2 Optional Attributes 391

    18.4 Maintaining ZCL Time 39318.4.1 Updating ZCL Time Following Sleep 39318.4.2 ZCL Time Synchronisation 393

    18.5 Time-Synchronisation of Devices 39418.5.1 Initialising and Maintaining Master Time 39618.5.2 Initial Synchronisation of Devices 39718.5.3 Re-synchronisation of Devices 398

    18.6 Time Event 39818.7 Functions 399

    eCLD_TimeCreateTime 400vZCL_SetUTCTime 402u32ZCL_GetUTCTime 403bZCL_GetTimeHasBeenSynchronised 404

    JN-UG-3115 v1.5 © NXP Semiconductors 2018 11

  • Contents

    vZCL_ClearTimeHasBeenSynchronised 40518.8 Return Codes 40618.9 Enumerations 406

    18.9.1 teCLD_TM_AttributeID 40618.10 Compile-Time Options 406

    19. Input and Output Clusters 40919.1 Analogue Input (Basic) 409

    19.1.1 Overview 40919.1.2 Analogue Input (Basic) Structure and Attributes 41019.1.3 Attributes for Default Reporting 41319.1.4 Functions 413

    eCLD_AnalogInputBasicCreateAnalogInputBasic 41419.1.5 Enumerations 416

    19.1.5.1 teCLD_AnalogInputBasicCluster_AttrID 41619.1.5.2 teCLD_AnalogInputBasic_Reliability 416

    19.1.6 Compile-Time Options 41719.2 Analogue Output (Basic) 418

    19.2.1 Overview 41819.2.2 Analogue Output (Basic) Structure and Attributes 41919.2.3 Attributes for Default Reporting 42219.2.4 Functions 422

    eCLD_AnalogOutputBasicCreateAnalogOutputBasic 42319.2.5 Enumerations 425

    19.2.5.1 teCLD_AnalogOutputBasicCluster_AttrID 42519.2.5.2 teCLD_AnalogOutputBasic_Reliability 425

    19.2.6 Compile-Time Options 42619.3 Binary Input (Basic) Cluster 427

    19.3.1 Overview 42719.3.2 Binary Input (Basic) Structure and Attributes 42719.3.3 Attributes for Default Reporting 43119.3.4 Functions 431

    eCLD_BinaryInputBasicCreateBinaryInputBasic 43219.3.5 Enumerations 434

    19.3.5.1 teCLD_BinaryInputBasicCluster_AttrID 43419.3.5.2 teCLD_BinaryInputBasic_Polarity 43419.3.5.3 teCLD_BinaryInputBasic_Reliability 435

    19.3.6 Compile-Time Options 43519.4 Binary Output (Basic) 437

    19.4.1 Overview 43719.4.2 Binary Output (Basic) Structure and Attributes 43719.4.3 Attributes for Default Reporting 44119.4.4 Functions 441

    eCLD_BinaryOutputBasicCreateBinaryOutputBasic 44219.4.5 Enumerations 444

    19.4.5.1 teCLD_BinaryOutputBasicCluster_AttrID 444

    12 © NXP Semiconductors 2018 JN-UG-3115 v1.5

  • ZigBee Cluster Library (for ZigBee 3.0)User Guide

    19.4.5.2 teCLD_BinaryOutputBasic_Polarity 44419.4.5.3 teCLD_BinaryOutputBasic_Reliability 445

    19.4.6 Compile-Time Options 44519.5 Multistate Input (Basic) 446

    19.5.1 Overview 44619.5.2 Multistate Input (Basic) Structure and Attributes 44719.5.3 Attributes for Default Reporting 44919.5.4 Functions 449

    eCLD_MultistateInputBasicCreateMultistateInputBasic 45019.5.5 Enumerations 452

    19.5.5.1 teCLD_MultistateInputBasicCluster_AttrID 45219.5.5.2 teCLD_MultistateInputBasic_Reliability 452

    19.5.6 Compile-Time Options 45319.6 Multistate Output (Basic) 454

    19.6.1 Overview 45419.6.2 Multistate Output (Basic) Structure and Attributes 45519.6.3 Attributes for Default Reporting 45719.6.4 Functions 457

    eCLD_MultistateOutputBasicCreateMultistateOutputBasic 45819.6.5 Enumerations 460

    19.6.5.1 teCLD_MultistateOutputBasicCluster_AttrID 46019.6.5.2 teCLD_MultistateOutputBasic_Reliability 460

    19.6.6 Compile-Time Options 461

    20. Poll Control Cluster 46320.1 Overview 46320.2 Cluster Structure and Attributes 46420.3 Attribute Settings 46620.4 Poll Control Operations 466

    20.4.1 Initialisation 46620.4.2 Configuration 46620.4.3 Operation 468

    20.4.3.1 Fast Poll Mode Timeout 46920.4.3.2 Invalid Check-in Responses 469

    20.5 Poll Control Events 47020.6 Functions 471

    20.6.1 Server/Client Function 471 eCLD_PollControlCreatePollControl 472

    20.6.2 Server Functions 474eCLD_PollControlUpdate 475eCLD_PollControlSetAttribute 476eCLD_PollControlUpdateSleepInterval 477

    20.6.3 Client Functions 478eCLD_PollControlSetLongPollIntervalSend 479eCLD_PollControlSetShortPollIntervalSend 481

    JN-UG-3115 v1.5 © NXP Semiconductors 2018 13

  • Contents

    eCLD_PollControlFastPollStopSend 48320.7 Return Codes 48420.8 Enumerations 484

    20.8.1 ‘Attribute ID’ Enumerations 48420.8.2 ‘Command’ Enumerations 484

    20.9 Structures 48520.9.1 tsCLD_PPCallBackMessage 48520.9.2 tsCLD_PollControl_CheckinResponsePayload 48620.9.3 tsCLD_PollControl_SetLongPollIntervalPayload 48620.9.4 tsCLD_PollControl_SetShortPollIntervalPayload 48720.9.5 tsCLD_PollControlCustomDataStructure 487

    20.10 Compile-Time Options 487

    21. Power Profile Cluster 49121.1 Overview 49121.2 Cluster Structure and Attributes 49121.3 Attributes for Default Reporting 49321.4 Power Profiles 49321.5 Power Profile Operations 494

    21.5.1 Initialisation 49421.5.2 Adding and Removing a Power Profile (Server Only) 494

    21.5.2.1 Adding a Power Profile Entry 49521.5.2.2 Removing a Power Profile Entry 49521.5.2.3 Obtaining a Power Profile Entry 495

    21.5.3 Communicating Power Profiles 49521.5.3.1 Requesting a Power Profile (by Client) 49621.5.3.2 Notification of a Power Profile (by Server) 496

    21.5.4 Communicating Schedule Information 49721.5.4.1 Requesting a Schedule (by Server) 49721.5.4.2 Notification of a Schedule (by Client) 49821.5.4.3 Notification of Energy Phases in Power Profile Schedule (by Server) 49821.5.4.4 Requesting the Scheduled Energy Phases (by Client) 499

    21.5.5 Executing a Power Profile Schedule 49921.5.6 Communicating Price Information 500

    21.5.6.1 Requesting Cost of a Power Profile Schedule (by Server) 50021.5.6.2 Requesting Cost of Power Profile Schedules Over a Day (by Server) 501

    21.6 Power Profile Events 50221.7 Functions 505

    21.7.1 Server/Client Function 505eCLD_PPCreatePowerProfile 506

    21.7.2 Server Functions 508eCLD_PPSchedule 509eCLD_PPSetPowerProfileState 510eCLD_PPAddPowerProfileEntry 511eCLD_PPRemovePowerProfileEntry 512

    14 © NXP Semiconductors 2018 JN-UG-3115 v1.5

  • ZigBee Cluster Library (for ZigBee 3.0)User Guide

    eCLD_PPGetPowerProfileEntry 513eCLD_PPPowerProfileNotificationSend 514eCLD_PPEnergyPhaseScheduleStateNotificationSend 515eCLD_PPPowerProfileScheduleConstraintsNotificationSend 516eCLD_PPEnergyPhasesScheduleReqSend 518eCLD_PPPowerProfileStateNotificationSend 519eCLD_PPGetPowerProfilePriceSend 520eCLD_PPGetPowerProfilePriceExtendedSend 521eCLD_PPGetOverallSchedulePriceSend 523

    21.7.3 Client Functions 524eCLD_PPPowerProfileRequestSend 525eCLD_PPEnergyPhasesScheduleNotificationSend 527eCLD_PPPowerProfileStateReqSend 529eCLD_PPEnergyPhasesScheduleStateReqSend 530eCLD_PPPowerProfileScheduleConstraintsReqSend 531

    21.8 Return Codes 53321.9 Enumerations 533

    21.9.1 ‘Attribute ID’ Enumerations 53321.9.2 ‘Power Profile State’ Enumerations 53321.9.3 ‘Server-Generated Command’ Enumerations 53421.9.4 ‘Server-Received Command’ Enumerations 535

    21.10 Structures 53621.10.1 tsCLD_PPCallBackMessage 53621.10.2 tsCLD_PPEntry 53821.10.3 tsCLD_PP_PowerProfileReqPayload 53921.10.4 tsCLD_PP_PowerProfilePayload 53921.10.5 tsCLD_PP_PowerProfileStatePayload 54021.10.6 tsCLD_PP_EnergyPhasesSchedulePayload 54021.10.7 tsCLD_PP_PowerProfileScheduleConstraintsPayload 54121.10.8 tsCLD_PP_GetPowerProfilePriceExtendedPayload 54121.10.9 tsCLD_PP_GetPowerProfilePriceRspPayload 54221.10.10 tsCLD_PP_GetOverallSchedulePriceRspPayload 54221.10.11 tsCLD_PP_EnergyPhaseInfo 54321.10.12 tsCLD_PP_EnergyPhaseDelay 54421.10.13 tsCLD_PP_PowerProfiIeRecord 54421.10.14 tsCLD_PPCustomDataStructure 545

    21.11 Compile-Time Options 545

    22.Diagnostics Cluster 54722.1 Overview 54722.2 Diagnostics Structure and Attributes 54822.3 Functions 552

    eCLD_DiagnosticsCreateDiagnostics 553eCLD_DiagnosticsUpdate 555

    JN-UG-3115 v1.5 © NXP Semiconductors 2018 15

  • Contents

    22.4 Enumerations 55622.4.1 teCLD_Diagnostics_AttributeId 556

    22.5 Compile-time Options 557

    Part IV: Measurement and Sensing Clusters

    23. Illuminance Measurement Cluster 56123.1 Overview 56123.2 Illuminance Measurement Structure and Attributes 56123.3 Attributes for Default Reporting 56323.4 Functions 563

    eCLD_IlluminanceMeasurementCreateIlluminanceMeasurement 56423.5 Enumerations 566

    23.5.1 teCLD_IM_ClusterID 56623.6 Compile-Time Options 566

    24. Illuminance Level Sensing Cluster 56724.1 Overview 56724.2 Cluster Structure and Attributes 56724.3 Attributes for Default Reporting 56924.4 Functions 569

    eCLD_IlluminanceLevelSensingCreateIlluminanceLevelSensing 57024.5 Enumerations 572

    24.5.1 teCLD_ILS_ClusterID 57224.5.2 teCLD_ILS_LightSensorType 57224.5.3 teCLD_ILS_LightLevelStatus 572

    24.6 Compile-Time Options 573

    25. Temperature Measurement Cluster 57525.1 Overview 57525.2 Temperature Measurement Structure and Attributes 57525.3 Attributes for Default Reporting 57725.4 Functions 577

    eCLD_TemperatureMeasurementCreateTemperatureMeasurement 57825.5 Enumerations 580

    25.5.1 teCLD_TemperatureMeasurement_AttributeID 58025.6 Compile-Time Options 580

    26.Pressure Measurement Cluster 581

    16 © NXP Semiconductors 2018 JN-UG-3115 v1.5

  • ZigBee Cluster Library (for ZigBee 3.0)User Guide

    26.1 Overview 58126.2 Cluster Structure and Attributes 58226.3 Initialisation and Operation 58326.4 Pressure Measurement Events 58326.5 Functions 583

    eCLD_PressureMeasurementCreatePressureMeasurement 58426.6 Return Codes 58626.7 Enumerations 586

    26.7.1 ‘Attribute ID’ Enumerations 58626.8 Structures 58626.9 Compile-Time Options 586

    27.Flow Measurement Cluster 58927.1 Overview 58927.2 Cluster Structure and Attributes 59027.3 Initialisation and Operation 59127.4 Flow Measurement Events 59127.5 Functions 591

    eCLD_FlowMeasurementCreateFlowMeasurement 59227.6 Return Codes 59427.7 Enumerations 594

    27.7.1 ‘Attribute ID’ Enumerations 59427.8 Structures 59427.9 Compile-Time Options 594

    28. Relative Humidity Measurement Cluster 59728.1 Overview 59728.2 RH Measurement Structure and Attributes 59728.3 Attributes for Default Reporting 59828.4 Functions 599

    eCLD_RelativeHumidityMeasurementCreateRelativeHumidityMeasurement 60028.5 Enumerations 602

    28.5.1 teCLD_RHM_ClusterID 60228.6 Compile-Time Options 602

    29. Occupancy Sensing Cluster 60329.1 Overview 60329.2 Occupancy Sensing Structure and Attributes 60429.3 Attributes for Default Reporting 60629.4 Functions 606

    JN-UG-3115 v1.5 © NXP Semiconductors 2018 17

  • Contents

    eCLD_OccupancySensingCreateOccupancySensing 60729.5 Enumerations 609

    29.5.1 teCLD_OS_ClusterID 60929.6 Compile-Time Options 609

    30.Electrical Measurement Cluster 61130.1 Overview 61130.2 Cluster Structure and Attributes 61230.3 Initialisation and Operation 61730.4 Electrical Measurement Events 61730.5 Functions 617

    eCLD_ElectricalMeasurementCreateElectricalMeasurement 61830.6 Return Codes 62030.7 Enumerations 620

    30.7.1 ‘Attribute ID’ Enumerations 62030.8 Structures 62030.9 Compile-Time Options 621

    Part V: Lighting Clusters

    31.Colour Control Cluster 62531.1 Overview 62531.2 Colour Control Cluster Structure and Attributes 62631.3 Attributes for Default Reporting 63731.4 Initialisation 63731.5 Sending Commands 637

    31.5.1 Controlling Hue 63731.5.2 Controlling Saturation 63831.5.3 Controlling Colour (CIE x and y Chromaticities) 63931.5.4 Controlling Colour Temperature 64031.5.5 Controlling ‘Enhanced’ Hue 64131.5.6 Controlling a Colour Loop 64431.5.7 Controlling Hue and Saturation 644

    31.6 Functions 645eCLD_ColourControlCreateColourControl 646eCLD_ColourControlCommandMoveToHueCommandSend 648eCLD_ColourControlCommandMoveHueCommandSend 650eCLD_ColourControlCommandStepHueCommandSend 652eCLD_ColourControlCommandMoveToSaturationCommandSend 654eCLD_ColourControlCommandMoveSaturationCommandSend 656

    18 © NXP Semiconductors 2018 JN-UG-3115 v1.5

  • ZigBee Cluster Library (for ZigBee 3.0)User Guide

    eCLD_ColourControlCommandStepSaturationCommandSend 658eCLD_ColourControlCommandMoveToHueAndSaturationCommandSend 660eCLD_ColourControlCommandMoveToColourCommandSend 662eCLD_ColourControlCommandMoveColourCommandSend 664eCLD_ColourControlCommandStepColourCommandSend 666eCLD_ColourControlCommandEnhancedMoveToHueCommandSend 668eCLD_ColourControlCommandEnhancedMoveHueCommandSend 670eCLD_ColourControlCommandEnhancedStepHueCommandSend 672eCLD_ColourControlCommandEnhancedMoveToHueAndSaturationCommandSend 674eCLD_ColourControlCommandColourLoopSetCommandSend 676eCLD_ColourControlCommandStopMoveStepCommandSend 678eCLD_ColourControlCommandMoveToColourTemperatureCommandSend 680eCLD_ColourControlCommandMoveColourTemperatureCommandSend 682eCLD_ColourControlCommandStepColourTemperatureCommandSend 684eCLD_ColourControl_GetRGB 686

    31.7 Structures 68731.7.1 Custom Data Structure 68731.7.2 Custom Command Payloads 687

    31.8 Enumerations 70131.8.1 teCLD_ColourControl_ClusterID 701

    31.9 Compile-Time Options 702

    32. Ballast Configuration Cluster 70732.1 Overview 70732.2 Cluster Structure and Attributes 70832.3 Functions 712

    eCLD_BallastConfigurationCreateBallastConfiguration 71332.4 Enumerations 715

    32.4.1 teCLD_BallastConfiguration_ClusterID 71532.5 Compile-Time Options 715

    Part VI: HVAC Clusters

    33. Thermostat Cluster 72133.1 Overview 72133.2 Thermostat Cluster Structure and Attributes 72233.3 Attributes for Default Reporting 72933.4 Thermostat Operations 729

    33.4.1 Initialisation 73033.4.2 Recording and Reporting the Local Temperature 73033.4.3 Configuring Heating and Cooling Setpoints 730

    JN-UG-3115 v1.5 © NXP Semiconductors 2018 19

  • Contents

    33.5 Thermostat Events 73133.6 Functions 732

    eCLD_ThermostatCreateThermostat 733eCLD_ThermostatSetAttribute 735eCLD_ThermostatStartReportingLocalTemperature 736eCLD_ThermostatCommandSetpointRaiseOrLowerSend 737

    33.7 Return Codes 73833.8 Enumerations 738

    33.8.1 ‘Attribute ID’ Enumerations 73833.8.2 ‘Operating Capabilities’ Enumerations 73933.8.3 ‘Command ID’ Enumerations 74033.8.4 ‘Setpoint Raise Or Lower’ Enumerations 740

    33.9 Structures 74133.9.1 Custom Data Structure 74133.9.2 tsCLD_ThermostatCallBackMessage 74133.9.3 tsCLD_Thermostat_SetpointRaiseOrLowerPayload 742

    33.10 Compile-Time Options 743

    34. Fan Control Cluster 74534.1 Overview 74534.2 Fan Control Structure and Attributes 74534.3 Initialisation 74634.4 Functions 746

    eCLD_CreateFanControl 74734.5 Enumerations 749

    34.5.1 teCLD_FanControl_AttributeID 74934.5.2 teCLD_FC_FanMode 74934.5.3 teCLD_FC_FanModeSequence 750

    34.6 Compile-Time Options 750

    35. Thermostat UI Configuration Cluster 75135.1 Overview 75135.2 Cluster Structure and Attributes 75235.3 Initialisation 75235.4 Functions 753

    eCLD_ThermostatUIConfigCreateThermostatUIConfig 754eCLD_ThermostatUIConfigConvertTemp 756

    35.5 Return Codes 75735.6 Enumerations 757

    35.6.1 ‘Attribute ID’ Enumerations 75735.6.2 ‘Temperature Display Mode’ Enumerations 75735.6.3 ‘Keypad Functionality’ Enumerations 758

    20 © NXP Semiconductors 2018 JN-UG-3115 v1.5

  • ZigBee Cluster Library (for ZigBee 3.0)User Guide

    35.7 Compile-Time Options 758

    Part VII: Closure Clusters

    36. Door Lock Cluster 76136.1 Overview 76136.2 Door Lock Cluster Structure and Attributes 76136.3 Attributes for Default Reporting 76436.4 Door Lock Events 76436.5 Functions 765

    eCLD_DoorLockCreateDoorLock 766eCLD_DoorLockSetLockState 768eCLD_DoorLockGetLockState 769eCLD_DoorLockCommandLockUnlockRequestSend 770eCLD_DoorLockSetSecurityLevel 771

    36.6 Return Codes 77236.7 Enumerations 772

    36.7.1 ‘Attribute ID’ Enumerations 77236.7.2 ‘Lock State’ Enumerations 77236.7.3 ‘Lock Type’ Enumerations 77336.7.4 ‘Door State’ Enumerations 77436.7.5 ‘Command ID’ Enumerations 774

    36.8 Structures 77536.8.1 tsCLD_DoorLockCallBackMessage 77536.8.2 tsCLD_DoorLock_LockUnlockResponsePayload 775

    36.9 Compile-Time Options 776

    Part VIII: Security and Safety Clusters

    37. IAS Zone Cluster 77937.1 Overview 77937.2 IAS Zone Structure and Attributes 78037.3 Enrollment 784

    37.3.1 Trip-to-Pair 78437.3.2 Auto-Enroll-Response 78537.3.3 Auto-Enroll-Request 785

    37.4 IAS Zone Events 78637.5 Functions 787

    eCLD_IASZoneCreateIASZone 788

    JN-UG-3115 v1.5 © NXP Semiconductors 2018 21

  • Contents

    eCLD_IASZoneUpdateZoneStatus 790eCLD_IASZoneUpdateZoneState 792eCLD_IASZoneUpdateZoneType 793eCLD_IASZoneUpdateZoneID 794eCLD_IASZoneUpdateCIEAddress 795eCLD_IASZoneEnrollReqSend 796eCLD_IASZoneEnrollRespSend 798eCLD_IASZoneStatusChangeNotificationSend 800eCLD_IASZoneNormalOperationModeReqSend 802eCLD_IASZoneTestModeReqSend 803

    37.6 Structures 80537.6.1 Custom Data Structure 80537.6.2 Custom Command Payloads 805

    37.7 Compile-Time Options 808

    38. IAS Ancillary Control Equipment Cluster 80938.1 Overview 80938.2 IAS ACE Structure and Attributes 80938.3 Table and Parameters 81038.4 Command Summary 81038.5 IAS ACE Events 81238.6 Functions 814

    eCLD_IASACECreateIASACE 815eCLD_IASACEAddZoneEntry 817eCLD_IASACERemoveZoneEntry 818eCLD_IASACEGetZoneTableEntry 819eCLD_IASACEGetEnrolledZones 820eCLD_IASACESetPanelParameter 821eCLD_IASACEGetPanelParameter 822eCLD_IASACESetZoneParameter 823eCLD_IASACESetZoneParameterValue 825eCLD_IASACEGetZoneParameter 826eCLD_IASACE_ArmSend 827eCLD_IASACE_BypassSend 829eCLD_IASACE_EmergencySend 831eCLD_IASACE_FireSend 832eCLD_IASACE_PanicSend 833eCLD_IASACE_GetZoneIDMapSend 834eCLD_IASACE_GetZoneInfoSend 836eCLD_IASACE_GetPanelStatusSend 838eCLD_IASACE_SetBypassedZoneListSend 840eCLD_IASACE_GetBypassedZoneListSend 842eCLD_IASACE_GetZoneStatusSend 844eCLD_IASACE_ZoneStatusChangedSend 846

    22 © NXP Semiconductors 2018 JN-UG-3115 v1.5

  • ZigBee Cluster Library (for ZigBee 3.0)User Guide

    eCLD_IASACE_PanelStatusChanged 84838.7 Structures 850

    38.7.1 Custom Data Structure 85038.7.2 Zone Table Entry 85038.7.3 Zone Parameters 85138.7.4 Panel Parameters 85338.7.5 Custom Command Payloads 85438.7.6 Event Data Structures 860

    38.8 Enumerations 86338.8.1 teCLD_IASACE_ArmMode 86338.8.2 teCLD_IASACE_PanelStatus 86338.8.3 teCLD_IASACE_AlarmStatus 86438.8.4 teCLD_IASACE_AudibleNotification 864

    38.9 Compile-Time Options 865

    39. IAS Warning Device Cluster 86739.1 Overview 86739.2 IAS WD Structure and Attribute 86739.3 Issuing Warnings 86839.4 IAS WD Events 86939.5 Functions 870

    eCLD_IASWDCreateIASWD 871eCLD_IASWDUpdate 873eCLD_IASWDUpdateMaxDuration 874eCLD_IASWDStartWarningReqSend 875eCLD_IASWDSquawkReqSend 877

    39.6 Structures 87939.6.1 Custom Data Structure 87939.6.2 Custom Command Payloads 87939.6.3 Event Data Structures 881

    39.7 Compile-Time Options 883

    Part IX: Smart Energy Clusters

    40. Price Cluster 88740.1 Overview 88740.2 Price Cluster Structure and Attributes 88840.3 Attribute Settings 89440.4 Initialising and Maintaining Price Lists 89540.5 Publishing Price Information 897

    JN-UG-3115 v1.5 © NXP Semiconductors 2018 23

  • Contents

    40.5.1 Unsolicited Price Updates 89740.5.2 Get Current Price 89840.5.3 Get Scheduled Prices 898

    40.6 Time-Synchronisation via Publish Price Commands 89940.7 Conversion Factor and Calorific Value (Gas Only) 90040.8 Price Events 90140.9 Functions 906

    eSE_PriceCreate 907eSE_PriceGetCurrentPriceSend 909eSE_PriceGetScheduledPricesSend 910eSE_PriceAddPriceEntry 912eSE_PriceAddPriceEntryToClient 914eSE_PriceGetPriceEntry 915eSE_PriceDoesPriceEntryExist 916eSE_PriceRemovePriceEntry 917eSE_PriceClearAllPriceEntries 918eSE_PriceAddConversionFactorEntry 919eSE_PriceGetConversionFactorSend 921eSE_PriceGetConversionFactorEntry 923eSE_PriceDoesConversionFactorEntryExist 924eSE_PriceRemoveConversionFactorEntry 925eSE_PriceClearAllConversionFactorEntries 926eSE_PriceAddCalorificValueEntry 927eSE_PriceGetCalorificValueSend 929eSE_PriceGetCalorificValueEntry 931eSE_PriceDoesCalorificValueEntryExist 932eSE_PriceRemoveCalorificValueEntry 933eSE_PriceClearAllCalorificValueEntries 934

    40.10 Return Codes 93540.11 Structures 937

    40.11.1 tsSE_PricePublishPriceCmdPayload 93740.11.2 tsSE_PricePublishConversionCmdPayload 93940.11.3 tsSE_PricePublishCalorificValueCmdPayload 939

    40.12 Enumerations 94040.12.1 ‘Attribute ID’ Enumerations 94040.12.2 ‘Price Event’ Enumerations 94340.12.3 'Calorific Value Unit' Enumerations 944

    40.13 Compile-Time Options 945

    41.Demand-Response and Load Control Cluster 94741.1 Overview 94741.2 DRLC Cluster Structure and Attributes 94841.3 Initialisation 949

    24 © NXP Semiconductors 2018 JN-UG-3115 v1.5

  • ZigBee Cluster Library (for ZigBee 3.0)User Guide

    41.4 Load Control Events (LCEs) 95041.4.1 LCE Contents 95041.4.2 LCE Lists 950

    41.5 LCE Handling 95141.5.1 LCE Handling on Server 95141.5.2 LCE Handling on Clients 953

    41.5.2.1 LCE Activation and De-activation 95341.5.2.2 Getting Scheduled Events 95441.5.2.3 Reporting LCE Actions to Server 95541.5.2.4 Over-riding LCE Settings 955

    41.5.3 Cancelling LCEs 95641.6 Message Signing (Security) 95641.7 DRLC Events 957

    41.7.1 Event and Command Types 95841.7.2 Other Elements of tsSE_DRLCCallBackMessage 960

    41.8 Functions 961eSE_DRLCCreate 962eSE_DRLCAddLoadControlEvent 964eSE_DRLCGetScheduledEventsSend 965eSE_DRLCCancelLoadControlEvent 966eSE_DRLCCancelAllLoadControlEvents 967eSE_DRLCSetEventUserOption 968eSE_DRLCSetEventUserData 969eSE_DRLCGetLoadControlEvent 970eSE_DRLCFindLoadControlEvent 971

    41.9 Return Codes 97241.10 Enumerations 973

    41.10.1 ‘Device Class’ Enumerations 97341.10.2 ‘DRLC Event’ Enumerations 97441.10.3 ‘Criticality Level’ Enumerations 97541.10.4 ‘LCE Cancellation’ Enumerations 97641.10.5 ‘LCE Participation’ Enumerations 97741.10.6 ‘LCE Data Modification’ Enumerations 97741.10.7 ‘LCE List’ Enumerations 97841.10.8 ‘LCE Status’ Enumerations 979

    41.11 Structures 98141.11.1 tsSE_DRLCLoadControlEvent 98141.11.2 tsSE_DRLCGetScheduledEvents 98341.11.3 tsSE_DRLCCancelLoadControlEvent 98341.11.4 tsSE_DRLCReportEvent 98441.11.5 tsSE_DRLCCallBackMessage 985

    41.12 Compile-Time Options 986

    42. Simple Metering Cluster 987

    JN-UG-3115 v1.5 © NXP Semiconductors 2018 25

  • Contents

    42.1 Overview 98742.2 Simple Metering Cluster Structure and Attributes 98942.3 Attribute Settings 100542.4 Remotely Reading Simple Metering Attributes 100742.5 Mirroring Metering Data 1008

    42.5.1 Configuring Mirroring on ESP 100942.5.2 Configuring Mirroring on Metering Devices 101142.5.3 Mirroring Data 101242.5.4 Reading Mirrored Data 101342.5.5 Removing a Mirror 1014

    42.6 Consumption Data Archive (‘Get Profile’) 101542.6.1 Updating Consumption Data on Server 101542.6.2 Sending and Handling a ‘Get Profile’ Request 1016

    42.7 Simple Metering Events 101842.7.1 Event Types 101942.7.2 Command Types 1019

    42.8 Functions 1020eSE_SMCreate 1021eSE_ReadMeterAttributes 1023eSE_HandleReadMeterAttributesResponse 1025eSM_ServerRequestMirrorCommand 1026eSM_ServerRemoveMirrorCommand 1028eSM_CreateMirror 1029eSM_RemoveMirror 1030eSM_GetFreeMirrorEndPoint 1031eSM_IsMirrorSourceAddressValid 1032eSM_ServerUpdateConsumption 1033eSM_ClientGetProfileCommand 1034u32SM_GetReceivedProfileData 1036

    42.9 Return Codes 103742.10 Enumerations 1037

    42.10.1 ‘Attribute ID’ Enumerations 103742.10.2 ‘Meter Status’ Enumerations 104142.10.3 ‘Unit of Measure’ Enumerations 104242.10.4 ‘Summation Formatting’ Enumerations 104442.10.5 ‘Supply Direction’ Enumerations 104542.10.6 ‘Metering Device Type’ Enumerations 104542.10.7 ‘Simple Metering Event’ Enumerations 104642.10.8 ‘Server Command’ Enumerations 104742.10.9 ‘Client Command’ Enumerations 104842.10.10 ‘Consumption Interval’ Enumerations 104942.10.11 ‘Simple Metering Status’ Enumerations 1050

    42.11 Structures 105142.11.1 tsSM_CallBackMessage 1051

    26 © NXP Semiconductors 2018 JN-UG-3115 v1.5

  • ZigBee Cluster Library (for ZigBee 3.0)User Guide

    42.11.2 tsSE_Mirror 105242.11.3 tsSE_MirrorClusterInstances 105342.11.4 tsSM_CustomStruct 105442.11.5 tsSEGetProfile 105542.11.6 tsSM_RequestMirrorResponseCommand 105542.11.7 tsSM_MirrorRemovedResponseCommand 105642.11.8 tsSM_GetProfileRequestCommand 105642.11.9 tsSM_GetProfileResponseCommand 105742.11.10 tsSM_Error 1058

    42.12 Compile-Time Options 1059

    Part X: Commissioning Clusters

    43. Commissioning Cluster 106543.1 Overview 106543.2 Commissioning Cluster Structure and Attributes 1066

    43.2.1 Start-up Parameters (tsCLD_StartupParameters) 106743.2.2 Join Parameters (tsCLD_JoinParameters) 107043.2.3 End Device Parameters (tsCLD_EndDeviceParameters) 107143.2.4 Concentrator Parameters (tsCLD_ConcentratorParameters) 1072

    43.3 Attribute Settings 107243.4 Initialisation 107343.5 Commissioning Commands 1073

    43.5.1 Device Start-up 107343.5.2 Stored Start-up Parameters 1074

    43.5.2.1 Saving Start-up Parameters 107443.5.2.2 Retrieving Stored Start-up Parameters 1074

    43.5.3 Reset Start-up Parameters to Default Values 107543.6 Commissioning Events 107543.7 Functions 1077

    eCLD_CommissioningClusterCreateCommissioning 1078eCLD_CommissioningCommandRestartDeviceSend 1080eCLD_CommissioningCommandSaveStartupParamsSend 1082eCLD_CommissioningCommandRestoreStartupParamsSend 1084eCLD_CommissioningCommandResetStartupParamsSend 1086eCLD_CommissioningCommandModifyStartupParamsSend 1088eCLD_CommissioningSetAttribute 1090

    43.8 Enumerations 109143.8.1 teCLD_Commissioning_AttributeID 109143.8.2 teCLD_Commissioning_AttributeSet 109143.8.3 teCLD_Commissioning_Command 1092

    43.9 Structures 1093

    JN-UG-3115 v1.5 © NXP Semiconductors 2018 27

  • Contents

    43.9.1 Attribute Set Structures 109343.9.2 tsCLD_Commissioning_RestartDevicePayload 109343.9.3 tsCLD_Commissioning_ModifyStartupParametersPayload 109443.9.4 tsCLD_Commissioning_ResponsePayload 109443.9.5 tsCLD_CommissioningCustomDataStructure 109543.9.6 tsCLD_CommissioningCallBackMessage 1095

    43.10 Compile-Time Options 1096

    44. Touchlink Commissioning Cluster 109944.1 Overview 109944.2 Cluster Structure and Attributes 110044.3 Commissioning Operations 110044.4 Using Touchlink 1101

    44.4.1 Creating a Network 110244.4.2 Adding to an Existing Network 110444.4.3 Updating Network Settings 110544.4.4 Stealing a Node 1106

    44.5 Using the Commissioning Utility 110744.6 Touchlink Commissioning Events 1109

    44.6.1 Touchlink Command Events 111044.6.2 Commissioning Utility Command Events 1111

    44.7 Functions 111144.7.1 Touchlink Functions 1112

    eZLL_RegisterCommissionEndPoint 1113eCLD_ZllCommissionCreateCommission 1114eCLD_ZllCommissionCommandScanReqCommandSend 1115eCLD_ZllCommissionCommandScanRspCommandSend 1116eCLD_ZllCommissionCommandDeviceInfoReqCommandSend 1117eCLD_ZllCommissionCommandDeviceInfoRspCommandSend 1118eCLD_ZllCommissionCommandDeviceIdentifyReqCommandSend 1119eCLD_ZllCommissionCommandFactoryResetReqCommandSend 1120eCLD_ZllCommissionCommandNetworkStartReqCommandSend 1121eCLD_ZllCommissionCommandNetworkStartRspCommandSend 1122eCLD_ZllCommissionCommandNetworkJoinRouterReqCommandSend 1123eCLD_ZllCommissionCommandNetworkJoinRouterRspCommandSend 1124eCLD_ZllCommissionCommandNetworkJoinEndDeviceReqCommandSend 1125eCLD_ZllCommissionCommandNetworkJoinEndDeviceRspCommandSend 1126eCLD_ZllCommissionCommandNetworkUpdateReqCommandSend 1127

    44.7.2 Commissioning Utility Functions 1128eCLD_ZllUtilityCreateUtility 1129eCLD_ZllUtilityCommandEndpointInformationCommandSend 1130eCLD_ZllUtilityCommandGetGroupIdReqCommandSend 1131eCLD_ZllUtilityCommandGetGroupIdRspCommandSend 1132eCLD_ZllUtilityCommandGetEndpointListReqCommandSend 1133

    28 © NXP Semiconductors 2018 JN-UG-3115 v1.5

  • ZigBee Cluster Library (for ZigBee 3.0)User Guide

    eCLD_ZllUtilityCommandGetEndpointListRspCommandSend 1134eCLD_ZllUtilityCommandHandler 1135

    44.8 Structures 113644.8.1 tsZLL_CommissionEndpoint 113644.8.2 tsZLL_CommissionEndpointClusterInstances 113744.8.3 tsCLD_ZllCommissionCustomDataStructure 113744.8.4 tsCLD_ZllCommissionCallBackMessage 113844.8.5 tsCLD_ZllCommission_ScanReqCommandPayload 113944.8.6 tsCLD_ZllCommission_ScanRspCommandPayload 113944.8.7 tsCLD_ZllCommission_DeviceInfoReqCommandPayload 114144.8.8 tsCLD_ZllCommission_DeviceInfoRspCommandPayload 114244.8.9 tsCLD_ZllCommission_IdentifyReqCommandPayload 114244.8.10 tsCLD_ZllCommission_FactoryResetReqCommandPayload 114344.8.11 tsCLD_ZllCommission_NetworkStartReqCommandPayload 114344.8.12 tsCLD_ZllCommission_NetworkStartRspCommandPayload 114544.8.13 tsCLD_ZllCommission_NetworkJoinRouterReqCommandPayload 114644.8.14 tsCLD_ZllCommission_NetworkJoinRouterRspCommandPayload 114744.8.15 tsCLD_ZllCommission_NetworkJoinEndDeviceReqCommandPayload 114844.8.16 tsCLD_ZllCommission_NetworkJoinEndDeviceRspCommandPayload 114944.8.17 tsCLD_ZllCommission_NetworkUpdateReqCommandPayload 115044.8.18 tsCLD_ZllUtilityCustomDataStructure 115044.8.19 tsCLD_ZllUtilityCallBackMessage 115144.8.20 tsCLD_ZllUtility_EndpointInformationCommandPayload 1152

    44.9 Enumerations 115344.9.1 Touchlink Event Enumerations 115344.9.2 Commissioning Utility Event Enumerations 1153

    44.10 Compile-Time Options 1154

    Part XI: Appliances Clusters

    45. Appliance Control Cluster 115745.1 Overview 115745.2 Cluster Structure and Attributes 115745.3 Attributes for Default Reporting 115945.4 Sending Commands 1159

    45.4.1 Execution Commands from Client to Server 115945.4.2 Status Commands from Client to Server 116045.4.3 Status Notifications from Server to Client 1160

    45.5 Appliance Control Events 116145.6 Functions 1162

    eCLD_ApplianceControlCreateApplianceControl 1163eCLD_ACExecutionOfCommandSend 1165

    JN-UG-3115 v1.5 © NXP Semiconductors 2018 29

  • Contents

    eCLD_ACSignalStateSend 1167eCLD_ACSignalStateResponseORSignalStateNotificationSend 1168eCLD_ACSignalStateNotificationSend 1170eCLD_ACChangeAttributeTime 1172

    45.7 Return Codes 117345.8 Enumerations 1173

    45.8.1 ‘Attribute ID’ Enumerations 117345.8.2 ‘Client Command ID’ Enumerations 117345.8.3 ‘Server Command ID’ Enumerations 1174

    45.9 Structures 117545.9.1 tsCLD_ApplianceControlCallBackMessage 117545.9.2 tsCLD_AC_ExecutionOfCommandPayload 117645.9.3 tsCLD_AC_SignalStateResponseORSignalStateNotificationPayload 117645.9.4 tsCLD_ApplianceControlCustomDataStructure 1178

    45.10 Compile-Time Options 1178

    46. Appliance Identification Cluster 117946.1 Overview 117946.2 Cluster Structure and Attributes 117946.3 Functions 1183

    eCLD_ApplianceIdentificationCreateApplianceIdentification 118446.4 Return Codes 118646.5 Enumerations 1186

    46.5.1 ‘Attribute ID’ Enumerations 118646.5.2 ‘Product Type ID’ Enumerations 1186

    46.6 Compile-Time Options 1187

    47.Appliance Events and Alerts Cluster 118947.1 Overview 118947.2 Cluster Structure and Attribute 118947.3 Sending Messages 1190

    47.3.1 ‘Get Alerts’ Messages from Client to Server 119047.3.2 ‘Alerts Notification’ Messages from Server to Client 119147.3.3 ‘Event Notification’ Messages from Server to Client 1191

    47.4 Appliance Events and Alerts Events 119247.5 Functions 1193

    eCLD_ApplianceEventsAndAlertsCreateApplianceEventsAndAlerts 1194eCLD_AEAAGetAlertsSend 1196eCLD_AEAAGetAlertsResponseORAlertsNotificationSend 1197eCLD_AEAAAlertsNotificationSend 1199eCLD_AEAAEventNotificationSend 1200

    47.6 Return Codes 1201

    30 © NXP Semiconductors 2018 JN-UG-3115 v1.5

  • ZigBee Cluster Library (for ZigBee 3.0)User Guide

    47.7 Enumerations 120147.7.1 ‘Command ID’ Enumerations 1201

    47.8 Structures 120247.8.1 tsCLD_ApplianceEventsAndAlertsCallBackMessage 120247.8.2 tsCLD_AEAA_GetAlertsResponseORAlertsNotificationPayload 120347.8.3 tsCLD_AEAA_EventNotificationPayload 120447.8.4 tsCLD_ApplianceEventsAndAlertsCustomDataStructure 1204

    47.9 Compile-Time Options 1205

    48.Appliance Statistics Cluster 120748.1 Overview 120748.2 Cluster Structure and Attributes 120848.3 Sending Messages 1209

    48.3.1 ‘Log Queue Request’ Messages from Client to Server 120948.3.2 ‘Statistics Available’ Messages from Server to Client 121048.3.3 ‘Log Request’ Messages from Client to Server 121148.3.4 ‘Log Notification’ Messages from Server to Client 1211

    48.4 Log Operations on Server 121248.4.1 Adding and Removing Logs 121248.4.2 Obtaining Logs 1212

    48.5 Appliance Statistics Events 121348.6 Functions 1214

    eCLD_ApplianceStatisticsCreateApplianceStatistics 1215eCLD_ASCAddLog 1217eCLD_ASCRemoveLog 1218eCLD_ASCGetLogsAvailable 1219eCLD_ASCGetLogEntry 1220eCLD_ASCLogQueueRequestSend 1221eCLD_ASCLogRequestSend 1222eCLD_ASCLogQueueResponseORStatisticsAvailableSend 1223eCLD_ASCStatisticsAvailableSend 1225eCLD_ASCLogNotificationORLogResponseSend 1226eCLD_ASCLogNotificationSend 1228

    48.7 Return Codes 122948.8 Enumerations 1229

    48.8.1 ‘Attribute ID’ Enumerations 122948.8.2 ‘Client Command ID’ Enumerations 122948.8.3 ‘Server Command ID’ Enumerations 1230

    48.9 Structures 123048.9.1 tsCLD_ApplianceStatisticsCallBackMessage 123048.9.2 tsCLD_ASC_LogRequestPayload 123148.9.3 tsCLD_ASC_LogNotificationORLogResponsePayload 123148.9.4 tsCLD_ASC_LogQueueResponseORStatisticsAvailablePayload 1232

    JN-UG-3115 v1.5 © NXP Semiconductors 2018 31

  • Contents

    48.9.5 tsCLD_LogTable 123248.9.6 tsCLD_ApplianceStatisticsCustomDataStructure 1233

    48.10 Compile-Time Options 1233

    Part XII: Over-The-Air Upgrade

    49.OTA Upgrade Cluster 123749.1 Overview 123749.2 OTA Upgrade Cluster Structure and Attributes 123849.3 Basic Principles 1240

    49.3.1 OTA Upgrade Cluster Server 124149.3.2 OTA Upgrade Cluster Client 1241

    49.4 Application Requirements 124249.5 Initialisation 124349.6 Implementing OTA Upgrade Mechanism 124449.7 Ancillary Features and Resources for OTA Upgrade 1247

    49.7.1 Rate Limiting 124749.7.2 Device-Specific File Downloads 125049.7.3Image Block Size and Fragmentation 125249.7.4 Page Requests 125349.7.5 Persistent Data Management 125549.7.6 Mutex for External Flash Memory Access 125649.7.7 Flash Memory Organisation 125749.7.8 Low-Voltage Flag 1258

    49.8 OTA Upgrade Events 125949.8.1 Server-side Events 126049.8.2 Client-side Events 126149.8.3 Server-side and Client-side Events 1263

    49.9 Functions 126449.9.1 General Functions 1264

    eOTA_Create 1265vOTA_FlashInit 1266eOTA_AllocateEndpointOTASpace 1267vOTA_GenerateHash 1269eOTA_GetCurrentOtaHeader 1270

    49.9.2 Server Functions 1271eOTA_SetServerAuthorisation 1272eOTA_SetServerParams 1273eOTA_GetServerData 1274eOTA_EraseFlashSectorsForNewImage 1275eOTA_FlashWriteNewImageBlock 1276eOTA_NewImageLoaded 1277

    32 © NXP Semiconductors 2018 JN-UG-3115 v1.5

  • ZigBee Cluster Library (for ZigBee 3.0)User Guide

    eOTA_ServerImageNotify 1278eOTA_ServerQueryNextImageResponse 1279eOTA_ServerImageBlockResponse 1280eOTA_SetWaitForDataParams 1282eOTA_ServerUpgradeEndResponse 1283eOTA_ServerSwitchToNewImage 1285eOTA_InvalidateStoredImage 1286eOTA_ServerQuerySpecificFileResponse 1287

    49.9.3 Client Functions 1288eOTA_SetServerAddress 1289eOTA_ClientQueryNextImageRequest 1290eOTA_ClientImageBlockRequest 1291eOTA_ClientImagePageRequest 1292eOTA_ClientUpgradeEndRequest 1293eOTA_HandleImageVerification 1295eOTA_UpdateClientAttributes 1296eOTA_RestoreClientData 1297vOTA_SetImageValidityFlag 1298eOTA_ClientQuerySpecificFileRequest 1299eOTA_SpecificFileUpgradeEndRequest 1300vOTA_SetLowVoltageFlag 1301

    49.10 Structures 130249.10.1 tsOTA_ImageHeader 130249.10.2 tsOTA_Common 130449.10.3 tsOTA_HwFncTable 130449.10.4 tsNvmDefs 130549.10.5 tsOTA_ImageNotifyCommand 130649.10.6 tsOTA_QueryImageRequest 130649.10.7 tsOTA_QueryImageResponse 130749.10.8 tsOTA_BlockRequest 130849.10.9 tsOTA_ImagePageRequest 130949.10.10 tsOTA_ImageBlockResponsePayload 131049.10.11 tsOTA_UpgradeEndRequestPayload 131049.10.12 tsOTA_UpgradeEndResponsePayload 131149.10.13 tsOTA_SuccessBlockResponsePayload 131249.10.14 tsOTA_BlockResponseEvent 131349.10.15 tsOTA_WaitForData 131449.10.16 tsOTA_WaitForDataParams 131449.10.17 tsOTA_PageReqServerParams 131549.10.18 tsOTA_PersistedData 131649.10.19 tsOTA_QuerySpecificFileRequestPayload 131749.10.20 tsOTA_QuerySpecificFileResponsePayload 131849.10.21 tsOTA_CallBackMessage 131949.10.22 tsCLD_PR_Ota 132149.10.23 tsCLD_AS_Ota 132249.10.24 tsOTA_ImageVersionVerify 1323

    JN-UG-3115 v1.5 © NXP Semiconductors 2018 33

  • Contents

    49.10.25 tsOTA_UpgradeDowngradeVerify 132349.11 Enumerations 1324

    49.11.1 teOTA_Cluster 132449.11.2 teOTA_UpgradeClusterEvents 132549.11.3 eOTA_AuthorisationState 132949.11.4 teOTA_ImageNotifyPayloadType 1329

    49.12 Compile-Time Options 133049.13 Build Process 1334

    49.13.1 Modifying Makefiles 133449.13.2 Building Applications 133449.13.3 Preparing and Downloading Initial Client Image 133449.13.4 Preparing and Downloading Server Image 1335

    Part XIII: Appendices

    A. Mutex Callbacks 1339B. Attribute Reporting 1341

    B.1 Automatic Attribute Reporting 1341B.2 Default Reporting 1342B.3 Configuring Attribute Reporting 1342

    B.3.1 Compile-time Options 1342B.3.2 Server Options 1342B.3.3 Client Options 1344B.3.4 General (Server and Client) Options 1344B.3.5 Configuring Automatic Attribute Reports (from Client) 1345B.3.6 Configuring Default Reporting (on Server) 1348B.3.7 ZCL Configuration for Attribute Reporting 1348B.3.8 Speeding Up Automatic Attribute Reports 1349

    B.4 Sending Attribute Reports 1350B.5 Receiving Attribute Reports 1351B.6 Querying Attribute Reporting Configuration 1351B.7 Storing an Attribute Reporting Configuration 1353

    B.7.1 Persisting an Attribute Reporting Configuration 1353B.7.2 Formatting an Attribute Reporting Configuration Record 1353

    C. Extended Attribute Discovery 1356C.1 Compile-time Options 1356C.2 Application Coding 1356

    D. Custom Endpoints 1357D.1 Devices and Endpoints 1357D.2 Cluster Creation Functions 1358

    34 © NXP Semiconductors 2018 JN-UG-3115 v1.5

  • ZigBee Cluster Library (for ZigBee 3.0)User Guide

    D.3 Custom Endpoint Set-up 1359E. Manufacturer-specific Attributes and Commands 1361

    E.1 Adding Manufacturer-specific Attributes 1361E.2 Adding Manufacturer-specific Commands 1363

    F. OTA Upgrade Images in Internal Flash Memory 1366G. OTA Extension for Dual-Processor Nodes 1369

    G.1 Application Upgrades for Different Target Processors 1371G.2 Application Upgrade Scenarios 1372

    G.2.1 Loading Image into JN516x/7x in OTA Server Node 1374G.2.2 Distributing Image to JN516x/7x in OTA Client Node(s) 1374G.2.3 Distributing Image to Co-processor in OTA Client Node(s) 1375

    G.3 Storing Upgrade Images in Co-processor Storage on Server 1379G.4 Use of Image Indices 1380G.5 Multiple OTA Download Files 1381

    G.5.1 Multiple Independent OTA Files 1381G.5.2 Multiple Dependent OTA Files 1381

    H. Example Code Fragments 1382H.1 Code Fragment for Flash Memory Access 1382

    I. Glossary 1384

    JN-UG-3115 v1.5 © NXP Semiconductors 2018 35

  • Contents

    36 © NXP Semiconductors 2018 JN-UG-3115 v1.5

  • ZigBee Cluster Library (for ZigBee 3.0)User Guide

    PrefaceThis manual describes the NXP implementation of the ZigBee Cluster Library (ZCL) for the ZigBee 3.0 standard. The manual describes the clusters from the ZCL that may be used in ZigBee 3.0 applications developed using an NXP ZigBee 3.0 Software Developer’s Kit (SDK).

    OrganisationThis manual is divided into thirteen parts:

    Part I: Fundamentals comprises four chapters: Chapter 1 introduces the ZigBee Cluster Library (ZCL) Chapter 2 describes some essential concepts for the ZCL, including read/

    write access to cluster attributes and the associated read/write functions Chapter 3 describes the event handling framework of the ZCL, including

    the supplied event handling function Chapter 4 describes the error handling provision of the ZCL, including the

    supplied error handling function Part II: Common Resources comprises three chapters:

    Chapter 5 details the general functions of the ZCL Chapter 6 details the general structures used by the ZCL Chapter 7 details the general enumerations used by the ZCL

    Part III: General Clusters comprises fifteen chapters: Chapter 8 details the Basic cluster Chapter 9 details the Power Configuration cluster Chapter 10 details the Device Temperature Configuration cluster Chapter 11 details the Identify cluster Chapter 12 details the Groups cluster Chapter 13 details the Scenes cluster Chapter 14 details the On/Off cluster Chapter 15 details the On/Off Switch Configuration cluster Chapter 16 details the Level Control cluster

    Note: This manual assumes that you are already familiar with the concepts of ZigBee devices, clusters and attributes. These are described in the ZigBee 3.0 Stack User Guide (JN-UG-3113), available from the NXP web site (see “Support Resources” on page 40).

    JN-UG-3115 v1.5 © NXP Semiconductors 2018 37

  • Preface

    Chapter 17 details the Alarms cluster Chapter 18 details the Time cluster, as well as the use of ZCL time Chapter 19 details the Input and Output clusters Chapter 20 details the Poll Control cluster Chapter 21 details the Power Profile cluster Chapter 22 details the Diagnostics cluster

    Part IV: Measurement and Sensing Clusters comprises eight chapters: Chapter 23 details the Illuminance Measurement cluster Chapter 24 details the Illuminance Level Sensing cluster Chapter 25 details the Temperature Measurement cluster Chapter 26 details the Pressure Measurement cluster Chapter 27 details the Flow Measurement cluster Chapter 28 details the Relative Humidity Measurement cluster Chapter 29 details the Occupancy Sensing cluster Chapter 30 details the Electrical Measurement cluster

    Part V: Lighting Clusters comprises two chapters: Chapter 31 details the Colour Control cluster Chapter 32 details the Ballast Configuration cluster

    Part VI: HVAC Clusters comprises three chapters: Chapter 33 details the Thermostat cluster Chapter 34 details the Fan Control cluster Chapter 35 details the Thermostat UI Configuration cluster

    Part VII: Closure Clusters comprises one chapter: Chapter 36 details the Door Lock cluster

    Part VIII: Security and Safety Clusters comprises three chapters: Chapter 37 details the IAS Zone cluster Chapter 38 details the IAS ACE (Ancillary Control Equipment) cluster Chapter 39 details the IAS WD (Warning Device) cluster

    Part IX: Smart Energy Clusters comprises three chapters: Chapter 40 details the Price cluster Chapter 41 details the Demand-Response and Load Control cluster Chapter 42 details the Simple Metering cluster

    Part X: Commissioning Clusters comprises two chapters: Chapter 43 details the Commissioning cluster Chapter 44 details the Touchlink Commissioning cluster

    38 © NXP Semiconductors 2018 JN-UG-3115 v1.5

  • ZigBee Cluster Library (for ZigBee 3.0)User Guide

    Part XI: Appliances Clusters comprises four chapters: Chapter 45 details the Appliance Control cluster Chapter 46 details the Appliance Identification cluster Chapter 47 details the Appliance Events and Alerts cluster Chapter 48 details the Appliance Statistics cluster

    Part XII: Over-The-Air Upgrade comprises one chapter: Chapter 49 details the OTA (Over-the-Air) Upgrade cluster

    Part XIII: Appendices comprises nine appendices covering topics that include mutex callbacks, attribute reporting, attribute discovery, custom endpoints, manufacturer-specific attributes and commands, the storage of OTA upgrade applications in JN516x/7x internal Flash memory, the OTA upgrade of nodes comprising two processors, example code fragments and a glossary of terms.

    ConventionsFiles, folders, functions and parameter types are represented in bold type.Function parameters are represented in italics type.

    Code fragments are represented in the Courier New typeface.

    This is a Tip. It indicates useful or practical information.

    This is a Note. It highlights important additional information.

    This is a Caution. It warns of situations that may result in equipment malfunction or damage.

    JN-UG-3115 v1.5 © NXP Semiconductors 2018 39

  • Preface

    Acronyms and AbbreviationsACE Ancillary Control Equipment

    API Application Programming Interface

    CIE Control and Indicating Equipment

    DRLC Demand-Response and Load Control

    HVAC Heating, Ventilation and Air-Conditioning

    JCU JN51xx Core Utilities

    IAS Intruder Alarm System

    OTA Over The Air

    SE Smart Energy

    UI User Interface

    UTC Co-ordinated Universal Time

    WD Warning Device

    ZCL ZigBee Cluster Library

    Related DocumentsJN-UG-3113 ZigBee 3.0 Stack User Guide

    JN-UG-3114 ZigBee Devices User Guide

    JN-UG-3116 JN51xx Core Utilities (JCU) User Guide

    JN-UG-3081 JN51xx Encryption Tool (JET) User Guide

    075123 rev 6 ZigBee Cluster Library Specification [from ZigBee Alliance]

    095264 ZigBee Over-the-Air Upgrading Cluster [from ZigBee Alliance]

    Support ResourcesTo access online support resources such as SDKs, Application Notes and User Guides, visit the Wireless Connectivity area of the NXP web site:

    www.nxp.com/products/wireless-connectivityAll NXP resources referred to in this manual can be found at the above address, unless otherwise stated.

    TrademarksAll trademarks are the property of their respective owners.

    40 © NXP Semiconductors 2018 JN-UG-3115 v1.5

  • ZigBee Cluster Library (for ZigBee 3.0)User Guide

    Chip CompatibilityThe ZCL software described in this manual can be used on the NXP JN516x and JN517x families of wireless microcontrollers, with the exception of JN5161 device.

    Most information in this manual is applicable to both the JN516x and JN517x devices. The host device is therefore sometimes referred to as JN516x/7x.

    JN-UG-3115 v1.5 © NXP Semiconductors 2018 41

  • Preface

    42 © NXP Semiconductors 2018 JN-UG-3115 v1.5

  • ZigBee Cluster Library (for ZigBee 3.0)User Guide

    Part I: Fundamentals

    JN-UG-3115 v1.5 © NXP Semiconductors 2018 43

  • 44 © NXP Semiconductors 2018 JN-UG-3115 v1.5

  • ZigBee Cluster Library (for ZigBee 3.0)User Guide

    1. ZigBee Cluster Library (ZCL)The ZigBee Cluster Library (ZCL) for ZigBee 3.0 contains standard clusters, as defined by the ZigBee Alliance, for use in ZigBee 3.0 applications over a diverse range of market sectors. Each cluster corresponds to a specific functionality, through a set of attributes and/or commands. Clusters can be selected from the ZCL to give an application the required set of capabilities.

    The ZCL also provides a common means for applications to communicate. It defines a header and payload that sit inside the Protocol Data Unit (PDU) used for messages. It also defines attribute types (such as ints, strings, etc), common commands (e.g. for reading attributes) and default responses for indicating success or failure.

    The NXP implementation of the ZCL, described in this manual, is supplied in the JN516x ZigBee 3.0 Software Developer’s Kit (SDK) [JN-SW-4170] and JN517x ZigBee 3.0 SDK [JN-SW-4270], available via the NXP web site (see “Support Resources” on page 40). These SDKs provide only the clusters supported by NXP that are described in this manual. The ZCL is fully detailed in the ZigBee Cluster Library Specification (075123), available from the ZigBee Alliance.

    The NXP ZCL software can be used on the NXP JN516x and JN517x families of wireless microcontrollers, with the exception of the JN5161 device.

    1.1 ZCL Member ClustersThe clusters of the ZCL are divided into functional areas, for convenience. An application can use clusters from any number of these areas to make up its complete functionality. The clusters implemented by NXP are from the following areas (the associated clusters are listed in the referenced sub-sections):

    General - Section 1.1.1 Measurement and Sensing - Section 1.1.2 Lighting - Section 1.1.3 Heating, Ventilation and Air-Conditioning (HVAC) - Section 1.1.4 Closures - Section 1.1.5 Security and Safety - Section 1.1.6 Smart Energy - Section 1.1.7 Commissioning - Section 1.1.8 Appliances - Section 1.1.9 Over-The-Air (OTA) Upgrade - Section 1.1.10

    Not all of the clusters from the above ZCL functional areas are available in the NXP software.

    JN-UG-3115 v1.5 © NXP Semiconductors 2018 45

  • Chapter 1ZigBee Cluster Library (ZCL)

    1.1.1 GeneralThe General clusters implemented by NXP are listed and outlined in the table below. These clusters are detailed in ‘Part III: General Clusters’ of this manual.

    Cluster Cluster ID Description

    Basic 0x0000 The Basic cluster contains the basic properties of a ZigBee device (e.g. software and hardware versions) and allows the setting of user-defined properties (such as location). This cluster is detailed in Chapter 8.

    Power Configuration 0x0001 The Power Configuration cluster allows the details of a device’s power source(s) to be determined and under/over-voltage alarms to be configured. This cluster is detailed in Chapter 9.

    Device Temperature Configuration 0x0002 The Device Temperature Configuration cluster allows information about the internal temperature of a device to be obtained and under/over-temperature alarms to be configured. This cluster is detailed in Chapter 10.

    Identify 0x0003 The Identify cluster allows a ZigBee device to make itself known visually (e.g. by flashing a light) to an observer, such as a network installer. This cluster is detailed in Chapter 11.

    Groups 0x0004 The Groups cluster allows the management of the Group table concerned with group addressing - that is, the targeting of multiple endpoints using a single address. This cluster is detailed in Chapter 12.

    Scenes 0x0005 The Scenes cluster allows the management of pre-defined sets of cluster attribute values called scenes, where a scene can be stored, retrieved and applied to put the system into a pre-determined state. This clus-ter is detailed in Chapter 13.

    On/Off 0x0006 The On/Off cluster allows a device to be put into the ‘on’ and ‘off’ states, or toggled between the two states. This cluster is detailed in Chapter 14.

    On/Off Switch Configuration 0x0007 The On/Off Switch Configuration cluster allows the switch type on a device to be defined, as well as the commands to be generated when the switch is moved between its two states. This cluster is detailed in Chapter 15.

    Level Control 0x0008 The Level Control cluster allows control of the level of a physical quantity (e.g. heat output) on a device. This cluster is detailed in Chapter 16.

    Alarms 0x0009 The Alarms cluster is used for sending alarm notifica-tions and the general configuration of alarms for all other clusters on the ZigBee device (individual alarm conditions are set in the corresponding clusters). Thi s cluster is detailed in Chapter 17.

    Table 1: General Clusters

    46 © NXP Semiconductors 2018 JN-UG-3115 v1.5

  • ZigBee Cluster Library (for ZigBee 3.0)User Guide

    Time 0x000A The Time cluster provides an interface to a real-time clock on a ZigBee device, allowing the clock time to be read and written in order to synchronise the clock to a time standard - the number of seconds since 0 hrs 0 mins 0 secs on 1st January 2000 UTC (Co-ordinated Universal Time). This cluster includes functionality for local time-zone and daylight saving time. This cluster is detailed in Chapter 18.

    Analogue Input (Basic) 0x000C The Analogue Input (Basic) cluster provides an inter-face for accessing an analogue measurement. This cluster is detailed in Section 19.1.

    Analogue Output (Basic) 0x000D The Analogue Output (Basic) cluster provides an interface for setting the value of an analogue output. This cluster is detailed in Section 19.2.

    Binary Input (Basic) 0x000F The Binary Input (Basic) cluster provides an interface for accessing a binary (two-state) measurement. This cluster is detailed in Section 19.3.

    Binary Output (Basic) 0x0010 The Binary Output (Basic) cluster provides an inter-face for setting the state of a binary (two-state) output. This cluster is detailed in Section 19.4.

    Multistate Input (Basic) 0x0012 The Multistate Input (Basic) cluster provides an inter-face for accessing a multistate measurement (that can take one of a set of fixed states). This cluster is detailed in Section 19.5.

    Multistate Output (Basic) 0x0013 The Multistate Output (Basic) cluster provides an interface for setting the value of a multistate output (that can take one of a set of fixed states). This cluster is detailed in Section 19.6.

    Poll Control 0x0020 The Poll Control cluster provides an interface for remotely controlling the rate at which a ZigBee End Device polls its parent for data. This cluster is detailed in Chapter 20.

    Power Profile 0x001A The Power Profile cluster provides an interface between a home appliance (e.g. a washing machine) and the controller of an energy management system. This cluster is detailed in Chapter 21.

    Diagnostics 0x0B05 The Diagnostics cluster allows the operation of the ZigBee PRO stack to be followed over time. This clus-ter is detailed in Chapter 22.

    Cluster Cluster ID Description

    Table 1: General Clusters

    JN-UG-3115 v1.5 © NXP Semiconductors 2018 47

  • Chapter 1ZigBee Cluster Library (ZCL)

    1.1.2 Measurement and SensingThe Measurement and Sensing clusters implemented by NXP are listed and outlined in the table below. These clusters are detailed in ‘Part IV: Measurement and Sensing Clusters’ of this manual.

    Cluster Cluster ID Description

    Illuminance Measurement 0x0400 The Illuminance Measurement cluster provides an interface to an illuminance measuring device, allowing the configuration of measuring and the reporting of measurements. This cluster is detailed in Chapter 23.

    Illuminance Level Sensing 0x0401 The Illuminance Level Sensing cluster provides an interface to light-level sensing functionality. This clus-ter is detailed in Chapter 24.

    Temperature Measurement 0x0402 The Temperature Measurement cluster provides an interface to a temperature measuring device, allowing the configuration of measuring and the reporting of measurements. This cluster is detailed in Chapter 25.

    Pressure Measurement 0x0403 The Pressure Measurement cluster provides an inter-face to a pressure measuring device, allowing the configuration of measuring and the reporting of meas-urements. This cluster is detailed in Chapter 26.

    Flow Measurement 0x0404 The Flow Measurement cluster provides an interface to a flow measuring device for a fluid, allowing the configuration of measuring and the reporting of meas-urements. This cluster is detailed in Chapter 27.

    Relative Humidity Measurement 0x0405 The Relative Humidity Measurement cluster provides an interface to a humidity measuring device, allowing the configuration of relative humidity measuring and the reporting of measurements. This cluster is detailed in Chapter 28.

    Occupancy Sensing 0x0406 The Occupancy Sensing cluster provides an interface to an occupancy sensor, allowing the configuration of sensing and the reporting of status. This cluster is detailed in Chapter 29.

    Electrical Measurement 0x0B04 The Electrical Measurement cluster provides an inter-face for obtaining electrical measurements from a device. This cluster is detailed in Chapter 30.

    Table 2: Measurement and Sensing Clusters

    48 © NXP Semiconductors 2018 JN-UG-3115 v1.5

  • ZigBee Cluster Library (for ZigBee 3.0)User Guide

    1.1.3 LightingThe Lighting clusters implemented by NXP are listed and outlined in the table below. These clusters are detailed in ‘Part V: Lighting Clusters’ of this manual.

    1.1.4 Heating, Ventilation and Air-Conditioning (HVAC)The HVAC clusters implemented by NXP are listed and outlined in the table below. These clusters are detailed in ‘Part VI: HVAC Clusters’ of this manual.

    Cluster Cluster ID Description

    Colour Control 0x0300 The Colour Control cluster can be used to adjust the colour of a light (it does not govern the overall lumi-nance of the light, as this is controlled using the Level Control cluster). This cluster is detailed in Chapter 31.

    Ballast Configuration 0x0301 The Ballast Configuration cluster can be used to con-figure a lighting ballast that restricts the light levels of a connected set of lamps. This cluster is detailed in Chapter 32.

    Table 3: Lighting Clusters

    Cluster Cluster ID Description

    Thermostat 0x0201 The Thermostat cluster provides a means of configur-ing and controlling the functionality of a thermostat. This cluster is detailed in Chapter 33.

    Fan Control 0x0202 The Fan Control cluster provides a means of con-trolling the speed or state of a fan which may be part of a heating or cooling system. The cluster is detailed in Chapter 34.

    Thermostat User Interface Configuration 0x0204 The Thermostat User Interface (UI) Configuration cluster provides a means of configuring the user inter-face (keypad and/or LCD screen) for a thermostat or a thermostat controller device. This cluster is detailed in Chapter 35.

    Table 4: HVAC Clusters

    JN-UG-3115 v1.5 © NXP Semiconductors 2018 49

  • Chapter 1ZigBee Cluster Library (ZCL)

    1.1.5 ClosuresThe Closure clusters implemented by NXP are listed and outlined in the table below. These clusters are detailed in ‘Part VII: Closure Clusters’ of this manual.

    1.1.6 Security and SafetyThe Security and Safety clusters implemented by NXP are listed and outlined in the table below. These clusters are detailed in ‘Part VIII: Security and Safety Clusters’ of this manual.

    Cluster Cluster ID Description

    Door Lock 0x0101 The Door Lock cluster provides a means of represent-ing the state of a door lock and (optionally) the door. This cluster is detailed in Chapter 36.

    Table 5: Closure Clusters

    Cluster Cluster ID Description

    IAS Zone 0x0500 The IAS Zone cluster provides an interface to a zone device in an IAS (Intruder Alarm System). This cluster is detailed in Chapter 37.

    IAS ACE (Ancillary Control Equipment) 0x0501 The IAS ACE cluster provides a control interface to a CIE (Control and Indicating Equipment) device in an IAS (Intruder Alarm System). This cluster is detailed in Chapter 38.

    IAS WD (Warning Device) 0x0502 The IAS WD cluster provides an interface to a Warn-ing Device in an IAS (Intruder Alarm System). For example, a CIE (Control and Indicating Equipment) device can use the cluster to issue alarm warning indi-cations to a Warning Device when an alarm condition is detected. This cluster is detailed in Chapter 39.

    Table 6: Security and Safety Clusters

    50 © NXP Semiconductors 2018 JN-UG-3115 v1.5

  • ZigBee Cluster Library (for ZigBee 3.0)User Guide

    1.1.7 Smart EnergyThe Smart Energy clusters implemented by NXP are listed and outlined in the table below. These clusters are detailed in ‘Part IX: Smart Energy Clusters’ of this manual.

    Other Smart Energy (SE) clusters, that are not available in the ZigBee 3.0 SDK, are provided in the NXP ZigBee Smart Energy SDK. The ZigBee 3.0 SDK contains only the SE clusters that are supported by NXP for non-SE applications.

    1.1.8 CommissioningThe Commissioning clusters implemented by NXP are listed and outlined in the table below. These clusters are detailed in ‘Part X: Commissioning Clusters’ of this manual.

    Cluster Cluster ID Description

    Price 0x0700 The Price cluster provides the mechanism for sending and receiving pricing information within a ZigBee 3.0 network. This cluster is detailed in Chapter 40.

    Demand-Response and Load Control 0x0701 The Demand-Response and Load Control (DRLC) cluster provides an interface for controlling an attached appliance that supports load control. The cluster is able to receive load control requests and act upon them - the demand-response functionality. This cluster is detailed in Chapter 41.

    Simple Metering 0x0702 The Simple Metering cluster provides a mechanism to obtain consumption data from a metering device (elec-tric, gas, water or thermal). This cluster is detailed in Chapter 42.

    Table 7: Smart Energy Clusters

    Cluster Cluster ID Description

    Commissioning 0x0015 The Commissioning cluster can be used for commis-sioning the ZigBee stack on a device during network installation and defining the device behaviour with respect to the ZigBee network (it does not affect appli-cations operating on the devices). This cluster is detailed in Chapter 43.

    Touchlink Commissioning 0x1000 The Touchlink Commissioning cluster is used when forming a ZigBee 3.0 network or adding a new node to an existing network. This cluster is detailed in Chapter 44.

    Table 8: Commissioning Clusters

    JN-UG-3115 v1.5 © NXP Semiconductors 2018 51

  • Chapter 1ZigBee Cluster Library (ZCL)

    1.1.9 AppliancesThe Appliances clusters implemented by NXP are listed and outlined in the table below. These clusters are detailed in ‘Part XI: Appliances Clusters’ of this manual.

    1.1.10 Over-The-Air (OTA) UpgradeThe Over-The-Air (OTA) Upgrade cluster is outlined in the table below and detailed in ‘Part XII: Over-The-Air Upgrade’ of this manual.

    Cluster Cluster ID Description

    Appliance Control 0x001B The Appliance Control cluster provides an interface for remotely controlling appliances in the home. This cluster is detailed in Chapter 45.

    Appliance Identification 0x0B00 The Appliance Identification cluster provides an inter-face for obtaining and setting basic appliance informa-tion. This cluster is detailed in Chapter 46.

    Appliance Events and Alerts 0x0B02 The Appliance Events and Alerts cluster provides an interface for the notification of significant events and alert situations. This cluster is detailed in Chapter 47.

    Appliance Statistics 0x0B03 The Appliance Statistics cluster provides an interface for supplying statistical information about an appli-ance. This cluster is detailed in Chapter 48.

    Table 9: Appliances Clusters

    Cluster Cluster ID Description

    OTA Upgrade 0x0019 The OTA Upgrade cluster provides the facility to upgrade (or downgrade or re-install) application soft-ware on the nodes of a ZigBee 3.0 network by distrib-uting the replacement software through the network (over the air) and updating the software with minimal interruption to node operation. This cluster is detailed in Chapter 49.

    Table 10: OTA Upgrade Cluster

    52 © NXP Semiconductors 2018 JN-UG-3115 v1.5

  • ZigBee Cluster Library (for ZigBee 3.0)User Guide

    1.2 General ZCL ResourcesIn addition to clusters, the ZCL provides general (non-cluster-specific) resources. For example, common mechanisms are used to allow a cluster client to access (read and write to) the attributes on the cluster server - the NXP ZCL software includes C functions and structures for performing such accesses across all clusters.

    The fundamental principles and mechanisms of the ZCL are presented in the rest of Part I: Fundamentals:

    Chapter 2 describes essential ZCL principles, such as accessing attributes Chapter 3 describes the ZCL handling of stack-related and timer-related events Chapter 4 described the ZCL handling of errors.

    The general resources provided by the ZCL software are detailed in Part II: Common Resources:

    Chapter 5 details the core functions provided with the ZCL Chapter 6 details the general ZCL structures Chapter 7 details the general ZCL enumerations and status codes

    Cluster-specific resources are detailed in the respective chapters for the clusters.

    Note: It is possible to customise the clusters of the ZCL by introducing manufacturer-specific attributes and commands. The processes of adding custom attributes and commands are described in Appendix E.

    JN-UG-3115 v1.5 © NXP Semiconductors 2018 53

  • Chapter 1ZigBee Cluster Library (ZCL)

    1.3 ZCL Compile-time OptionsBefore the application can be built, the ZCL compile-time options must be configured in the header file zcl_options.h for the application.

    Enabled ClustersAll required clusters must be enabled in the options header file. For example, to enable the Basic and Time clusters, the following lines are required:

    #define CLD_BASIC

    #define CLD_TIME

    In addition, to include the software for a cluster client or server or both, it is necessary to select them in the options header file. For example, to select the Basic cluster client and server, the following lines are required:

    #define BASIC_CLIENT

    #define BASIC_SERVER

    Support for Attribute Read/WriteRead/write access to cluster attributes must be explicitly compiled into the application, and must be enabled separately for the server and client sides of a cluster using the following macros in the options header file:

    #define ZCL_ATTRIBUTE_READ_SERVER_SUPPORTED

    #define ZCL_ATTRIBUTE_READ_CLIENT_SUPPORTED

    #define ZCL_ATTRIBUTE_WRITE_SERVER_SUPPORTED

    #define ZCL_ATTRIBUTE_WRITE_CLIENT_SUPPORTED

    Each of the above definitions will apply to all clusters used in the application.

    Optional AttributesMany clusters have optional attributes that may be enabled at compile-time via the options header file - for example, to enable the Time Zone attribute in the Time cluster:

    #define E_CLD_TIME_ATTR_TIME_ZONE

    Tip: If only read access to attributes is required then do not enable write access, as omitting the write options will give the benefit of a reduced application size.

    Note: Cluster-specific compile-time options are detailed in the chapters for the individual clusters. The attribute reporting feature also has its own compile-time options (see Appendix B.3.1).

    54 © NXP Semiconductors 2018 JN-UG-3115 v1.5

  • ZigBee Cluster Library (for ZigBee 3.0)User Guide

    Number of EndpointsThe following line can be added to set the number of endpoints supported on a node (to n):

    #define ZCL_NUMBER_OF_ENDPOINTS n

    The default value is 1.

    Default ResponsesThe following line can be added to enable default responses (see Section 2.5):

    #define ZCL_DISABLE_DEFAULT_RESPONSES

    By default, they are disabled.

    APS AcknowledgementsThe following line can be added to enable APS acknowledgements:

    #define ZCL_DISABLE_APS_ACK

    By default, they are disabled.

    Cooperative TasksBy default, tasks within the application are cooperative, and events will therefore not be generated for locking and unlocking mutexes for resources that are shared between the tasks. To disable the cooperative task feature, add the following line:

    #undefine COOPERATIVE

    Note that this requires an undefine.

    Parameter CheckingParameter checking in various functons can be enabled by including the following line:

    #define STRICT_PARAM_CHECK

    This feature is useful for testing during application development. When the testing is complete, the option should be disabled to eliminate the checks and to save code memory. This option can be defined in the zcl_options.h file or the makefile.

    ‘Wild Card’ ProfileCommands with a ‘wild card’ application profile (Profile ID of 0xFFFF) can be accepted and processed by the receiving device by including the following line:

    #define ZCL_ALLOW_WILD_CARD_PROFILE

    JN-UG-3115 v1.5 © NXP Semiconductors 2018 55

  • Chapter 1ZigBee Cluster Library (ZCL)

    56 © NXP Semiconductors 2018 JN-UG-3115 v1.5

  • ZigBee Cluster Library (for ZigBee 3.0)User Guide

    2. ZCL Fundamentals and FeaturesThis chapter describes essential ZCL concepts, including the use of shared device structures as well as remote read and write accesses to cluster attributes.

    2.1 Initialising the ZCLThe ZCL can be initialised using the function eZCL_Initialise(), which must be called before registering any endpoints (using the device-specific endpoint registration functions) and before starting the ZigBee PRO stack. As part of this initialisation, you must specify a user-defined callback function that will be invoked when a ZigBee PRO stack event occurs that is not associated with an endpoint. You must also provide a local pool of Application Protocol Data Units (APDUs) that will be used by the ZCL to hold messages that are to be sent and received.

    2.2 Shared Device StructuresIn each ZigBee device, cluster attribute values are exchanged between the application and the ZCL by means of a shared structure. This structure is protected by a mutex - see Appendix A. The structure for a particular ZigBee device contains structures for the clusters supported by that device.

    A shared device structure within a device can be accessed both by the local application and by a remote application on another device. Remote read and write operations involving a shared device structure are illustrated in Figure 1 below. Normally, these operations are requested by a cluster client and performed on a cluster server. For more detailed descriptions of these operations, refer to Section 2.3.

    Usually, the ZCL parses remote commands that write attribute values to the shared device structure. The written values can then be read by the local application. For example, an On/Off Switch device remotely writes to the shared device structure in an

    Note 1: This chapter assumes that you are familiar with ZigBee clusters and associated concepts (such as the cluster server and client). For an introduction to ZigBee clusters, refer to the ZigBee 3.0 Stack User Guide (JN-UG-3113).

    Note 2: The ZCL functions referred to in this chapter are detailed in Chapter 5.

    Note: In order to use a cluster which is supported by a device, the relevant option for the cluster must be specified at build-time - see Section 1.3.

    JN-UG-3115 v1.5 © NXP Semiconductors 2018 57

  • Chapter 2ZCL Fundamentals and Features

    On/Off Light device and the local application then reads this data to change the state or configuration of the light.

    Figure 1: Operations using Shared Device Structure

    Note: Provided that there are no remote attribute writes, the attributes of a cluster server (in the shared structure) on a device are maintained by the local application(s).

    Read Command

    Response

    Server Device

    Device Structure

    Application

    WriteRead

    Client Device

    Application

    Read Request

    ZCLZCL

    Reading Remote Attributes

    Write Command

    Server Device

    Device Structure

    Application

    ReadWrite

    Client Device

    Application

    Write Request

    ZCLZCL

    Writing Remote Attributes

    Response

    Application requests read of attribute values from device structure on remote server and ZCL sends request .ZCL receives response and generates events (which can prompt application to read attributes from structure).

    1.

    4.

    If necessary, application first updates attribute values in device structure.ZCL reads requested attribute values from device structure and then returns them to requesting client .

    2.

    3.

    ZCL sends 'write attributes' request to remote server.ZCL can receive optional response and generate events for the application (that indicate any unsuccessful writes).

    1.5.

    ZCL writes received attribute values to device structure and optionally sends response to client.If required, application can then read new attribute values from device structure.ZCL can optionally generate a ‘write attributes’ response .

    2.

    3.

    4.

    Event (s)

    Event (s)

    58 © NXP Semiconductors 2018 JN-UG-3115 v1.5

  • ZigBee Cluster Library (for ZigBee 3.0)User Guide

    2.3 Accessing AttributesThis section describes the processes of reading and writing cluster attributes on a remote node. For the attribute access function descriptions, refer to Section 5.2.

    2.3.1 Attribute Access PermissionsFor each attribute of a cluster, access permissions need to be defined for the different types of access to the attribute. These permissions are configured using control flags, with one flag for each access type, as follows:

    If a particular access type is required for an individual attribute, the corresponding flag must be defined for that attribute. This is done in the C header file for the cluster. For example, in the case of the On/Off cluster, the required flags must be defined for each attribute in the following structure in the OnOff.c file:

    const tsZCL_AttributeDefinition asCLD_OnOffClusterAttributeDefinitions[] = {#ifdef ONOFF_SERVER {E_CLD_ONOFF_ATTR_ID_ONOFF, (E_ZCL_AF_RD|E_ZCL_AF_SE|E_ZCL_AF_RP), E_ZCL_BOOL, (uint32)(&((tsCLD_OnOff*)(0))->bOnOff),0}, /* Mandatory */ #ifdef CLD_ONOFF_ATTR_GLOBAL_SCENE_CONTROL {E_CLD_ONOFF_ATTR_ID_GLOBAL_SCENE_CONTROL, (E_ZCL_AF_RD), _ZCL_BOOL, (uint32)(&((tsCLD_OnOff*)(0))->bGlobalSceneControl),0}, /* Optional */#endif#ifdef CLD_ONOFF_ATTR_ON_TIME {E_CLD_ONOFF_ATTR_ID_ON_TIME, E_ZCL_AF_RD|E_ZCL_AF_WR), E_ZCL_UINT16, (uint32)(&((tsCLD_OnOff*)(0))->u16OnTime),0}, /* Optional */#endif#ifdef CLD_ONOFF_ATTR_OFF_WAIT_TIME {E_CLD_ONOFF_ATTR_ID_OFF_WAIT_TIME, (E_ZCL_AF_RD|E_ZCL_AF_WR), E_ZCL_UINT16, (uint32)(&((tsCLD_OnOff*)(0))->u16OffWaitTime),0}, /* Optional */#endif#ifdef CLD_ONOFF_ATTR_STARTUP_ONOFF /* ZLO extension for OnOff Cluster */ {E_CLD_ONOFF_ATTR_ID_STARTUP_ONOFF, E_ZCL_AF_RD|E_ZCL_AF_WR), E_ZCL_ENUM8, (uint32)(&((tsCLD_OnOff*)(0))->eStartUpOnOff),0}, /* Optional */#endif#endif {E_CLD_GLOBAL_ATTR_ID_CLUSTER_REVISION, (E_ZCL_AF_RD|E_ZCL_AF_GA), E_ZCL_UINT16, (uint32)(&((tsCLD_OnOff*)(0))->u16ClusterRevision),0}, /* Mandatory */#if (defined ONOFF_SERVER) && (defined CLD_ONOFF_ATTR_ATTRIBUTE_REPORTING_STATUS) {E_CLD_GLOBAL_ATTR_ID_ATTRIBUTE_REPORTING_STATUS,(E_ZCL_AF_RD|E_ZCL_AF_GA), E_ZCL_ENUM8, (uint32)(&((tsCLD_OnOff*)(0))->u8AttributeReportingStatus),0}, /* Optional */#endif};

    Note that the flag E_ZCL_AF_GA indicates a global attribute.

    Access Type Flag Description

    Read E_ZCL_AF_RD Global commands can read the attribute value

    Write E_ZCL_AF_WR Global commands can write a new value to the attribute

    Report E_ZCL_AF_RP Global commands can report the value of the attribute or configure the attribute for default reporting

    Scene E_ZCL_AF_SE The attribute can be accessed through a scene (if the Scenes cluster is implemented on the same endpoint)

    Table 11: Attribute Access Types and Control Flags

    JN-UG-3115 v1.5 © NXP Semiconductors 2018 59

  • Chapter 2ZCL Fundamentals and Features

    2.3.2 Reading AttributesA ZigBee