Is it possible to Implement dimmer switch using lightness client on CYW20706?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
NiA_4003596
Level 3
Level 3
25 replies posted 10 replies posted 5 replies posted

Hi,

Would anyone please suggest how to implement broadcasting light dimming values using lightness client on CYW20706. I have gone through dimmer demo application written for modbus using level client and server. Kindly clarify the below points to understand better the code.

1. Is it possible to use lightness client to implement dimmer switch? If yes, what are the API functions to broadcast message to other server nodes, consider provisioning through mobile app.

2. In WICED 6.2, I could find wiced_bt_mesh_model_level_client_send_set is the only API function available in level client to send message not wiced_bt_mesh_model_level_client_set as in dimmer switch demo. What is the p_event argument value for wiced_bt_mesh_model_level_client_send_set in level client, which acts as gateway or switch, to send messages to other server nodes, consider provisioning through mobile app.

A brief about my project, I plan to implement smart street light solution using one client, which act as gateway, to broadcast dimming value to other lightness server node. Please suggest if you have any better sloution.

0 Likes
1 Solution
DheerajPK_41
Moderator
Moderator
Moderator
750 replies posted 500 likes received 500 replies posted

Hi,

It is possible to create a client application using lightness_client model to control lightness_server device.

But, for implementing your project for street lights, I believe dimmer and light_dimmable applications are sufficient, unless you want to use all the features and messages defined in light_lightness model. Please check the spec https://www.bluetooth.com/specifications/mesh-specifications/​.

Here, Dimmer app implements WICED_BT_MESH_MODEL_LEVEL_CLIENT model and light_dimmable app implements WICED_BT_MESH_MODEL_LIGHT_LIGHTNESS_SERVER model (It also implements all the dependent and mandatory models as per mesh spec). Since Light Lightness Actual state is bound to Generic Level state, we will be able to control the light (LED) associated with the light_dimmable app.

The latest Modustoolbox supports CYW20706 also. I would suggest you to migrate to Modustoolbox and continue developing your application.

FYI.

wiced_bt_mesh_model_level_client_set is another API to create appropriate mesh event and send the level_set message to the destination. This API is available from WICD6.4 onward. Please check wiced_bt_mesh_models.h for the description of wiced_bt_mesh_model_level_client_send_set API.

Please let me know if you have questions.

Thanks,

-Dheeraj

View solution in original post

0 Likes
4 Replies
DheerajPK_41
Moderator
Moderator
Moderator
750 replies posted 500 likes received 500 replies posted

Hi,

It is possible to create a client application using lightness_client model to control lightness_server device.

But, for implementing your project for street lights, I believe dimmer and light_dimmable applications are sufficient, unless you want to use all the features and messages defined in light_lightness model. Please check the spec https://www.bluetooth.com/specifications/mesh-specifications/​.

Here, Dimmer app implements WICED_BT_MESH_MODEL_LEVEL_CLIENT model and light_dimmable app implements WICED_BT_MESH_MODEL_LIGHT_LIGHTNESS_SERVER model (It also implements all the dependent and mandatory models as per mesh spec). Since Light Lightness Actual state is bound to Generic Level state, we will be able to control the light (LED) associated with the light_dimmable app.

The latest Modustoolbox supports CYW20706 also. I would suggest you to migrate to Modustoolbox and continue developing your application.

FYI.

wiced_bt_mesh_model_level_client_set is another API to create appropriate mesh event and send the level_set message to the destination. This API is available from WICD6.4 onward. Please check wiced_bt_mesh_models.h for the description of wiced_bt_mesh_model_level_client_send_set API.

Please let me know if you have questions.

Thanks,

-Dheeraj

0 Likes

Thank you for sharing the information. i will get back to you for further queries after exploring WICED 6.4 and modbus.

0 Likes

Hi,

I have tried wiced_bt_mesh_model_light_lightness_client_send_set to send messages to other server node but could not find proper p_event argument value, so it failed. What is the light lightness client's API function to send messages to light lightness server?

0 Likes

Hi,

I would suggest you to go through the light_lightness snip applications, an implementation of light lightness mesh model.

mesh_light_lightness_client

mesh_light_lightness_server

Thanks,

-Dheeraj