Lighting and Occupancy Device Types

This chapter details the ZigBee device types that are collected together in the ZigBee Lighting and Occupancy Device Specification (15-0014-01) from the ZigBee Alliance.

Note: Lighting and Occupancy are not the application profiles. The devices in this collection use the application profile identifier 0x0104, previously used for the Home Automation application profile. This identifier ensures backward compatibility with applications for devices based on the Home Automation 1.2 profile.

The ZigBee Lighting and Occupancy (ZLO) device types are listed in the table below.

Lighting and Occupancy Device Types

Device Type

Device ID

Reference

On/Off Light

0x0100

Section 3.1

Dimmable Light

0x0101

Section 3.2

Colour Dimmable Light

0x0102

Section 3.3

On/Off Light Switch

0x0103

Section 3.4

Dimmer Switch

0x0104

Section 3.5

Colour Dimmer Switch

0x0105

Section 3.6

Light Sensor

0x0106

Section 3.7

Occupancy Sensor

0x0107

Section 3.8

On/Off Ballast

0x0108

Section 3.9

Dimmable Ballast

0x0109

Section 3.10

On/Off Plug-in Unit

0x010A

Section 3.11

Dimmable Plug-in Unit

0x010B

Section 3.12

Colour Temperature Light

0x010C

Section 3.13

Extended Colour Light

0x010D

Section 3.14

Light Level Sensor

0x010E

Section 3.15

Colour Controller

0x0800

Section 3.16

Colour Scene Controller

0x0810

Section 3.17

Non-Colour Controller

0x0820

Section 3.18

Non-Colour Scene Controller

0x0830

Section 3.19

Control Bridge

0x0840

Section 3.20

On/Off Sensor

0x0850

Section 3.21

On/Off light

The On/Off Light device is simply a light that can be switched on and off (two states only and no intermediate levels).

  • The Device ID is 0x0100.

  • The header file for the device is on_off_light.h.

  • The clusters supported by the device are listed in Section 3.1.1.

  • The device structure, tsZLO_OnOffLightDevice, is listed in Section 3.1.2.

  • The endpoint registration function for the device, eZLO_RegisterOnOffLightEndPoint(), is detailed in Section 3.1.3.

Supported clusters

The clusters used by the On/Off Light device are listed in the table below.

Table 14.  Clusters for On/Off Light

Server (Input) side

Client (Output) side

Mandatory

Basic

Identify

On/Off

Scenes

Groups

Optional

Level control

OTA upgrade

Touchlink commissioning

Occupancy sensing

The mandatory attributes within each cluster for this device type are indicated in the ZigBee Lighting and Occupancy Device Specification (15-0014-01).

Parent topic:On/Off light

Device structure

The following tsZLO_OnOffLightDevice structure is the shared structure for an On/Off Light device:

typedef struct
{
            tsZCL_EndPointDefinition sEndPoint;
 /* Cluster instances */
            tsZLO_OnOffLightDeviceClusterInstances sClusterInstance;
            #if (defined CLD_BASIC) && (defined BASIC_SERVER)
/* Basic Cluster - Server */
            tsCLD_Basic sBasicServerCluster;
            #endif
            #if (defined CLD_ONOFF) && (defined ONOFF_SERVER)
/* On/Off Cluster - Server */
            tsCLD_OnOff sOnOffServerCluster;
            tsCLD_OnOffCustomDataStructure sOnOffServerCustomDataStructure;
            #endif
            #if (defined CLD_GROUPS) && (defined GROUPS_SERVER)
/* Groups Cluster - Server */
            tsCLD_Groups sGroupsServerCluster;
            tsCLD_GroupsCustomDataStructure sGroupsServerCustomDataStructure;
            #endif
            #if (defined CLD_SCENES) && (defined SCENES_SERVER)
/* Scenes Cluster - Server */
            tsCLD_Scenes sScenesServerCluster;
            tsCLD_ScenesCustomDataStructure sScenesServerCustomDataStructure;
            #endif
            #if (defined CLD_IDENTIFY) && (defined IDENTIFY_SERVER)
/* Identify Cluster - Server */
            tsCLD_Identify sIdentifyServerCluster;
            tsCLD_IdentifyCustomDataStructure
                        sIdentifyServerCustomDataStructure;
            #endif
/* On Off light device 2 optional clusters for the server */
            #if (defined CLD_LEVEL_CONTROL) && (defined LEVEL_CONTROL_SERVER)
/* LevelControl Cluster - Server */
            tsCLD_LevelControl sLevelControlServerCluster;
            tsCLD_LevelControlCustomDataStructure
                     sLevelControlServerCustomDataStructure;
            #endif
            #if (defined CLD_ZLL_COMMISSION) && (defined ZLL_COMMISSION_SERVER)
            tsCLD_ZllCommission sZllCommissionServerCluster;
            tsCLD_ZllCommissionCustomDataStructure
            sZllCommissionServerCustomDataStructure;
            #endif
/* On Off light device 2 optional clusters for the client */
            #if (defined CLD_OTA) && (defined OTA_CLIENT)
            /* OTA cluster - Client */
            tsCLD_AS_Ota sCLD_OTA;
            tsOTA_Common sCLD_OTA_CustomDataStruct;
            #endif
            #if (defined CLD_OCCUPANCY_SENSING) && (defined
            OCCUPANCY_SENSING_CLIENT)
            /* Occupancy Sensing Cluster - Client */
            tsCLD_OccupancySensing sOccupancySensingClientCluster;
            #endif
} tsZLO_OnOffLightDevice;

Parent topic:On/Off light

Registration function

The following eZLO_RegisterOnOffLightEndPoint() function is the endpoint registration function for an On/Off Light device.

teZCL_Status eZLO_RegisterOnOffLightEndPoint(
     uint8 u8EndPointIdentifier,
     CL_ZCLCallBackFunction cbCallBack,
         tsZLO_OnOffLightDevice *psDeviceInfo);

Description

This function is used to register an endpoint that supports an On/Off Light device. The function must be called after eZCL_Initialise().

The specified identifier for the endpoint is a number in the range 1 to 240 (endpoint 0 is reserved for ZigBee use). Application endpoints are normally numbered consecutively starting at 1. The specified number must be less than or equal to the value of ZLO_NUMBER_OF_ENDPOINTS defined in the zcl_options.h file, which represents the highest endpoint number used for applications.

While invoking this function, specify a user-defined callback function, which is invoked when an event associated with the endpoint occurs. This callback function is defined according to the typedef:

typedef void(* tfpZCL_ZCLCallBackFunction)
(tsZCL_CallBackEvent *pCallBackEvent);

Also provide a pointer to a tsZLO_OnOffLightDevice structure, described in Section 3.1.2. This structure stores all variables relating to the colour Controller device associated with the endpoint. This function sets the sEndPoint and sClusterInstance fields of this structure and these fields must not be directly written to by the application.

The function is called multiple times if more than one endpoint is used - for example, if more than one On/Off Light device is housed in the same hardware, sharing the same module.

Parameters

  • u8EndPointIdentifier: Endpoint that is to be associated with the registered structure and callback function.

  • cbCallBack: Pointer to the callback function that is used to indicate events to the application for this endpoint.

  • psDeviceInfo: Pointer to the structure that acts as storage for all variables related to the device being registered. on this endpoint (see Section 3.1.2). The sEndPoint and sClusterInstance fields are set by this register function for internal use and must not be written to by the application.

Returns

  1. E_ZCL_SUCCESS

  2. E_ZCL_FAIL

  3. E_ZCL_ERR_PARAMETER_NULL

  4. E_ZCL_ERR_PARAMETER_RANGE

  5. E_ZCL_ERR_EP_RANGE

  6. E_ZCL_ERR_CLUSTER_0

  7. E_ZCL_ERR_CALLBACK_NULL

  8. E_ZCL_ERR_CLUSTER_NULL

  9. E_ZCL_ERR_SECURITY_RANGE

  10. E_ZCL_ERR_CLUSTER_ID_RANGE

  11. E_ZCL_ERR_MANUFACTURER_SPECIFIC

  12. E_ZCL_ERR_ATTRIBUTE_TYPE_UNSUPPORTED

  13. E_ZCL_ERR_ATTRIBUTE_ID_ORDER

  14. E_ZCL_ERR_ATTRIBUTES_ACCESS

The above codes are described in the ZCL User Guide (JNUG3132).

Parent topic:On/Off light

Parent topic:Lighting and Occupancy Device Types

Dimmable Light

The Dimmable Light device is a light that can have its luminance varied, and can be switched on and off. The permitted range of light levels is 0x01 to 0xFE.

  • The Device ID is 0x0101.

  • The header file for the device is dimmable_light.h.

  • The clusters supported by the device are listed in Section 3.2.1.

  • The device structure, tsZLO_DimmableLightDevice, is listed in Section 3.2.2.

  • The endpoint registration function for the device, eZLO_RegisterDimmableLightEndPoint(), is detailed in Section 3.2.3.

Supported clusters

The clusters used by the Dimmable Light device are listed in the table below.

Table 15. Clusters for Dimmable Light

Server (Input) side

Client (Output) side

Mandatory

Basic

Identify

On/Off

Level control

Scenes

Groups

Optional

Touchlink commissioning

OTA upgrade

Occupancy sensing

The mandatory attributes within each cluster for this device type are indicated in the ZigBee Lighting and Occupancy Device Specification (15-0014-01).

Parent topic:Dimmable Light

Device Structure

The following tsZLO_DimmableLightDevice structure is the shared structure for a Dimmable Light device:

typedefstruct
{
tsZCL_EndPointDefinitionsEndPoint;
/*Clusterinstances*/
tsZLO_DimmableLightDeviceClusterInstancessClusterInstance;
#if(definedCLD_BASIC)&&(definedBASIC_SERVER)
/*BasicCluster-Server*/
tsCLD_BasicsBasicServerCluster;
#endif
#if(definedCLD_IDENTIFY)&&(definedIDENTIFY_SERVER)
/*IdentifyCluster-Server*/
tsCLD_IdentifysIdentifyServerCluster;
tsCLD_IdentifyCustomDataStructure
sIdentifyServerCustomDataStructure;
#endif
#if(definedCLD_ONOFF)&&(definedONOFF_SERVER)
/*On/OffCluster-Server*/
tsCLD_OnOffsOnOffServerCluster;
tsCLD_OnOffCustomDataStructuresOnOffServerCustomDataStructure;
#endif
#if(definedCLD_GROUPS)&&(definedGROUPS_SERVER)
/*GroupsCluster-Server*/
tsCLD_GroupssGroupsServerCluster;
tsCLD_GroupsCustomDataStructuresGroupsServerCustomDataStructure;
#endif
#if(definedCLD_SCENES)&&(definedSCENES_SERVER)
/*ScenesCluster-Server*/
tsCLD_ScenessScenesServerCluster;
tsCLD_ScenesCustomDataStructuresScenesServerCustomDataStructure;
#endif
#if(definedCLD_LEVEL_CONTROL)&&(definedLEVEL_CONTROL_SERVER)
/*LevelControlCluster-Server*/
tsCLD_LevelControlsLevelControlServerCluster;
tsCLD_LevelControlCustomDataStructure
sLevelControlServerCustomDataStructure;
#endif
#if(definedCLD_ZLL_COMMISSION)&&(definedZLL_COMMISSION_SERVER)
tsCLD_ZllCommissionsZllCommissionServerCluster;
tsCLD_ZllCommissionCustomDataStructure
sZllCommissionServerCustomDataStructure;
#endif
#if(definedCLD_OTA)&&(definedOTA_CLIENT)
/*OTAcluster-Client*/
tsCLD_AS_OtasCLD_OTA;
tsOTA_CommonsCLD_OTA_CustomDataStruct;
#endif
#if(definedCLD_OCCUPANCY_SENSING)&&(definedOCCUPANCY_SENSING_CLIENT)
/*OccupancySensingCluster-Client*/
tsCLD_OccupancySensingsOccupancySensingClientCluster;
#endif
}tsZLO_DimmableLightDevice;

Parent topic:Dimmable Light

Registration Function

The following eZLO_RegisterDimmableLightEndPoint() function is the endpoint registration function for a Dimmable Light device.

teZCL_Status eZLO_RegisterDimmableLightEndPoint(
              uint8 u8EndPointIdentifier,
    tfpZCL_ZCLCallBackFunction cbCallBack,
        tsZLO_DimmableLightDevice *psDeviceInfo);

Description

This function is used to register an endpoint which supports a Dimmable Light device. The function must be called after eZCL_Initialise().

The specified identifier for the endpoint is a number in the range 1 to 240 (endpoint 0 is reserved for ZigBee use). Application endpoints are normally numbered consecutively starting at 1. The specified number must be less than or equal to the value of ZLO_NUMBER_OF_ENDPOINTS defined in the zcl_options.h file, which represents the highest endpoint number used for applications.

While invoking this function, specify a user-defined callback function, which is invoked when an event associated with the endpoint occurs. This callback function is defined according to the typedef:

typedef void(* tfpZCL_ZCLCallBackFunction)
(tsZCL_CallBackEvent *pCallBackEvent);

Also provide a pointer to a tsZLO_DimmableLightDevice structure, described in Section 3.2.2. This structure stores all variables relating to the color Controller device associated with the endpoint. The sEndPoint and sClusterInstance fields of this structure are set by this function and must not be directly written to by the application.

The function may be called multiple times if more than one endpoint is used - for example, if more than one Dimmable Light device is housed in the same hardware, sharing the same module.

Parameters

  • u8EndPointIdentifier: Endpoint that is to be associated with the registered structure and callback function.

  • cbCallBack: Pointer to the function that is used to indicate events to the application for this endpoint.

  • psDeviceInfo: Pointer to the structure that acts as storage for all variables related to the device being registered on this endpoint (see Section 3.2.2). The sEndPoint and sClusterInstance fields are set by this register function for internal use and must not be written to by the application.

Returns

  1. E_ZCL_SUCCESS

  2. E_ZCL_FAIL

  3. E_ZCL_ERR_PARAMETER_NULL

  4. E_ZCL_ERR_PARAMETER_RANGE

  5. E_ZCL_ERR_EP_RANGE

  6. E_ZCL_ERR_CLUSTER_0

  7. E_ZCL_ERR_CALLBACK_NULL

  8. E_ZCL_ERR_CLUSTER_NULL

  9. E_ZCL_ERR_SECURITY_RANGE

  10. E_ZCL_ERR_CLUSTER_ID_RANGE

  11. E_ZCL_ERR_MANUFACTURER_SPECIFIC

  12. E_ZCL_ERR_ATTRIBUTE_TYPE_UNSUPPORTED

  13. E_ZCL_ERR_ATTRIBUTE_ID_ORDER

  14. E_ZCL_ERR_ATTRIBUTES_ACCESS

The above codes are described in the ZCL User Guide (JNUG3132).

Parent topic:Dimmable Light

Parent topic:Lighting and Occupancy Device Types

Colour Dimmable Light

The Colour Dimmable Light device is a multi-colour light that can have its hue, saturation and luminance varied, and can be switched on and off.

  • The Device ID is 0x0102.

  • The header file for the device is colour_dimmable_light.h.

  • The clusters supported by the device are listed in Section 3.3.1.

  • The device structure, tsZLO_ColourDimmableLightDevice, is listed in Section 3.3.2.

  • The endpoint registration function for the device, eZLO_RegisterColourDimmableLightEndPoint(), is detailed in Section 3.3.3.

Supported clusters

The clusters used by the Colour Dimmable Light device are listed in the table below.

Table 19. Clusters for Colour Dimmer Switch

Server (input) side

Client (output) side

Mandatory

Basic

On/Off

Identify

Level control

Colour control

Identify

Optional

On/Off switch configuration

OTA upgrade

Scenes

Groups

The mandatory attributes within each cluster for this device type are indicated in the ZigBee Lighting and Occupancy Device Specification (15-0014-01).

Parent topic:Colour Dimmable Light

Device Structure

The following tsZLO_ColourDimmableLightDevice structure is the shared structure for a Colour Dimmable Light device:

typedef struct
{
    tsZCL_EndPointDefinition sEndPoint;
/* Cluster instances */
    tsZLO_DimmableLightDeviceClusterInstances sClusterInstance;
    #if (defined CLD_BASIC) && (defined BASIC_SERVER)
/* Basic Cluster - Server */
    tsCLD_Basic sBasicServerCluster;
    #endif
    #if (defined CLD_IDENTIFY) && (defined IDENTIFY_SERVER)
/* Identify Cluster - Server */
    tsCLD_Identify sIdentifyServerCluster;
    tsCLD_IdentifyCustomDataStructure
    sIdentifyServerCustomDataStructure;
    #endif
    #if (defined CLD_ONOFF) && (defined ONOFF_SERVER)
/* On/Off Cluster - Server */
    tsCLD_OnOff sOnOffServerCluster;
    tsCLD_OnOffCustomDataStructure sOnOffServerCustomDataStructure;
    #endif
    #if (defined CLD_GROUPS) && (defined GROUPS_SERVER)
/* Groups Cluster - Server */
    tsCLD_Groups sGroupsServerCluster;
    tsCLD_GroupsCustomDataStructure sGroupsServerCustomDataStructure;
    #endif
    #if (defined CLD_SCENES) && (defined SCENES_SERVER)
/* Scenes Cluster - Server */
    tsCLD_Scenes sScenesServerCluster;
    tsCLD_ScenesCustomDataStructure sScenesServerCustomDataStructure;
    #endif
    #if (defined CLD_LEVEL_CONTROL) && (defined LEVEL_CONTROL_SERVER)
/* LevelControl Cluster - Server */
    tsCLD_LevelControl sLevelControlServerCluster;
    tsCLD_LevelControlCustomDataStructure
    sLevelControlServerCustomDataStructure;
    #endif
    #if (defined CLD_ZLL_COMMISSION) && (defined ZLL_COMMISSION_SERVER)
    tsCLD_ZllCommission sZllCommissionServerCluster;
    tsCLD_ZllCommissionCustomDataStructure
    sZllCommissionServerCustomDataStructure;
    #endif
    #if (defined CLD_OTA) && (defined OTA_CLIENT)
/* OTA cluster - Client */
    tsCLD_AS_Ota sCLD_OTA;
    tsOTA_Common sCLD_OTA_CustomDataStruct;
    #endif
    #if (defined CLD_OCCUPANCY_SENSING) && (defined
OCCUPANCY_SENSING_CLIENT)
/* Occupancy Sensing Cluster - Client */
    tsCLD_OccupancySensing sOccupancySensingClientCluster;
    #endif
} tsZLO_DimmableLightDevice;

