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

energy-management-app: refactor WH and EVSE into separate endpoints and fix conformance issues #36201

Merged
merged 28 commits into from
Nov 27, 2024

Conversation

soares-sergio
Copy link
Contributor

@soares-sergio soares-sergio commented Oct 22, 2024

This PR refactors the energy-management-app into 2 separate endpoints
(EP1 for EVSE and EP2 for WaterHeater) and fixes almost all of the device conformance issues.

Main contributions from this PR:

  • TC_DeviceBasicComposition.py failed on this app before this PR and now passes.
  • TC_DeviceConformance.py failed more than 13 tests for each app and now only fails one for evse and two for water-heater.

Changes:

  • Split Water Heater and EVSE into two separate endpoints (1 and 2).
  • Dynamically disable unused endpoint at runtime. Based on the app choice
    (command line argument on linux [evse of water-heater] or #define in ESP32 or SIlabs).
    • For example, for Water Heater, initialize clusters on endpoint 2 and
      disable endpoint 1 (EVSE).
  • Refactor/move the cluster init code related to ElectricalSensor (PowerTopology, EPM and EEM) and DEM out of evse and into a common directory that can be shared between EVSE and WaterHeater.
  • Fix many conformance issues:
    • Bump outdated cluster revisions
    • Fix feature map bits
    • Fix device description for each endpoint
    • Remove extra clusters
    • Move PowerSource from EP0 to EP1
    • When using evse, only unitialize evse related clusters. Same for WaterHeater
  • Update TC_WHM_xyz test scripts to use the correct endpoint passed in as argument

Tests performed:

  1. Check basic composition for EVSE:
scripts/run_in_python_env.sh out/python_env './scripts/tests/run_python_test.py --app ./out/linux-x64-energy-management-no-ble/chip-energy-management-app --app-args "--application evse --trace-to json:log" --script src/python_testing/TC_DeviceBasicComposition.py --script-args "--qr-code MT:-24J0AFN00KA0648G00"'
  1. Check basic composition for WaterHeater:
scripts/run_in_python_env.sh out/python_env './scripts/tests/run_python_test.py --app ./out/linux-x64-energy-management-no-ble/chip-energy-management-app --app-args "--application water-heater --trace-to json:log" --script src/python_testing/TC_DeviceBasicComposition.py --script-args "--qr-code MT:-24J0AFN00KA0648G00"'
  1. Check evse app against TC_EEVSE_2_6.py:
rm -f evse.bin; ./out/linux-x64-energy-management-no-ble/chip-energy-management-app --enable-key 000102030405060708090a0b0c0d0e0f --KVS evse.bin --featureSet 0x3d

python src/python_testing/TC_EEVSE_2_6.py --endpoint 1 -m on-network -n 1234 -p 20202021 -d 3840 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f
  1. Verified it builds for esp32, silabs and linux.
  2. Verified all-clusters-app builds
  3. Verified TC_WHM_1_2 and TC_WHM_2_1

EVSE app Conformance failures before this PR:

chip-energy-management-app,"  Problem: ProblemSeverity.ERROR
  test_name: IDM-10.3
  location:
  Endpoint: 0,
  Cluster:  40 (0x28) BasicInformation
  Attribute:65533 (0xfffd)
  problem: Revision found on cluster (3) does not match revision listed in the spec (4)"
chip-energy-management-app,"  Problem: ProblemSeverity.ERROR
  test_name: IDM-10.3
  location:
  Endpoint: 0,
  Cluster:  47 (0x2f) PowerSource
  Attribute:65533 (0xfffd)
  problem: Revision found on cluster (2) does not match revision listed in the spec (3)"
chip-energy-management-app,"  Problem: ProblemSeverity.ERROR
  test_name: IDM-10.3
  location:
  Endpoint: 0,
  Cluster:  48 (0x30) GeneralCommissioning
  Attribute:65533 (0xfffd)
  problem: Revision found on cluster (1) does not match revision listed in the spec (2)"
chip-energy-management-app,"  Problem: ProblemSeverity.ERROR
  test_name: IDM-10.3
  location:
  Endpoint: 1,
  Cluster:  3 (0x03) Identify
  Attribute:65533 (0xfffd)
  problem: Revision found on cluster (4) does not match revision listed in the spec (5)"
chip-energy-management-app,"  Problem: ProblemSeverity.ERROR
  test_name: IDM-10.3
  location:
  Endpoint: 1,
  Cluster:  148 (0x94) WaterHeaterManagement
  Attribute:65533 (0xfffd)
  problem: Revision found on cluster (ValueDecodeFailure(TLVValue=None, Reason=InteractionModelError(<Status.Failure: 1>))) does not match revision listed in the spec (2)"
chip-energy-management-app,"  Problem: ProblemSeverity.ERROR
  test_name: IDM-10.3
  location:
  Endpoint: 1,
  Cluster:  153 (0x99) EnergyEvse
  Attribute:65533 (0xfffd)
  problem: Revision found on cluster (2) does not match revision listed in the spec (3)"
chip-energy-management-app,"  Problem: ProblemSeverity.ERROR
  test_name: IDM-10.3
  location:
  Endpoint: 1,
  Cluster:  157 (0x9d) EnergyEvseMode
  Attribute:65533 (0xfffd)
  problem: Revision found on cluster (1) does not match revision listed in the spec (2)"
chip-energy-management-app,"  Problem: ProblemSeverity.ERROR
  test_name: IDM-10.3
  location:
  Endpoint: 1,
  Cluster:  159 (0x9f) DeviceEnergyManagementMode
  Attribute:65533 (0xfffd)
  problem: Revision found on cluster (1) does not match revision listed in the spec (2)"
chip-energy-management-app,"  Problem: ProblemSeverity.ERROR
  test_name: IDM-10.5
  location:
  Endpoint: 1,
  Cluster:  152 (0x98) DeviceEnergyManagement
  problem: Extra cluster found on endpoint with device types [Descriptor.Structs.DeviceTypeStruct(deviceType=1292, revision=1), Descriptor.Structs.DeviceTypeStruct(deviceType=1296, revision=1)]
  spec_location:"
chip-energy-management-app,"  Problem: ProblemSeverity.ERROR
  test_name: IDM-10.5
  location:
  Endpoint: 1,
  Cluster:  148 (0x94) WaterHeaterManagement
  problem: Extra cluster found on endpoint with device types [Descriptor.Structs.DeviceTypeStruct(deviceType=1292, revision=1), Descriptor.Structs.DeviceTypeStruct(deviceType=1296, revision=1)]
  spec_location:"
chip-energy-management-app,"  Problem: ProblemSeverity.ERROR
  test_name: IDM-10.5
  location:
  Endpoint: 1,
  Cluster:  158 (0x9e) WaterHeaterMode
  problem: Extra cluster found on endpoint with device types [Descriptor.Structs.DeviceTypeStruct(deviceType=1292, revision=1), Descriptor.Structs.DeviceTypeStruct(deviceType=1296, revision=1)]
  spec_location:"
chip-energy-management-app,"  Problem: ProblemSeverity.ERROR
  test_name: IDM-10.5
  location:
  Endpoint: 1,
  Cluster:  159 (0x9f) DeviceEnergyManagementMode
  problem: Extra cluster found on endpoint with device types [Descriptor.Structs.DeviceTypeStruct(deviceType=1292, revision=1), Descriptor.Structs.DeviceTypeStruct(deviceType=1296, revision=1)]
  spec_location:"

EVSE app conformance failures after this PR (only one :)):

