Zigbee_Thermostat_Client_Coord Application Description

How to use the Thermostat cluster 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 Thermostat cluster. Once the Zigbee mesh network is created, the Server sends regularly the Temperature to Client. The user can manipulate a Menu through push buttons SW1, SW2 and SW3.

Keywords

Connectivity, Zigbee, Zigbee protocol, 802.15.4 protocol, Thermostat cluster

Hardware Requirements

For this application it is requested to have:

Demo use case

    
    

               Coord.                                                                    Router
           +------------+                                                                +------------+
           |            |                                                                |            |                                       
           | Thermostat |                                                                | Thermostat |
           [   Client   |                                                                | Server     |  - Temperature Server during Init 
           |            |                                                                |            |    launch a 500 ms Periodic Timer (Green Led toggling)
           |            |                                                                |            |  
           |            |                                                                |            |  - Every 500 ms
           |            |                                                                |            |    * Read the Temperature Sensor (if exist)
           |            |                                                                |            |      or simulate it with RNG and the Thermostat setting.
           |            |                                                                |            |    * <= ZbZclAttrIntegerWrite(ZCL_THERM_SVR_ATTR_LOCAL_TEMP) 
           |            |  After a Router was connected :                                |            |    * Display Local Temperature and Relay State (OPEN or CLOSED
           |            |  ZbZclAttrReportConfigReq(ZCL_THERM_SVR_ATTR_LOCAL_TEMP, 5sec) |            |      depending on thermostat setting).
           |            | -------------------------------------------------------------> |            |
           |            | <------------------------------------------------------------- |            |
           |            |                                                                |            |
           |            | <-------------- Report (every 5 seconds) --------------------- |            |
           |            |                                                                |            |             
           |            |                                                                |            | <= PushB SW1/SW2/SW3 : Change a Thermostat setting (see Menu description below)
           |            |                                                                |            |          
           |            |                                                                |            | 
           |            |                                                                |            |          
           +----------+                                                                  +------------+
  

Application Setup

 


                      |
                   SW1|
                      v                                                                                                                                                                                                           
           +---------------------+   SW2    +-------------------+   SW2       +-------------------+     SW2                 +-------------------+        SW2          +-----------+
           |  Trace msg: Cooling |<---------| Trace msg: Heating|<------------|Trace msg: Control |<------------------------| Trace msg: SysMode|<--------------------|   Exit    |
           |                     |--------->|                   |------------>|                   |------------------------>|                   |-------------------->|           |    
           +---------------------+   SW3    +-------------------+    SW3      +-------------------+           SW3           +-------------------+        SW3          +-----------+
                      |                           SW1 |                               |                                                  |
                  SW1 |                               |                          SW1  |                                               SW1|
                      v                               v                      (Default)|    +-------------------+                (Default)|      +-----------------+ 
    +------------------------------+          Same as Cooling menu                    |    |    Cooling Only   |   SW1                   |      |     OFF         |   SW1   
    | Trace msg : Cooling temp = X |-----|                                            |    |                   |-------|                 |      |                 |-------|    
    |                              |     |                                            |    +-------------------+       |                 |      +-----------------+       |     
    +------------------------------+     | SW3                                        |        |            ^          |                 |          |         ^           |     
                    |                    |                                            |        |SW3         |SW2       |                 |          |SW3      |SW2        | 
                 SW2|                    |                                            |        v            |          |                 |          v         |           | 
                    v                    v                                            |    +-------------------+       |                 |      +-----------------+       |  
        +-------------------+  SW3  +-------------------+                             |    | Cooling + Reheat  |   SW1 |                 |----->|     Auto        |   SW1 | 
    |-->| Action: X=X-0.5   |------>|  Action: X=X+0.5  |<---|                        |    |                   |-------|                        |                 |-------| 
    |   |                   |<------|                   |    |                        |    +-------------------+       |                        +-----------------+       |  
    |   +-------------------+  SW2  +-------------------+    |                        |        |            ^          |                            |         ^           | 
    | SW2  |   |                      |               |  SW3 |                        |        |SW3         |SW2       |                            |SW3      |SW2        | 
    |------|   |                      |               |------|                        |        v            |          |                            v         |           | 
               | SW1                  | SW1                                           |    +-------------------+       |                        +-----------------+       |  
               v                      v                                               |    |   Heating Only    |   SW1 |                        |     Not Used    |   SW1 | 
       +-----------------------------------------+                                    |    |                   |-------|                        |                 |-------|                         
       | Trace msg: Exit from Menu with new value|                                    |    +-------------------+       |                        +-----------------+       |  
       |                                         |                                    |        |            ^          |                            |        ^            | 
       +-----------------------------------------+                                    |        |SW3         |SW2       |                            |SW3     |SW2         | 
                                                                                      |        v            |          |                            v        |            | 
                                                                                      |    +-------------------+       |                        +-----------------+       |  
                                                                                      |    | Heating + Reheat  |  SW1  |                        |     Cooling     |  SW1  | 
                                                                                      |    |                   |-------|                        |                 |-------| 
                                                                                      |    +-------------------+       |                        +-----------------+       |     
                                                                                      |        |            ^          |              and so on (see above description)   | 
                        Timeout=10s                                                   |        |SW3         |SW2       |                                                  |
                        Exit from Menu without                                        |        v            |          |                                                  |
                        change in all cases                                           |  +----------------------+      |                                                  |
                                                                                      |->| Cooling and Heating  |  SW1 |    +-----------------------------------------+   |
                                                                                         |                      |------|--->| Trace msg: Exit from Menu with new value|   |
                                                                                         +----------------------+      |    |                                         |<--|
                                                                                               |            ^          |    +-----------------------------------------+
                                                                                               |SW3         |SW2       |
                                                                                               v            |          |
                                                                                  +-------------------------------+    |
                                                                                  | Cooling and Heating + Reheat  | SW1|
                                                                                  |                               |----|
                                                                                  +-------------------------------+
                                                                                
                                  


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.