Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temperature Control Cluster write attribute invalid type (CON-1458) #1195

Closed
algo-techai opened this issue Dec 6, 2024 · 2 comments
Closed

Comments

@algo-techai
Copy link

Bug Description

When attempting to write the TargetTemperature attribute of the Temperature Control cluster for a refrigerator device with two temperature-controlled cabinets, the attribute is reported as an invalid type during the write operation.

  • Expected Behavior: The TargetTemperature attribute value should be updated to the provided value (e.g., 260) as per the CHIP specification.
  • Actual Behavior: The write operation reports an "invalid type" for the TargetTemperature attribute, with a value type of 0 (unknown) in the logs.

Steps to Reproduce

  1. Create a Temperature Controlled Cabinet device with the following configuration:

    temperature_controlled_cabinet::config_t fridge_temperature_controlled_cabinet_config;
    fridge_temperature_controlled_cabinet_config.temperature_control.temperature_number.temp_setpoint = 500;
    fridge_temperature_controlled_cabinet_config.temperature_control.temperature_number.min_temperature = 200;
    fridge_temperature_controlled_cabinet_config.temperature_control.temperature_number.max_temperature = 800;
    fridge_temperature_controlled_cabinet_config.temperature_control.temperature_level.selected_temp_level = 0;
    
    endpoint_t *fridge_cabinet_endpoint = temperature_controlled_cabinet::create(node, &fridge_temperature_controlled_cabinet_config, ENDPOINT_FLAG_NONE, NULL);
    esp_matter::cluster::temperature_measurement::config_t fridge_temperature_measurement_config;
    fridge_temperature_measurement_config.measured_value = 500;
    fridge_temperature_measurement_config.min_measured_value = 200;
    fridge_temperature_measurement_config.max_measured_value = 800;
    
    esp_matter::cluster::temperature_measurement::create(fridge_cabinet_endpoint, &fridge_temperature_measurement_config, CLUSTER_FLAG_SERVER);
    
    cluster_t *fridge_temperature_control_cluster = cluster::get(fridge_cabinet_endpoint, chip::app::Clusters::TemperatureControl::Id);
    esp_matter::cluster::temperature_control::feature::temperature_number::add(fridge_temperature_control_cluster, &(fridge_temperature_controlled_cabinet_config.temperature_control.temperature_number));
  2. Use the chip-tool to send the set-temperature command:

    temperaturecontrol set-temperature 0x7283 0x2 --TargetTemperature 260
    
  3. Observe the device logs for errors.


Observed Logs

  • Write operation on the TargetTemperature attribute reports the following:

    I (50456) esp_matter_attribute: ********** W : Endpoint 0x0002's Cluster 0x00000056's Attribute 0x00000000 is <invalid type: 0> **********
    I (50476) app_main: Attribute update callback: type: 0, endpoint_id: 0x2, cluster_id: 0x56, attribute_id: 0x0, val_type: 0
    
  • Despite the error, subsequent reads show that the value is correctly updated:

    I (50606) esp_matter_attribute: ********** R : Endpoint 0x0002's Cluster 0x00000056's Attribute 0x00000000 is 260 **********
    

Environment

  • ESP-Matter Commit ID: 21c2051

  • ESP-IDF Commit ID: c9763f62dd (idf version 5.2.3)

  • SoC: ESP32-S3

  • Host Machine OS: macOS 15.0

  • Host Machine Python Version: 3.13.0

  • Commissioner App and Version: chip-tool

  • Commissioner's Logs: [Attach logs if available]