Parent topic:Colour Dimmable Light

Registration Function

The following eZLO_RegisterColourDimmableLightEndPoint() function is the endpoint registration function for a color Dimmable Light device.

teZCL_Status eZLO_RegisterColourDimmableLightEndPoint(
                      uint8 u8EndPointIdentifier,
            tfpZCL_ZCLCallBackFunction cbCallBack,
        tsZLO_ColourDimmableLightDevice *psDeviceInfo);

Description

This function is used to register an endpoint that supports a color Dimmable Light device. The function must be called after eZCL_Initialise().

The specified identifier for the endpoint is a number in the range 1 to 240 (endpoint 0 is reserved for ZigBee use). Application endpoints are normally numbered consecutively starting at 1. The specified number must be less than or equal to the value of ZLO_NUMBER_OF_ENDPOINTS defined in the zcl_options.h file, which represents the highest endpoint number used for applications.

While invoking this function, specify a user-defined callback function, which is invoked when an event associated with the endpoint occurs. This callback function is defined according to the typedef:

typedef void(* tfpZCL_ZCLCallBackFunction)
(tsZCL_CallBackEvent *pCallBackEvent);

Also provide a pointer to a tsZLO_ColourDimmableLightDevice structure, described in Section 3.3.2. This structure stores all variables relating to the color Controller device associated with the endpoint. This function sets the sEndPoint and sClusterInstance fields of this structure and these fields must not be directly written to by the application.

The function is called multiple times if more than one endpoint is being used - for example, if more than one color Dimmable Light device is housed in the same hardware, sharing the same module.

Parameters

  • u8EndPointIdentifier: function that is used to indicate events to the application for this endpoint.

  • psDeviceInfo: Pointer to the structure that acts as storage for all variables related to the device being registered on this endpoint (see Section 3.3.2). The sEndPoint and sClusterInstance fields are set by this register function for internal use and must not be written to by the application.

Returns

  1. E_ZCL_SUCCESS

  2. E_ZCL_FAIL

  3. E_ZCL_ERR_PARAMETER_NULL

  4. E_ZCL_ERR_PARAMETER_RANGE

  5. E_ZCL_ERR_EP_RANGE

  6. E_ZCL_ERR_CLUSTER_0

  7. E_ZCL_ERR_CALLBACK_NULL

  8. E_ZCL_ERR_CLUSTER_NULL

  9. E_ZCL_ERR_SECURITY_RANGE

  10. E_ZCL_ERR_CLUSTER_ID_RANGE

  11. E_ZCL_ERR_MANUFACTURER_SPECIFIC

  12. E_ZCL_ERR_ATTRIBUTE_TYPE_UNSUPPORTED

  13. E_ZCL_ERR_ATTRIBUTE_ID_ORDER

  14. E_ZCL_ERR_ATTRIBUTES_ACCESS

The above codes are described in the ZCL User Guide (JNUG3132).

Parent topic:Colour Dimmable Light

Parent topic:Lighting and Occupancy Device Types

On/Off Light Switch

The On/Off Light Switch device is used to switch a light device on and off by sending on, off and toggle commands to the target device.

  • The Device ID is 0x0103.

  • The header file for the device is on_off_light_switch.h.

  • The clusters supported by the device are listed in Section 3.4.1.

  • The device structure, tsZLO_OnOffLightSwitchDevice, is listed in Section 3.4.2.

  • The endpoint registration function for the device, eZLO_RegisterOnOffLightSwitchEndPoint(), is detailed in Section 3.4.3.

Supported clusters

The clusters used by the On/Off Light Switch device are listed in in the table below.

Table 17.  Clusters for On/Off Light Switch

Server (Input) side

Client (Output) side

Mandatory

Basic

On/Off

Identify

Identify

Optional

On/Off switch configuration

OTA upgrade

Scenes

Groups

The mandatory attributes within each cluster for this device type are indicated in the ZigBee Lighting and Occupancy Device Specification (15-0014-01).

Parent topic:On/Off Light Switch

Device Structure

The following tsZLO_OnOffLightSwitchDevice structure is the shared structure for an On/Off Light Switch device:

typedef struct
{
    tsZCL_EndPointDefinition sEndPoint;
    /* Cluster instances */
    tsZLO_OnOffLightSwitchDeviceClusterInstances sClusterInstance;
    /* Mandatory server clusters */
    #if (defined CLD_BASIC) && (defined BASIC_SERVER)
    /* Basic Cluster - Server */
    tsCLD_Basic sBasicServerCluster;
    #endif
    #if (defined CLD_IDENTIFY) && (defined IDENTIFY_SERVER)
    /* Identify Cluster - Server */
    tsCLD_Identify sIdentifyServerCluster;
    tsCLD_IdentifyCustomDataStructure
    sIdentifyServerCustomDataStructure;
    #endif
    /* Recommended Optional server */
    #if (defined CLD_OOSC) && (defined OOSC_SERVER)
        /* On/Off Switch Configuration Cluster - Server */
    tsCLD_OOSC sOOSCServerCluster;
    #endif
/* Mandatory client clusters */
    #if (defined CLD_ONOFF) && (defined ONOFF_CLIENT)
        tsCLD_OnOff sOnOffClientCluster;
    #endif
    #if (defined CLD_IDENTIFY) && (defined IDENTIFY_CLIENT)
    /* Identify Cluster - Client */
    tsCLD_Identify sIdentifyClientCluster;
    tsCLD_IdentifyCustomDataStructure
        sIdentifyClientCustomDataStructure;
    #endif
    #if (defined CLD_BASIC) && (defined BASIC_CLIENT)
    /* Basic Cluster - Client */
        tsCLD_Basic sBasicClientCluster;
    #endif
    /* Recommended Optional client clusters */
    #if (defined CLD_SCENES) && (defined SCENES_CLIENT)
        /* Scenes Cluster - Client */
        tsCLD_Scenes sScenesClientCluster;
        tsCLD_ScenesCustomDataStructure sScenesClientCustomDataStructure;
    #endif
    #if (defined CLD_GROUPS) && (defined GROUPS_CLIENT)
    /* Groups Cluster - Client */
        tsCLD_Groups sGroupsClientCluster;
        tsCLD_GroupsCustomDataStructure sGroupsClientCustomDataStructure;
    #endif
    #if (defined CLD_OTA) && (defined OTA_CLIENT)
        tsCLD_AS_Ota sCLD_OTA;
        tsOTA_Common sCLD_OTA_CustomDataStruct;
    #endif
} tsZLO_OnOffLightSwitchDevice;

Parent topic:On/Off Light Switch

Registration Function

The following eZLO_RegisterOnOffLightSwitchEndPoint() function is the endpoint registration function for an On/Off Light Switch device.

teZCL_Status eZLO_RegisterOnOffLightSwitchEndPoint(
         uint8 u8EndPointIdentifier,
         tfpZCL_ZCLCallBackFunction cbCallBack,
      tsZLO_OnOffLightSwitchDevice *psDeviceInfo);

Description

This function is used to register an endpoint which supports an On/Off Light Switch device. The function must be called after eZCL_Initialise().

The specified identifier for the endpoint is a number in the range 1 to 240 (endpoint 0 is reserved for ZigBee use). Application endpoints are normally numbered consecutively starting at 1. The specified number must be less than or equal to the value of ZLO_NUMBER_OF_ENDPOINTS defined in the zcl_options.h file, which represents the highest endpoint number used for applications.

While invoking this function, specify a user-defined callback function, which is invoked when an event associated with the endpoint occurs. This callback function is defined according to the typedef:

typedef void(* tfpZCL_ZCLCallBackFunction)
(tsZCL_CallBackEvent *pCallBackEvent);

Also provide a pointer to a tsZLO_OnOffLightSwitchDevice structure, described in Device Structure. This structure stores all variables relating to the color Controller device associated with the endpoint. This function sets the sEndPoint and sClusterInstance fields of this structure and these fields must not be directly written to by the application.

The function is called multiple times if more than one endpoint is being used - for example, if more than one On/Off Light Switch device is housed in the same hardware, sharing the same module.

Parameters

  • u8EndPointIdentifier: Endpoint that is to be associated with the registered structure and callback function.

  • *cbCallBack:*Pointer to the function that is used to indicate events to the application for this endpoint.

  • psDeviceInfo: Pointer to the structure that acts as storage for all variables related to the device being registered on this endpoint (see Device Structure). The sEndPoint and sClusterInstance fields are set by this register function for internal use and must not be written to by the application.

Returns

  1. E_ZCL_SUCCESS

  2. E_ZCL_FAIL

  3. E_ZCL_ERR_PARAMETER_NULL

  4. E_ZCL_ERR_PARAMETER_RANGE

  5. E_ZCL_ERR_EP_RANGE

  6. E_ZCL_ERR_CLUSTER_0

  7. E_ZCL_ERR_CALLBACK_NULL

  8. E_ZCL_ERR_CLUSTER_NULL

  9. E_ZCL_ERR_SECURITY_RANGE

  10. E_ZCL_ERR_CLUSTER_ID_RANGE

  11. E_ZCL_ERR_MANUFACTURER_SPECIFIC

  12. E_ZCL_ERR_ATTRIBUTE_TYPE_UNSUPPORTED

  13. E_ZCL_ERR_ATTRIBUTE_ID_ORDER

  14. E_ZCL_ERR_ATTRIBUTES_ACCESS

The above codes are described in the ZCL User Guide (JNUG3132).

Parent topic:On/Off Light Switch

Parent topic:Lighting and Occupancy Device Types

Dimmer Switch

The Dimmer Switch device is used to control a characteristic of a light (for example, luminance) and to switch the light device on and off.

  • The Device ID is 0x0104.

  • The header file for the device is dimmer_switch.h.

  • The clusters supported by the device are listed in Section 3.5.1.

  • The device structure, tsZLO_DimmerSwitchDevice, is listed in Section 3.5.2.

  • The endpoint registration function for the device, eZLO_RegisterDimmerSwitchEndPoint(), is detailed in Section 3.5.3.

Supported clusters

The clusters used by the Dimmer Switch device are listed in the table below.

Table: Clusters for Dimmer Switch

Server (input) side

Client (output) side

Mandatory

Basic

On/Off

Identify

Identify

Level control

Optional

On/Off switch configuration

OTA upgrade

Scenes

Groups

The mandatory attributes within each cluster for this device type are indicated in the ZigBee Lighting and Occupancy Device Specification (15-0014-01).

Parent topic:Dimmer Switch

Device Structure

The following tsZLO_DimmerSwitchDevice structure is the shared structure for a Dimmer Switch device:

typedef struct
{
  tsZCL_EndPointDefinition sEndPoint;
/* Cluster instances */
    tsZLO_DimmerSwitchDeviceClusterInstances sClusterInstance;
/* Mandatory server clusters */
#if (defined CLD_BASIC) && (defined BASIC_SERVER)
  /* Basic Cluster - Server */
  tsCLD_Basic sBasicServerCluster;
#endif
#if (defined CLD_IDENTIFY) && (defined IDENTIFY_SERVER)
/* Identify Cluster - Server */
  tsCLD_Identify sIdentifyServerCluster;
  tsCLD_IdentifyCustomDataStructure
  sIdentifyServerCustomDataStructure;
#endif
/* Optional server clusters */
#if (defined CLD_OOSC) && (defined OOSC_SERVER)
  /* On/Off Switch Configuration Cluster - Server */
  tsCLD_OOSC sOOSCServerCluster;
#endif
/* Mandatory client clusters */
#if (defined CLD_IDENTIFY) && (defined IDENTIFY_CLIENT)
  /* Identify Cluster - Client */
  tsCLD_Identify sIdentifyClientCluster;
  tsCLD_IdentifyCustomDataStructure
  sIdentifyClientCustomDataStructure;
#endif
#if (defined CLD_BASIC) && (defined BASIC_CLIENT)
  /* Basic Cluster - Client */
  tsCLD_Basic sBasicClientCluster;
  #endif
#if (defined CLD_ONOFF) && (defined ONOFF_CLIENT)
  tsCLD_OnOff sOnOffClientCluster;
#endif
#if (defined CLD_LEVEL_CONTROL) && (defined LEVEL_CONTROL_CLIENT)
  /* Level Control Cluster - Client */
  tsCLD_LevelControl sLevelControlClientCluster;
  tsCLD_LevelControlCustomDataStructure
        sLevelControlClientCustomDataStructure;
#endif
/* Recommended Optional client clusters */
#if (defined CLD_SCENES) && (defined SCENES_CLIENT)
    /* Scenes Cluster - Client */
    tsCLD_Scenes sScenesClientCluster;
    tsCLD_ScenesCustomDataStructure sScenesClientCustomDataStructure;
#endif
#if (defined CLD_GROUPS) && (defined GROUPS_CLIENT)
  /* Groups Cluster - Client */
  tsCLD_Groups sGroupsClientCluster;
  tsCLD_GroupsCustomDataStructure sGroupsClientCustomDataStructure;
#endif
#if (defined CLD_OTA) && (defined OTA_CLIENT)
  tsCLD_AS_Ota sCLD_OTA;
  tsOTA_Common sCLD_OTA_CustomDataStruct;
#endif
} tsZLO_DimmerSwitchDevice;

Parent topic:Dimmer Switch

Registration Function

The following eZLO_RegisterDimmerSwitchEndPoint() function is the endpoint registration function for a Dimmer Switch device.

teZCL_Status eZLO_RegisterDimmerSwitchEndPoint(
        uint8 u8EndPointIdentifier,
        tfpZCL_ZCLCallBackFunction cbCallBack,
        tsZLO_DimmerSwitchDevice *psDeviceInfo);

Description

This function is used to register an endpoint that supports a Dimmer Switch device. The function must be called after eZCL_Initialise().

The specified identifier for the endpoint is a number in the range 1 to 240 (endpoint 0 is reserved for ZigBee use). Application endpoints are normally numbered consecutively starting at 1. The specified number must be less than or equal to the value of ZLO_NUMBER_OF_ENDPOINTS defined in the zcl_options.h file, which represents the highest endpoint number used for application.

While invoking this function, specify a user-defined callback function, which is invoked when an event associated with the endpoint occurs. This callback function is defined according to the typedef:

typedef void(* tfpZCL_ZCLCallBackFunction)
(tsZCL_CallBackEvent *pCallBackEvent);

Also provide a pointer to a tsZLO_DimmerSwitchDevice structure, described in Section 3.5.2. This structure stores all variables relating to the color Controller device associated with the endpoint. The sEndPoint and sClusterInstance fields of this structure are set by this function and must not be directly written to by the application.

The function is called multiple times if more than one endpoint is being used - for example, if more than one Dimmer Switch device is housed in the same hardware, sharing the same module.

Parameters

  • u8EndPointIdentifier: Endpoint that is to be associated with the registered structure and callback function.

  • cbCallBack: Pointer to the function that is used to indicate events to the application for this endpoint.

  • psDeviceInfo: Pointer to the structure that acts as storage for all variables related to the device being registered on this endpoint (see Section 3.5.2). The sEndPoint and sClusterInstance fields are set by this register function for internal use and must not be written to by the application.

Returns

  1. E_ZCL_SUCCESS

  2. E_ZCL_FAIL

  3. E_ZCL_ERR_PARAMETER_NULL

  4. E_ZCL_ERR_PARAMETER_RANGE

  5. E_ZCL_ERR_EP_RANGE

  6. E_ZCL_ERR_CLUSTER_0

  7. E_ZCL_ERR_CALLBACK_NULL

  8. E_ZCL_ERR_CLUSTER_NULL

  9. E_ZCL_ERR_SECURITY_RANGE

  10. E_ZCL_ERR_CLUSTER_ID_RANGE

  11. E_ZCL_ERR_MANUFACTURER_SPECIFIC

  12. E_ZCL_ERR_ATTRIBUTE_TYPE_UNSUPPORTED

  13. E_ZCL_ERR_ATTRIBUTE_ID_ORDER

  14. E_ZCL_ERR_ATTRIBUTES_ACCESS

The above codes are described in the ZCL User Guide (JNUG3132).

Parent topic:Dimmer Switch

Parent topic:Lighting and Occupancy Device Types

Colour Dimmer Switch

The Colour Dimmer Switch device controls the hue, saturation and luminance of a multi-colour light, and to switch the light device on and off.

  • The Device ID is 0x0105.

  • The header file for the device is colour_dimmer_switch.h.

  • The clusters supported by the device are listed in Section 3.6.1.

  • The device structure, tsZLO_ColourDimmerSwitchDevice, is listed in Section 3.6.2.

  • The endpoint registration function for the device, eZLO_RegisterColourDimmerSwitchEndPoint(), is detailed in Section 3.6.3.

Supported clusters

The clusters used by the Colour Dimmer Switch device are listed in the table below.

Table 19.  Clusters for Colour Dimmer Switch

Server (input) side

Client (output) side

Mandatory

Basic

On/Off

Identify

Level control

Colour control

Identify

Optional

On/Off switch configuration

OTA upgrade

Scenes

Groups

The mandatory attributes within each cluster for this device type are indicated in the ZigBee Lighting and Occupancy Device Specification (15-0014-01).

Parent topic:Colour Dimmer Switch

Device Structure

The following tsZLO_ColourDimmerSwitchDevice structure is the shared structure for a Colour Dimmer Switch device:

