Open ghost opened 1 year ago
Looks like you are using the bridge-app from upstream connectedhomeip
repo. For level control cluster, we must call MatterLevelControlPluginServerInitCallback before enabling the dynamic endpoint to make the cluster work.
If you use APIs from esp-matter-bridge this PluginServerInit Callback will be call in plugin_init_callback_endpoin and the dimmable-light can be create with create_device.
@wqx6 I'm using bridge-app examples from here, where we don't have any matter related file includes in it. When I try to add the header files it throws the error as No such file or directory
any reference docs for the matter bridge?
I'm using bridge-app examples from here.
In that example, you should call You should call MatterLevelControlPluginServerInitCallback()
after you call Esp32AppServer::Init()
to use the LevelControl Cluster in Dynamic endpoint.emberAfLevelControlClusterServerInitCallback()
after you enable the dynamic endpoint with emberAfEndpointEnableDisable()
.
any reference docs for the matter bridge?
9.12. Bridge for non-Matter devices in SPEC might help you
Could you share the location of the file where the MatterLevelControlPluginServerInitCallback() function exist.
Sorry for the wrong reply. I have changed the function in the last comment. emberAfLevelControlClusterServerInitCallback() is in connectedhomeip/src/app/clusters/level-control.cpp
The DECLARE_DYNAMIC_CLUSTER
doesn't include the init function so the cluster initialization function is not called for the dynamic endpoint, that's why the level control cluster doesn't work on dynamic endpoint.
@wqx6 initialized the function, but doesn't seems like the level control cluster works. still the write callback is not called and the level cluster is not handled. if (emAfMatchAttribute(cluster, am, attRecord))// this condition is getting failed.
initializtion of the function:
endpoint_index=AddDeviceEndpoint(&gLight[array_index],&bridgedDimmableLightEndpoint, Span
The input of emberAfLevelControlClusterServerInitCallback
is endpoint ID, not endpoint index.
named the variable as endpoint_index, but passing the endpoint only. Is there anything that need to be updated in the ZAP config for the clusters and attributes.
@wqx6 The logs are as this when the level functions are not being called. I tried calling the function emberAfLevelControlClusterServerInitCallback(), but no use. How do I get the level cluster related callbacks. level_bridge.txt
I'm using esp-idf: v4.4.3 Matter: release/v1.0 When ever I change the level in the dimmer through alexa the level cluster is not being called. Tried the above configurations as suggested but still getting the same issue.
bridge-level-control.txt Could you apply this patch to your example? I tested and the external write callback was called when I sent the movetolevel command to the endpoint.
In the bridge-app It is given for the on /off light where I need to integrate the Dimmer instead on on/off light. Does bridge-app example support Dimmers. The changes made for Dimmer: dimmer_changes.txt with these changes I observed that:
Kindly share the resources if available.