Zigbee_OccupSensing_Server_Router Application Description

How to use the Occupancy Sensing on a device acting as a Server within a Centralized Zigbee network.

The purpose of this application is to show how to create a Zigbee centralized network, and how to communicate from one node to another one using the Occupancy Sensing cluster. Once the Zigbee mesh network is created, the Server sends regularly the Occupancy to Client. The user can indicate if the Room is empty or not on Server by using push buttons SW1 and SW2.

Keywords

Connectivity, Zigbee, Zigbee protocol, 802.15.4 protocol, Occupancy Sensing cluster

Hardware Requirements

For this application it is requested to have:

Demo use case

    
 
               Coord.                                                                       Router
             +-----------+                                                               +-----------+
             |           |                                                               |           |                                       
             | OccupSens |                                                               | OccupSens |
             [ Client    |                                                               | Server    |  - Occupancy Sensing Server during Init 
             |           |                                                               |           |    launch a 500 ms Periodic Timer
             |           |                                                               |           |  
             |           |                                                               |           |  - Every 500 ms
             |           |                                                               |           |    * Read the Occupancy Sensor (if exist)
             |           |                                                               |           |      or simulate it with RNG.
             |           |                                                               |           |    * <= ZbZclAttrIntegerWrite(ZCL_OCC_ATTR_OCCUPANCY) 
             |           |  After a Router was connected :                               |           |
             |           |  ZbZclAttrReportConfigReq(ZCL_OCC_ATTR_OCCUPANCY, 5sec)       |           |
             |           | ------------------------------------------------------------> |           |
             |           | <------------------------------------------------------------ |           |
             |           |                                                               |           |
             |           | <-------------- Report (every 5 seconds) -------------------- |           |
             |           |                                                               |           |             
             |           |                                                               |           | <= PushB SW1 : Indicate Room Occupancy.
             |           |                                                               |           |                    -> ZbZclAttrIntegerWrite(ZCL_OCC_ATTR_OCCUPANCY)
             |           |                                                               |           |           
             |           |                                                               |           | <= PushB SW2 : Indicate Room Empty.       
             |           |                                                               |           |                    -> ZbZclAttrIntegerWrite(ZCL_OCC_ATTR_OCCUPANCY)
             |           |                                                               |           |           
             +-----------+                                                               +-----------+
  

Application Setup

Note: When LED Red, Green and Blue are toggling it is indicating an error has occurred on application.

Hardware and Software environment

Traces

Note

By default, this application runs with Zigbee PRO stack R23.
If you want to run this application using Zigbee PRO stack R22, you should replace ZigBeeProR23_FFD.a by ZigBeeProR22_FFD.a and ZigBeeProR23_RFD.a by ZigBeeProR22_RFD.a and ZigBeeClusters.a by ZigBeeClustersR22.a in the build environment.
Also, set in the project setup compilation flag CONFIG_ZB_REV=22.