typedef struct
{
    tsZCL_EndPointDefinition sEndPoint;
    /* Cluster instances */
    tsZLO_ColourDimmerSwitchDeviceClusterInstances sClusterInstance;
    /* Mandatory server clusters */
    #if (defined CLD_BASIC) && (defined BASIC_SERVER)
    /* Basic Cluster - Server */
    tsCLD_Basic sBasicServerCluster;
    #endif
    #if (defined CLD_IDENTIFY) && (defined IDENTIFY_SERVER)
    /* Identify Cluster - Server */
    tsCLD_Identify sIdentifyServerCluster;
    tsCLD_IdentifyCustomDataStructure
    sIdentifyServerCustomDataStructure;
    #endif
    /* Optional server clusters */
    #if (defined CLD_OOSC) && (defined OOSC_SERVER)
        /* On/Off Switch Configuration Cluster - Server */
        tsCLD_OOSC sOOSCServerCluster;
    #endif
    /* Mandatory client clusters */
    #if (defined CLD_IDENTIFY) && (defined IDENTIFY_CLIENT)
        /* Identify Cluster - Client */
        tsCLD_Identify sIdentifyClientCluster;
        tsCLD_IdentifyCustomDataStructure
        sIdentifyClientCustomDataStructure;
    #endif
    #if (defined CLD_BASIC) && (defined BASIC_CLIENT)
    /* Basic Cluster - Server */
        tsCLD_Basic sBasicClientCluster;
        #endif
    #if (defined CLD_ONOFF) && (defined ONOFF_CLIENT)
    tsCLD_OnOff sOnOffClientCluster;
    #endif
    #if (defined CLD_LEVEL_CONTROL) && (defined LEVEL_CONTROL_CLIENT)
    /* Level Control Cluster - Client */
        tsCLD_LevelControl sLevelControlClientCluster;
        tsCLD_LevelControlCustomDataStructure
        sLevelControlClientCustomDataStructure;
     #endif
    #if (defined CLD_COLOUR_CONTROL) && (defined COLOUR_CONTROL_CLIENT)
        /* Colour Control Cluster - Client */
        tsCLD_ColourControl sColourControlClientCluster;
        tsCLD_ColourControlCustomDataStructure
        sColourControlClientCustomDataStructure;
    #endif
    /*Recommended Optional client clusters */
    #if (defined CLD_SCENES) && (defined SCENES_CLIENT)
    /* Scenes Cluster - Client */
    tsCLD_Scenes sScenesClientCluster;
    tsCLD_ScenesCustomDataStructure sScenesClientCustomDataStructure;
    #endif
    #if (defined CLD_GROUPS) && (defined GROUPS_CLIENT)
    /* Groups Cluster - Client */
    tsCLD_Groups sGroupsClientCluster;
    tsCLD_GroupsCustomDataStructure sGroupsClientCustomDataStructure;
    #endif
    #if (defined CLD_OTA) && (defined OTA_CLIENT)
    tsCLD_AS_Ota sCLD_OTA;
    tsOTA_Common sCLD_OTA_CustomDataStruct;
    #endif
} tsZLO_ColourDimmerSwitchDevice;

Parent topic:Colour Dimmer Switch

Registration Function

The following eZLO_RegisterColourDimmerSwitchEndPoint() function is the endpoint registration function for a color Dimmer Switch device.

teZCL_Status eZLO_RegisterColourDimmerSwitchEndPoint(
                   uint8 u8EndPointIdentifier,
        tfpZCL_ZCLCallBackFunction cbCallBack,
             tsZLO_DimmerSwitchDevice *psDeviceInfo);

Description

This function is used to register an endpoint which supports a color Dimmer Switch device. The function must be called after eZCL_Initialise().

The specified identifier for the endpoint is a number in the range 1 to 240 (endpoint 0 is reserved for ZigBee use). Application endpoints are normally numbered consecutively starting at 1. The specified number must be less than or equal to the value of ZLO_NUMBER_OF_ENDPOINTS defined in the zcl_options.h file. This parameter represents the highest endpoint number used for applications.

While invoking this function, specify a user-defined callback function, which is invoked when an event associated with the endpoint occurs. This callback function is defined according to the typedef:

typedef void(* tfpZCL_ZCLCallBackFunction)
(tsZCL_CallBackEvent *pCallBackEvent);

You must also provide a pointer to a tsZLO_ColourDimmerSwitchDevice structure, described in Device Structure. This structure stores all variables relating to the color Controller device associated with the endpoint. This function sets the sEndPoint and sClusterInstance fields of this structure and these fields must not be directly written to by the application.

The function is called multiple times if more than one endpoint is being used - for example, if more than one color Dimmer Switch device is housed in the same hardware, sharing the same module.

Parameters

  • u8EndPointIdentifier: Endpoint that is to be associated with the registered structure and callback function.

  • cbCallBack: Pointer to the function that is used to indicate events to the application for this endpoint.

  • psDeviceInfo: Pointer to the structure that acts as storage for all variables related to the device being registered on this endpoint (see Device Structure). The sEndPoint and sClusterInstance fields are set by this register function for internal use and must not be written to by the application.

Returns

  1. E_ZCL_SUCCESS

  2. E_ZCL_FAIL

  3. E_ZCL_ERR_PARAMETER_NULL

  4. E_ZCL_ERR_PARAMETER_RANGE

  5. E_ZCL_ERR_EP_RANGE

  6. E_ZCL_ERR_CLUSTER_0

  7. E_ZCL_ERR_CALLBACK_NULL

  8. E_ZCL_ERR_CLUSTER_NULL

  9. E_ZCL_ERR_SECURITY_RANGE

  10. E_ZCL_ERR_CLUSTER_ID_RANGE

  11. E_ZCL_ERR_MANUFACTURER_SPECIFIC

  12. E_ZCL_ERR_ATTRIBUTE_TYPE_UNSUPPORTED

  13. E_ZCL_ERR_ATTRIBUTE_ID_ORDER

  14. E_ZCL_ERR_ATTRIBUTES_ACCESS

The above codes are described in the ZCL User Guide (JNUG3132).

Parent topic:Colour Dimmer Switch

Parent topic:Lighting and Occupancy Device Types

Light Sensor

The Light Sensor device reports the illumination level in an area.

  • The Device ID is 0x0106.

  • The header file for the device is light_sensor.h.

  • The clusters supported by the device are listed in Section 3.7.1.

  • The device structure, tsZLO_LightSensorDevice, is listed in Section 3.7.2.

  • The endpoint registration function for the device, eZLO_RegisterLightSensorEndPoint(), is detailed in Section 3.7.3.

Supported clusters

The clusters used by the Light Sensor device are listed in the table below.

Table 20.  Clusters for Light Sensor

Server (input) side

Client (output) side

Mandatory

Basic

Identify

Identify

Illuminance measurement

Optional

OTA upgrade

Groups

The mandatory attributes within each cluster for this device type are indicated in the ZigBee Lighting and Occupancy Device Specification (15-0014-01).

Parent topic:Light Sensor

Device Structure

The following tsZLO_LightSensorDevice structure is the shared structure for a Light Sensor device:

typedef struct
{
    tsZCL_EndPointDefinition sEndPoint;
    /* Cluster instances */
    tsZLO_LightSensorDeviceClusterInstances sClusterInstance;
    /* Mandatory server clusters */
    #if (defined CLD_BASIC) && (defined BASIC_SERVER)
        /* Basic Cluster - Server */
        tsCLD_Basic sBasicServerCluster;
    #endif
    #if (defined CLD_IDENTIFY) && (defined IDENTIFY_SERVER)
    /* Identify Cluster - Server */
        tsCLD_Identify sIdentifyServerCluster;
        tsCLD_IdentifyCustomDataStructure
            sIdentifyServerCustomDataStructure;
    #endif
    #if (defined CLD_ILLUMINANCE_MEASUREMENT) && (defined
            ILLUMINANCE_MEASUREMENT_SERVER)
        /* Illuminance Measurement Cluster - Server */
        tsCLD_IlluminanceMeasurement sIlluminanceMeasurementServerCluster;
    #endif
    /* Optional server clusters */
    #if (defined CLD_POLL_CONTROL) && (defined POLL_CONTROL_SERVER)
        tsCLD_PollControl sPollControlServerCluster;
        tsCLD_PollControlCustomDataStructure
        sPollControlServerCustomDataStructure;
    #endif
    /* Mandatory server clusters */
    #if (defined CLD_IDENTIFY) && (defined IDENTIFY_CLIENT)
        /* Identify Cluster - Client */
        tsCLD_Identify sIdentifyClientCluster;
        tsCLD_IdentifyCustomDataStructure
            sIdentifyClientCustomDataStructure;
    #endif
    /* Recommended Optional client clusters */
    #if (defined CLD_GROUPS) && (defined GROUPS_CLIENT)
        /* Groups Cluster - Client */
        tsCLD_Groups sGroupsClientCluster;
        tsCLD_GroupsCustomDataStructure sGroupsClientCustomDataStructure;
    #endif
    #if (defined CLD_OTA) && (defined OTA_CLIENT)
    tsCLD_AS_Ota sCLD_OTA;
    tsOTA_Common sCLD_OTA_CustomDataStruct;
    #endif
} tsZLO_LightSensorDevice;

Parent topic:Light Sensor

Registration Function

The following eZLO_RegisterLightSensorEndPoint() function is the endpoint registration function for a Light Sensor device.

teZCL_Status eZLO_RegisterLightSensorEndPoint(
                uint8 u8EndPointIdentifier,
     tfpZCL_ZCLCallBackFunction cbCallBack,
         tsZLO_LightSensorDevice *psDeviceInfo);

Description

This function is used to register an endpoint which supports a Light Sensor device. The function must be called after eZCL_Initialise().

The specified identifier for the endpoint is a number in the range 1 to 240 (endpoint 0 is reserved for ZigBee use). Application endpoints are normally numbered consecutively starting at 1. The specified number must be less than or equal to the value of ZLO_NUMBER_OF_ENDPOINTS defined in the zcl_options.h file, which represents the highest endpoint number used for applications.

While invoking this function, specify a user-defined callback function, which is invoked when an event associated with the endpoint occurs. This callback function is defined according to the typedef:

typedef void(* tfpZCL_ZCLCallBackFunction)
        (tsZCL_CallBackEvent *pCallBackEvent);

Also provide a pointer to a tsZLO_LightSensorDevice structure, described in Section 3.7.2. This structure stores all variables relating to the color Controller device associated with the endpoint. This function sets the sEndPoint and sClusterInstance fields of this structure and these fields must not be directly written to by the application.

The function is called multiple times if more than one endpoint is used - for example, if more than one Light Sensor device is housed in the same hardware, sharing the same module.

Parameters

  • u8EndPointIdentifier: Endpoint that is to be associated with the registered structure and callback function.

  • cbCallBack: Pointer to the function that is used to indicate events to the application for this endpoint.

  • psDeviceInfo: Pointer to the structure that acts as storage for all variables related to the device being registered on this endpoint (see Section 3.7.2). The sEndPoint and sClusterInstance fields are set by this register function for internal use and must not be written to by the application.

Returns

  1. E_ZCL_SUCCESS

  2. E_ZCL_FAIL

  3. E_ZCL_ERR_PARAMETER_NULL

  4. E_ZCL_ERR_PARAMETER_RANGE

  5. E_ZCL_ERR_EP_RANGE

  6. E_ZCL_ERR_CLUSTER_0

  7. E_ZCL_ERR_CALLBACK_NULL

  8. E_ZCL_ERR_CLUSTER_NULL

  9. E_ZCL_ERR_SECURITY_RANGE

  10. E_ZCL_ERR_CLUSTER_ID_RANGE

  11. E_ZCL_ERR_MANUFACTURER_SPECIFIC

  12. E_ZCL_ERR_ATTRIBUTE_TYPE_UNSUPPORTED

  13. E_ZCL_ERR_ATTRIBUTE_ID_ORDER

  14. E_ZCL_ERR_ATTRIBUTES_ACCESS

The above codes are described in the ZCL User Guide (JNUG3132).

Parent topic:Light Sensor

Parent topic:Lighting and Occupancy Device Types

Occupancy Sensor

The Occupancy Sensor device reports the presence (or not) of occupants in an area.

  • The Device ID is 0x0107.

  • The header file for the device is occupancy_sensor.h.

  • The clusters supported by the device are listed in Section 3.8.1.

  • The device structure, tsZLO_OccupancySensorDevice, is listed in Section 3.7.2.

  • The endpoint registration function for the device, eZLO_RegisterOccupancySensorEndPoint(), is detailed in Section 3.7.3.

Supported clusters

The clusters used by the Occupancy Sensor device are listed in the table below.

Clusters for Occupancy Sensor device

Server (input) side

Client (output) side

Mandatory

Basic

Identify

Identify

Occupancy sensing

Optional

OTA upgrade

Groups

The mandatory attributes within each cluster for this device type are indicated in the ZigBee Lighting and Occupancy Device Specification (15-0014-01).

Parent topic:Occupancy Sensor

Device Structure

The following tsZLO_OccupancySensorDevice structure is the shared structure for an Occupancy Sensor device:

typedef struct
{
    tsZCL_EndPointDefinition sEndPoint;
    /* Cluster instances */
    tsZLO_OccupancySensorDeviceClusterInstances sClusterInstance;
    /* Mandatory server clusters */
  #if (defined CLD_BASIC) && (defined BASIC_SERVER)
    /* Basic Cluster - Server */
    tsCLD_Basic sBasicServerCluster;
  #endif
    #if (defined CLD_IDENTIFY) && (defined IDENTIFY_SERVER)
    /* Identify Cluster - Server */
    tsCLD_Identify sIdentifyServerCluster;
    tsCLD_IdentifyCustomDataStructure sIdentifyServerCustomDataStructure;
    #endif
    #if (defined CLD_OCCUPANCY_SENSING) && (defined OCCUPANCY_SENSING_SERVER)
        /* Occupancy Sensing Cluster - Server */
        tsCLD_OccupancySensing sOccupancySensingServerCluster;
    #endif
        /* Optional server clusters */
    #if (defined CLD_POLL_CONTROL) && (defined POLL_CONTROL_SERVER)
        tsCLD_PollControl sPollControlServerCluster;
        tsCLD_PollControlCustomDataStructure
            sPollControlServerCustomDataStructure;
    #endif
        /* Mandatory client clusters */
    #if (defined CLD_IDENTIFY) && (defined IDENTIFY_CLIENT)
            /* Identify Cluster - Client */
            tsCLD_Identify sIdentifyClientCluster;
            tsCLD_IdentifyCustomDataStructure sIdentifyClientCustomDataStructure;
    #endif
        /* Recommended Optional client clusters */
    #if (defined CLD_POLL_CONTROL) && (defined POLL_CONTROL_CLIENT)
        tsCLD_PollControl sPollControlClientCluster;
        tsCLD_PollControlCustomDataStructure
        sPollControlClientCustomDataStructure;
    #endif
    #if (defined CLD_GROUPS) && (defined GROUPS_CLIENT)
        /* Groups Cluster - Client */
        tsCLD_Groups sGroupsClientCluster;
        tsCLD_GroupsCustomDataStructure sGroupsClientCustomDataStructure;
    #endif
    #if (defined CLD_OTA) && (defined OTA_CLIENT)
        tsCLD_AS_Ota sCLD_OTA;
        tsOTA_Common sCLD_OTA_CustomDataStruct;
    #endif
} tsZLO_OccupancySensorDevice;;

Parent topic:Occupancy Sensor

Registration Function

The following eZLO_RegisterOccupancySensorEndPoint() function is the endpoint registration function for an Occupancy Sensor device.

teZCL_Status eZLO_RegisterOccupancySensorEndPoint(
    uint8 u8EndPointIdentifier,
    tfpZCL_ZCLCallBackFunction cbCallBack,
        tsZLO_OccupancySensorDevice *psDeviceInfo);

Description

This function is used to register an endpoint which supports an Occupancy Sensor device. The function must be called after eZCL_Initialise().

The specified identifier for the endpoint is a number in the range 1 to 240 (endpoint 0 is reserved for ZigBee use). Application endpoints are normally numbered consecutively starting at 1. The specified number must be less than or equal to the value of ZLO_NUMBER_OF_ENDPOINTS defined in the zcl_options.h file, which represents the highest endpoint number used for applications.

While invoking this function, specify a user-defined callback function, which is invoked when an event associated with the endpoint occurs. This callback function is defined according to the typedef:

typedef void(* tfpZCL_ZCLCallBackFunction)
    (tsZCL_CallBackEvent *pCallBackEvent);

Also provide a pointer to a tsZLO_OccupancySensorDevice structure, described in Section 3.8.2. This structure stores all variables relating to the color Controller device associated with the endpoint. The sEndPoint and sClusterInstance fields of this structure are set by this function and must not be directly written to by the application.

The function is called multiple times if more than one endpoint is being used - for example, if more than one Occupancy Sensor device is housed in the same hardware, sharing the same module.

Parameters

  • u8EndPointIdentifier: Endpoint that is to be associated with the registered structure and callback function.

  • cbCallBack: Pointer to the function that is used to indicate events to the application for this endpoint.

  • psDeviceInfo: Pointer to the structure that acts as storage for all variables related to the device being registered on this endpoint (see Section 3.8.2). This function sets the sEndPoint and sClusterInstance fields of this structure and these fields must not be directly written to by the application.

Returns

  1. E_ZCL_SUCCESS

  2. E_ZCL_FAIL

  3. E_ZCL_ERR_PARAMETER_NULL

  4. E_ZCL_ERR_PARAMETER_RANGE

  5. E_ZCL_ERR_EP_RANGE

  6. E_ZCL_ERR_CLUSTER_0

  7. E_ZCL_ERR_CALLBACK_NULL

  8. E_ZCL_ERR_CLUSTER_NULL

  9. E_ZCL_ERR_SECURITY_RANGE

  10. E_ZCL_ERR_CLUSTER_ID_RANGE

  11. E_ZCL_ERR_MANUFACTURER_SPECIFIC

  12. E_ZCL_ERR_ATTRIBUTE_TYPE_UNSUPPORTED

  13. E_ZCL_ERR_ATTRIBUTE_ID_ORDER

  14. E_ZCL_ERR_ATTRIBUTES_ACCESS

The above codes are described in the ZCL User Guide (JNUG3132).

Parent topic:Occupancy Sensor

Parent topic:Lighting and Occupancy Device Types

On/Off Ballast

The On/Off Ballast is a lighting device that can be switched on/off from a controller device, such as an On/Off Light Switch or an Occupancy Sensor.

  • The Device ID is 0x0108.

  • The header file for the device is on_off_ballast.h.

  • The clusters supported by the device are listed in Section 3.9.1.

  • The device structure, tsZLO_OnOffBallastDevice, is listed in Section 3.9.2.

  • The endpoint registration function for the device, eZLO_RegisterOnOffBallastEndPoint(), is detailed in Section 3.9.3.

Supported clusters

The clusters used by the On/Off Ballast device are listed in the table below.

Table 22. Clusters for On/Off Ballast

Server (Input) side

Client (Output) side

Mandatory

Basic

Power configuration

Device temperature configuration

Identify

Groups

Scenes

On/Off

Ballast configuration

Optional

Level control

OTA upgrade

Illuminance level sensing

Illuminance measurement

Touchlink commissioning

Illuminance level sensing

Occupancy sensing

The mandatory attributes within each cluster for this device type are indicated in the ZigBee Lighting and Occupancy Device Specification (15-0014-01).

Parent topic:On/Off Ballast

Device Structure

The following tsZLO_OnOffBallastDevice structure is the shared structure for an On/Off Ballast device:

typedef struct
{
    tsZCL_EndPointDefinition sEndPoint;
    /* Cluster instances */
    tsZLO_OnOffBallastDeviceClusterInstances sClusterInstance;
    /* Mandatory server clusters */
    #if (defined CLD_BASIC) && (defined BASIC_SERVER)
        /* Basic Cluster - Server */
        tsCLD_Basic sBasicServerCluster;
    #endif
    #if (defined CLD_IDENTIFY) && (defined IDENTIFY_SERVER)
        /* Identify Cluster - Server */
        tsCLD_Identify sIdentifyServerCluster;
        tsCLD_IdentifyCustomDataStructure
            sIdentifyServerCustomDataStructure;
    #endif
    #if (defined CLD_ONOFF) && (defined ONOFF_SERVER)
    /* On/Off Cluster - Server */
      tsCLD_OnOff sOnOffServerCluster;
      tsCLD_OnOffCustomDataStructure sOnOffServerCustomDataStructure;
    #endif
    #if (defined CLD_SCENES) && (defined SCENES_SERVER)
    /* Scenes Cluster - Server */
      tsCLD_Scenes sScenesServerCluster;
      tsCLD_ScenesCustomDataStructure sScenesServerCustomDataStructure;
    #endif
    #if (defined CLD_GROUPS) && (defined GROUPS_SERVER)
    /* Groups Cluster - Server */
      tsCLD_Groups sGroupsServerCluster;
      tsCLD_GroupsCustomDataStructure sGroupsServerCustomDataStructure;
    #endif
    /* Optional server clusters */
    #if (defined CLD_POWER_CONFIGURATION) && (defined
  POWER_CONFIGURATION_SERVER)
    /* Power Configuration Cluster - Server */
      tsCLD_PowerConfiguration sPowerConfigServerCluster;
    #endif
    #if (defined CLD_DEVICE_TEMPERATURE_CONFIGURATION) && (defined
        DEVICE_TEMPERATURE_CONFIGURATION_SERVER)
        /* Device Temperature Configuration Cluster - Server */
        tsCLD_DeviceTemperatureConfiguration
            sDeviceTemperatureConfigurationServerCluster;
    #endif
    #if (defined CLD_BALLAST_CONFIGURATION) && (defined
      BALLAST_CONFIGURATION_SERVER)
      tsCLD_BallastConfiguration sBallastConfigurationServerCluster;
    #endif
   /* Recommended Optional server clusters */
    #if (defined CLD_LEVEL_CONTROL) && (defined LEVEL_CONTROL_SERVER)
    /* LevelControl Cluster - Server */
        tsCLD_LevelControl sLevelControlServerCluster;
        tsCLD_LevelControlCustomDataStructure
        sLevelControlServerCustomDataStructure;
    #endif
    #if (defined CLD_ILLUMINANCE_LEVEL_SENSING) && (defined
        ILLUMINANCE_LEVEL_SENSING_SERVER)
      tsCLD_IlluminanceLevelSensing
      sIlluminanceLevelSensingServerCluster;
    #endif
    #if (defined CLD_ZLL_COMMISSION) && (defined ZLL_COMMISSION_SERVER)
      tsCLD_ZllCommission sZllCommissionServerCluster;
      tsCLD_ZllCommissionCustomDataStructure
            sZllCommissionServerCustomDataStructure;
    #endif
    /*Recommended Optional client clusters */
    #if (defined CLD_OTA) && (defined OTA_CLIENT)
        /* OTA cluster - Client */
        tsCLD_AS_Ota sCLD_OTA;
        tsOTA_Common sCLD_OTA_CustomDataStruct;
    #endif
    #if (defined CLD_ILLUMINANCE_MEASUREMENT) && (defined
 ILLUMINANCE_MEASUREMENT_CLIENT)
        /* Illuminance Measurement Cluster - Client */
         tsCLD_IlluminanceMeasurement sIlluminanceMeasurementClientCluster;
    #endif
    #if (defined CLD_ILLUMINANCE_LEVEL_SENSING) && (defined
  ILLUMINANCE_LEVEL_SENSING_CLIENT)
      tsCLD_IlluminanceLevelSensing
        sIlluminanceLevelSensingClientCluster;
    #endif
    #if (defined CLD_OCCUPANCY_SENSING) && (defined
  OCCUPANCY_SENSING_CLIENT)
    /* Occupancy Sensing Cluster - Client */
       tsCLD_OccupancySensing sOccupancySensingClientCluster;
    #endif
} tsZLO_OnOffBallastDevice;

Parent topic:On/Off Ballast

Registration Function

The following eZLO_RegisterOnOffBallastEndPoint() function is the endpoint registration function for an On/Off Ballast device.

teZCL_Status eZLO_RegisterOnOffBallastEndPoint(
uint8 u8EndPointIdentifier,
tfpZCL_ZCLCallBackFunction cbCallBack,
tsZLO_OnOffBallastDevice *psDeviceInfo);

Description

This function is used to register an endpoint which supports an On/Off Ballast device. The function must be called after eZCL_Initialise().

The specified identifier for the endpoint is a number in the range 1 to 240 (endpoint 0 is reserved for ZigBee use). Application endpoints are normally numbered consecutively starting at 1. The specified number must be less than or equal to the value of ZLO_NUMBER_OF_ENDPOINTS defined in the zcl_options.h file, which represents the highest endpoint number used for applications.

While invoking this function, specify a user-defined callback function, which is invoked when an event associated with the endpoint occurs. This callback function is defined according to the typedef:

typedef void(* tfpZCL_ZCLCallBackFunction)
(tsZCL_CallBackEvent *pCallBackEvent);

Also provide a pointer to a tsZLO_OnOffBallastDevice structure, described in Section 3.9.2. This structure stores all variables relating to the color Controller device associated with the endpoint. This function sets the sEndPoint and sClusterInstance fields of this structure and these fields must not be directly written to by the application.

The function may be called multiple times if more than one endpoint is being used - for example, if more than one On/Off Ballast device is housed in the same hardware, sharing the same module.

Parameters

  • u8EndPointIdentifier: Endpoint that is to be associated with the registered structure and callback function.

  • cbCallBack: Pointer to the function that is used to indicate events to the application for this endpoint.

  • psDeviceInfo: Pointer to the structure that acts as storage for all variables related to the device being registered on this endpoint (see Section 3.9.2). The sEndPoint and sClusterInstance fields are set by this register function for internal use and must not be written to by the application.

Returns

  1. E_ZCL_SUCCESS

  2. E_ZCL_FAIL

  3. E_ZCL_ERR_PARAMETER_NULL

  4. E_ZCL_ERR_PARAMETER_RANGE

  5. E_ZCL_ERR_EP_RANGE

  6. E_ZCL_ERR_CLUSTER_0

  7. E_ZCL_ERR_CALLBACK_NULL

  8. E_ZCL_ERR_CLUSTER_NULL

  9. E_ZCL_ERR_SECURITY_RANGE

  10. E_ZCL_ERR_CLUSTER_ID_RANGE

  11. E_ZCL_ERR_MANUFACTURER_SPECIFIC

  12. E_ZCL_ERR_ATTRIBUTE_TYPE_UNSUPPORTED

  13. E_ZCL_ERR_ATTRIBUTE_ID_ORDER

  14. E_ZCL_ERR_ATTRIBUTES_ACCESS

The above codes are described in the ZCL User Guide (JNUG3132).

Parent topic:On/Off Ballast

Parent topic:Lighting and Occupancy Device Types

Dimmable Ballast

The Dimmable Ballast is a lighting device that switches on/off or have its level adjusted from a controller device, such as a Dimmer Switch, or simply be switched on/off from an Occupancy Sensor.

  • The Device ID is 0x0109.

  • The header file for the device is dimmable_ballast.h.

  • The clusters supported by the device are listed in Section 3.10.1.

  • The device structure, tsZLO_DimmableBallastDevice, is listed in Section 3.10.2.

  • The endpoint registration function for the device, eZLO_RegisterDimmableBallastEndPoint, is detailed in Section 3.10.3.

Supported clusters

The clusters used by the Dimmable Ballast device are listed in the table below.

Table 23.  Clusters for Dimmable Ballast

Server (Input) side

Client (Output) side

Mandatory

Basic

Power configuration

Device temperature configuration

Identify

Groups

Scenes

On/Off

Level control

Ballast configuration

Optional

Illuminance level sensing

OTA upgrade

Touchlink commissioning

Illuminance measurement

Illuminance level sensing

Occupancy sensing

The mandatory attributes within each cluster for this device type are indicated in the ZigBee Lighting and Occupancy Device Specification (15-0014-01).

Parent topic:Dimmable Ballast

Device Structure

The following tsZLO_DimmableBallastDevice structure is the shared structure for a Dimmable Ballast device:

typedef struct
{
    tsZCL_EndPointDefinition sEndPoint;
   /* Cluster instances */
   tsZLO_DimmableBallastDeviceClusterInstances sClusterInstance;
  /* Mandatory server clusters */
  #if (defined CLD_BASIC) && (defined BASIC_SERVER)
    /* Basic Cluster - Server */
    tsCLD_Basic sBasicServerCluster;
  #endif
  #if (defined CLD_IDENTIFY) && (defined IDENTIFY_SERVER)
    /* Identify Cluster - Server */
    tsCLD_Identify sIdentifyServerCluster;
    tsCLD_IdentifyCustomDataStructure
          sIdentifyServerCustomDataStructure;
  #endif
  #if (defined CLD_ONOFF) && (defined ONOFF_SERVER)
    /* On/Off Cluster - Server */
    tsCLD_OnOff sOnOffServerCluster;
    tsCLD_OnOffCustomDataStructure sOnOffServerCustomDataStructure;
  #endif
  #if (defined CLD_LEVEL_CONTROL) && (defined LEVEL_CONTROL_SERVER)
    /* LevelControl Cluster - Server */
    tsCLD_LevelControl sLevelControlServerCluster;
    tsCLD_LevelControlCustomDataStructure
    sLevelControlServerCustomDataStructure;
  #endif
#if (defined CLD_SCENES) && (defined SCENES_SERVER)
  /* Scenes Cluster - Server */
    tsCLD_Scenes sScenesServerCluster;
    tsCLD_ScenesCustomDataStructure sScenesServerCustomDataStructure;
  #endif
  #if (defined CLD_GROUPS) && (defined GROUPS_SERVER)
  /* Groups Cluster - Server */
    tsCLD_Groups sGroupsServerCluster;
    tsCLD_GroupsCustomDataStructure sGroupsServerCustomDataStructure;
  #endif
  #if (defined CLD_POWER_CONFIGURATION) && (defined
 POWER_CONFIGURATION_SERVER)
    /* Power Configuration Cluster - Server */
    tsCLD_PowerConfiguration sPowerConfigServerCluster;
  #endif
    #if (defined CLD_DEVICE_TEMPERATURE_CONFIGURATION) && (defined
  DEVICE_TEMPERATURE_CONFIGURATION_SERVER)
    /* Device Temperature Configuration Cluster - Server */
    tsCLD_DeviceTemperatureConfiguration
          sDeviceTemperatureConfigurationServerCluster;
    #endif
    #if (defined CLD_BALLAST_CONFIGURATION) && (defined
  BALLAST_CONFIGURATION_SERVER)
    tsCLD_BallastConfiguration sBallastConfigurationServerCluster;
    #endif
  /* Recommended Optional server clusters */
  #if (defined CLD_ILLUMINANCE_LEVEL_SENSING) && (defined
  ILLUMINANCE_LEVEL_SENSING_SERVER)
    tsCLD_IlluminanceLevelSensing
        sIlluminanceLevelSensingServerCluster;
  #endif
  #if (defined CLD_ZLL_COMMISSION) && (defined ZLL_COMMISSION_SERVER)
    tsCLD_ZllCommission sZllCommissionServerCluster;
    tsCLD_ZllCommissionCustomDataStructure
        sZllCommissionServerCustomDataStructure;
  #endif
/*Recommended Optional client clusters */
  #if (defined CLD_OTA) && (defined OTA_CLIENT)
    /* OTA cluster - Client */
    tsCLD_AS_Ota sCLD_OTA;
    tsOTA_Common sCLD_OTA_CustomDataStruct;
  #endif
  #if (defined CLD_ILLUMINANCE_MEASUREMENT) && (defined
  ILLUMINANCE_MEASUREMENT_CLIENT)
    /* Illuminance Measurement Cluster - Client */
    tsCLD_IlluminanceMeasurement sIlluminanceMeasurementClientCluster;
  #endif
    #if (defined CLD_ILLUMINANCE_LEVEL_SENSING) && (defined
  ILLUMINANCE_LEVEL_SENSING_CLIENT)
    tsCLD_IlluminanceLevelSensing
      sIlluminanceLevelSensingClientCluster;
  #endif
  #if (defined CLD_OCCUPANCY_SENSING) && (defined
  OCCUPANCY_SENSING_CLIENT)
      /* Occupancy Sensing Cluster - Client */
    tsCLD_OccupancySensing sOccupancySensingClientCluster;
  #endif
} tsZLO_DimmableBallastDevice;

Parent topic:Dimmable Ballast

Registration Function

The following eZLO_RegisterDimmableBallastEndPoint() function is the endpoint registration function for a Dimmable Ballast device.

teZCL_Status eZLO_RegisterDimmableBallastEndPoint(
uint8 u8EndPointIdentifier,
tfpZCL_ZCLCallBackFunction cbCallBack,
tsZLO_DimmableBallastDevice *psDeviceInfo);

Description

This function is used to register an endpoint that supports a Dimmable Ballast device. The function must be called after eZCL_Initialise().

The specified identifier for the endpoint is a number in the range 1 to 240 (endpoint 0 is reserved for ZigBee use). Application endpoints are normally numbered consecutively starting at 1. The specified number must be less than or equal to the value of ZLO_NUMBER_OF_ENDPOINTS defined in the zcl_options.h file, which represents the highest endpoint number used for applications.

While invoking this function, specify a user-defined callback function, which is invoked when an event associated with the endpoint occurs. This callback function is defined according to the typedef:

typedef void(* tfpZCL_ZCLCallBackFunction)
(tsZCL_CallBackEvent *pCallBackEvent);

Also provide a pointer to a tsZLO_DimmableBallastDevice structure, described in Section 3.10.2. This structure stores all variables relating to the color Controller device associated with the endpoint. The sEndPoint and sClusterInstance fields of this structure are set by this function and must not be directly written to by the application. The function is called multiple times if more than one endpoint is being used - for example, if more than one Dimmable Ballast device is housed in the same hardware, sharing the same module.

Parameters

  • u8EndPointIdentifier: Endpoint that is to be associated with the registered structure and callback function.

  • cbCallBack: Pointer to the function that is used to indicate events to the application for this endpoint.

  • psDeviceInfo: Pointer to the structure that acts as storage for all variables related to the device being registered on this endpoint (see Section 3.10.2). The sEndPoint and sClusterInstance fields are set by this register function for internal use and must not be written to by the application.

Returns

  1. E_ZCL_SUCCESS

  2. E_ZCL_FAIL

  3. E_ZCL_ERR_PARAMETER_NULL

  4. E_ZCL_ERR_PARAMETER_RANGE

  5. E_ZCL_ERR_EP_RANGE

  6. E_ZCL_ERR_CLUSTER_0

  7. E_ZCL_ERR_CALLBACK_NULL

  8. E_ZCL_ERR_CLUSTER_NULL

  9. E_ZCL_ERR_SECURITY_RANGE

  10. E_ZCL_ERR_CLUSTER_ID_RANGE

  11. E_ZCL_ERR_MANUFACTURER_SPECIFIC

  12. E_ZCL_ERR_ATTRIBUTE_TYPE_UNSUPPORTED

  13. E_ZCL_ERR_ATTRIBUTE_ID_ORDER

  14. E_ZCL_ERR_ATTRIBUTES_ACCESS

The above codes are described in the ZCL User Guide (JNUG3132).

Parent topic:Dimmable Ballast

Parent topic:Lighting and Occupancy Device Types

On/Off Plug-in Unit

The On/Off Plug-in Unit device is typically used in nodes that contain a controllable mains plug or adaptor which includes an on/off switch. It may be controlled from a controller device such as an On/Off Light Switch.

  • The Device ID is 0x010A.

  • The header file for the device is on_off_plug.h.

  • The clusters supported by the device are listed in Section 3.11.1.

  • The device structure, tsZLO_OnOffPlugDevice, is listed in Section 3.11.2.

  • The endpoint registration function for the device, eZLO_RegisterOnOffPlugEndPoint(), is detailed in Section 3.11.3.

Supported clusters

The clusters supported by the On/Off Plug-in Unit device are listed in the table below. |

Table 24.  Clusters for On/Off Plug-in Unit

Server (Input) side

Client (Output) side

Mandatory

Basic

Identify

Groups

Scenes

On/Off

Optional

Level control

OTA upgrade

The mandatory attributes within each cluster for this device type are indicated in the ZigBee Lighting and Occupancy Device Specification (15-0014-01).

Parent topic:On/Off Plug-in Unit

Device Structure

The following tsZLO_OnOffPlugDevice structure is the shared structure for an On/Off Plug-in Unit device:

typedef struct
{
    tsZCL_EndPointDefinition sEndPoint;
  /* Cluster instances */
    tsZLO_OnOffPlugDeviceClusterInstances sClusterInstance;
  #if (defined CLD_BASIC) && (defined BASIC_SERVER)
    /* Basic Cluster - Server */
    tsCLD_Basic sBasicServerCluster;
  #endif
  #if (defined CLD_IDENTIFY) && (defined IDENTIFY_SERVER)
    /* Identify Cluster - Server */
    tsCLD_Identify sIdentifyServerCluster;
    tsCLD_IdentifyCustomDataStructure
        sIdentifyServerCustomDataStructure;
  #endif
  #if (defined CLD_ONOFF) && (defined ONOFF_SERVER)
    /* On/Off Cluster - Server */
    tsCLD_OnOff sOnOffServerCluster;
    tsCLD_OnOffCustomDataStructure
        sOnOffServerCustomDataStructure;
  #endif
  #if (defined CLD_GROUPS) && (defined GROUPS_SERVER)
  /* Groups Cluster - Server */
    tsCLD_Groups sGroupsServerCluster;
    tsCLD_GroupsCustomDataStructure
        sGroupsServerCustomDataStructure;
  #endif
  #if (defined CLD_SCENES) && (defined SCENES_SERVER)
    /* Scenes Cluster - Server */
    tsCLD_Scenes sScenesServerCluster;
    tsCLD_ScenesCustomDataStructure
        sScenesServerCustomDataStructure;
  #endif
  #if (defined CLD_LEVEL_CONTROL) && (defined LEVEL_CONTROL_SERVER)
    /* LevelControl Cluster - Server */
    tsCLD_LevelControl sLevelControlServerCluster;
    tsCLD_LevelControlCustomDataStructure
        sLevelControlServerCustomDataStructure;
  #endif
  #if (defined CLD_OTA) && (defined OTA_CLIENT)
    /* OTA cluster - Client */
    tsCLD_AS_Ota sCLD_OTA;
    tsOTA_Common sCLD_OTA_CustomDataStruct;
  #endif
} tsZLO_OnOffPlugDevice;

