Skip to content

microwave_oven endpoint have two instance of operational_state and mode_base (CON-1752) #1486

@ehsanziyaee

Description

@ehsanziyaee

Describe the bug
As we know, in the esp_matter_delegate_callbacks namespace, there has been an attempt to connect the CHIP clusters delegate class to the ESP-Matter clusters. In MicrowaveOvenControlDelegateInitCB, two instances—one for ModeBase and one for OperationalState—have been created again, even though their corresponding instance classes were already initialized in OperationalStateDelegateInitCB and InitModeDelegate.

This duplication of instance creation leads to a mismatch in behavior: some commands issued by ChipTool operate on one instance (e.g., reading the OperationalState attribute), while others operate on a different instance (e.g., handling the start or stop commands).

Specifically, the read command retrieves data from the instance created in OperationalStateDelegateInitCB, while state change commands are handled by the instance created in MicrowaveOvenControlDelegateInitCB.

This issue was confirmed by inspecting the operational-state-server.cpp implementation in CHIP and printing the memory addresses of both the instance and delegate. We observed that different commands accessed different instance pointers, proving the existence of this inconsistency.

Environment

  • ESP-Matter Commit Id: (main branch v1.4)

  • ESP-IDF Commit Id: (v5.4.2)

  • SoC (eg: ESP32 or ESP32-C3): (ESP-S3)

  • Device Logs (Please attach the log file):

  • Host Machine OS: Ubuntu 24.04

  • Host Machine Python version: 3.12.3

  • Commissioner app and versions if present:

  • Home hub app and versions if present:

  • Commissioner's logs if present:

Any additional details
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions