This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Cluster List for Thermostat Sample

Other Parts Discussed in Thread: Z-STACK

Hi all,

I have question about Thermostat Sample from ZigBee Home Automation profile.

If I understand relation correctly: Temperature sensor sends to Thermostat value of temperature. It reads that value and accordingly to it sends on/off command to Heating-Cooling unit:

Sensor ---> Thermostat --->Heating/Cooling Unit

I assume that my understanding is properly. If so, the Heating-Cooling Unit only receives data and not resend it - just turns on or turns off according to read value. There should be a ZCL_CLUSTER_ID_HVAC_THERMOSTAT in OutClusterList in the simpledescriptor. 

Indeed it is, when you look at an old version of zstack  - for example you can check it here:

http://processors.wiki.ti.com/index.php/Thermostat_Sample

But in the latest version of zstack, ZCL_CLUSTER_ID_HVAC_THERMOSTAT is located in InClusterList:

const cId_t zclSampleHeatingCoolingUnit_InClusterList[ZCLSAMPLEHEATINGCOOLINGUNIT_MAX_INCLUSTERS] =
{
  ZCL_CLUSTER_ID_GEN_BASIC,
  ZCL_CLUSTER_ID_GEN_IDENTIFY,
  ZCL_CLUSTER_ID_GEN_ON_OFF,
  ZCL_CLUSTER_ID_HVAC_THERMOSTAT
};

#define ZCLSAMPLEHEATINGCOOLINGUNIT_MAX_OUTCLUSTERS       1
const cId_t zclSampleHeatingCoolingUnit_OutClusterList[ZCLSAMPLEHEATINGCOOLINGUNIT_MAX_OUTCLUSTERS] =
{
  ZCL_CLUSTER_ID_GEN_BASIC
};

Why so? Does Heating-Cooling Unit receive data for now?

  • If you take a closer look in the TI wiki, you should find ZCL_CLUSTER_ID_HVAC_THERMOSTAT should be put in zclSampleThermostat_InClusterLis of Thermostat device. For Heating and Cooling device, ZCL_CLUSTER_ID_HVAC_THERMOSTAT should be put in zclSampleHCUnit_OutClusterList. I think you mix up Thermostat and Heating and Cooling device. They are different.

  • YiKai Chen said:
    ZCL_CLUSTER_ID_HVAC_THERMOSTAT should be put in zclSampleThermostat_InClusterLis of Thermostat device. For Heating and Cooling device, ZCL_CLUSTER_ID_HVAC_THERMOSTAT should be put in zclSampleHCUnit_OutClusterList.

    They are in the TI wiki. But, if you take a look at the newest Z-Stack Home 1.2.2a, the ZCL_CLUSTER_ID_HVAC_THERMOSTAT is put in InClusterList. Heating and Cooling device configuration looks like this:

    #define ZCLSAMPLEHEATINGCOOLINGUNIT_MAX_INCLUSTERS       4
    const cId_t zclSampleHeatingCoolingUnit_InClusterList[ZCLSAMPLEHEATINGCOOLINGUNIT_MAX_INCLUSTERS] =
    {
      ZCL_CLUSTER_ID_GEN_BASIC,
      ZCL_CLUSTER_ID_GEN_IDENTIFY,
      ZCL_CLUSTER_ID_GEN_ON_OFF,
      ZCL_CLUSTER_ID_HVAC_THERMOSTAT
    };
    
    #define ZCLSAMPLEHEATINGCOOLINGUNIT_MAX_OUTCLUSTERS       1
    const cId_t zclSampleHeatingCoolingUnit_OutClusterList[ZCLSAMPLEHEATINGCOOLINGUNIT_MAX_OUTCLUSTERS] =
    {
      ZCL_CLUSTER_ID_GEN_BASIC
    };

  • After checking ZIgbee HA profile spec, I find ZCL_CLUSTER_ID_HVAC_THERMOSTAT should be put in zclSampleHeatingCoolingUnit_InClusterList. I suppose TI wiki gives wrong information.
  • Hmm, so could you tell me if I understand this mechanism properly:

    Temperature sensor sends data (temperature value) to Thermostat, so ZCL_CLUSTER_ID_MS_TEMPERATURE_MEASUREMENT is put in InClusterList for Sample Temperature sensor device and in OutClusterList for Thermostat device. Sensor is the data server in this case and the Thermostat is the client on this cluster. I understand this configuration, it's clear for me. 

    Now relation between Thermostat and Heating/Cooling Unit. In this situation Thermostat sends data to Unit, isn't it? So the Thermostat is the data server and Unit is the client on this cluster, right?

    So why should ZCL_CLUSTER_ID_HVAC_THERMOSTAT be put in zclSampleHeatingCoolingUnit_InClusterList? Heating/Cooling Unit receives the data, not send.

  • You can refer to the discussions in e2e.ti.com/.../343150
  • I know that thread, it helped me to understand mechanism of input/output clusters. But I cannot find answer for my question there.

    So, in this example of sample temperature, the IN cluster list contains MS_TEMP, so zclEZModeInvokeData.Inclusters contains MS_TEMP so that it can find a matching node with MS_TEMP defined in the OUT CLUSTER, which is the thermostat node. In this case, the temp sensor is the data server, and the thermostat is the client on this cluster. 

    I agree. If device sends data, you put its cluster to OutClusterList of device, if it receives data, you put its cluster to InClusterList to find a matching node. 

    And the same for the matching between thermostat and heating cooling unit.

    Actually it's not. Heating/Cooling Unit receives data and you told me that its cluster should be put in InClusterList. WHY?

    Could you refer to my previous post?

  • Yikai, are you able to answer to my question?
  • What do you mean Heating/Cooling Unit receives data?

  • I mean that Heating/Cooling Unit receives data from Thermostat device.

    from TI wiki:

    Heating/Cooling Unit has the ability to receive the report command sent by the thermostat device and decide whether to enter heating or cooling mode based on the temperature value reported.

    What about this sentence:

     If device sends data, you put its cluster to OutClusterList of device, if it receives data, you put its cluster to InClusterList to find a matching node. 

    Is it correct? If it is, why should ZCL_CLUSTER_ID_HVAC_THERMOSTAT be put in zclSampleHeatingCoolingUnit_InClusterList, since Heating/Cooling Unit receives the data, not send?

  • In Z-Stack Home 1.2.2a, SampleHeatingCoolingUnit only receive ZCL_CLUSTER_ID_HVAC_THERMOSTAT messages so ZCL_CLUSTER_ID_HVAC_THERMOSTAT is put in InClusterList. I don't see any problem on this, right?
  • According to that, if SampleTemperatureSensorDevice only sends ZCL_CLUSTER_ID_MS_TEMPERATURE_MEASUREMENT message, why it is put in InClusterList? The same analogy.

  • In SampleTemperatureSensor example, ZCL_CLUSTER_ID_MS_TEMPERATURE_MEASUREMENT is put in inCluster.
  • YiKai, I'm sorry, but I get the impression that you don't read my posts.

    YiKai Chen said:
    In SampleTemperatureSensor example, ZCL_CLUSTER_ID_MS_TEMPERATURE_MEASUREMENT is put in inCluster.

    Okay, it's correct. SampleTemperatureSensorDevice sends ZCL_CLUSTER_ID_MS_TEMPERATURE_MEASUREMENT message to Thermostat device, so it is put in inCluster. If I want to send data I put its cluster to InCluster, right? 

    YiKai Chen said:
    SampleHeatingCoolingUnit only receive ZCL_CLUSTER_ID_HVAC_THERMOSTAT messages so ZCL_CLUSTER_ID_HVAC_THERMOSTAT is put in InClusterList.

    SampleHeatingCoolingUnit receives data from Thermostat device. So why ZCL_CLUSTER_ID_HVAC_THERMOSTAT is also put in inCluster? This is my question.

  • I would use temperature cluster to explain to you again. If you have to provide attributes of temperature cluster to read by other nodes, you have to put temperature cluster to inCluster. If your device can report temperature data, you have to put temperature cluster to outCluster to let other node knows it can report temperature data.
  • YiKai Chen said:
    If you have to provide attributes of temperature cluster to read by other nodes, you have to put temperature cluster to inCluster.

    If your device can report temperature data, you have to put temperature cluster to outCluster to let other node knows it can report temperature data.

    Could you explain me what's the difference between these?

    If I understand it properly - there're two states:

    1) device sends data (then it's data server)

    2) device receives data (it's data client)

    What's the difference between  a) providing attributes cluster to read by others and b) reporting data to announce others that device can do that? Both are 1) state - device sends data, right?

  • Maybe it's not clear to use Thermostat and temperature sensor as examples to explain this. I would use SampleLight and SampleSwitch to explain this again. In SampleSwitch, the purpose of it is to send ON/OFF/Toggle command to a SampleLight. This is what I said this device would send command to another device. If you have a look at outCluster in SampleSwitch, ZCL_CLUSTER_ID_GEN_ON_OFF is listed on outCluster. For SampleLight, it is for receive ON/OFF command. Or other node can read ON/OFF status from SampleLight. If you have a look at inCluster in SampleSwitch, ZCL_CLUSTER_ID_GEN_ON_OFF is listed on inCluster which means it provide server for ZCL_CLUSTER_ID_GEN_ON_OFF. If you still don't get it, you can just follow Zigbee HA spec to know whether you should put a cluster in inCluser (server side) or outCluster (client side).