Parent topic:On/Off Plug-in Unit

Registration Function

The following eZLO_RegisterOnOffPlugEndPoint() function is the endpoint registration function for an On/Off Plug-in Unit device.

teZCL_Status eZLO_RegisterOnOffPlugEndPoint(
uint8 u8EndPointIdentifier,
tfpZCL_ZCLCallBackFunction cbCallBack,
tsZLO_OnOffPlugDevice *psDeviceInfo);

Description

This function is used to register an endpoint which supports an On/Off Plug-in Unit device. The function must be called after eZCL_Initialise().

The specified identifier for the endpoint is a number in the range 1 to 240 (endpoint 0 is reserved for ZigBee use). Application endpoints are normally numbered consecutively starting at 1. The specified number must be less than or equal to the value of ZLO_NUMBER_OF_ENDPOINTS defined in the zcl_options.h file, which represents the highest endpoint number used for applications.

While invoking this function, specify a user-defined callback function, which is invoked when an event associated with the endpoint occurs. This callback function is defined according to the typedef:

typedef void(* tfpZCL_ZCLCallBackFunction)
(tsZCL_CallBackEvent *pCallBackEvent);

Also provide a pointer to a tsZLO_OnOffPlugDevice structure, described in Section 3.11.2. This structure stores all variables relating to the color Controller device associated with the endpoint. The sEndPoint and sClusterInstance fields of this structure are set by this function and must not be directly written to by the application. The function is called multiple times if more than one endpoint is being used - for example, if more than one On/Off Plug-in Unit device is housed in the same hardware, sharing the same module.

Parameters

  • u8EndPointIdentifier: Endpoint that is to be associated with the registered structure and callback function.

  • cbCallBack: Pointer to the function that is used to indicate events to the application for this endpoint.

  • psDeviceInfo: Pointer to the structure that acts as storage for all variables related to the device being registered on this endpoint (see Section 3.11.2). The sEndPoint and sClusterInstance fields are set by this register function for internal use and must not be written to by the application.

Returns

  1. E_ZCL_SUCCESS

  2. E_ZCL_FAIL

  3. E_ZCL_ERR_PARAMETER_NULL

  4. E_ZCL_ERR_PARAMETER_RANGE

  5. E_ZCL_ERR_EP_RANGE

  6. E_ZCL_ERR_CLUSTER_0

  7. E_ZCL_ERR_CALLBACK_NULL

  8. E_ZCL_ERR_CLUSTER_NULL

  9. E_ZCL_ERR_SECURITY_RANGE

  10. E_ZCL_ERR_CLUSTER_ID_RANGE

  11. E_ZCL_ERR_MANUFACTURER_SPECIFIC

  12. E_ZCL_ERR_ATTRIBUTE_TYPE_UNSUPPORTED

  13. E_ZCL_ERR_ATTRIBUTE_ID_ORDER

  14. E_ZCL_ERR_ATTRIBUTES_ACCESS

The above codes are described in the ZCL User Guide (JNUG3132).

Parent topic:On/Off Plug-in Unit

Parent topic:Lighting and Occupancy Device Types

Dimmable Plug-in Unit

The Dimmable Plug-in Unit device is typically used in nodes that contain a controllable mains plug or adaptor which includes an adjustable output (to a lamp). It may be controlled from a controller device such as a Dimmer Switch or a Non-colour Controller.

  • The Device ID is 0x010B.

  • The header file for the device is dimmable_plug.h.

  • The clusters supported by the device are listed in Section 3.12.1.

  • The device structure, tsZLO_DimmablePlugDevice, is listed in Section 3.12.2.

  • The endpoint registration function for the device, eZLO_RegisterDimmablePlugEndPoint(), is detailed in Section 3.12.3.

Supported clusters

The clusters supported by the Dimmable Plug-in Unit device are listed in the table below.

Table 25.  Clusters for Dimmable Plug-in Unit

Server (Input) side

Client (Output) side

Mandatory

Basic

Identify

Groups

Scenes

On/Off

Level control

Optional

OTA upgrade

The mandatory attributes within each cluster for this device type are indicated in the ZigBee Lighting and Occupancy Device Specification (15-0014-01).

Parent topic:Dimmable Plug-in Unit

Device Structure

The following tsZLO_DimmablePlugDevice structure is the shared structure for a Dimmable Plug-in Unit device:

typedefstruct
{
   tsZCL_EndPointDefinitionsEndPoint;
    /* Cluster instances */
    tsZLO_DimmablePlugDeviceClusterInstances sClusterInstance;
    #if (defined CLD_BASIC) && (defined BASIC_SERVER)
        /* Basic Cluster - Server */
        tsCLD_Basic sBasicServerCluster;
    #endif
    #if (defined CLD_IDENTIFY) && (defined IDENTIFY_SERVER)
    /* Identify Cluster - Server */
    tsCLD_Identify sIdentifyServerCluster;
    tsCLD_IdentifyCustomDataStructure
            sIdentifyServerCustomDataStructure;
    #endif
    #if (defined CLD_ONOFF) && (defined ONOFF_SERVER)
    /* On/Off Cluster - Server */
    tsCLD_OnOff sOnOffServerCluster;
    tsCLD_OnOffCustomDataStructure sOnOffServerCustomDataStructure;
    #endif
    #if (defined CLD_GROUPS) && (defined GROUPS_SERVER)
        /* Groups Cluster - Server */
        tsCLD_Groups sGroupsServerCluster;
        tsCLD_GroupsCustomDataStructure sGroupsServerCustomDataStructure;
    #endif
    #if (defined CLD_SCENES) && (defined SCENES_SERVER)
    /* Scenes Cluster - Server */
    tsCLD_Scenes sScenesServerCluster;
    tsCLD_ScenesCustomDataStructure sScenesServerCustomDataStructure;
    #endif
    #if (defined CLD_LEVEL_CONTROL) && (defined LEVEL_CONTROL_SERVER)
    /* LevelControl Cluster - Server */
    tsCLD_LevelControl sLevelControlServerCluster;
    tsCLD_LevelControlCustomDataStructure
                sLevelControlServerCustomDataStructure;
    #endif
    #if (defined CLD_OTA) && (defined OTA_CLIENT)
    /* OTA cluster - Client */
    tsCLD_AS_Ota sCLD_OTA;
    tsOTA_Common sCLD_OTA_CustomDataStruct;
    #endif
} tsZLO_DimmablePlugDevice;

Parent topic:Dimmable Plug-in Unit

Registration Function

The following eZLO_RegisterDimmablePlugEndPoint() function is the endpoint registration function for a Dimmable Plug-in Unit device.

teZCL_Status eZLO_RegisterDimmablePlugEndPoint(
        uint8 u8EndPointIdentifier,
        tfpZCL_ZCLCallBackFunction cbCallBack,
        tsZLO_DimmablePlugDevice *psDeviceInfo);

Description

This function is used to register an endpoint which supports a Dimmable Plug-in Unit device. The function must be called after eZCL_Initialise().

The specified identifier for the endpoint is a number in the range 1 to 240 (endpoint 0 is reserved for ZigBee use). Application endpoints are normally numbered consecutively starting at 1. The specified number must be less than or equal to the value of ZLO_NUMBER_OF_ENDPOINTS defined in the zcl_options.h file, which represents the highest endpoint number used for applications.

While invoking this function, specify a user-defined callback function, which is invoked when an event associated with the endpoint occurs. This callback function is defined according to the typedef:

typedef void(* tfpZCL_ZCLCallBackFunction)
(tsZCL_CallBackEvent *pCallBackEvent);

Also provide a pointer to a tsZLO_DimmablePlugDevice structure, described in Device Structure. This structure stores all variables relating to the color Controller device associated with the endpoint. The sEndPoint and sClusterInstance fields of this structure are set by this function and must not be directly written to by the application.

The function is called multiple times if more than one endpoint is being used - for example, if more than one Dimmable Plug-in Unit device is housed in the same hardware, sharing the same module.

Parameters

  • u8EndPointIdentifier: Endpoint that is to be associated with the registered structure and callback function.

  • cbCallBack: Pointer to the function that is used to indicate events to the application for this endpoint.

  • psDeviceInfo: Pointer to the structure that acts as storage for all variables related to the device being registered on this endpoint (see Device Structure). The sEndPoint and sClusterInstance fields are set by this register function for internal use and must not be written to by the application.

Returns

  1. E_ZCL_SUCCESS

  2. E_ZCL_FAIL

  3. E_ZCL_ERR_PARAMETER_NULL

  4. E_ZCL_ERR_PARAMETER_RANGE

  5. E_ZCL_ERR_EP_RANGE

  6. E_ZCL_ERR_CLUSTER_0

  7. E_ZCL_ERR_CALLBACK_NULL

  8. E_ZCL_ERR_CLUSTER_NULL

  9. E_ZCL_ERR_SECURITY_RANGE

  10. E_ZCL_ERR_CLUSTER_ID_RANGE

  11. E_ZCL_ERR_MANUFACTURER_SPECIFIC

  12. E_ZCL_ERR_ATTRIBUTE_TYPE_UNSUPPORTED

  13. E_ZCL_ERR_ATTRIBUTE_ID_ORDER

  14. E_ZCL_ERR_ATTRIBUTES_ACCESS

The above codes are described in the ZCL User Guide (JNUG3132).

Parent topic:Dimmable Plug-in Unit

Parent topic:Lighting and Occupancy Device Types

Colour Temperature Light

The Colour Temperature Light device is typically used in nodes that contain a colour lamp with adjustable colour (and brightness) which operates using colour temperature.

  • The Device ID is 0x010C.

  • The header file for the device is colour_temperature_light.h.

  • The clusters supported by the device are listed in Supported clusters.

  • The device structure, tsZLO_ColourTemperatureLightDevice, is listed in Device Structure.

  • The endpoint registration function for the device, eZLO_RegisterColourTemperatureLightEndPoint(), is detailed in Registration Function.

Supported clusters

The clusters supported by the Colour Temperature Light device are listed in the table below.

Table 26.  Clusters for Colour Temperature Light

Server (Input) side

Client (Output) side

Mandatory

Basic

Identify

Groups

Scenes

On/Off

Level control

Colour control

Optional

Touchlink commissioning

OTA upgrade

The mandatory attributes within each cluster for this device type are indicated in the ZigBee Lighting and Occupancy Device Specification (15-0014-01).

Parent topic:Colour Temperature Light

Device Structure

The following tsZLO_ColourTemperatureLightDevice structure is the shared structure for a Colour Temperature Light device:

typedef struct
{
  tsZCL_EndPointDefinition sEndPoint;
  /* Cluster instances */
    tsZLO_ColourTemperatureLightDeviceClusterInstances sClusterInstance;
  #if (defined CLD_BASIC) && (defined BASIC_SERVER)
    /* Basic Cluster - Server */
    tsCLD_Basic sBasicServerCluster;
  #endif
  #if (defined CLD_IDENTIFY) && (defined IDENTIFY_SERVER)
  /* Identify Cluster - Server */
    tsCLD_Identify sIdentifyServerCluster;
    tsCLD_IdentifyCustomDataStructure
          sIdentifyServerCustomDataStructure;
  #endif
  #if (defined CLD_ONOFF) && (defined ONOFF_SERVER)
    /* On/Off Cluster - Server */
    tsCLD_OnOff sOnOffServerCluster;
    tsCLD_OnOffCustomDataStructure sOnOffServerCustomDataStructure;
  #endif
  #if (defined CLD_GROUPS) && (defined GROUPS_SERVER)
    /* Groups Cluster - Server */
    tsCLD_Groups sGroupsServerCluster;
    tsCLD_GroupsCustomDataStructure sGroupsServerCustomDataStructure;
  #endif
  #if (defined CLD_SCENES) && (defined SCENES_SERVER)
    /* Scenes Cluster - Server */
    tsCLD_Scenes sScenesServerCluster;
    tsCLD_ScenesCustomDataStructure sScenesServerCustomDataStructure;
  #endif
  #if (defined CLD_LEVEL_CONTROL) && (defined LEVEL_CONTROL_SERVER)
    /* LevelControl Cluster - Server */
    tsCLD_LevelControl sLevelControlServerCluster;
    tsCLD_LevelControlCustomDataStructure
    sLevelControlServerCustomDataStructure;
    #endif
  #if (defined CLD_COLOUR_CONTROL) && (defined COLOUR_CONTROL_SERVER)
    /* Colour Control Cluster - Server */
    tsCLD_ColourControl sColourControlServerCluster;
    tsCLD_ColourControlCustomDataStructure
        sColourControlServerCustomDataStructure;
  #endif
  #if (defined CLD_ZLL_COMMISSION) && (defined ZLL_COMMISSION_SERVER)
    tsCLD_ZllCommission sZllCommissionServerCluster;
    tsCLD_ZllCommissionCustomDataStructure
    sZllCommissionServerCustomDataStructure;
  #endif
  #if (defined CLD_OTA) && (defined OTA_CLIENT)
    /* OTA cluster - Client */
    tsCLD_AS_Ota sCLD_OTA;
    tsOTA_Common sCLD_OTA_CustomDataStruct;
    #endif
} tsZLO_ColourTemperatureLightDevice;

Parent topic:Colour Temperature Light

Registration Function

The following eZLO_RegisterColourTemperatureLightEndPoint() function is the endpoint registration function for a color Temperature Light device.

teZCL_Status eZLO_RegisterColourTemperatureLightEndPoint(
                uint8 u8EndPointIdentifier,
     tfpZCL_ZCLCallBackFunction cbCallBack,
        tsZLO_ColourTemperatureLightDevice *psDeviceInfo);

Description

This function is used to register an endpoint which supports a color Temperature Light device. The function must be called after eZCL_Initialise().

The specified identifier for the endpoint is a number in the range 1 to 240 (endpoint 0 is reserved for ZigBee use). Application endpoints are normally numbered consecutively starting at 1. The specified number must be less than or equal to the value of ZLO_NUMBER_OF_ENDPOINTS defined in the zcl_options.h file, which represents the highest endpoint number used for applications.

While invoking this function, specify a user-defined callback function, which is invoked when an event associated with the endpoint occurs. This callback function is defined according to the typedef:

typedef void(* tfpZCL_ZCLCallBackFunction)
(tsZCL_CallBackEvent *pCallBackEvent);

Also provide a pointer to a tsZLO_ColourTemperatureLightDevice structure, described in Device Structure. This structure stores all variables relating to the color Controller device associated with the endpoint. The sEndPoint and sClusterInstance fields of this structure are set by this function and must not be directly written to by the application.

The function is called multiple times if more than one endpoint is being used - for example, if more than one color Temperature Light device is housed in the same hardware, sharing the same module.

Parameters

  • u8EndPointIdentifier: Endpoint that is to be associated with the registered structure and callback function.

  • cbCallBack: Pointer to the function that is used to indicate events to the application for this endpoint.

  • psDeviceInfo: Pointer to the structure that acts as storage for all variables related to the device being registered on this endpoint (see Device Structure). The sEndPoint and sClusterInstance fields are set by this register function for internal use and must not be written to by the application.

Returns

  1. E_ZCL_SUCCESS

  2. E_ZCL_FAIL

  3. E_ZCL_ERR_PARAMETER_NULL

  4. E_ZCL_ERR_PARAMETER_RANGE

  5. E_ZCL_ERR_EP_RANGE

  6. E_ZCL_ERR_CLUSTER_0

  7. E_ZCL_ERR_CALLBACK_NULL

  8. E_ZCL_ERR_CLUSTER_NULL

  9. E_ZCL_ERR_SECURITY_RANGE

  10. E_ZCL_ERR_CLUSTER_ID_RANGE

  11. E_ZCL_ERR_MANUFACTURER_SPECIFIC

  12. E_ZCL_ERR_ATTRIBUTE_TYPE_UNSUPPORTED

  13. E_ZCL_ERR_ATTRIBUTE_ID_ORDER

  14. E_ZCL_ERR_ATTRIBUTES_ACCESS

The above codes are described in the ZCL User Guide (JNUG3132).

Parent topic:Colour Temperature Light

Parent topic:Lighting and Occupancy Device Types

Extended Colour Light

The Extended Colour Light device is typically used in nodes that contain a colour lamp with adjustable colour and brightness. This device supports a range of colour parameters, including hue/saturation, enhanced hue, colour temperature, colour loop, and XY.

  • The Device ID is 0x010D.

  • The header file for the device is extended_colour_light.h.

  • The clusters supported by the device are listed in Section 3.14.1.

  • The device structure, tsZLO_ExtendedColourLightDevice, is listed in Section 3.14.2.

  • The endpoint registration function for the device, eZLO_RegisterExtendedColourLightEndPoint(), is detailed in Section 3.14.3.

Supported clusters

The clusters supported by the Extended Colour Light device are listed in the table below.

Table 27.  Clusters for Extended Colour Light

Server (Input) side

Client (Output) side

Mandatory

Basic

Identify

Groups

Scenes

On/Off

Level control

Colour control

Optional

Touchlink commissioning

OTA upgrade

The mandatory attributes within each cluster for this device type are indicated in the ZigBee Lighting and Occupancy Device Specification (15-0014-01).

Parent topic:Extended Colour Light

Device Structure

The following tsZLO_ExtendedColourLightDevice structure is the shared structure for an Extended color Light device:

typedef struct
{
  tsZCL_EndPointDefinition sEndPoint;
  /*Clusterinstances*/
    tsZLO_ExtendedColourLightDeviceClusterInstances
                                  sClusterInstance;
  #if (defined CLD_BASIC) && (defined BASIC_SERVER)
    /* Basic Cluster - Server */
    tsCLD_Basic sBasicServerCluster;
  #endif
  #if (defined CLD_IDENTIFY) && (defined IDENTIFY_SERVER)
    /* Identify Cluster - Server */
    tsCLD_Identify sIdentifyServerCluster;
    tsCLD_IdentifyCustomDataStructure
            sIdentifyServerCustomDataStructure;
  #endif
  #if (defined CLD_ONOFF) && (defined ONOFF_SERVER)
    /* On/Off Cluster - Server */
    tsCLD_OnOff sOnOffServerCluster;
    tsCLD_OnOffCustomDataStructure sOnOffServerCustomDataStructure;
  #endif
  #if (defined CLD_GROUPS) && (defined GROUPS_SERVER)
    /* Groups Cluster - Server */
    tsCLD_Groups sGroupsServerCluster;
    tsCLD_GroupsCustomDataStructure sGroupsServerCustomDataStructure;
    #endif
  #if (defined CLD_SCENES) && (defined SCENES_SERVER)
    /* Scenes Cluster - Server */
    tsCLD_Scenes sScenesServerCluster;
    tsCLD_ScenesCustomDataStructure sScenesServerCustomDataStructure;
  #endif
  #if (defined CLD_LEVEL_CONTROL) && (defined LEVEL_CONTROL_SERVER)
    /* LevelControl Cluster - Server */
    tsCLD_LevelControl sLevelControlServerCluster;
    tsCLD_LevelControlCustomDataStructure
    sLevelControlServerCustomDataStructure;
  #endif
  #if (defined CLD_COLOUR_CONTROL) && (defined COLOUR_CONTROL_SERVER)
    /* Colour Control Cluster - Server */
    tsCLD_ColourControl sColourControlServerCluster;
    tsCLD_ColourControlCustomDataStructure
    sColourControlServerCustomDataStructure;
  #endif
  #if (defined CLD_ZLL_COMMISSION) && (defined ZLL_COMMISSION_SERVER)
    tsCLD_ZllCommission sZllCommissionServerCluster;
    tsCLD_ZllCommissionCustomDataStructure
    sZllCommissionServerCustomDataStructure;
  #endif
  #if (defined CLD_OTA) && (defined OTA_CLIENT)
    /* OTA cluster - Client */
    tsCLD_AS_Ota sCLD_OTA;
    tsOTA_Common sCLD_OTA_CustomDataStruct;
    #endif
} tsZLO_ExtendedColourLightDevice;

Parent topic:Extended Colour Light

Registration Function

The following eZLO_RegisterExtendedColourLightEndPoint() function is the endpoint registration function for an Extended color Light device.

teZCL_Status eZLO_RegisterExtendedColourLightEndPoint(
uint8 u8EndPointIdentifier,
tfpZCL_ZCLCallBackFunction cbCallBack,
tsZLO_ExtendedColourLightDevice *psDeviceInfo);

Description

This function is used to register an endpoint which supports an Extended color Light device. The function must be called after eZCL_Initialise().

The specified identifier for the endpoint is a number in the range 1 to 240 (endpoint 0 is reserved for ZigBee use). Application endpoints are normally numbered consecutively starting at 1. The specified number must be less than or equal to the value of ZLO_NUMBER_OF_ENDPOINTS defined in the zcl_options.h file, which represents the highest endpoint number used for applications.

While invoking this function, specify a user-defined callback function, which is invoked when an event associated with the endpoint occurs. This callback function is defined according to the typedef:

typedef void(* tfpZCL_ZCLCallBackFunction)
(tsZCL_CallBackEvent *pCallBackEvent);

Also provide a pointer to a tsZLO_ExtendedColourLightDevice structure, described in Section 3.14.2. This structure stores all variables relating to the color Controller device associated with the endpoint. The sEndPoint and sClusterInstance fields of this structure are set by this function and must not be directly written to by the application.

The function is called multiple times if more than one endpoint is being used - for example, if more than one Extended color Light device is housed in the same hardware, sharing the same module.

Parameters

  • u8EndPointIdentifier: Endpoint that is to be associated with the registered structure and callback function.

  • cbCallBack: Pointer to the function that is used to indicate events to the application for this endpoint.

  • psDeviceInfo: Pointer to the structure that acts as storage for all variables related to the device being registered on this endpoint (see Section 3.14.2). The sEndPoint and sClusterInstance fields are set by this register function for internal use and must not be written to by the application.

Returns

  1. E_ZCL_SUCCESS

  2. E_ZCL_FAIL

  3. E_ZCL_ERR_PARAMETER_NULL

  4. E_ZCL_ERR_PARAMETER_RANGE

  5. E_ZCL_ERR_EP_RANGE

  6. E_ZCL_ERR_CLUSTER_0

  7. E_ZCL_ERR_CALLBACK_NULL

  8. E_ZCL_ERR_CLUSTER_NULL

  9. E_ZCL_ERR_SECURITY_RANGE

  10. E_ZCL_ERR_CLUSTER_ID_RANGE

  11. E_ZCL_ERR_MANUFACTURER_SPECIFIC

  12. E_ZCL_ERR_ATTRIBUTE_TYPE_UNSUPPORTED

  13. E_ZCL_ERR_ATTRIBUTE_ID_ORDER

  14. E_ZCL_ERR_ATTRIBUTES_ACCESS

The above codes are described in the ZCL User Guide (JNUG3132).

Parent topic:Extended Colour Light

Parent topic:Lighting and Occupancy Device Types

Light Level Sensor

The Light Level Sensor device measures the illumination level in an area. It can be used to switch on/off a lighting device, such as an On/Off Ballast.

  • The Device ID is 0x010E.

  • The header file for the device is light_level_sensor.h.

  • The clusters supported by the device are listed in Section 3.15.1.

  • The device structure, tsZLO_LightLevelSensorDevice, is listed in Section 3.15.2.

  • The endpoint registration function for the device, eZLO_RegisterLightLevelSensorEndPoint(), is detailed in Section 3.15.3.

Supported clusters

The clusters used by the Light Level Sensor device are listed in the table below.

Table 20. Clusters for Light Sensor

Server (input) side

Client (output) side

Mandatory

Basic

Identify

Identify

Illuminance measurement

Optional

OTA upgrade

Groups

Parent topic:Light Level Sensor

Device Structure

The following tsZLO_LightLevelSensorDevice structure is the shared structure for a Light Level Sensor device:

typedef struct
{
  tsZCL_EndPointDefinition sEndPoint;
 /* Cluster instances */
  tsZLO_LightLevelSensorDeviceClusterInstances sClusterInstance;
  /* Mandatory server clusters */
  #if (defined CLD_BASIC) && (defined BASIC_SERVER)
  /* Basic Cluster - Server */
  tsCLD_Basic sBasicServerCluster;
  #endif
  #if (defined CLD_IDENTIFY) && (defined IDENTIFY_SERVER)
    /* Identify Cluster - Server */
    tsCLD_Identify sIdentifyServerCluster;
    tsCLD_IdentifyCustomDataStructure
        sIdentifyServerCustomDataStructure;
  #endif
  #if (defined CLD_ILLUMINANCE_LEVEL_SENSING) && (defined
 ILLUMINANCE_LEVEL_SENSING_SERVER)
    tsCLD_IlluminanceLevelSensing
      sIlluminanceLevelSensingServerCluster;
  #endif
  /* Optional server clusters */
  #if (defined CLD_POLL_CONTROL) && (defined POLL_CONTROL_SERVER)
    tsCLD_PollControl sPollControlServerCluster;
    tsCLD_PollControlCustomDataStructure
    sPollControlServerCustomDataStructure;
  #endif
  /* Mandatory server clusters */
  #if (defined CLD_IDENTIFY) && (defined IDENTIFY_CLIENT)
    /* Identify Cluster - Client */
    tsCLD_Identify sIdentifyClientCluster;
    tsCLD_IdentifyCustomDataStructure
    sIdentifyClientCustomDataStructure;
  #endif
  /* Recommended Optional client clusters */
  #if (defined CLD_GROUPS) && (defined GROUPS_CLIENT)
    /* Groups Cluster - Client */
    tsCLD_Groups sGroupsClientCluster;
    tsCLD_GroupsCustomDataStructure sGroupsClientCustomDataStructure;
  #endif
  #if (defined CLD_OTA) && (defined OTA_CLIENT)
    tsCLD_AS_Ota sCLD_OTA;
    tsOTA_Common sCLD_OTA_CustomDataStruct;
  #endif
} tsZLO_LightLevelSensorDevice;

Parent topic:Light Level Sensor

Registration Function

The following eZLO_RegisterLightLevelSensorEndPoint() function is the endpoint registration function for a Light Level Sensor device.

teZCL_Status eZLO_RegisterLightLevelSensorEndPoint(
    uint8 u8EndPointIdentifier,
    tfpZCL_ZCLCallBackFunction cbCallBack,
        tsZLO_LightLevelSensorDevice *psDeviceInfo);

Description

This function is used to register an endpoint which supports a Light Level Sensor device. The function must be called after eZCL_Initialise().

The specified identifier for the endpoint is a number in the range 1 to 240 (endpoint 0 is reserved for ZigBee use). Application endpoints are normally numbered consecutively starting at 1. The specified number must be less than or equal to the value of ZLO_NUMBER_OF_ENDPOINTS defined in the zcl_options.h file, which represents the highest endpoint number used for applications.

While invoking this function, specify a user-defined callback function, which is invoked when an event associated with the endpoint occurs. This callback function is defined according to the typedef:

typedef void( *tfpZCL_ZCLCallBackFunction)
(tsZCL_CallBackEvent *pCallBackEvent);

Also provide a pointer to a tsZLO_ColourControllerDevice structure, described in Section 3.16.2. This structure stores all variables relating to the color Controller device associated with the endpoint. The sEndPoint and sClusterInstance fields of this structure are set by this function and must not be directly written to by the application.

The function is called multiple times if more than one endpoint is being used - for example, if more than one Light Level Sensor device is housed in the same hardware, sharing the same module.

Parameters

  • u8EndPointIdentifier: Endpoint that is to be associated with the registered structure and callback function.

  • cbCallBack: Pointer to the function that is used to indicate events to the application for this endpoint.

  • psDeviceInfo: Pointer to the structure that acts as storage for all variables related to the device being registered on this endpoint (see Section 3.16.2). The sEndPoint and sClusterInstance fields are set by this register function for internal use and must not be written to by the application.

Returns

  1. E_ZCL_SUCCESS

  2. E_ZCL_FAIL

  3. E_ZCL_ERR_PARAMETER_NULL

  4. E_ZCL_ERR_PARAMETER_RANGE

  5. E_ZCL_ERR_EP_RANGE

  6. E_ZCL_ERR_CLUSTER_0

  7. E_ZCL_ERR_CALLBACK_NULL

  8. E_ZCL_ERR_CLUSTER_NULL

  9. E_ZCL_ERR_SECURITY_RANGE

  10. E_ZCL_ERR_CLUSTER_ID_RANGE

  11. E_ZCL_ERR_MANUFACTURER_SPECIFIC

  12. E_ZCL_ERR_ATTRIBUTE_TYPE_UNSUPPORTED

  13. E_ZCL_ERR_ATTRIBUTE_ID_ORDER

  14. E_ZCL_ERR_ATTRIBUTES_ACCESS

The above codes are described in the ZCL User Guide (JNUG3132).

Parent topic:Light Level Sensor

Parent topic:Lighting and Occupancy Device Types

Colour Controller

The Colour Controller device is used in a node that issues colour-control commands to adjust the intensity or colour of a lighting device, or switch it on/off.

  • The Device ID is 0x0800.

  • The header file for the device is colour_controller.h.

  • The clusters supported by the device are listed in Section 3.16.1.

  • The device structure, tsZLO_ColourControllerDevice, is listed in Section 3.16.2.

  • The endpoint registration function for the device, eZLO_RegisterColourRemoteEndPoint(), is detailed in Section 3.16.3.

Supported clusters

The clusters supported by the Colour Controller device are listed in the table below.

Table 29. Clusters for Colour Controller

Server (Input) side

Client (Output) side

Mandatory

Basic

On/Off

Identify

Identify

Level control

Colour control

Optional

Touchlink commissioning

Touchlink commissioning

Groups

OTA upgrade

The mandatory attributes within each cluster for this device type are indicated in the ZigBee Lighting and Occupancy Device Specification (15-0014-01).

Parent topic:Colour Controller

Device Structure

The following tsZLO_ColourControllerDevice structure is the shared structure for a Colour Controller device:

typedef struct
{
tsZCL_EndPointDefinitionsEndPoint;
/* Clusterinstances */
tsZLO_ColourControllerDeviceClusterInstances sClusterInstance;
#if (defined CLD_BASIC) && (defined BASIC_SERVER)
/* Basic Cluster - Server */
tsCLD_Basic sBasicServerCluster;
#endif
#if (defined CLD_IDENTIFY) && (defined IDENTIFY_SERVER)
/* Identify Cluster - Server */
tsCLD_Identify sIdentifyServerCluster;
tsCLD_IdentifyCustomDataStructure
sIdentifyServerCustomDataStructure;
#endif
#if (defined CLD_ZLL_COMMISSION) && (defined ZLL_COMMISSION_SERVER)
tsCLD_ZllCommission sZllCommissionServerCluster;
tsCLD_ZllCommissionCustomDataStructure
sZllCommissionServerCustomDataStructure;
#endif
/* Mandatory client clusters */
#if (defined CLD_IDENTIFY) && (defined IDENTIFY_CLIENT)
/* Identify Cluster - Client */
tsCLD_Identify sIdentifyClientCluster;
tsCLD_IdentifyCustomDataStructure
sIdentifyClientCustomDataStructure;
#endif
#if (defined CLD_BASIC) && (defined BASIC_CLIENT)
/* Basic Cluster - Client */
tsCLD_Basic sBasicClientCluster;
#endif
#if (defined CLD_ONOFF) && (defined ONOFF_CLIENT)
/* On/Off Cluster - Client */
tsCLD_OnOff sOnOffClientCluster;
#endif
#if (defined CLD_LEVEL_CONTROL) && (defined LEVEL_CONTROL_CLIENT)
/* Level Control Cluster - Client */
tsCLD_LevelControl sLevelControlClientCluster;
tsCLD_LevelControlCustomDataStructure
sLevelControlClientCustomDataStructure;
#endif
#if (defined CLD_COLOUR_CONTROL) && (defined COLOUR_CONTROL_CLIENT)
/* Colour Control Cluster - Client */
tsCLD_ColourControl sColourControlClientCluster;
tsCLD_ColourControlCustomDataStructure
sColourControlClientCustomDataStructure;
#endif
/* Optional client cluster */
#if (defined CLD_GROUPS) && (defined GROUPS_CLIENT)
/* Groups Cluster - Client */
tsCLD_Groups sGroupsClientCluster;
tsCLD_GroupsCustomDataStructure sGroupsClientCustomDataStructure;
#endif
#if (defined CLD_OTA) && (defined OTA_CLIENT)
/* OTA cluster - Client */
tsCLD_AS_Ota sCLD_OTA;
tsOTA_Common sCLD_OTA_CustomDataStruct;
#endif
#if (defined CLD_ZLL_COMMISSION) && (defined ZLL_COMMISSION_CLIENT)
tsCLD_ZllCommission sZllCommissionClientCluster;
tsCLD_ZllCommissionCustomDataStructure
sZllCommissionClientCustomDataStructure;
#endif
}tsZLO_ColourControllerDevice;

Parent topic:Colour Controller

Registration Function

The following eZLO_RegisterColourControllerEndPoint() function is the endpoint registration function for a color Controller device.

teZCL_Status eZLO_RegisterColourControllerEndPoint(
uint8 u8EndPointIdentifier,
tfpZCL_ZCLCallBackFunction cbCallBack,
tsZLO_ColourControllerDevice *psDeviceInfo);

Description

This function is used to register an endpoint which supports a color Controller device. The function must be called after eZCL_Initialise().

The specified identifier for the endpoint is a number in the range 1 to 240 (endpoint 0 is reserved for ZigBee use). Application endpoints are normally numbered consecutively starting at 1. The specified number must be less than or equal to the value of ZLO_NUMBER_OF_ENDPOINTS defined in the zcl_options.h file, which represents the highest endpoint number used for applications.

While invoking this function, specify a user-defined callback function, which is invoked when an event associated with the endpoint occurs. This callback function is defined according to the typedef:

typedef void(* tfpZCL_ZCLCallBackFunction)
(tsZCL_CallBackEvent* pCallBackEvent);

Also provide a pointer to a tsZLO_ColourControllerDevice structure, described in Section 3.16.2. This structure stores all variables relating to the color Controller device associated with the endpoint. The sEndPoint and sClusterInstance fields of this structure are set by this function and must not be directly written to by the application.

The function is called multiple times if more than one endpoint is being used - for example, if more than one color Controller device is housed in the same hardware, sharing the same module.

Parameters

  • u8EndPointIdentifier: Endpoint that is to be associated with the registered structure and callback function.

  • cbCallBack: Pointer to the function that is used to indicate events to the application for this endpoint.

  • psDeviceInfo: Pointer to the structure that acts as storage for all variables related to the device being registered on this endpoint (see Section 3.16.2). The sEndPoint and sClusterInstance fields are set by this register function for internal use and must not be written to by the application.

Returns

  1. E_ZCL_SUCCESS

  2. E_ZCL_FAIL

  3. E_ZCL_ERR_PARAMETER_NULL

  4. E_ZCL_ERR_PARAMETER_RANGE

  5. E_ZCL_ERR_EP_RANGE

  6. E_ZCL_ERR_CLUSTER_0

  7. E_ZCL_ERR_CALLBACK_NULL

  8. E_ZCL_ERR_CLUSTER_NULL

  9. E_ZCL_ERR_SECURITY_RANGE

  10. E_ZCL_ERR_CLUSTER_ID_RANGE

  11. E_ZCL_ERR_MANUFACTURER_SPECIFIC

  12. E_ZCL_ERR_ATTRIBUTE_TYPE_UNSUPPORTED

  13. E_ZCL_ERR_ATTRIBUTE_ID_ORDER

  14. E_ZCL_ERR_ATTRIBUTES_ACCESS

The above codes are described in the ZCL User Guide (JNUG3132).

Parent topic:Colour Controller

Parent topic:Lighting and Occupancy Device Types

Color Scene Controller

