Page 1 of 1

Define Matter PhaseList in Operational State cluster of Dish Washer Endpoint

Posted: Fri Jun 13, 2025 3:14 pm
by tomasmcguinness
I am trying to understand how to configure the Operational State cluster on a Dishwasher Endpoint.

I can see that an operations state cluster is created when the dish_washer::add method is called

Code: Select all

operational_state::create(endpoint, &(config->operational_state), CLUSTER_FLAG_SERVER);
I have tried to fetch the cluster and attribute

Code: Select all

cluster_t *operational_state_cluster = cluster::get(endpoint, OperationalState::Id);
esp_matter::attribute_t *phase_list_attr = esp_matter::attribute::get(operational_state_cluster, chip::app::Clusters::OperationalState::Attributes::PhaseList::Id);
but I'm uncertain how to create and set the phase list.

I tried this:

Code: Select all

uint8_t phase_list[] = { 0x00, 0x01, 0x02 };

esp_matter::attribute::set_val(phase_list_attr, &phase_val);

but that results in this error:

esp_matter_core: set_val(1098): Attribute is not managed by esp matter data model

The phase list attribute is also supposed to be strings, but I don't know how to use the uint8_t type with string values.

There don't appear to be any examples of this. Can anyone help?

Re: Define Matter PhaseList in Operational State cluster of Dish Washer Endpoint

Posted: Mon Jun 16, 2025 4:14 pm
by tomasmcguinness
I made some progress with this.

I created an implementation of the Delegate, as described in the Matter SDK. This means that the Phase List and Operational Status attributes can be read successfully.

However, when I try to sent a Start command, I get an error: 0x81 Unsupported_Command.

Re: Define Matter PhaseList in Operational State cluster of Dish Washer Endpoint

Posted: Tue Jun 17, 2025 10:55 am
by tomasmcguinness
To resolve this, I needed to add the commands to the cluster. I think that's because the commands are optional.

Code: Select all

esp_matter::cluster_t *operational_state_cluster = esp_matter::cluster::get(endpoint, chip::app::Clusters::OperationalState::Id);
esp_matter::cluster::operational_state::command::create_start(operational_state_cluster);
esp_matter::cluster::operational_state::command::create_stop(operational_state_cluster);
esp_matter::cluster::operational_state::command::create_pause(operational_state_cluster);
esp_matter::cluster::operational_state::command::create_resume(operational_state_cluster);
Once I made that change, the various callbacks get invoked as expected.