Other Parts Discussed in Thread: CC1354P10,
Tool/software:
My device has several endpoints which all have the same on/off function. Starting from the zed_lights example, I have done:
zclGeneral_RegisterCmdCallbacks( HYDRONIC_VALVULES_ENDPOINT1, &zclHydronicController_CmdCallbacks );
zclGeneral_RegisterCmdCallbacks( HYDRONIC_VALVULES_ENDPOINT2, &zclHydronicController_CmdCallbacks2 );
static zclGeneral_AppCallbacks_t zclHydronicController_CmdCallbacks =
{
zclHydronicController_BasicResetCB, // Basic Cluster Reset command
NULL, // Identfiy cmd
NULL, // Identify Query command
zclHydronicController_IdentifyQueryRspCB, // Identify Query Response command
NULL, // Identify Trigger Effect command
#ifdef ZCL_ON_OFF
zclHydronicValvules1_OnOffCB, // On/Off cluster commands
NULL, // On/Off cluster enhanced command Off with Effect
NULL, // On/Off cluster enhanced command On with Recall Global Scene
NULL, // On/Off cluster enhanced command On with Timed Off
#endif
#ifdef ZCL_LEVEL_CTRL
zclHydronicController_LevelControlMoveToLevelCB, // Level Control Move to Level command
zclHydronicController_LevelControlMoveCB, // Level Control Move command
zclHydronicController_LevelControlStepCB, // Level Control Step command
zclHydronicController_LevelControlStopCB, // Level Control Stop command
zclHydronicController_LevelControlMoveToClosestFrequencyCB, // Level Control Stop command
#endif
#ifdef ZCL_GROUPS
NULL, // Group Response commands
#endif
#ifdef ZCL_SCENES
zclHydronicController_SceneStoreCB, // Scene Store Request command
zclHydronicController_SceneRecallCB, // Scene Recall Request command
NULL, // Scene Response command
#endif
#ifdef ZCL_ALARMS
NULL, // Alarm (Response) commands
#endif
#ifdef SE_UK_EXT
NULL, // Get Event Log command
NULL, // Publish Event Log command
#endif
NULL, // RSSI Location command
NULL // RSSI Location Response command
};However, even if endpoint 2 is called, always the function registered for the first endpoint will be called.
Any idea why this could happen? Even if this would work correctly, is there a more elegant way by passing the endpoint as parameter of the callback functions so that I do not need to duplicate functions?
Thank you and regards
Peter
PS: the module is actually CC1354P10 and not CC2652P but when selecting the right module, I cannot post into the ZigBee forum...