cancel
Showing results for 
Search instead for 
Did you mean: 

zcl.scenes.h: ZbZclScenesServerAlloc Callbacks?

BenedictHeyl
Associate II

Hello ST friends!

I'm implementing a dimmable light profile on a STM32WB55, so I need to implement the Scenes cluster. However, when allocating the ScenesServer, I cannot register any callbacks.

How do I receive the Scenes Server commands on my application?

For example, the OnOffServer allocation looks like this (includes a pointer to callbacks):

struct ZbZclClusterT * ZbZclOnOffServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclOnOffServerCallbacksT *callbacks, void *arg);

On the other hand, the ScenesServer allocation looks like this (no callback pointer...)

struct ZbZclClusterT * ZbZclScenesServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, uint8_t maxScenes);

Is it all handled by the ZigBee stack itself and I will receive the callbacks to the OnOff cluster? I will try to test this next, but for this, I will need to implement the ScenesClient first...

Any clues are appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Remi QUINTIN
ST Employee

Scene cluster

Every command defined in Zigbee cluster library is implemented on Scene Server side.

see picture in attachment

Scene commands are handled in Zigbee Middleware and there is no need for callback at application level.

Scene cluster is to be used with Group cluster.

So, you need to allocate it before calling ZbZclScenesServerAlloc.

If you intend to use Scene cluster with OnOff cluster, you shall also allocate OnOff Server cluster before calling ZbZclScenesServerAlloc.

Scene server will apply right OnOff attribute value depending on received Store/Recall commands.

You can then catch OnOff attribute value change at application level adding attribute callback in OnOff attribute list.

View solution in original post

1 REPLY 1
Remi QUINTIN
ST Employee

Scene cluster

Every command defined in Zigbee cluster library is implemented on Scene Server side.

see picture in attachment

Scene commands are handled in Zigbee Middleware and there is no need for callback at application level.

Scene cluster is to be used with Group cluster.

So, you need to allocate it before calling ZbZclScenesServerAlloc.

If you intend to use Scene cluster with OnOff cluster, you shall also allocate OnOff Server cluster before calling ZbZclScenesServerAlloc.

Scene server will apply right OnOff attribute value depending on received Store/Recall commands.

You can then catch OnOff attribute value change at application level adding attribute callback in OnOff attribute list.