cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB55CG Zigbee LED Controller (Color)

vh789
Associate III

Hi,

I have used a custom board with an STM32WB55CG MCU to successfully connect to a Tuya Gateway and also a Homassistent/Zigbee2mqtt setup with the OnOff functionality.

As next topic I wanted to add a color control functionility and tried several optins (Profile ID HA or ZLL) and several functions of the color control cluster (such as step_color_xy or move_to_color_xy).

In my Homassistent, the board was successfully detected (already one step ahead of my trial with Tuya) and the clusters were detected correctly. However, sending any color request from the UI in Homassistent did not work and no command was received on my board (reading the Debug messages with UART), while the OnOff functionality was still there.

Since the UI gives also the option, to send commands directly, I tried to send a command to my endpoint, with the cluster 0x0300 (Color Control) and 0x07/0x09 (move_to/step_color_xy) and an arbitrary payload (Zigbee2mqtt makes sure that the format is correct). Neither of the commands was received by my MCU. Therefore I want to ask for help, if anyone has managed to do this before and if theres an idea of additional debugging, to see wether any message actually reaches the MCU or the problem lays somewhere else.

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions

Hello,

After reviewing your code I made a quick application Server/Client implementing the Color Control Cluster to test its functions, especially step_color_xy command as you mentioned on the post, and it's working as expected. 

Actually the application is based on 2 Nucleo boards, 1 coordinator Client and 2 is a router Server. 

After establishing the connection, you can send a step_color_xy command over the function ZbZclColorClientStepColorXYReq that should be received on the Server side by pressing SW1 button.

For that, I added a callback returning the status of the command and the response, as you can see in the capture below, the response returns 0 ( success) and the callback is received by the server "colorControl_server_1_step_color_xy"

Ouadi_0-1728482475974.png

Please find below Zigbee code source for both Server/Client for test.

Best regards,

Ouadi

View solution in original post

5 REPLIES 5
Ouadi
ST Employee

Hi @vh789,

It seems that you have an issue on the implementation of the cluster on application level, please make sure to define the cluster as a server with all the needed callback to handle the commands received from the client. 

To active the full debug traces, please set the mask of  ZbSetLogging to ZB_LOG_MASK_LEVEL_ALL .

You can also refer the the Application note guide that describes all needed informations to get started with zigbee.

Best regards,

Ouadi

vh789
Associate III

Hi Ouadi,

I believe that I have followed all those steps, but just to be sure, here is what I did:

This is my Configuration in CubeMX:

vh789_0-1728329739129.png

I used this post https://community.st.com/t5/stm32-mcus-wireless/stm32wb55-color-control-cluster-gives-an-assertion-error/td-p/117097 and added 

.capabilities = ZCL_COLOR_CAP_XY

To see which commands are coming, I implemented full functionality to the OnOff functions from the examples and to the functions colorControl_server_1_move_to_color_xy and colorControl_server_1_step_color_xy I added a Uart output each, to understand wether the function was called or not.

If it helps, I can also upload my .ioc or even the complete CubeIDE project. Or do you already see something missing here? As I mentioned, the OnOff functionality works flawless.

Thanks!

vh789
Associate III

Hi Ouadi,

I have also tried to set the ZB_LOG_MASK_LEVEL_ALL. Unfortunately, I still cannot see any received commands regarding the colors in the console.

I also tried a basic level control, which (same as On Off) works fine. So it seems that there is a problem related to color control specifically.

I have attached parts of my project (please ignore the name OnOff).

Thanks

Hello,

After reviewing your code I made a quick application Server/Client implementing the Color Control Cluster to test its functions, especially step_color_xy command as you mentioned on the post, and it's working as expected. 

Actually the application is based on 2 Nucleo boards, 1 coordinator Client and 2 is a router Server. 

After establishing the connection, you can send a step_color_xy command over the function ZbZclColorClientStepColorXYReq that should be received on the Server side by pressing SW1 button.

For that, I added a callback returning the status of the command and the response, as you can see in the capture below, the response returns 0 ( success) and the callback is received by the server "colorControl_server_1_step_color_xy"

Ouadi_0-1728482475974.png

Please find below Zigbee code source for both Server/Client for test.

Best regards,

Ouadi

vh789
Associate III

Hi Ouadi,

thank you for the effort. I have uploaded the server code to my board and tested it.

The result is the same, OnOff commands are received, but nothing regarding the color control.

I will now search for the problem on the Homeassistant side.

Thanks!