The color Scene Controller device is used in nodes that support scenes and that issue color-control commands. A typical use is to adjust the intensity or color of a lighting device, or switch it on/off. For example, it can be used as a controller for a Color Dimmable Light.

  • The Device ID is 0x0810.

  • The header file for the device is colour_scene_controller.h.

  • The clusters supported by the device are listed in Supported clusters.

  • The device structure, tsZLO_ColourSceneControllerDevice, is listed in Device Structure.

  • The endpoint registration function for the device, eZLO_RegisterColourSceneControllerEndPoint(), is detailed in Registration Function.

Supported clusters

The clusters supported by the Colour Scene Controller device are listed in the table below.

Table 30.  Clusters for Colour Scene Controller

Server (Input) side

Client (Output) side

Mandatory

Basic

On/Off

Identify

Identify

Level control

Colour control

Scenes

Optional

Touchlink commissioning

Touchlink commissioning

Groups

OTA upgrade

The mandatory attributes within each cluster for this device type are indicated in the ZigBee Lighting and Occupancy Device Specification (15-0014-01).

Parent topic:Color Scene Controller

Device Structure

The following tsZLO_ColourSceneControllerDevice structure is the shared structure for a Colour Scene Controller device:

typedef struct
{
tsZCL_EndPointDefinition sEndPoint;
/* Cluster instances */
    tsZLO_ColourSceneControllerDeviceClusterInstances sClusterInstance;
#if (defined CLD_BASIC) && (defined BASIC_SERVER)
/* Basic Cluster - Server */
    tsCLD_Basic sBasicServerCluster;
#endif
#if (defined CLD_IDENTIFY) && (defined IDENTIFY_SERVER)
/* Identify Cluster - Server */
    tsCLD_Identify sIdentifyServerCluster;
    tsCLD_IdentifyCustomDataStructure
    sIdentifyServerCustomDataStructure;
#endif
#if (defined CLD_ZLL_COMMISSION) && (defined ZLL_COMMISSION_SERVER)
    tsCLD_ZllCommission sZllCommissionServerCluster;
    tsCLD_ZllCommissionCustomDataStructure
    sZllCommissionServerCustomDataStructure;
#endif
/* Mandatory client clusters */
#if (defined CLD_IDENTIFY) && (defined IDENTIFY_CLIENT)
/* Identify Cluster - Client */
    tsCLD_Identify sIdentifyClientCluster;
    tsCLD_IdentifyCustomDataStructure
    sIdentifyClientCustomDataStructure;
#endif
#if (defined CLD_BASIC) && (defined BASIC_CLIENT)
/* Basic Cluster - Server */
    tsCLD_Basic sBasicClientCluster;
#endif
#if (defined CLD_ONOFF) && (defined ONOFF_CLIENT)
/* On/Off Cluster - Client */
    tsCLD_OnOff sOnOffClientCluster;
#endif
#if (defined CLD_LEVEL_CONTROL) && (defined LEVEL_CONTROL_CLIENT)
/* Level Control Cluster - Client */
    tsCLD_LevelControl sLevelControlClientCluster;
    tsCLD_LevelControlCustomDataStructure
    sLevelControlClientCustomDataStructure;
#endif
#if (defined CLD_COLOUR_CONTROL) && (defined COLOUR_CONTROL_CLIENT)
/* Colour Control Cluster - Client */
    tsCLD_ColourControl sColourControlClientCluster;
    tsCLD_ColourControlCustomDataStructure
    sColourControlClientCustomDataStructure;
#endif
#if (defined CLD_SCENES) && (defined SCENES_CLIENT)
/* Scenes Cluster - Client */
    tsCLD_Scenes sScenesClientCluster;
    tsCLD_ScenesCustomDataStructure sScenesClientCustomDataStructure;
#endif
/* Recommended Optional Client Cluster */
#if (defined CLD_GROUPS) && (defined GROUPS_CLIENT)
/* Groups Cluster - Client */
    tsCLD_Groups sGroupsClientCluster;
    tsCLD_GroupsCustomDataStructure sGroupsClientCustomDataStructure;
#endif
#if (defined CLD_OTA) && (defined OTA_CLIENT)
/* OTA cluster - Client */
    tsCLD_AS_Ota sCLD_OTA;
    tsOTA_Common sCLD_OTA_CustomDataStruct;
#endif
#if (defined CLD_ZLL_COMMISSION) && (defined ZLL_COMMISSION_CLIENT)
    tsCLD_ZllCommission sZllCommissionClientCluster;
    tsCLD_ZllCommissionCustomDataStructure
    sZllCommissionClientCustomDataStructure;
#endif
}tsZLO_ColourSceneControllerDevice;

Parent topic:Color Scene Controller

Registration Function

The following eZLO_RegisterColourSceneControllerEndPoint() function is the endpoint registration function for a color Scene Controller device.

teZCL_Status eZLO_RegisterColourSceneControllerEndPoint(
uint8 u8EndPointIdentifier,
tfpZCL_ZCLCallBackFunction cbCallBack,
tsZLO_ColourSceneControllerDevice *psDeviceInfo);

Description

This function is used to register an endpoint which supports a color Scene Controller device. The function must be called after eZCL_Initialise().

The specified identifier for the endpoint is a number in the range 1 to 240 (endpoint 0 is reserved for ZigBee use). Application endpoints are normally numbered consecutively starting at 1. The specified number must be less than or equal to the value of ZLO_NUMBER_OF_ENDPOINTS defined in the zcl_options.h file, which represents the highest endpoint number used for applications.

While invoking this function, specify a user-defined callback function, which is invoked when an event associated with the endpoint occurs. This callback function is defined according to the typedef:

typedef void(* tfpZCL_ZCLCallBackFunction)
(tsZCL_CallBackEvent *pCallBackEvent);

Also provide a pointer to a tsZLO_ColourSceneControllerDevice structure, described in Section 3.17.2. This structure stores all variables relating to the color Controller device associated with the endpoint. The sEndPoint and sClusterInstance fields of this structure are set by this function and must not be directly written to by the application.

The function is called multiple times if more than one endpoint is being used - for example, if more than one color Scene Controller device is housed in the same hardware, sharing the same module.

Parameters

  • u8EndPointIdentifier: Endpoint that is to be associated with the registered structure and callback function.

  • cbCallBack: Pointer to the function that is used to indicate events to the application for this endpoint.

  • psDeviceInfo: Pointer to the structure that acts as storage for all variables related to the device being registered on this endpoint (see Section 3.17.2). The sEndPoint and sClusterInstance fields are set by this register function for internal use and must not be written to by the application.

Returns

  1. E_ZCL_SUCCESS

  2. E_ZCL_FAIL

  3. E_ZCL_ERR_PARAMETER_NULL

  4. E_ZCL_ERR_PARAMETER_RANGE

  5. E_ZCL_ERR_EP_RANGE

  6. E_ZCL_ERR_CLUSTER_0

  7. E_ZCL_ERR_CALLBACK_NULL

  8. E_ZCL_ERR_CLUSTER_NULL

  9. E_ZCL_ERR_SECURITY_RANGE

  10. E_ZCL_ERR_CLUSTER_ID_RANGE

  11. E_ZCL_ERR_MANUFACTURER_SPECIFIC

  12. E_ZCL_ERR_ATTRIBUTE_TYPE_UNSUPPORTED

  13. E_ZCL_ERR_ATTRIBUTE_ID_ORDER

  14. E_ZCL_ERR_ATTRIBUTES_ACCESS

The above codes are described in the ZCL User Guide (JNUG3132).

Parent topic:Color Scene Controller

Parent topic:Lighting and Occupancy Device Types

Non-Colour Controller

The Non-Colour Controller device is used in nodes that issue control commands that are not related to colour - for example, to control a Dimmable Light.

  • The Device ID is 0x0820.

  • The header file for the device is non_colour_controller.h.

  • The clusters supported by the device are listed in Section 3.18.1.

  • The device structure, tsZLO_NonColourControllerDevice, is listed in Section 3.18.2.

  • The endpoint registration function for the device, eZLO_RegisterNonColourControllerEndPoint(), is detailed in Section 3.18.3.

Supported clusters

The clusters supported by the Non-Colour Controller device are listed in the table below.

Server (Input) side

Client (Output) side

Mandatory

Basic

On/Off

Identify

Identify

Level control

Optional

Touchlink commissioning

Touchlink commissioning

Groups

OTA upgrade

The mandatory attributes within each cluster for this device type are indicated in the ZigBee Lighting and Occupancy Device Specification (15-0014-01).

Parent topic:Non-Colour Controller

Device structure

The following tsZLO_NonColourControllerDevice structure is the shared structure for a Non-Colour Controller device:

typedef struct
{
tsZCL_EndPointDefinition sEndPoint;
/* Cluster instances */
tsZLO_NonColourControllerDeviceClusterInstances sClusterInstance;
#if (defined CLD_BASIC) && (defined BASIC_SERVER)
/* Basic Cluster - Server */
tsCLD_Basic sBasicServerCluster;
#endif
#if (defined CLD_IDENTIFY) && (defined IDENTIFY_SERVER)
/* Identify Cluster - Server */
tsCLD_Identify sIdentifyServerCluster;
tsCLD_IdentifyCustomDataStructure sIdentifyServerCustomDataStructure;
#endif
#if (defined CLD_ZLL_COMMISSION) && (defined ZLL_COMMISSION_SERVER)
tsCLD_ZllCommission sZllCommissionServerCluster;
tsCLD_ZllCommissionCustomDataStructure
sZllCommissionServerCustomDataStructure;
#endif
/* Mandatory client clusters */
#if (defined CLD_IDENTIFY) && (defined IDENTIFY_CLIENT)
/* Identify Cluster - Client */
tsCLD_Identify sIdentifyClientCluster;
tsCLD_IdentifyCustomDataStructure sIdentifyClientCustomDataStructure;
#endif
#if (defined CLD_BASIC) && (defined BASIC_CLIENT)
/* Basic Cluster - Client */
tsCLD_Basic sBasicClientCluster;
#endif
#if (defined CLD_ONOFF) && (defined ONOFF_CLIENT)
/* On/Off Cluster - Client */
tsCLD_OnOff sOnOffClientCluster;
#endif
#if (defined CLD_LEVEL_CONTROL) && (defined LEVEL_CONTROL_CLIENT)
/* Level Control Cluster - Client */
tsCLD_LevelControl sLevelControlClientCluster;
tsCLD_LevelControlCustomDataStructure
sLevelControlClientCustomDataStructure;
#endif
#if (defined CLD_GROUPS) && (defined GROUPS_CLIENT)
/* Groups Cluster - Client */
tsCLD_GroupssGroup sClientCluster;
tsCLD_GroupsCustomDataStructuresGroup sClientCustomDataStructure;
#endif
#if (defined CLD_OTA) && (defined OTA_CLIENT)
/* OTA cluster - Client */
tsCLD_AS_Ota sCLD_OTA;
tsOTA_Common sCLD_OTA_CustomDataStruct;
#endif
#if (defined CLD_ZLL_COMMISSION) && (defined ZLL_COMMISSION_CLIENT)
tsCLD_ZllCommission sZllCommissionClientCluster;
tsCLD_ZllCommissionCustomDataStructure
sZllCommissionClientCustomDataStructure;
#endif
}tsZLO_NonColourControllerDevice;

Parent topic:Non-Colour Controller

Registration function

The following eZLO_RegisterNonColourControllerEndPoint() function is the endpoint registration function for a Non-Colour Controller device.

teZCL_Status eZLO_RegisterNonColourControllerEndPoint(
               uint8 u8EndPointIdentifier,
    tfpZCL_ZCLCallBackFunction cbCallBack,
        tsZLO_NonColourControllerDevice *psDeviceInfo);

Description

This function is used to register an endpoint which supports a Non-Colour Controller device. The function must be called after eZCL_Initialise().

The specified identifier for the endpoint is a number in the range 1 to 240 (endpoint 0 is reserved for ZigBee use). Application endpoints are normally numbered consecutively starting at 1. The specified number must be less than or equal to the value of ZLO_NUMBER_OF_ENDPOINTS defined in the zcl_options.h file, which represents the highest endpoint number used for applications.

While invoking this function, specify a user-defined callback function, which is invoked when an event associated with the endpoint occurs. This callback function is defined according to the typedef:

typedef void(* tfpZCL_ZCLCallBackFunction)
        (tsZCL_CallBackEvent *pCallBackEvent);

Also provide a pointer to a tsZLO_NonColourControllerDevice structure, described in Section 3.18.2. This structure stores all variables relating to the color Controller device associated with the endpoint. The sEndPoint and sClusterInstance fields of this structure are set by this function and must not be directly written to by the application.

The function is called multiple times if more than one endpoint is being used - for example, if more than one Non-Colour Controller device is housed in the same hardware, sharing the same module.

Parameters

  • u8EndPointIdentifier: Endpoint that is to be associated with the registered structure and callback function.

  • cbCallBack: Pointer to the function that is used to indicate events to the application for this endpoint.

  • psDeviceInfo: Pointer to the structure that acts as storage for all variables related to the device being registered on this endpoint (see Section 3.18.2). The sEndPoint and sClusterInstance fields are set by this register function for internal use and must not be written to by the application.

Returns

  1. E_ZCL_SUCCESS

  2. E_ZCL_FAIL

  3. E_ZCL_ERR_PARAMETER_NULL

  4. E_ZCL_ERR_PARAMETER_RANGE

  5. E_ZCL_ERR_EP_RANGE

  6. E_ZCL_ERR_CLUSTER_0

  7. E_ZCL_ERR_CALLBACK_NULL

  8. E_ZCL_ERR_CLUSTER_NULL

  9. E_ZCL_ERR_SECURITY_RANGE

  10. E_ZCL_ERR_CLUSTER_ID_RANGE

  11. E_ZCL_ERR_MANUFACTURER_SPECIFIC

  12. E_ZCL_ERR_ATTRIBUTE_TYPE_UNSUPPORTED

  13. E_ZCL_ERR_ATTRIBUTE_ID_ORDER

  14. E_ZCL_ERR_ATTRIBUTES_ACCESS

The above codes are described in the ZCL User Guide (JNUG3132).

Parent topic:Non-Colour Controller

Parent topic:Lighting and Occupancy Device Types

Non-Colour Scene Controller

The Non-Colour Scene Controller device is used in nodes that support ‘scenes’ and issues control commands which are not related to colour - for example, to control a Dimmable Light.

  • The Device ID is 0x0830.

  • The header file for the device is non_colour_scene_controller.h.

  • The clusters supported by the device are listed in Supported clusters.

  • The device structure, tsZLO_NonColourSceneRemoteDevice, is listed in Device Structure.

  • The endpoint registration function for the device, eZLO_RegisterNonColourSceneControllerEndPoint(), is detailed in Registration Function.

Supported clusters

The clusters supported by the Non-Colour Scene Controller device are listed in the table below.

Table: Clusters for Non-Colour Scene Controller

Server (Input) side

Client (Output) side

Mandatory

Basic

On-Off

Identify

Identify

Level control

Scenes

Optional

Touchlink commissioning

Touchlink commissioning

Groups

OTA upgrade

The mandatory attributes within each cluster for this device type are indicated in the ZigBee Lighting and Occupancy Device Specification (15-0014-01).

Parent topic:Non-Colour Scene Controller

Device Structure

The following tsZLO_NonColourSceneControllerDevice structure is the shared structure for a Non-Colour Scene Controller device:

typedef struct
{
tsZCL_EndPointDefinition sEndPoint;
/* Cluster instances */
tsZLO_NonColourSceneControllerDeviceClusterInstances sClusterInstance;
#if (defined CLD_BASIC) && (defined BASIC_SERVER)
/* Basic Cluster - Server */
tsCLD_Basic sBasicServerCluster;
#endif
#if (defined CLD_IDENTIFY) && (defined IDENTIFY_SERVER)
/* Identify Cluster - Server */
tsCLD_Identify sIdentifyServerCluster;
tsCLD_IdentifyCustomDataStructure
sIdentifyServerCustomDataStructure;
#endif
#if (defined CLD_ZLL_COMMISSION) && (defined ZLL_COMMISSION_SERVER)
tsCLD_ZllCommission sZllCommissionServerCluster;
tsCLD_ZllCommissionCustomDataStructure
sZllCommissionServerCustomDataStructure;
#endif
/* Mandatory client clusters */
#if (defined CLD_IDENTIFY) && (defined IDENTIFY_CLIENT)
/* Identify Cluster - Client */
tsCLD_Identify sIdentifyClientCluster;
tsCLD_IdentifyCustomDataStructure
sIdentifyClientCustomDataStructure;
#endif
#if (defined CLD_BASIC) && (defined BASIC_CLIENT)
/* Basic Cluster - Client */
tsCLD_Basic sBasicClientCluster;
#endif
#if (defined CLD_ONOFF) && (defined ONOFF_CLIENT)
/* On/Off Cluster - Client */
tsCLD_OnOff sOnOffClientCluster;
#endif
#if (defined CLD_LEVEL_CONTROL) && (defined LEVEL_CONTROL_CLIENT)
/* Level Control Cluster - Client */
tsCLD_LevelControl sLevelControlClientCluster;
tsCLD_LevelControlCustomDataStructure
sLevelControlClientCustomDataStructure;
#endif
#if (defined CLD_SCENES) && (defined SCENES_CLIENT)
/* Scenes Cluster - Client */
tsCLD_Scenes sScenesClientCluster;
tsCLD_ScenesCustomDataStructure sScenesClientCustomDataStructure;
#endif
/* Recommended Optional Client Cluster*/
#if (defined CLD_GROUPS) && (defined GROUPS_CLIENT)
/* Groups Cluster - Client */
tsCLD_Groups sGroupsClientCluster;
tsCLD_GroupsCustomDataStructure sGroupsClientCustomDataStructure;
#endif
#if (defined CLD_OTA) && (defined OTA_CLIENT)
/* OTA cluster - Client */
tsCLD_AS_Ota sCLD_OTA;
tsOTA_Common sCLD_OTA_CustomDataStruct;
#endif
#if (defined CLD_ZLL_COMMISSION) && (defined ZLL_COMMISSION_CLIENT)
tsCLD_ZllCommission sZllCommissionClientCluster;
tsCLD_ZllCommissionCustomDataStructure
sZllCommissionClientCustomDataStructure;
#endif
}tsZLO_NonColourSceneControllerDevice;

Parent topic:Non-Colour Scene Controller

Registration Function

The following eZLO_RegisterNonColourSceneControllerEndPoint() function is the endpoint registration function for a Non-Colour Scene Controller device.