Problem: ProblemSeverity.ERROR
    test_name: IDM-10.2
    location: 
       Endpoint: 0,
       Cluster:  49 (0x31) NetworkCommissioning
      Attribute:8 (0x08)
    problem: Attribute 0x08 is included, but is disallowed by conformance. Conformance: WI, implemented features: ET
    spec_location: 

This failure is expected as the example apps have both ET and WI implemented, while this is disallowed in a real product.

This PR adds the missing Water Heater device to matter-devices.xml.

The description was generated using the Alchemy tool
(https://github.com/project-chip/alchemy) with the following command:

`alchemy zap --attribute="in-progress"  --sdkRoot=./connectedhomeip/
--specRoot=./connectedhomeip-spec/
./connectedhomeip-spec/src/device_types/WaterHeater.adoc`

I manually fixed the device nae from `Matter Water Heater` to `Water
Heater`.
This PR refactors the energy-management-app into 2 separate endpoints
(one for EVSE and another for WaterHeater).

This is the first step in making this app spec-conformant.

`TC_DeviceBasicComposition.py` failed on this app before this PR and now passes.

Changes:
* Split Water Heater and EVSE into two separate endpoints (1 and 2).
  Updated zap and code.
* Dinamically disable unused endpoint at runtime. Based on the app choice
  (command line argument on linux or #define in ESP32 or SIlabs), initialize
  the clusters in the correct endpoint and disable the other endpoint.
  For example, for Water Heater, initialize clusters on endpoint 2 and
  disable endpoint 1 (EVSE).
* Refactor/move the init code related to ElectricalSensor (PowerTopology, EPM and EEM) from inside EVSE
  into ElectricalSensorInit.h/.cpp so they can be easier to reuse by both WaterHeater and EVSE.
* Refactor/move DEM cluster init code into its own file so it can be
  better reused outside EVSE.

Test performed:
1. Check basic composition for EVSE:
```
scripts/run_in_python_env.sh out/python_env './scripts/tests/run_python_test.py --app ./out/linux-x64-energy-management-no-ble/chip-energy-management-app --app-args "--application evse --trace-to json:log" --script src/python_testing/TC_DeviceBasicComposition.py --script-args "--qr-code MT:-24J0AFN00KA0648G00"'
```

2. Check basic composition for WaterHeater:
```
scripts/run_in_python_env.sh out/python_env './scripts/tests/run_python_test.py --app ./out/linux-x64-energy-management-no-ble/chip-energy-management-app --app-args "--application water-heater --trace-to json:log" --script src/python_testing/TC_DeviceBasicComposition.py --script-args "--qr-code MT:-24J0AFN00KA0648G00"'
```

3. Check app against `TC_EEVSE_2_6.py`:
```
rm -f evse.bin; ./out/linux-x64-energy-management-no-ble/chip-energy-management-app --enable-key 000102030405060708090a0b0c0d0e0f --KVS evse.bin --featureSet 0x3d

python src/python_testing/TC_EEVSE_2_6.py --endpoint 1 -m on-network -n 1234 -p 20202021 -d 3840 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f
```
@soares-sergio soares-sergio requested review from a team as code owners October 22, 2024 20:04
Copy link

semanticdiff-com bot commented Oct 22, 2024

Review changes with  SemanticDiff

Changed Files
File Status
  examples/all-clusters-app/all-clusters-common/src/energy-evse-stub.cpp Unsupported file format
  examples/all-clusters-app/linux/main-common.cpp Unsupported file format
  examples/energy-management-app/energy-management-common/common/include/EnergyManagementAppCommonMain.h Unsupported file format
  examples/energy-management-app/energy-management-common/common/src/EnergyManagementAppCommonMain.cpp Unsupported file format
  examples/energy-management-app/energy-management-common/device-energy-management/src/DEMTestEventTriggers.cpp Unsupported file format
  examples/energy-management-app/energy-management-common/device-energy-management/src/device-energy-management-mode.cpp Unsupported file format
  examples/energy-management-app/energy-management-common/energy-evse/include/EVSEManufacturerImpl.h Unsupported file format
  examples/energy-management-app/energy-management-common/energy-evse/include/EnergyEvseMain.h Unsupported file format
  examples/energy-management-app/energy-management-common/energy-evse/src/EVSEManufacturerImpl.cpp Unsupported file format
  examples/energy-management-app/energy-management-common/energy-evse/src/EnergyEvseMain.cpp Unsupported file format
  examples/energy-management-app/energy-management-common/energy-management-app.matter Unsupported file format
  examples/energy-management-app/energy-management-common/energy-management-app.zap Unsupported file format
  examples/energy-management-app/energy-management-common/energy-reporting/include/ElectricalSensorInit.h Unsupported file format
  examples/energy-management-app/energy-management-common/energy-reporting/src/FakeReadings.cpp Unsupported file format
  examples/energy-management-app/energy-management-common/water-heater/include/WhmMain.h Unsupported file format
  examples/energy-management-app/energy-management-common/water-heater/src/WaterHeaterMain.cpp Unsupported file format
  examples/energy-management-app/energy-management-common/water-heater/src/WhmDelegateImpl.cpp Unsupported file format
  examples/energy-management-app/energy-management-common/water-heater/src/WhmMain.cpp Unsupported file format
  examples/energy-management-app/energy-management-common/water-heater/src/water-heater-mode.cpp Unsupported file format
  examples/energy-management-app/esp32/main/main.cpp Unsupported file format
  examples/energy-management-app/linux/BUILD.gn Unsupported file format
  examples/energy-management-app/linux/main.cpp Unsupported file format
  examples/energy-management-app/silabs/BUILD.gn Unsupported file format
  examples/energy-management-app/silabs/src/AppTask.cpp Unsupported file format
  src/python_testing/TC_EWATERHTR_2_1.py  0% smaller
  src/python_testing/TC_EWATERHTR_2_2.py  0% smaller
  src/python_testing/TC_EWATERHTR_2_3.py  0% smaller
  src/python_testing/TC_WHM_1_2.py  0% smaller
  src/python_testing/TC_WHM_2_1.py  0% smaller

Copy link

github-actions bot commented Oct 22, 2024

PR #36201: Size comparison from 0b93b0d to ea06d89

Full report (7 builds for cc32xx, qpg, stm32, tizen)
platform target config section 0b93b0d ea06d89 change % change
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 617162 617162 0 0.0
RAM 205908 205908 0 0.0
lock CC3235SF_LAUNCHXL FLASH 657210 657210 0 0.0
RAM 206060 206060 0 0.0
qpg lighting-app qpg6105+debug FLASH 660600 660600 0 0.0
RAM 105396 105396 0 0.0
lock-app qpg6105+debug FLASH 618612 618612 0 0.0
RAM 99864 99864 0 0.0
stm32 light STM32WB5MM-DK FLASH 481936 481936 0 0.0
RAM 144844 144844 0 0.0
tizen all-clusters-app arm unknown 4912 4912 0 0.0
FLASH 1729756 1729756 0 0.0
RAM 90108 90108 0 0.0
chip-tool-ubsan arm unknown 10792 10792 0 0.0
FLASH 18237078 18237102 24 0.0
RAM 7945732 7945732 0 0.0

Copy link

github-actions bot commented Oct 22, 2024

PR #36201: Size comparison from 0b93b0d to f05afff

Full report (14 builds for cc13x4_26x4, cc32xx, nrfconnect, qpg, stm32, tizen)
platform target config section 0b93b0d f05afff change % change
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 829564 829564 0 0.0
RAM 123452 123452 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 814872 814872 0 0.0
RAM 125332 125332 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 761460 761460 0 0.0
RAM 113824 113824 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 745704 745704 0 0.0
RAM 114016 114016 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 617162 617162 0 0.0
RAM 205908 205908 0 0.0
lock CC3235SF_LAUNCHXL FLASH 657210 657210 0 0.0
RAM 206060 206060 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 915528 915528 0 0.0
RAM 143357 143357 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 885992 885992 0 0.0
RAM 141496 141496 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 848936 848936 0 0.0
RAM 142265 142265 0 0.0
qpg lighting-app qpg6105+debug FLASH 660600 660600 0 0.0
RAM 105396 105396 0 0.0
lock-app qpg6105+debug FLASH 618612 618612 0 0.0
RAM 99864 99864 0 0.0
stm32 light STM32WB5MM-DK FLASH 481936 481936 0 0.0
RAM 144844 144844 0 0.0
tizen all-clusters-app arm unknown 4912 4912 0 0.0
FLASH 1729756 1729756 0 0.0
RAM 90108 90108 0 0.0
chip-tool-ubsan arm unknown 10792 10792 0 0.0
FLASH 18237078 18237102 24 0.0
RAM 7945732 7945732 0 0.0

@mergify mergify bot added the conflict label Oct 24, 2024
@mergify mergify bot removed the conflict label Oct 24, 2024
Copy link

github-actions bot commented Oct 24, 2024

PR #36201: Size comparison from 692983e to 9dee3de

Full report (49 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section 692983e 9dee3de change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1350120 1350120 0 0.0
RAM 104120 104120 0 0.0
bl702 lighting-app bl702+eth FLASH 647856 647856 0 0.0
RAM 25233 25233 0 0.0
bl702+wifi FLASH 825164 825164 0 0.0
RAM 13965 13965 0 0.0
bl706+mfd+rpc+littlefs FLASH 1054154 1054154 0 0.0
RAM 23821 23821 0 0.0
bl702l lighting-app bl702l+mfd+littlefs FLASH 974938 974938 0 0.0
RAM 16468 16468 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 836660 836660 0 0.0
RAM 123676 123676 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 821960 821960 0 0.0
RAM 125556 125556 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 768532 768532 0 0.0
RAM 114048 114048 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 752792 752792 0 0.0
RAM 114240 114240 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 627466 627466 0 0.0
RAM 206132 206132 0 0.0
lock CC3235SF_LAUNCHXL FLASH 667458 667458 0 0.0
RAM 206284 206284 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 678621 678621 0 0.0
RAM 78692 78692 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 698465 698465 0 0.0
RAM 81324 81324 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 698465 698465 0 0.0
RAM 81324 81324 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 655401 655401 0 0.0
RAM 73760 73760 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 615037 615037 0 0.0
RAM 71644 71644 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 634665 634665 0 0.0
RAM 74196 74196 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 634665 634665 0 0.0
RAM 74196 74196 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 634309 634309 0 0.0
RAM 74692 74692 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 654017 654017 0 0.0
RAM 77244 77244 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 654017 654017 0 0.0
RAM 77244 77244 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 609669 609669 0 0.0
RAM 68780 68780 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 629521 629521 0 0.0
RAM 71412 71412 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 629521 629521 0 0.0
RAM 71412 71412 0 0.0
efr32 lock-app BRD4187C FLASH 925644 925644 0 0.0
RAM 159920 159920 0 0.0
BRD4338a FLASH 742216 742216 0 0.0
RAM 232580 232580 0 0.0
window-app BRD4187C FLASH 1018568 1018568 0 0.0
RAM 128264 128264 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 915564 915564 0 0.0
RAM 143357 143357 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 886032 886032 0 0.0
RAM 141496 141496 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 848972 848972 0 0.0
RAM 142265 142265 0 0.0
nxp contact k32w0+release FLASH 582424 582424 0 0.0
RAM 71092 71092 0 0.0
mcxw71+release FLASH 596896 596896 0 0.0
RAM 63184 63184 0 0.0
light k32w0+release FLASH 619044 619044 0 0.0
RAM 70556 70556 0 0.0
k32w1+release FLASH 683144 683144 0 0.0
RAM 48816 48816 0 0.0
lock mcxw71+release FLASH 746704 746704 0 0.0
RAM 67340 67340 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1647668 1647668 0 0.0
RAM 212408 212408 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1553740 1553740 0 0.0
RAM 209208 209208 0 0.0
light cy8ckit_062s2_43012 FLASH 1468004 1468004 0 0.0
RAM 201200 201200 0 0.0
lock cy8ckit_062s2_43012 FLASH 1464964 1464964 0 0.0
RAM 225560 225560 0 0.0
qpg lighting-app qpg6105+debug FLASH 660536 660536 0 0.0
RAM 105420 105420 0 0.0
lock-app qpg6105+debug FLASH 618628 618628 0 0.0
RAM 99880 99880 0 0.0
stm32 light STM32WB5MM-DK FLASH 481920 481920 0 0.0
RAM 144844 144844 0 0.0
telink bridge-app tlsr9258a FLASH 681136 681136 0 0.0
RAM 91304 91304 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 620782 620782 0 0.0
RAM 50600 50600 0 0.0
light-switch-app-ota-shell-factory-data tlsr9528a FLASH 708762 708762 0 0.0
RAM 73940 73940 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 625736 625736 0 0.0
RAM 144468 144468 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 811746 811746 0 0.0
RAM 99100 99100 0 0.0
tizen all-clusters-app arm unknown 4912 4912 0 0.0
FLASH 1729952 1729952 0 0.0
RAM 90108 90108 0 0.0
chip-tool-ubsan arm unknown 10792 10792 0 0.0
FLASH 18237510 18237510 0 0.0
RAM 7945192 7945192 0 0.0

@lboue
Copy link
Contributor

lboue commented Nov 11, 2024

It seems there is an issue with WaterHeaterMode.Attributes.SupportedModes attribute:

[2024-11-07 17:54:28.881678][TEST][STDERR]INFO:chip.native.FP:Forgetting fabric 0x1
[2024-11-07 17:54:28.882097][TEST][STDOUT]mobly.signals.TestFailure: Details=Error reading <class 'chip.clusters.Objects.WaterHeaterMode'>:<class 'chip.clusters.Objects.WaterHeaterMode.Attributes.SupportedModes'> = ValueDecodeFailure(TLVValue=None, Reason=InteractionModelError(<Status.UnsupportedEndpoint: 127>)), Extras=None
[2024-11-07 17:54:28.882637][TEST][STDOUT][MatterTest] 11-07 17:54:28.873 INFO 		***** Test Failure : 
[2024-11-07 17:54:28.882724][TEST][STDERR]INFO:chip.native.TS:Pending Last Known Good Time: 2023-10-14T01:16:48
[2024-11-07 17:54:28.863686][APP ][STDOUT][25075:25075] CHIP:EM: Rxd Ack; Removing MessageCounter:265997561 from Retrans Table on exchange 3726r
[2024-11-07 17:54:28.883327][TEST][STDOUT][MatterTest] 11-07 17:54:28.873 INFO Finished test in 8564.0ms
[2024-11-07 17:54:28.883629][TEST][STDERR]INFO:chip.native.TS:Previous Last Known Good Time: 2023-10-14T01:16:48
[2024-11-07 17:54:28.864435][APP ][STDOUT][25075:25075] CHIP:ATM: {
[2024-11-07 17:54:28.883748][TEST][STDOUT][MatterTest] 11-07 17:54:28.873 ERROR 

@lboue
Copy link
Contributor

lboue commented Nov 19, 2024

Could you restart the Tests / REPL Tests - Linux CI job ?

@kiel-apple
Copy link
Contributor

@lboue re-ran that job but it failed again so it doesn't seem like a flake.

@soares-sergio
Copy link
Contributor Author

It seems there is an issue with WaterHeaterMode.Attributes.SupportedModes attribute:

[2024-11-07 17:54:28.881678][TEST][STDERR]INFO:chip.native.FP:Forgetting fabric 0x1
[2024-11-07 17:54:28.882097][TEST][STDOUT]mobly.signals.TestFailure: Details=Error reading <class 'chip.clusters.Objects.WaterHeaterMode'>:<class 'chip.clusters.Objects.WaterHeaterMode.Attributes.SupportedModes'> = ValueDecodeFailure(TLVValue=None, Reason=InteractionModelError(<Status.UnsupportedEndpoint: 127>)), Extras=None
[2024-11-07 17:54:28.882637][TEST][STDOUT][MatterTest] 11-07 17:54:28.873 INFO 		***** Test Failure : 
[2024-11-07 17:54:28.882724][TEST][STDERR]INFO:chip.native.TS:Pending Last Known Good Time: 2023-10-14T01:16:48
[2024-11-07 17:54:28.863686][APP ][STDOUT][25075:25075] CHIP:EM: Rxd Ack; Removing MessageCounter:265997561 from Retrans Table on exchange 3726r
[2024-11-07 17:54:28.883327][TEST][STDOUT][MatterTest] 11-07 17:54:28.873 INFO Finished test in 8564.0ms
[2024-11-07 17:54:28.883629][TEST][STDERR]INFO:chip.native.TS:Previous Last Known Good Time: 2023-10-14T01:16:48
[2024-11-07 17:54:28.864435][APP ][STDOUT][25075:25075] CHIP:ATM: {
[2024-11-07 17:54:28.883748][TEST][STDOUT][MatterTest] 11-07 17:54:28.873 ERROR 

Thanks, @lboue and @kiel-apple for double checking the REPL tests. I found the culprit!

TC_WHM_2_1 passes when I run locally:

[2024-11-20 15:23:35.890526][TEST][STDOUT][MatterTest] 11-20 15:23:35.890 INFO Summary for test class TC_WHM_2_1: Error 0, Executed 1, Failed 0, Passed 1, Requested 1, Skipped 0

With this command:

rm /tmp/chip_* && scripts/run_in_python_env.sh out/python_env './scripts/tests/run_python_test.py --app ./out/linux-x64-energy-management-no-ble/chip-energy-management-app --app-args "--discriminator 1234 --featureSet 0x00 --application water-heater --trace-to json:log" --script src/python_testing/TC_WHM_2_1.py --script-args "--commissioning-method on-network --discriminator 1234 --passcode 20202021 --endpoint 2"'

So that pointed me to likely an issue with the CI scripts itself. I investigated a bit and found out the --application argument was incorrect in the test script itself. I fixed it in: #36578 once that lands, I'll merge master on this PR and it should start passing the REPL tests.

Remove PowerSource from root node and move to EP1/evse
Bump cluster revisions where needed
Fix device type descriptions for each EP
Remove unused Thermostat cluster and added a TODO. We need to properly
implement this cluster for this app for temperature control.
Copy link

github-actions bot commented Nov 20, 2024

PR #36201: Size comparison from e1fbaf6 to c0d14a2

Full report (69 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section e1fbaf6 c0d14a2 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1350314 1350314 0 0.0
RAM 104088 104088 0 0.0
bl702 lighting-app bl702+eth FLASH 649926 649926 0 0.0
RAM 25329 25329 0 0.0
bl702+wifi FLASH 827254 827254 0 0.0
RAM 14069 14069 0 0.0
bl706+mfd+rpc+littlefs FLASH 1055448 1055448 0 0.0
RAM 23917 23917 0 0.0
bl702l lighting-app bl702l+mfd+littlefs FLASH 977078 977078 0 0.0
RAM 16556 16556 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 838240 838240 0 0.0
RAM 123640 123640 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 824180 824180 0 0.0
RAM 125520 125520 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 770888 770888 0 0.0
RAM 113988 113988 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 755092 755092 0 0.0
RAM 114204 114204 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 629294 629294 0 0.0
RAM 205792 205792 0 0.0
lock CC3235SF_LAUNCHXL FLASH 667874 667874 0 0.0
RAM 205936 205936 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 679857 679857 0 0.0
RAM 78692 78692 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 699709 699709 0 0.0
RAM 81332 81332 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 699709 699709 0 0.0
RAM 81332 81332 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 656637 656637 0 0.0
RAM 73760 73760 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 616721 616721 0 0.0
RAM 71652 71652 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 636357 636357 0 0.0
RAM 74196 74196 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 636357 636357 0 0.0
RAM 74196 74196 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 636185 636185 0 0.0
RAM 74700 74700 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 655901 655901 0 0.0
RAM 77244 77244 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 655901 655901 0 0.0
RAM 77244 77244 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 612677 612677 0 0.0
RAM 68780 68780 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 632529 632529 0 0.0
RAM 71420 71420 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 632529 632529 0 0.0
RAM 71420 71420 0 0.0
efr32 lock-app BRD4187C FLASH 927948 927948 0 0.0
RAM 160168 160168 0 0.0
BRD4338a FLASH 744312 744304 -8 -0.0
RAM 233296 233296 0 0.0
window-app BRD4187C FLASH 1019432 1019424 -8 -0.0
RAM 128268 128268 0 0.0
esp32 all-clusters-app c3devkit DRAM 95344 95344 0 0.0
FLASH 1541622 1541666 44 0.0
IRAM 82542 82542 0 0.0
m5stack DRAM 116256 116256 0 0.0
FLASH 1548702 1548738 36 0.0
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4712 4712 0 0.0
FLASH 2706449 2706449 0 0.0
RAM 129736 129736 0 0.0
all-clusters-app debug unknown 5552 5552 0 0.0
FLASH 5997550 5997622 72 0.0
RAM 523464 523464 0 0.0
all-clusters-minimal-app debug unknown 5448 5448 0 0.0
FLASH 5335804 5335804 0 0.0
RAM 242520 242520 0 0.0
bridge-app debug unknown 5432 5432 0 0.0
FLASH 4675522 4675522 0 0.0
RAM 218464 218464 0 0.0
chip-tool debug unknown 5984 5984 0 0.0
FLASH 12834316 12834316 0 0.0
RAM 582226 582226 0 0.0
chip-tool-ipv6only arm64 unknown 21304 21304 0 0.0
FLASH 10969472 10969472 0 0.0
RAM 633160 633160 0 0.0
fabric-admin debug unknown 5808 5808 0 0.0
FLASH 11243259 11243259 0 0.0
RAM 582610 582610 0 0.0
fabric-bridge-app debug unknown 4688 4688 0 0.0
FLASH 4499792 4499792 0 0.0
RAM 205424 205424 0 0.0
fabric-sync debug unknown 4896 4896 0 0.0
FLASH 5596357 5596357 0 0.0
RAM 472424 472424 0 0.0
lighting-app debug+rpc+ui unknown 6096 6096 0 0.0
FLASH 5611473 5611473 0 0.0
RAM 228616 228616 0 0.0
lock-app debug unknown 5368 5368 0 0.0
FLASH 4724878 4724878 0 0.0
RAM 204632 204632 0 0.0
ota-provider-app debug unknown 4744 4744 0 0.0
FLASH 4350396 4350396 0 0.0
RAM 198304 198304 0 0.0
ota-requestor-app debug unknown 4680 4680 0 0.0
FLASH 4488830 4488830 0 0.0
RAM 202888 202888 0 0.0
shell debug unknown 4240 4240 0 0.0
FLASH 3020717 3020717 0 0.0
RAM 160368 160368 0 0.0
thermostat-no-ble arm64 unknown 9512 9512 0 0.0
FLASH 4096272 4096272 0 0.0
RAM 243008 243008 0 0.0
tv-app debug unknown 5664 5664 0 0.0
FLASH 5948069 5948069 0 0.0
RAM 595952 595952 0 0.0
tv-casting-app debug unknown 5232 5232 0 0.0
FLASH 11040237 11040237 0 0.0
RAM 691960 691960 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 916244 916244 0 0.0
RAM 143292 143292 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 888432 888432 0 0.0
RAM 141479 141479 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 850444 850444 0 0.0
RAM 142200 142200 0 0.0
nxp contact k32w0+release FLASH 584344 584344 0 0.0
RAM 71056 71056 0 0.0
mcxw71+release FLASH 598872 598872 0 0.0
RAM 63152 63152 0 0.0
light k32w0+release FLASH 611284 611284 0 0.0
RAM 70448 70448 0 0.0
k32w1+release FLASH 685384 685384 0 0.0
RAM 48776 48776 0 0.0
lock mcxw71+release FLASH 748896 748896 0 0.0
RAM 67308 67308 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1644236 1644236 0 0.0
RAM 212072 212072 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1552212 1552212 0 0.0
RAM 208872 208872 0 0.0
light cy8ckit_062s2_43012 FLASH 1467252 1467252 0 0.0
RAM 200856 200856 0 0.0
lock cy8ckit_062s2_43012 FLASH 1465428 1465428 0 0.0
RAM 225216 225216 0 0.0
qpg lighting-app qpg6105+debug FLASH 662520 662520 0 0.0
RAM 105384 105384 0 0.0
lock-app qpg6105+debug FLASH 620628 620628 0 0.0
RAM 99844 99844 0 0.0
stm32 light STM32WB5MM-DK FLASH 483332 483332 0 0.0
RAM 144848 144848 0 0.0
telink bridge-app tlsr9258a FLASH 681594 681594 0 0.0
RAM 91200 91200 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 622030 622030 0 0.0
RAM 31432 31432 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 762886 762886 0 0.0
RAM 50208 50208 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 709164 709164 0 0.0
RAM 73460 73460 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 625872 625872 0 0.0
RAM 142132 142132 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 811780 811780 0 0.0
RAM 99676 99676 0 0.0
tizen all-clusters-app arm unknown 4972 4972 0 0.0
FLASH 1726800 1726800 0 0.0
RAM 90652 90652 0 0.0
chip-tool-ubsan arm unknown 10780 10780 0 0.0
FLASH 17946894 17946894 0 0.0
RAM 7830432 7830432 0 0.0

Copy link

github-actions bot commented Nov 21, 2024

PR #36201: Size comparison from e1fbaf6 to 2d92654

Full report (69 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section e1fbaf6 2d92654 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1350314 1350314 0 0.0
RAM 104088 104088 0 0.0
bl702 lighting-app bl702+eth FLASH 649926 649926 0 0.0
RAM 25329 25329 0 0.0
bl702+wifi FLASH 827254 827254 0 0.0
RAM 14069 14069 0 0.0
bl706+mfd+rpc+littlefs FLASH 1055448 1055448 0 0.0
RAM 23917 23917 0 0.0
bl702l lighting-app bl702l+mfd+littlefs FLASH 977078 977078 0 0.0
RAM 16556 16556 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 838240 838240 0 0.0
RAM 123640 123640 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 824180 824180 0 0.0
RAM 125520 125520 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 770888 770888 0 0.0
RAM 113988 113988 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 755092 755092 0 0.0
RAM 114204 114204 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 629294 629294 0 0.0
RAM 205792 205792 0 0.0
lock CC3235SF_LAUNCHXL FLASH 667874 667874 0 0.0
RAM 205936 205936 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 679857 679857 0 0.0
RAM 78692 78692 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 699709 699709 0 0.0
RAM 81332 81332 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 699709 699709 0 0.0
RAM 81332 81332 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 656637 656637 0 0.0
RAM 73760 73760 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 616721 616721 0 0.0
RAM 71652 71652 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 636357 636357 0 0.0
RAM 74196 74196 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 636357 636357 0 0.0
RAM 74196 74196 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 636185 636185 0 0.0
RAM 74700 74700 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 655901 655901 0 0.0
RAM 77244 77244 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 655901 655901 0 0.0
RAM 77244 77244 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 612677 612677 0 0.0
RAM 68780 68780 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 632529 632529 0 0.0
RAM 71420 71420 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 632529 632529 0 0.0
RAM 71420 71420 0 0.0
efr32 lock-app BRD4187C FLASH 927948 927948 0 0.0
RAM 160168 160168 0 0.0
BRD4338a FLASH 744312 744304 -8 -0.0
RAM 233296 233296 0 0.0
window-app BRD4187C FLASH 1019432 1019424 -8 -0.0
RAM 128268 128268 0 0.0
esp32 all-clusters-app c3devkit DRAM 95344 95344 0 0.0
FLASH 1541622 1541666 44 0.0
IRAM 82542 82542 0 0.0
m5stack DRAM 116256 116256 0 0.0
FLASH 1548702 1548738 36 0.0
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4712 4712 0 0.0
FLASH 2706449 2706449 0 0.0
RAM 129736 129736 0 0.0
all-clusters-app debug unknown 5552 5552 0 0.0
FLASH 5997550 5997622 72 0.0
RAM 523464 523464 0 0.0
all-clusters-minimal-app debug unknown 5448 5448 0 0.0
FLASH 5335804 5335804 0 0.0
RAM 242520 242520 0 0.0
bridge-app debug unknown 5432 5432 0 0.0
FLASH 4675522 4675522 0 0.0
RAM 218464 218464 0 0.0
chip-tool debug unknown 5984 5984 0 0.0
FLASH 12834316 12834316 0 0.0
RAM 582226 582226 0 0.0
chip-tool-ipv6only arm64 unknown 21304 21304 0 0.0
FLASH 10969472 10969472 0 0.0
RAM 633160 633160 0 0.0
fabric-admin debug unknown 5808 5808 0 0.0
FLASH 11243259 11243259 0 0.0
RAM 582610 582610 0 0.0
fabric-bridge-app debug unknown 4688 4688 0 0.0
FLASH 4499792 4499792 0 0.0
RAM 205424 205424 0 0.0
fabric-sync debug unknown 4896 4896 0 0.0
FLASH 5596357 5596357 0 0.0
RAM 472424 472424 0 0.0
lighting-app debug+rpc+ui unknown 6096 6096 0 0.0
FLASH 5611473 5611473 0 0.0
RAM 228616 228616 0 0.0
lock-app debug unknown 5368 5368 0 0.0
FLASH 4724878 4724878 0 0.0
RAM 204632 204632 0 0.0
ota-provider-app debug unknown 4744 4744 0 0.0
FLASH 4350396 4350396 0 0.0
RAM 198304 198304 0 0.0
ota-requestor-app debug unknown 4680 4680 0 0.0
FLASH 4488830 4488830 0 0.0
RAM 202888 202888 0 0.0
shell debug unknown 4240 4240 0 0.0
FLASH 3020717 3020717 0 0.0
RAM 160368 160368 0 0.0
thermostat-no-ble arm64 unknown 9512 9512 0 0.0
FLASH 4096272 4096272 0 0.0
RAM 243008 243008 0 0.0
tv-app debug unknown 5664 5664 0 0.0
FLASH 5948069 5948069 0 0.0
RAM 595952 595952 0 0.0
tv-casting-app debug unknown 5232 5232 0 0.0
FLASH 11040237 11040237 0 0.0
RAM 691960 691960 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 916244 916244 0 0.0
RAM 143292 143292 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 888432 888432 0 0.0
RAM 141479 141479 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 850444 850444 0 0.0
RAM 142200 142200 0 0.0
nxp contact k32w0+release FLASH 584344 584344 0 0.0
RAM 71056 71056 0 0.0
mcxw71+release FLASH 598872 598872 0 0.0
RAM 63152 63152 0 0.0
light k32w0+release FLASH 611284 611284 0 0.0
RAM 70448 70448 0 0.0
k32w1+release FLASH 685384 685384 0 0.0
RAM 48776 48776 0 0.0
lock mcxw71+release FLASH 748896 748896 0 0.0
RAM 67308 67308 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1644236 1644236 0 0.0
RAM 212072 212072 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1552212 1552212 0 0.0
RAM 208872 208872 0 0.0
light cy8ckit_062s2_43012 FLASH 1467252 1467252 0 0.0
RAM 200856 200856 0 0.0
lock cy8ckit_062s2_43012 FLASH 1465428 1465428 0 0.0
RAM 225216 225216 0 0.0
qpg lighting-app qpg6105+debug FLASH 662520 662520 0 0.0
RAM 105384 105384 0 0.0
lock-app qpg6105+debug FLASH 620628 620628 0 0.0
RAM 99844 99844 0 0.0
stm32 light STM32WB5MM-DK FLASH 483332 483332 0 0.0
RAM 144848 144848 0 0.0
telink bridge-app tlsr9258a FLASH 681594 681594 0 0.0
RAM 91200 91200 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 622030 622030 0 0.0
RAM 31432 31432 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 762886 762886 0 0.0
RAM 50208 50208 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 709164 709164 0 0.0
RAM 73460 73460 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 625872 625872 0 0.0
RAM 142132 142132 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 811780 811780 0 0.0
RAM 99676 99676 0 0.0
tizen all-clusters-app arm unknown 4972 4972 0 0.0
FLASH 1726800 1726800 0 0.0
RAM 90652 90652 0 0.0
chip-tool-ubsan arm unknown 10780 10780 0 0.0
FLASH 17946894 17946894 0 0.0
RAM 7830432 7830432 0 0.0

@lboue
Copy link
Contributor

lboue commented Nov 21, 2024

So that pointed me to likely an issue with the CI scripts itself. I investigated a bit and found out the --application argument was incorrect in the test script itself. I fixed it in: #36578 once that lands, I'll merge master on this PR and it should start passing the REPL tests.

@soares-sergio Thank you for your patches. The Tests / REPL Tests - Linux CI test is now working.

@soares-sergio soares-sergio changed the title energy-management-app: Split WH and EVSE into 2 endpoints energy-management-app: Split WH and EVSE into separate endpoints and fix conformance issues Nov 21, 2024
@soares-sergio soares-sergio changed the title energy-management-app: Split WH and EVSE into separate endpoints and fix conformance issues energy-management-app: refactor WH and EVSE into separate endpoints and fix conformance issues Nov 21, 2024
@mergify mergify bot added the conflict label Nov 25, 2024
@PeterC1965
Copy link
Contributor

This all looks good to me.

@lboue
Copy link
Contributor

lboue commented Nov 27, 2024

This branch has conflicts with the file src/python_testing/TC_WHM_1_2.py (commit 926ab43)

@mergify mergify bot removed the conflict label Nov 27, 2024
Copy link

github-actions bot commented Nov 27, 2024

PR #36201: Size comparison from 29165e9 to d2f26a1

Full report (69 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section 29165e9 d2f26a1 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1350810 1350810 0 0.0
RAM 104088 104088 0 0.0
bl702 lighting-app bl702+eth FLASH 650164 650164 0 0.0
RAM 25329 25329 0 0.0
bl702+wifi FLASH 827748 827748 0 0.0
RAM 14069 14069 0 0.0
bl706+mfd+rpc+littlefs FLASH 1055942 1055942 0 0.0
RAM 23917 23917 0 0.0
bl702l lighting-app bl702l+mfd+littlefs FLASH 977316 977316 0 0.0
RAM 16556 16556 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 838488 838488 0 0.0
RAM 123640 123640 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 824172 824172 0 0.0
RAM 125520 125520 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 770880 770880 0 0.0
RAM 113988 113988 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 755084 755084 0 0.0
RAM 114204 114204 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 629278 629278 0 0.0
RAM 205792 205792 0 0.0
lock CC3235SF_LAUNCHXL FLASH 667858 667858 0 0.0
RAM 205936 205936 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 680105 680105 0 0.0
RAM 78692 78692 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 699957 699957 0 0.0
RAM 81332 81332 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 699957 699957 0 0.0
RAM 81332 81332 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 656885 656885 0 0.0
RAM 73760 73760 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 616713 616713 0 0.0
RAM 71652 71652 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 636349 636349 0 0.0
RAM 74196 74196 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 636349 636349 0 0.0
RAM 74196 74196 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 636177 636177 0 0.0
RAM 74700 74700 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 655893 655893 0 0.0
RAM 77244 77244 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 655893 655893 0 0.0
RAM 77244 77244 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 612669 612669 0 0.0
RAM 68780 68780 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 632521 632521 0 0.0
RAM 71420 71420 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 632521 632521 0 0.0
RAM 71420 71420 0 0.0
efr32 lock-app BRD4187C FLASH 927948 927948 0 0.0
RAM 160168 160168 0 0.0
BRD4338a FLASH 744296 744288 -8 -0.0
RAM 233296 233296 0 0.0
window-app BRD4187C FLASH 1019400 1019392 -8 -0.0
RAM 128268 128268 0 0.0
esp32 all-clusters-app c3devkit DRAM 95344 95344 0 0.0
FLASH 1541916 1541960 44 0.0
IRAM 82542 82542 0 0.0
m5stack DRAM 116256 116256 0 0.0
FLASH 1549042 1549074 32 0.0
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4720 4720 0 0.0
FLASH 2706559 2706559 0 0.0
RAM 129640 129640 0 0.0
all-clusters-app debug unknown 5560 5560 0 0.0
FLASH 5998230 5998302 72 0.0
RAM 523368 523368 0 0.0
all-clusters-minimal-app debug unknown 5456 5456 0 0.0
FLASH 5336108 5336108 0 0.0
RAM 242424 242424 0 0.0
bridge-app debug unknown 5440 5440 0 0.0
FLASH 4675636 4675636 0 0.0
RAM 218368 218368 0 0.0
chip-tool debug unknown 5992 5992 0 0.0
FLASH 12838862 12838862 0 0.0
RAM 582194 582194 0 0.0
chip-tool-ipv6only arm64 unknown 21304 21304 0 0.0
FLASH 10973264 10973264 0 0.0
RAM 633144 633144 0 0.0
fabric-admin debug unknown 5816 5816 0 0.0
FLASH 11242827 11242827 0 0.0
RAM 582546 582546 0 0.0
fabric-bridge-app debug unknown 4696 4696 0 0.0
FLASH 4499892 4499892 0 0.0
RAM 205360 205360 0 0.0
fabric-sync debug unknown 4904 4904 0 0.0
FLASH 5595797 5595797 0 0.0
RAM 472344 472344 0 0.0
lighting-app debug+rpc+ui unknown 6104 6104 0 0.0
FLASH 5612145 5612145 0 0.0
RAM 228584 228584 0 0.0
lock-app debug unknown 5376 5376 0 0.0
FLASH 4725022 4725022 0 0.0
RAM 204600 204600 0 0.0
ota-provider-app debug unknown 4752 4752 0 0.0
FLASH 4350560 4350560 0 0.0
RAM 198272 198272 0 0.0
ota-requestor-app debug unknown 4688 4688 0 0.0
FLASH 4488930 4488930 0 0.0
RAM 202856 202856 0 0.0
shell debug unknown 4248 4248 0 0.0
FLASH 3021389 3021389 0 0.0
RAM 160304 160304 0 0.0
thermostat-no-ble arm64 unknown 9512 9512 0 0.0
FLASH 4096432 4096432 0 0.0
RAM 242976 242976 0 0.0
tv-app debug unknown 5672 5672 0 0.0
FLASH 5948629 5948629 0 0.0
RAM 595856 595856 0 0.0
tv-casting-app debug unknown 5240 5240 0 0.0
FLASH 11040301 11040301 0 0.0
RAM 691960 691960 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 916492 916492 0 0.0
RAM 143292 143292 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 888600 888600 0 0.0
RAM 141479 141479 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 850512 850512 0 0.0
RAM 142200 142200 0 0.0
nxp contact k32w0+release FLASH 584328 584328 0 0.0
RAM 71056 71056 0 0.0
mcxw71+release FLASH 598864 598864 0 0.0
RAM 63152 63152 0 0.0
light k32w0+release FLASH 611268 611268 0 0.0
RAM 70448 70448 0 0.0
k32w1+release FLASH 685376 685376 0 0.0
RAM 48776 48776 0 0.0
lock mcxw71+release FLASH 761632 761632 0 0.0
RAM 70540 70540 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1644524 1644524 0 0.0
RAM 212072 212072 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1552324 1552324 0 0.0
RAM 208872 208872 0 0.0
light cy8ckit_062s2_43012 FLASH 1467556 1467556 0 0.0
RAM 200856 200856 0 0.0
lock cy8ckit_062s2_43012 FLASH 1465412 1465412 0 0.0
RAM 225216 225216 0 0.0
qpg lighting-app qpg6105+debug FLASH 662808 662808 0 0.0
RAM 105384 105384 0 0.0
lock-app qpg6105+debug FLASH 620636 620636 0 0.0
RAM 99844 99844 0 0.0
stm32 light STM32WB5MM-DK FLASH 483580 483580 0 0.0
RAM 144848 144848 0 0.0
telink bridge-app tlsr9258a FLASH 681574 681574 0 0.0
RAM 91200 91200 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 621984 621984 0 0.0
RAM 31432 31432 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 763160 763160 0 0.0
RAM 50208 50208 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 709144 709144 0 0.0
RAM 73460 73460 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 626178 626178 0 0.0
RAM 142132 142132 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 812086 812086 0 0.0
RAM 99676 99676 0 0.0
tizen all-clusters-app arm unknown 4976 4976 0 0.0
FLASH 1727224 1727224 0 0.0
RAM 90636 90636 0 0.0
chip-tool-ubsan arm unknown 10788 10788 0 0.0
FLASH 17951238 17951238 0 0.0
RAM 7831148 7831148 0 0.0

@soares-sergio
Copy link
Contributor Author

This branch has conflicts with the file src/python_testing/TC_WHM_1_2.py (commit 926ab43)

Just fixed it, thanks!

And thanks for reviewing @PeterC1965 .
I'll get this landed.

@mergify mergify bot merged commit 481270d into project-chip:master Nov 27, 2024
67 checks passed
yyzhong-g pushed a commit to yyzhong-g/connectedhomeip that referenced this pull request Dec 12, 2024
…nd fix conformance issues (project-chip#36201)

* Add missing Water Heater device to matter-devices.xml

This PR adds the missing Water Heater device to matter-devices.xml.

The description was generated using the Alchemy tool
(https://github.com/project-chip/alchemy) with the following command:

`alchemy zap --attribute="in-progress"  --sdkRoot=./connectedhomeip/
--specRoot=./connectedhomeip-spec/
./connectedhomeip-spec/src/device_types/WaterHeater.adoc`

I manually fixed the device nae from `Matter Water Heater` to `Water
Heater`.

* zap regen

* energy-management-app: Split WH and EVSE into 2 endpoints

This PR refactors the energy-management-app into 2 separate endpoints
(one for EVSE and another for WaterHeater).

This is the first step in making this app spec-conformant.

`TC_DeviceBasicComposition.py` failed on this app before this PR and now passes.

Changes:
* Split Water Heater and EVSE into two separate endpoints (1 and 2).
  Updated zap and code.
* Dinamically disable unused endpoint at runtime. Based on the app choice
  (command line argument on linux or #define in ESP32 or SIlabs), initialize
  the clusters in the correct endpoint and disable the other endpoint.
  For example, for Water Heater, initialize clusters on endpoint 2 and
  disable endpoint 1 (EVSE).
* Refactor/move the init code related to ElectricalSensor (PowerTopology, EPM and EEM) from inside EVSE
  into ElectricalSensorInit.h/.cpp so they can be easier to reuse by both WaterHeater and EVSE.
* Refactor/move DEM cluster init code into its own file so it can be
  better reused outside EVSE.

Test performed:
1. Check basic composition for EVSE:
```
scripts/run_in_python_env.sh out/python_env './scripts/tests/run_python_test.py --app ./out/linux-x64-energy-management-no-ble/chip-energy-management-app --app-args "--application evse --trace-to json:log" --script src/python_testing/TC_DeviceBasicComposition.py --script-args "--qr-code MT:-24J0AFN00KA0648G00"'
```

2. Check basic composition for WaterHeater:
```
scripts/run_in_python_env.sh out/python_env './scripts/tests/run_python_test.py --app ./out/linux-x64-energy-management-no-ble/chip-energy-management-app --app-args "--application water-heater --trace-to json:log" --script src/python_testing/TC_DeviceBasicComposition.py --script-args "--qr-code MT:-24J0AFN00KA0648G00"'
```

3. Check app against `TC_EEVSE_2_6.py`:
```
rm -f evse.bin; ./out/linux-x64-energy-management-no-ble/chip-energy-management-app --enable-key 000102030405060708090a0b0c0d0e0f --KVS evse.bin --featureSet 0x3d

python src/python_testing/TC_EEVSE_2_6.py --endpoint 1 -m on-network -n 1234 -p 20202021 -d 3840 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f
```

* Use anon namespace instead of static.

* disable enpoint on esp32 and silabs

* address Tennessee's PR feedback

* Review suggestion: move GetMainAppEndpointId to another file

* zap regen

* fix matter-devices white space diffs

* App now builds on all-clusters app

* Fix typo on init

* fix all-clusters breakage on esp32

* fix misuse of namespace in header

* Fix breakage for silabs water heater

* Update WaterHeater endpoint for CI tests

This fixes REPL test CI breakage.

* Update WaterHeater tests to endpoint 2

* Bumped ClusterRevisions

Cluster 40 (0x28) BasicInformation - 3 -> 4
Cluster 47 (0x2f) PowerSource - 2 -> 3
Cluster 48 (0x30) GeneralCommissioning 1-> 2
Cluster 3 (0x03) Identify 4 -> 5
Cluster 153 (0x99) EnergyEvse 2 -> 3
Cluster 157 (0x9d) EnergyEvseMode 1-> 2
Cluster 159 (0x9f) DeviceEnergyManagementMode 1-> 2

* Update AccessControl featureMap to enable Extension attribute

* Remove AccessControl extension attribute

* Remove kStateForecastReporting from the default feature map

That feature can't be enabled together with kPowerAdjustment.

* Update TC_WHM_1_2 endpoint to 2

* Fix various conformance issues

Remove PowerSource from root node and move to EP1/evse
Bump cluster revisions where needed
Fix device type descriptions for each EP
Remove unused Thermostat cluster and added a TODO. We need to properly
implement this cluster for this app for temperature control.

* TC_WHM_1_2: Use endpoint id passed as argument instead of hardcoded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

8 participants