[1733509110.492] [77957:36220198] [TOO] Command: temperaturecontrol set-temperature 0x7283 0x2 --TargetTemperature 260 
[1733509110.493] [77957:37205455] [TOO] Sending command to node 0x7283
[1733509110.494] [77957:37205455] [CSM] FindOrEstablishSession: PeerId = [1:0000000000007283]
[1733509110.494] [77957:37205455] [CSM] FindOrEstablishSession: No existing OperationalSessionSetup instance found
[1733509110.494] [77957:37205455] [DIS] Found an existing secure session to [1:0000000000007283]!
[1733509110.494] [77957:37205455] [DIS] OperationalSessionSetup[1:0000000000007283]: State change 1 --> 5
[1733509110.494] [77957:37205455] [TOO] Sending cluster (0x00000056) command (0x00000000) on endpoint 2
[1733509110.495] [77957:37205455] [DMG] ICR moving to [AddingComm]
[1733509110.496] [77957:37205455] [DMG] ICR moving to [AddedComma]
[1733509110.496] [77957:37205455] [EM] <<< [E:33626i S:33154 M:212326524] (S) Msg TX from 000000000001B669 to 1:0000000000007283 [3345] [UDP:[fe80::f29e:9eff:fe22:97c8%en0]:5540] --- Type 0001:08 (IM:InvokeCommandRequest) (B:63)
[1733509110.496] [77957:37205455] [EM] ??1 [E:33626i S:33154 M:212326524] (S) Msg Retransmission to 1:0000000000007283 in 639ms [State:Idle II:500 AI:300 AT:4000]
[1733509110.496] [77957:37205455] [DMG] ICR moving to [AwaitingRe]
[1733509110.946] [77957:37205455] [EM] >>> [E:33626i S:33154 M:105859678 (Ack:212326524)] (S) Msg RX from 1:0000000000007283 [3345] to 000000000001B669 --- Type 0001:09 (IM:InvokeCommandResponse) (B:90)
[1733509110.946] [77957:37205455] [EM] Found matching exchange: 33626i, Delegate: 0x7ff2c9010918
[1733509110.946] [77957:37205455] [EM] Rxd Ack; Removing MessageCounter:212326524 from Retrans Table on exchange 33626i
[1733509110.946] [77957:37205455] [DMG] ICR moving to [ResponseRe]
[1733509110.946] [77957:37205455] [DMG] InvokeResponseMessage =
[1733509110.946] [77957:37205455] [DMG] {
[1733509110.946] [77957:37205455] [DMG]         suppressResponse = false, 
[1733509110.946] [77957:37205455] [DMG]         InvokeResponseIBs =
[1733509110.946] [77957:37205455] [DMG]         [
[1733509110.946] [77957:37205455] [DMG]                 InvokeResponseIB =
[1733509110.946] [77957:37205455] [DMG]                 {
[1733509110.946] [77957:37205455] [DMG]                         CommandStatusIB =
[1733509110.946] [77957:37205455] [DMG]                         {
[1733509110.946] [77957:37205455] [DMG]                                 CommandPathIB =
[1733509110.946] [77957:37205455] [DMG]                                 {
[1733509110.946] [77957:37205455] [DMG]                                         EndpointId = 0x2,
[1733509110.946] [77957:37205455] [DMG]                                         ClusterId = 0x56,
[1733509110.947] [77957:37205455] [DMG]                                         CommandId = 0x0,
[1733509110.947] [77957:37205455] [DMG]                                 },
[1733509110.947] [77957:37205455] [DMG] 
[1733509110.947] [77957:37205455] [DMG]                                 StatusIB =
[1733509110.947] [77957:37205455] [DMG]                                 {
[1733509110.947] [77957:37205455] [DMG]                                         status = 0x00 (SUCCESS),
[1733509110.947] [77957:37205455] [DMG]                                 },
[1733509110.947] [77957:37205455] [DMG] 
[1733509110.947] [77957:37205455] [DMG]                         },
[1733509110.947] [77957:37205455] [DMG] 
[1733509110.947] [77957:37205455] [DMG]                 },
[1733509110.947] [77957:37205455] [DMG] 
[1733509110.947] [77957:37205455] [DMG]                 InvokeResponseIB =
[1733509110.947] [77957:37205455] [DMG]                 {
[1733509110.947] [77957:37205455] [DMG]                         CommandStatusIB =
[1733509110.947] [77957:37205455] [DMG]                         {
[1733509110.947] [77957:37205455] [DMG]                                 CommandPathIB =
[1733509110.947] [77957:37205455] [DMG]                                 {
[1733509110.947] [77957:37205455] [DMG]                                         EndpointId = 0x2,
[1733509110.947] [77957:37205455] [DMG]                                         ClusterId = 0x56,
[1733509110.947] [77957:37205455] [DMG]                                         CommandId = 0x0,
[1733509110.947] [77957:37205455] [DMG]                                 },
[1733509110.947] [77957:37205455] [DMG] 
[1733509110.947] [77957:37205455] [DMG]                                 StatusIB =
[1733509110.947] [77957:37205455] [DMG]                                 {
[1733509110.947] [77957:37205455] [DMG]                                         status = 0x00 (SUCCESS),
[1733509110.947] [77957:37205455] [DMG]                                 },
[1733509110.948] [77957:37205455] [DMG] 
[1733509110.948] [77957:37205455] [DMG]                         },
[1733509110.948] [77957:37205455] [DMG] 
[1733509110.948] [77957:37205455] [DMG]                 },
[1733509110.948] [77957:37205455] [DMG] 
[1733509110.948] [77957:37205455] [DMG]         ],
[1733509110.948] [77957:37205455] [DMG] 
[1733509110.948] [77957:37205455] [DMG]         InteractionModelRevision = 11
[1733509110.948] [77957:37205455] [DMG] },
[1733509110.948] [77957:37205455] [DMG] Received Command Response Status for Endpoint=2 Cluster=0x0000_0056 Command=0x0000_0000 Status=0x0
[1733509110.948] [77957:37205455] [DMG] Received Command Response Status for Endpoint=2 Cluster=0x0000_0056 Command=0x0000_0000 Status=0x0

Additional Details

  • The TargetTemperature attribute is configured as part of the temperature_number feature of the Temperature Control cluster.
  • The step value for the temperature was not added during the endpoint setup. Even if it was added, it gives the same bug

@github-actions github-actions bot changed the title Temperature Control Cluster write attribute invalid type Temperature Control Cluster write attribute invalid type (CON-1458) Dec 6, 2024
@jadhavrohit924
Copy link
Contributor

@algo-techai Thanks for the report. We will fix it.

@algo-techai
Copy link
Author

@jadhavrohit924 Any Updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants