Other Parts Discussed in Thread: Z-STACK, SIMPLELINK-CC13X2-26X2-SDK
AFAICS, the sample applications only use the zclGeneral_RegisterCmdCallbacks function and therefore none of the other cluster implementations available in the ZSTACK3.0.2 code.
The Thermostat implementation could have used the zclHVAC_RegisterCmdCallbacks() method for instance.
I've looked through tthe documatation, I could not find a lot of information about this. At best, the generic app example says:
// GENERICAPP_TODO: Register other cluster command callbacks her
As I didn not notice this previously, I have used the SampleThermostat as example.
In the sample Thermostat App the temperature setpoints are provided by usint the LCD+UI Key interface, but I am using Zigbee commands.
When the setpoint changes, it is useful to get notifiied about that change.
I expected the SYS_EVENT_MSG / ZCL_INCOMING_MSG to help me with this.
while I can send an updated setpoint temperature to the application (see sniffer log below), and see this change in the application variable associated with the attribute value, my breakpoints do not trigger on SYS_EVENT_MSG / ZCL_INCOMING_MSG .
ZigBee Cluster Library Frame, Command: Write Attributes, Seq: 249
Frame Control Field: Profile-wide (0x00)
.... ..00 = Frame Type: Profile-wide (0x0)
.... .0.. = Manufacturer Specific: False
.... 0... = Direction: Client to Server
...0 .... = Disable Default Response: False
Sequence Number: 249
Command: Write Attributes (0x02)
Attribute Field, Int16: 2500
Attribute: OccupiedHeatingSetpoint (0x0012)
Data Type: 16-Bit Signed Integer (0x29)
Int16: 2500
Questions:
- When not using the *_RegisterCmdCallbacks, how can I make sure that the application is notified about attribute changes?
- Can the *_RegisterCmdCallbacks be used (outside the ZNP, etc)?
- What should I be careful about when using them?
- Do I need to add all the attributes that they potentially use?
- Are there any expectations about the READ/WRITE/REPORTABLE/GLOBAL configuration of the attributes, or are those configuration strictly respected?
- Is attribute change notification different when using the *_RegisterCmdCallbacks, ?
- Are the attribute values stored and retrieved from NV when using the *_RegisterCmdCallbacks ?
For instance, when the Heating setpoint changed, is it recoverd after startup? What about the localTemperature? - Anything else? Documentation?