espressif / esp-matter

Espressif's SDK for Matter
Apache License 2.0
663 stars 155 forks source link

ON_OFF Cluster (CON-1178) #945

Open RoootNoodle opened 4 months ago

RoootNoodle commented 4 months ago

I am trying to create a custom cluster as shown by the guide https://docs.espressif.com/projects/esp-matter/en/latest/esp32/developing.html#defining-your-own-data-model . But the on-off config_t is not recognize, am I missing an include or how can this be fixed? Screenshot from 2024-06-01 10-20-32

jonsmirl commented 4 months ago

Are you using the namespaces?

using namespace esp_matter;
using namespace esp_matter::attribute;
using namespace esp_matter::endpoint;
using namespace esp_matter::cluster;
RoootNoodle commented 4 months ago

Just needed to add the cluster namespace, thanks.

Why would adding a custem cluster change the icon to a light? Is there a way to set the icon to something else?

jadhavrohit924 commented 4 months ago

Is there a way to set the icon to something else?

No, ~by default every ecosystem identifies every device as light only and at the time of commissioning based on endpoint composition ecosystem identify and create particular device types.~

RoootNoodle commented 4 months ago

The end point is defined as on of light, without adding a custom on of cluster, the icon is different from when the custom cluster is added. Why would this be, since the endpoint did not change?

jadhavrohit924 commented 4 months ago

What was the old icon and what new icon? Please attached some snapshots. What custom cluster you have added?

RoootNoodle commented 4 months ago

image

On the right is a on_off_switch endpoint with no custom clusters configure, on the left is when a on_off cluster was added to the endpoint. How do I prevent it from changing?

The endpoint and cluster was created as stated in the documents as specified in the first comment. Also visible in the image below. The uncommented part is to add the cluster, which then changes the icon to a light.

image

jadhavrohit924 commented 4 months ago

@RoootNoodle This should not happen. We are looking into the issue.

jonsmirl commented 4 months ago

What app is that screen shot from?

RoootNoodle commented 4 months ago

ESP-Rainmaker app