teZCL_Status eZLO_RegisterNonColourSceneControllerEndPoint(
uint8 u8EndPointIdentifier,
tfpZCL_ZCLCallBackFunction cbCallBack,
tsZLO_NonColourSceneControllerDevice *psDeviceInfo);

Description

This function is used to register an endpoint which supports a Non-Colour Scene Controller device. The function must be called after eZCL_Initialise().

The specified identifier for the endpoint is a number in the range 1 to 240 (endpoint 0 is reserved for ZigBee use). Application endpoints are normally numbered consecutively starting at 1. The specified number must be less than or equal to the value of ZLO_NUMBER_OF_ENDPOINTS defined in the zcl_options.h file, which represents the highest endpoint number used for applications.

While invoking this function, specify a user-defined callback function, which is invoked when an event associated with the endpoint occurs. This callback function is defined according to the typedef:

typedef void(* tfpZCL_ZCLCallBackFunction)
(tsZCL_CallBackEvent *pCallBackEvent);

Also provide a pointer to a tsZLO_NonColourSceneControllerDevice structure, described in Device Structure. This structure stores all variables relating to the color Controller device associated with the endpoint. The sEndPoint and sClusterInstance fields of this structure are set by this function and must not be directly written to by the application.

The function is called multiple times if more than one endpoint is being used - for example, if more than one Non-Colour Scene Controller device is housed in the same hardware, sharing the same module.

Parameters

  • u8EndPointIdentifier: Endpoint that is to be associated with the registered structure and callback function.

  • cbCallBack: Pointer to the function that is used to indicate events to the application for this endpoint.

  • psDeviceInfo: Pointer to the structure that acts as storage for all variables related to the device being registered on this endpoint (see Device Structure). The sEndPoint and sClusterInstance fields are set by this register function for internal use and must not be written to by the application.

Returns

  1. E_ZCL_SUCCESS

  2. E_ZCL_FAIL

  3. E_ZCL_ERR_PARAMETER_NULL

  4. E_ZCL_ERR_PARAMETER_RANGE

  5. E_ZCL_ERR_EP_RANGE

  6. E_ZCL_ERR_CLUSTER_0

  7. E_ZCL_ERR_CALLBACK_NULL

  8. E_ZCL_ERR_CLUSTER_NULL

  9. E_ZCL_ERR_SECURITY_RANGE

  10. E_ZCL_ERR_CLUSTER_ID_RANGE

  11. E_ZCL_ERR_MANUFACTURER_SPECIFIC

  12. E_ZCL_ERR_ATTRIBUTE_TYPE_UNSUPPORTED

  13. E_ZCL_ERR_ATTRIBUTE_ID_ORDER

  14. E_ZCL_ERR_ATTRIBUTES_ACCESS

The above codes are described in the ZCL User Guide (JNUG3132).

Parent topic:Non-Colour Scene Controller

Parent topic:Lighting and Occupancy Device Types

Control Bridge

The Control Bridge device is used in nodes that relay control commands issued from another network, for example, in an Internet router with a ZigBee interface.

  • The Device ID is 0x0840.

  • The header file for the device is control_bridge.h.

  • The clusters supported by the device are listed in Section 3.20.1.

  • The device structure, tsZLO_ControlBridgeDevice, is listed in Section 3.20.2.

  • The endpoint registration function for the device, eZLO_RegisterControlBridgeEndPoint(), is detailed in Section 3.20.3.

Supported clusters

The clusters supported by the Control Bridge device are listed in the table below.

Table: Clusters for Control Bridge

Server (Input) side

Client (Output) side

Mandatory

Basic

On/Off

Identify

Identify

Groups

Scenes

Level control

Colour control

Optional

OTA upgrade

OTA upgrade

Touchlink commissioning

Touchlink commissioning

Illuminance measurement

Illuminance level sensing

Occupancy sensing

The mandatory attributes within each cluster for this device type are indicated in the ZigBee Lighting and Occupancy Device Specification (15-0014-01).

Parent topic:Control Bridge

Device Structure

The following tsZLO_ControlBridgeDevice structure is the shared structure for a Control Bridge device:

typedef struct
{
tsZCL_EndPointDefinition sEndPoint;
/* Cluster instances */
tsZLO_ControlBridgeDeviceClusterInstances sClusterInstance;
#if (defined CLD_BASIC) && (defined BASIC_SERVER)
/* Basic Cluster - Server */
tsCLD_Basic sBasicServerCluster;
#endif
#if (defined CLD_IDENTIFY) && (defined IDENTIFY_SERVER)
/* Identify Cluster - Server */
tsCLD_Identify sIdentifyServerCluster;
tsCLD_IdentifyCustomDataStructure sIdentifyServerCustomDataStructure;
#endif
/* Recommended Optional Server Cluster */
#if (defined CLD_OTA) && (defined OTA_SERVER)
/* OTA cluster */
tsCLD_AS_Ota sCLD_ServerOTA;
tsOTA_Common sCLD_OTA_ServerCustomDataStruct;
#endif
#if (defined CLD_ZLL_COMMISSION) && (defined ZLL_COMMISSION_SERVER)
tsCLD_ZllCommission sZllCommissionServerCluster;
tsCLD_ZllCommissionCustomDataStructure
sZllCommissionServerCustomDataStructure;
#endif
/*
* Mandatory client clusters
*/
#if (defined CLD_IDENTIFY) && (defined IDENTIFY_CLIENT)
/* Identify Cluster - Client */
tsCLD_Identify sIdentifyClientCluster;
tsCLD_IdentifyCustomDataStructure sIdentifyClientCustomDataStructure;
#endif
#if (defined CLD_BASIC) && (defined BASIC_CLIENT)
/* Basic Cluster - Client */
tsCLD_Basic sBasicClientCluster;
#endif
#if (defined CLD_ONOFF) && (defined ONOFF_CLIENT)
/* On/Off Cluster - Client */
tsCLD_OnOff sOnOffClientCluster;
#endif
#if (defined CLD_LEVEL_CONTROL) && (defined LEVEL_CONTROL_CLIENT)
/* Level Control Cluster - Client */
tsCLD_LevelControl sLevelControlClientCluster;
tsCLD_LevelControlCustomDataStructure
sLevelControlClientCustomDataStructure;
#endif
#if (defined CLD_SCENES) && (defined SCENES_CLIENT)
/* Scenes Cluster - Client */
tsCLD_Scenes sScenesClientCluster;
tsCLD_ScenesCustomDataStructure sScenesClientCustomDataStructure;
#endif
#if (defined CLD_GROUPS) && (defined GROUPS_CLIENT)
/* Groups Cluster - Client */
tsCLD_Groups sGroupsClientCluster;
tsCLD_GroupsCustomDataStructure sGroupsClientCustomDataStructure;
#endif
#if (defined CLD_COLOUR_CONTROL) && (defined COLOUR_CONTROL_CLIENT)
/* Colour Control Cluster - Client */
tsCLD_ColourControl sColourControlClientCluster;
tsCLD_ColourControlCustomDataStructure
sColourControlClientCustomDataStructure;
#endif
/* Recommended Optional client clusters */
#if (defined CLD_OTA) && (defined OTA_CLIENT)
/* OTA cluster */
tsCLD_AS_Ota sCLD_OTA;
tsOTA_Common sCLD_OTA_CustomDataStruct;
#endif
#if( defined CLD_ILLUMINANCE_MEASUREMENT) && (defined ILLUMINANCE_MEASUREMENT_CLIENT)
/* Illuminance Measurement Cluster - Client */
tsCLD_IlluminanceMeasurement sIlluminanceMeasurementClientCluster;
#endif
#if (defined CLD_ILLUMINANCE_LEVEL_SENSING) && (defined ILLUMINANCE_LEVEL_SENSING_CLIENT)
tsCLD_IlluminanceLevelSensing sIlluminanceLevelSensingClientCluster;
#endif
#if (defined CLD_OCCUPANCY_SENSING) && (defined OCCUPANCY_SENSING_CLIENT)
/* Occupancy Sensing Cluster - Client */
tsCLD_OccupancySensing sOccupancySensingClientCluster;
#endif
#if (defined CLD_ZLL_COMMISSION) && (defined ZLL_COMMISSION_CLIENT)
tsCLD_ZllCommission sZllCommissionClientCluster;
tsCLD_ZllCommissionCustomDataStructure
sZllCommissionClientCustomDataStructure;
#endif
}tsZLO_ControlBridgeDevice;

Parent topic:Control Bridge

Registration Function

The following eZLO_RegisterControlBridgeEndPoint() function is the endpoint registration function for a Control Bridge device.

teZCL_Status eZLO_RegisterControlBridgeEndPoint(
uint8 u8EndPointIdentifier,
tfpZCL_ZCLCallBackFunction cbCallBack,
tsZLO_ControlBridgeDevice *psDeviceInfo);

Description

This function is used to register an endpoint which supports a Control Bridge device. The function must be called after eZCL_Initialise().

The specified identifier for the endpoint is a number in the range 1 to 240 (endpoint 0 is reserved for ZigBee use). Application endpoints are normally numbered consecutively starting at 1. The specified number must be less than or equal to the value of ZLO_NUMBER_OF_ENDPOINTS defined in the zcl_options.h file, which represents the highest endpoint number used for applications.

While invoking this function, specify a user-defined callback function, which is invoked when an event associated with the endpoint occurs. This callback function is defined according to the typedef:

typedef void(* tfpZCL_ZCLCallBackFunction)
(tsZCL_CallBackEvent *pCallBackEvent);

Also provide a pointer to a tsZLO_ControlBridgeDevice structure, described in Section 3.20.2. This structure stores all variables relating to the color Controller device associated with the endpoint. The sEndPoint and sClusterInstance fields of this structure are set by this function and must not be directly written to by the application.

The function is called multiple times if more than one endpoint is being used - for example, if more than one Control Bridge device is housed in the same hardware, sharing the same module.

Parameters

  • u8EndPointIdentifier: Endpoint that is to be associated with the registered structure and callback function.

  • cbCallBack: Pointer to the function that is used to indicate events to the application for this endpoint.

  • psDeviceInfo: Pointer to the structure that acts as storage for all variables related to the device being registered on this endpoint (see Section 3.20.2). The sEndPoint and sClusterInstance fields are set by this register function for internal use and must not be written to by the application.

Returns

  1. E_ZCL_SUCCESS

  2. E_ZCL_FAIL

  3. E_ZCL_ERR_PARAMETER_NULL

  4. E_ZCL_ERR_PARAMETER_RANGE

  5. E_ZCL_ERR_EP_RANGE

  6. E_ZCL_ERR_CLUSTER_0

  7. E_ZCL_ERR_CALLBACK_NULL

  8. E_ZCL_ERR_CLUSTER_NULL

  9. E_ZCL_ERR_SECURITY_RANGE

  10. E_ZCL_ERR_CLUSTER_ID_RANGE

  11. E_ZCL_ERR_MANUFACTURER_SPECIFIC

  12. E_ZCL_ERR_ATTRIBUTE_TYPE_UNSUPPORTED

  13. E_ZCL_ERR_ATTRIBUTE_ID_ORDER

  14. E_ZCL_ERR_ATTRIBUTES_ACCESS

The above codes are described in the ZCL User Guide (JNUG3132).

Parent topic:Control Bridge

Parent topic:Lighting and Occupancy Device Types

On/Off Sensor

The On/Off Sensor device is used in sensor nodes that issue control commands, for example, an infrared occupancy sensor.

  • The Device ID is 0x0850.

  • The header file for the device is on_off_sensor.h.

  • The clusters supported by the device are listed in Supported clusters.

  • The device structure, tsZLO_OnOffSensorDevice, is listed in Device structure.

  • The endpoint registration function for the device, eZLO_RegisterOnOffSensorEndPoint(), is detailed in Registration function.

Supported clusters

The clusters used by the On/Off Sensor device are listed in the table below.

Table 34.  Clusters for On/Off Sensor

Server (Input) side

Client (Output) side

Mandatory

Basic

On/Off

Identify

Identify

Optional

Touchlink commissioning

Touchlink commissioning

Level control

Colour control

Groups

Scenes

OTA upgrade

The mandatory attributes within each cluster for this device type are indicated in the ZigBee Lighting and Occupancy Device Specification (15-0014-01).

Parent topic:On/Off Sensor

Device structure

The following tsZLO_OnOffSensorDevice structure is the shared structure for a On/Off Sensor device:

typedef struct
{
  tsZCL_EndPointDefinition sEndPoint;
  /* Cluster instances */
  tsZLO_OnOffSensorDeviceClusterInstances sClusterInstance;
  #if (defined CLD_BASIC) && (defined BASIC_SERVER)
    /* Basic Cluster - Server */
    tsCLD_Basic sBasicServerCluster;
  #endif
  #if (defined CLD_IDENTIFY) && (defined IDENTIFY_SERVER)
    /* Identify Cluster - Server */
    tsCLD_Identify sIdentifyServerCluster;
    tsCLD_IdentifyCustomDataStructure
          sIdentifyServerCustomDataStructure;
    #endif
  /* Recommended Optional Server Cluster */
  #if (defined CLD_ZLL_COMMISSION) && (defined ZLL_COMMISSION_SERVER)
    tsCLD_ZllCommission sZllCommissionServerCluster;
    tsCLD_ZllCommissionCustomDataStructure
          sZllCommissionServerCustomDataStructure;
  #endif
/** Mandatory client clusters*/
  #if (defined CLD_IDENTIFY) && (defined IDENTIFY_CLIENT)
    /* Identify Cluster - Client */
    tsCLD_Identify sIdentifyClientCluster;
    tsCLD_IdentifyCustomDataStructure
          sIdentifyClientCustomDataStructure;
  #endif
  #if (defined CLD_ONOFF) && (defined ONOFF_CLIENT)
  /* On/Off Cluster - Client */
  tsCLD_OnOff sOnOffClientCluster;
  #endif
  /* Recommended Optional Client CLuster */
  #if (defined CLD_LEVEL_CONTROL) && (defined LEVEL_CONTROL_CLIENT)
    /* Level Control Cluster - Client */
    tsCLD_LevelControl sLevelControlClientCluster;
    tsCLD_LevelControlCustomDataStructure
          sLevelControlClientCustomDataStructure;
  #endif
  #if (defined CLD_SCENES) && (defined SCENES_CLIENT)
  /* Scenes Cluster - Client */
  tsCLD_Scenes sScenesClientCluster;
  tsCLD_ScenesCustomDataStructure sScenesClientCustomDataStructure;
  #endif
  #if (defined CLD_GROUPS) && (defined GROUPS_CLIENT)
    /* Groups Cluster - Client */
    tsCLD_Groups sGroupsClientCluster;
    tsCLD_GroupsCustomDataStructure sGroupsClientCustomDataStructure;
  #endif
  #if (defined CLD_COLOUR_CONTROL) && (defined COLOUR_CONTROL_CLIENT)
    /* Colour Control Cluster - Client */
    tsCLD_ColourControl sColourControlClientCluster;
    tsCLD_ColourControlCustomDataStructure
            sColourControlClientCustomDataStructure;
  #endif
  #if (defined CLD_OTA) && (defined OTA_CLIENT)
    /* OTA cluster - Client */
    tsCLD_AS_Ota sCLD_OTA;
    tsOTA_Common sCLD_OTA_CustomDataStruct;
  #endif
  #if (defined CLD_ZLL_COMMISSION) && (defined ZLL_COMMISSION_CLIENT)
  tsCLD_ZllCommission sZllCommissionClientCluster;
  tsCLD_ZllCommissionCustomDataStructure
          sZllCommissionClientCustomDataStructure;
  #endif
} tsZLO_OnOffSensorDevice;

Parent topic:On/Off Sensor

Registration function

The following eZLO_RegisterOnOffSensorEndPoint() function is the endpoint registration function for an On/Off Sensor device.

teZCL_Status eZLO_RegisterOnOffSensorEndPoint(
uint8 *u8EndPointIdentifier,
tfpZCL_ZCLCallBackFunction cbCallBack,
tsZLO_OnOffSensorDevice *psDeviceInfo);

Description

This function is used to register an endpoint which supports an On/Off Sensor device. The function must be called after eZCL_Initialise().

The specified identifier for the endpoint is a number in the range 1 to 240 (endpoint 0 is reserved for ZigBee use). Application endpoints are normally numbered consecutively starting at 1. The specified number must be less than or equal to the value of ZLO_NUMBER_OF_ENDPOINTS defined in the zcl_options.h file, which represents the highest endpoint number used for applications.

While invoking this function, specify a user-defined callback function, which is invoked when an event associated with the endpoint occurs. This callback function is defined according to the typedef:

typedef void(* tfpZCL_ZCLCallBackFunction)
(tsZCL_CallBackEvent *pCallBackEvent);

Also provide a pointer to a tsZLO_OnOffSensorDevice structure, described in Device structure. This structure stores all variables relating to the color Controller device associated with the endpoint. The sEndPoint and sClusterInstance fields of this structure are set by this function and must not be directly written to by the application.

The function is called multiple times if more than one endpoint is being used - for example, if more than one On/Off Sensor device is housed in the same hardware, sharing the same module.

Parameters

  • u8EndPointIdentifier: Endpoint that is to be associated with the registered structure and callback function.

  • cbCallBack: Pointer to the function that is used to indicate events to the application for this endpoint.

  • psDeviceInfo: Pointer to the structure that acts as storage for all variables related to the device being registered on this endpoint (see Device structure). The sEndPoint and sClusterInstance fields are set by this register function for internal use and must not be written to by the application.

Returns

  1. E_ZCL_SUCCESS

  2. E_ZCL_FAIL

  3. E_ZCL_ERR_PARAMETER_NULL

  4. E_ZCL_ERR_PARAMETER_RANGE

  5. E_ZCL_ERR_EP_RANGE

  6. E_ZCL_ERR_CLUSTER_0

  7. E_ZCL_ERR_CALLBACK_NULL

  8. E_ZCL_ERR_CLUSTER_NULL

  9. E_ZCL_ERR_SECURITY_RANGE

  10. E_ZCL_ERR_CLUSTER_ID_RANGE

  11. E_ZCL_ERR_MANUFACTURER_SPECIFIC

  12. E_ZCL_ERR_ATTRIBUTE_TYPE_UNSUPPORTED

  13. E_ZCL_ERR_ATTRIBUTE_ID_ORDER

  14. E_ZCL_ERR_ATTRIBUTES_ACCESS

The above codes are described in the ZCL User Guide (JNUG3132).

Parent topic:On/Off Sensor

Parent topic:Lighting and Occupancy Device Types