This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Scene Extension field sets

Hi.

 

I want to configure a scene when I create it on a node. So I need to use the Extension field sets, described in the ZCL 3.7.2.4.2.1. I see that the stack has a macro named ZB_ZCL_SCENES_INIT_FIELDSET that can be used for that purpose. Has anyone worked with it and can give me a clue on how to actually use it?

 

Additionally I want to be able to read back my scene configuration.

ZCL 3.7.2.5.2.1 describes the payload format for a View Scene Response. The extension field sets are also defined here. In the structure used to parse the ViewSceneResponse from the stack (zb_zcl_scenes_view_scene_res_fixed_size_s) no extension field defined.

Does that mean it really is not included in the response passed from the stack or is it just not handled in the struct?

Or is there any other way to read back these extension field sets?

Best Regards

Lutz

Parents
  • Hi again

    I see that you found the answer to part two, but I wrote our team before I saw this so I'm including their reply to that question as well in case it's helpful to you:

    1. The macro ZB_ZCL_SCENES_INIT_FIELDSET justputs the cluster ID and length of the extension fieldset. After that, you need to input the actual data, so for ON/OFF cluster it would be something like this:

    ZB_ZCL_SCENES_INIT_FIELDSET(cmd_ptr,
                                ZB_ZCL_CLUSTER_ID_ON_OFF,
                                sizeof(zb_uint8_t));
    /* OnOff fieldset data */
    ZB_ZCL_PACKET_PUT_DATA8(cmd_ptr, (zb_uint8_t)ZB_TRUE);

    If another fieldset is to be added, use ZB_ZCL_SCENES_INIT_FIELDSET and add all data that belongs to the fieldset later.

    2. The ZB_ZCL_SCENES_GET_VIEW_SCENE_RES_COMMON has some limitations in what it can parse and zb_zcl_scenes_view_scene_res_fixed_size_t structure has a few other limitations as well. If you want to parse the whole command payload, you would need to write a similar macro that can parse command and create structure to store parsed data. If additional data is present in the command, it can be read.

Reply
  • Hi again

    I see that you found the answer to part two, but I wrote our team before I saw this so I'm including their reply to that question as well in case it's helpful to you:

    1. The macro ZB_ZCL_SCENES_INIT_FIELDSET justputs the cluster ID and length of the extension fieldset. After that, you need to input the actual data, so for ON/OFF cluster it would be something like this:

    ZB_ZCL_SCENES_INIT_FIELDSET(cmd_ptr,
                                ZB_ZCL_CLUSTER_ID_ON_OFF,
                                sizeof(zb_uint8_t));
    /* OnOff fieldset data */
    ZB_ZCL_PACKET_PUT_DATA8(cmd_ptr, (zb_uint8_t)ZB_TRUE);

    If another fieldset is to be added, use ZB_ZCL_SCENES_INIT_FIELDSET and add all data that belongs to the fieldset later.

    2. The ZB_ZCL_SCENES_GET_VIEW_SCENE_RES_COMMON has some limitations in what it can parse and zb_zcl_scenes_view_scene_res_fixed_size_t structure has a few other limitations as well. If you want to parse the whole command payload, you would need to write a similar macro that can parse command and create structure to store parsed data. If additional data is present in the command, it can be read.

Children
Related