diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 386253bb609e8e..3d2c6295f88f0c 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -37,6 +37,7 @@ RUN apt-get update \ valgrind \ docker.io \ iputils-ping \ + icecc \ && : RUN groupadd -g $USER_GID $USERNAME \ @@ -80,3 +81,13 @@ ENV TIZEN_ROOTFS /tizen_rootfs # Fast Model GDB plugins path for debugging support ENV FAST_MODEL_PLUGINS_PATH /opt/FastModelsPortfolio_11.16/plugins/Linux64_GCC-9.3 + +# Set up ccache as a pigweed command launcher when using the scripts/build/build_examples.py +# script. Also, set up icecc as the command prefix for ccache. Such setup allows to benefit +# from compilation caching and distributed compilation at the same time. +# +# NOTE: In order to use distributed compilation with icecc, one should run +# "scripts/icecc.sh start" before starting the build. +ENV CHIP_PW_COMMAND_LAUNCHER ccache +ENV CCACHE_PREFIX icecc +ENV PATH /usr/lib/ccache:$PATH diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index dc56ae93a28e1d..5c24cdec825ac1 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -1603,6 +1603,7 @@ xFFF xFFFF xfffff xFFFFFFEFFFFFFFFF +XMLPICSValidator xtensa xvzf xwayland diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index b8ab010a1dfe5f..00000000000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1,2 +0,0 @@ -# Current reviewers-XXX teams, who review everything for approval. -* @reviewers-amazon @reviewers-apple @reviewers-comcast @reviewers-google @reviewers-lg @reviewers-nordic @reviewers-samsung @reviewers-silabs @reviewers-tcl diff --git a/.github/workflows/bloat_check.yaml b/.github/workflows/bloat_check.yaml index b9e1b7b891ffdc..7ec2a6bf692011 100644 --- a/.github/workflows/bloat_check.yaml +++ b/.github/workflows/bloat_check.yaml @@ -34,7 +34,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:77 + image: ghcr.io/project-chip/chip-build:81 steps: - name: Checkout diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e7e5073ec54b02..f14a16f5e017b1 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -16,8 +16,9 @@ name: Builds on: push: - branches-ignore: - - 'dependabot/**' + branches: + - master + - 'v*-branch' pull_request: merge_group: workflow_dispatch: @@ -42,7 +43,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:77 + image: ghcr.io/project-chip/chip-build:81 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" @@ -138,7 +139,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:77 + image: ghcr.io/project-chip/chip-build:81 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" @@ -283,7 +284,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:77 + image: ghcr.io/project-chip/chip-build:81 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" @@ -346,7 +347,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:77 + image: ghcr.io/project-chip/chip-build:81 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" @@ -457,7 +458,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:77 + image: ghcr.io/project-chip/chip-build:81 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/chef.yaml b/.github/workflows/chef.yaml index a3af1d83649bc4..a1e5907cb91a70 100644 --- a/.github/workflows/chef.yaml +++ b/.github/workflows/chef.yaml @@ -16,8 +16,9 @@ name: Build Chef CI examples on all platforms on: push: - branches-ignore: - - 'dependabot/**' + branches: + - master + - 'v*-branch' pull_request: merge_group: @@ -35,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:77 + image: ghcr.io/project-chip/chip-build:81 options: --user root steps: @@ -56,7 +57,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:77 + image: ghcr.io/project-chip/chip-build-esp32:81 options: --user root steps: @@ -77,7 +78,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nrf-platform:77 + image: ghcr.io/project-chip/chip-build-nrf-platform:81 options: --user root steps: @@ -98,7 +99,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-telink:77 + image: ghcr.io/project-chip/chip-build-telink:81 options: --user root steps: @@ -110,7 +111,7 @@ jobs: platform: telink # - name: Update Zephyr to specific revision (for developers purpose) # shell: bash - # run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py ab81a585fca6a83b30e1f4e58a021113d6a3acb8" + # run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py 3ed7686a9378de6be1368c912f9a42f998bbfb18" - name: CI Examples Telink shell: bash run: | diff --git a/.github/workflows/cirque.yaml b/.github/workflows/cirque.yaml index 6fe17c3558c767..083b35062990e6 100644 --- a/.github/workflows/cirque.yaml +++ b/.github/workflows/cirque.yaml @@ -16,8 +16,9 @@ name: Cirque on: push: - branches-ignore: - - 'dependabot/**' + branches: + - master + - 'v*-branch' pull_request: merge_group: workflow_dispatch: diff --git a/.github/workflows/darwin-tests.yaml b/.github/workflows/darwin-tests.yaml index 815293204b09de..1ddc9e9fbc42a6 100644 --- a/.github/workflows/darwin-tests.yaml +++ b/.github/workflows/darwin-tests.yaml @@ -16,8 +16,9 @@ name: Darwin Tests on: push: - branches-ignore: - - 'dependabot/**' + branches: + - master + - 'v*-branch' pull_request: merge_group: workflow_dispatch: @@ -37,7 +38,7 @@ jobs: strategy: matrix: - build_variant: [no-ble-asan-clang] + build_variant: [no-ble-no-shell-asan-clang] env: BUILD_VARIANT: ${{matrix.build_variant}} diff --git a/.github/workflows/darwin.yaml b/.github/workflows/darwin.yaml index fa9e6144497414..bc4441a84f1c23 100644 --- a/.github/workflows/darwin.yaml +++ b/.github/workflows/darwin.yaml @@ -16,8 +16,9 @@ name: Darwin on: push: - branches-ignore: - - "dependabot/**" + branches: + - master + - 'v*-branch' pull_request: merge_group: workflow_dispatch: @@ -36,7 +37,7 @@ jobs: framework: name: Build framework if: github.actor != 'restyled-io[bot]' - runs-on: macos-14 + runs-on: macos-13 strategy: matrix: options: # We don't need a full matrix @@ -73,7 +74,7 @@ jobs: name: Run framework tests if: github.actor != 'restyled-io[bot]' needs: [framework] # serialize to avoid running to many parallel macos runners - runs-on: macos-14 + runs-on: macos-13 strategy: matrix: options: # We don't need a full matrix @@ -111,8 +112,7 @@ jobs: working-directory: src/darwin/Framework run: | mkdir -p /tmp/darwin/framework-tests - echo "This is a simple log" > /tmp/darwin/framework-tests/end_user_support_log.txt - ../../../out/debug/all-clusters-app/chip-all-clusters-app --interface-id -1 --end_user_support_log /tmp/darwin/framework-tests/end_user_support_log.txt > >(tee /tmp/darwin/framework-tests/all-cluster-app.log) 2> >(tee /tmp/darwin/framework-tests/all-cluster-app-err.log >&2) & + ../../../out/debug/all-clusters-app/chip-all-clusters-app --interface-id -1 > >(tee /tmp/darwin/framework-tests/all-cluster-app.log) 2> >(tee /tmp/darwin/framework-tests/all-cluster-app-err.log >&2) & export TEST_RUNNER_ASAN_OPTIONS=__CURRENT_VALUE__:detect_stack_use_after_return=1 diff --git a/.github/workflows/docker_img.yaml b/.github/workflows/docker_img.yaml index 05594606a610c7..8921a55cb2b9e0 100644 --- a/.github/workflows/docker_img.yaml +++ b/.github/workflows/docker_img.yaml @@ -101,7 +101,7 @@ jobs: # ApplyLayer exit status 1 stdout: stderr: write /opt/fsl-imx-xwayland/5.15-kirkstone/sysroots/armv8a-poky-linux/opt/ltp/testcases/bin/fanotify15: no space left on device # - "-imx" - "-java" - - "-k32w" + - "-nxp" - "-nrf-platform" - "-telink" - "-ti" diff --git a/.github/workflows/doxygen.yaml b/.github/workflows/doxygen.yaml index f486995e8b261f..9dc5bbab1ac574 100644 --- a/.github/workflows/doxygen.yaml +++ b/.github/workflows/doxygen.yaml @@ -16,6 +16,9 @@ name: Doxygen on: push: + branches: + - master + - 'v*-branch' paths: - "**.do[xc]" - "**.c[cs]?" @@ -81,7 +84,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-doxygen:77 + image: ghcr.io/project-chip/chip-build-doxygen:81 if: github.actor != 'restyled-io[bot]' diff --git a/.github/workflows/example-tv-casting-darwin.yaml b/.github/workflows/example-tv-casting-darwin.yaml index d8b7b7895e250e..1528d87c448e8b 100644 --- a/.github/workflows/example-tv-casting-darwin.yaml +++ b/.github/workflows/example-tv-casting-darwin.yaml @@ -16,8 +16,9 @@ name: TV Casting Example - Darwin on: push: - branches-ignore: - - "dependabot/**" + branches: + - master + - 'v*-branch' pull_request: merge_group: workflow_dispatch: diff --git a/.github/workflows/examples-ameba.yaml b/.github/workflows/examples-ameba.yaml index ef27d2252858dd..1c87787cf67ecc 100644 --- a/.github/workflows/examples-ameba.yaml +++ b/.github/workflows/examples-ameba.yaml @@ -16,8 +16,9 @@ name: Build example - Ameba on: push: - branches-ignore: - - 'dependabot/**' + branches: + - master + - 'v*-branch' pull_request: merge_group: @@ -38,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-ameba:77 + image: ghcr.io/project-chip/chip-build-ameba:81 options: --user root steps: diff --git a/.github/workflows/examples-asr.yaml b/.github/workflows/examples-asr.yaml index d61af7ea5f633d..7597ef1783eea4 100644 --- a/.github/workflows/examples-asr.yaml +++ b/.github/workflows/examples-asr.yaml @@ -16,8 +16,9 @@ name: Build example - ASR on: push: - branches-ignore: - - 'dependabot/**' + branches: + - master + - 'v*-branch' pull_request: merge_group: @@ -36,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-asr:77 + image: ghcr.io/project-chip/chip-build-asr:81 options: --user root steps: diff --git a/.github/workflows/examples-bouffalolab.yaml b/.github/workflows/examples-bouffalolab.yaml index 01935deba341bc..9a6989881e5e0c 100644 --- a/.github/workflows/examples-bouffalolab.yaml +++ b/.github/workflows/examples-bouffalolab.yaml @@ -16,8 +16,9 @@ name: Build example - BouffaloLab on: push: - branches-ignore: - - 'dependabot/**' + branches: + - master + - 'v*-branch' pull_request: merge_group: workflow_dispatch: @@ -37,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-bouffalolab:77 + image: ghcr.io/project-chip/chip-build-bouffalolab:81 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: @@ -57,9 +58,9 @@ jobs: run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ - --target bouffalolab-bl602-night-light-light \ - --target bouffalolab-bl602-night-light-light-mfd \ - --target bouffalolab-bl602-iot-matter-v1-light-115200-rpc \ + --target bouffalolab-bl602dk-light-easyflash \ + --target bouffalolab-bl602dk-light-mfd-littlefs \ + --target bouffalolab-bl602dk-light-rpc-115200-littlefs \ build \ --copy-artifacts-to out/artifacts \ " @@ -67,15 +68,15 @@ jobs: run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ bl602 bl602 lighting-app \ - out/artifacts/bouffalolab-bl602-night-light-light/chip-bl602-lighting-example.out \ + out/artifacts/bouffalolab-bl602dk-light-easyflash/chip-bl602-lighting-example.out \ /tmp/bloat_reports/ .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ bl602 bl602+mfd lighting-app \ - out/artifacts/bouffalolab-bl602-night-light-light-mfd/chip-bl602-lighting-example.out \ + out/artifacts/bouffalolab-bl602dk-light-mfd-littlefs/chip-bl602-lighting-example.out \ /tmp/bloat_reports/ .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ bl602 bl602+rpc lighting-app \ - out/artifacts/bouffalolab-bl602-iot-matter-v1-light-115200-rpc/chip-bl602-lighting-example.out \ + out/artifacts/bouffalolab-bl602dk-light-rpc-115200-littlefs/chip-bl602-lighting-example.out \ /tmp/bloat_reports/ - name: Clean out build output run: rm -rf ./out @@ -84,11 +85,11 @@ jobs: run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ - --target bouffalolab-bl706-night-light-light \ - --target bouffalolab-bl706-night-light-light-mfd \ - --target bouffalolab-bl706dk-light-ethernet \ - --target bouffalolab-bl706dk-light-wifi-fp \ - --target bouffalolab-xt-zb6-devkit-light-115200-rpc \ + --target bouffalolab-bl706dk-light-easyflash \ + --target bouffalolab-bl706dk-light-mfd-littlefs \ + --target bouffalolab-bl706dk-light-ethernet-littlefs \ + --target bouffalolab-bl706dk-light-wifi-littlefs \ + --target bouffalolab-bl706dk-light-rpc-115200-littlefs \ build \ --copy-artifacts-to out/artifacts \ " @@ -96,23 +97,23 @@ jobs: run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ bl702 bl702 lighting-app \ - out/artifacts/bouffalolab-bl706-night-light-light/chip-bl702-lighting-example.out \ + out/artifacts/bouffalolab-bl706dk-light-easyflash/chip-bl702-lighting-example.out \ /tmp/bloat_reports/ .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ bl702 bl702+mfd lighting-app \ - out/artifacts/bouffalolab-bl706-night-light-light-mfd/chip-bl702-lighting-example.out \ + out/artifacts/bouffalolab-bl706dk-light-mfd-littlefs/chip-bl702-lighting-example.out \ /tmp/bloat_reports/ .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ bl702 bl706-eth lighting-app \ - out/artifacts/bouffalolab-bl706dk-light-ethernet/chip-bl702-lighting-example.out \ + out/artifacts/bouffalolab-bl706dk-light-ethernet-littlefs/chip-bl702-lighting-example.out \ /tmp/bloat_reports/ .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ bl702 bl706-wifi lighting-app \ - out/artifacts/bouffalolab-bl706dk-light-wifi-fp/chip-bl702-lighting-example.out \ + out/artifacts/bouffalolab-bl706dk-light-wifi-littlefs/chip-bl702-lighting-example.out \ /tmp/bloat_reports/ .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ bl702 bl702+rpc lighting-app \ - out/artifacts/bouffalolab-xt-zb6-devkit-light-115200-rpc/chip-bl702-lighting-example.out \ + out/artifacts/bouffalolab-bl706dk-light-rpc-115200-littlefs/chip-bl702-lighting-example.out \ /tmp/bloat_reports/ - name: Clean out build output run: rm -rf ./out @@ -122,8 +123,8 @@ jobs: run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ - --target bouffalolab-bl704ldk-light \ - --target bouffalolab-bl704ldk-light-mfd \ + --target bouffalolab-bl704ldk-light-easyflash \ + --target bouffalolab-bl704ldk-light-mfd-littlefs \ build \ --copy-artifacts-to out/artifacts \ " @@ -131,11 +132,11 @@ jobs: run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ bl702l bl702l lighting-app \ - out/artifacts/bouffalolab-bl704ldk-light/chip-bl702l-lighting-example.out \ + out/artifacts/bouffalolab-bl704ldk-light-easyflash/chip-bl702l-lighting-example.out \ /tmp/bloat_reports/ .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ bl702l bl702l+mfd lighting-app \ - out/artifacts/bouffalolab-bl704ldk-light-mfd/chip-bl702l-lighting-example.out \ + out/artifacts/bouffalolab-bl704ldk-light-mfd-littlefs/chip-bl702l-lighting-example.out \ /tmp/bloat_reports/ - name: Clean out build output run: rm -rf ./out diff --git a/.github/workflows/examples-cc13xx_26xx.yaml b/.github/workflows/examples-cc13xx_26xx.yaml index 98f244ba3417cc..31988e66385236 100644 --- a/.github/workflows/examples-cc13xx_26xx.yaml +++ b/.github/workflows/examples-cc13xx_26xx.yaml @@ -16,8 +16,9 @@ name: Build example - TI CC13XX_26XX on: push: - branches-ignore: - - "dependabot/**" + branches: + - master + - 'v*-branch' pull_request: merge_group: @@ -41,7 +42,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-ti:77 + image: ghcr.io/project-chip/chip-build-ti:81 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-cc32xx.yaml b/.github/workflows/examples-cc32xx.yaml index 2c42df7deb139f..24edcb3fa92603 100644 --- a/.github/workflows/examples-cc32xx.yaml +++ b/.github/workflows/examples-cc32xx.yaml @@ -17,8 +17,9 @@ name: Build example - TI CC32XX on: workflow_dispatch: push: - branches-ignore: - - "dependabot/**" + branches: + - master + - 'v*-branch' pull_request: merge_group: @@ -40,7 +41,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-ti:77 + image: ghcr.io/project-chip/chip-build-ti:81 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index 8a3fc40338b825..6d286355970cce 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -16,8 +16,9 @@ name: Build example - EFR32 on: push: - branches-ignore: - - 'dependabot/**' + branches: + - master + - 'v*-branch' pull_request: merge_group: @@ -40,7 +41,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-efr32:78 + image: ghcr.io/project-chip/chip-build-efr32:81 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: @@ -68,6 +69,7 @@ jobs: "./scripts/build/build_examples.py \ --enable-flashbundle \ --target efr32-brd4187c-thermostat-openthread-mtd \ + --target efr32-brd4187c-air-quality-sensor-app-openthread-mtd \ --target efr32-brd4187c-switch-shell-use-ot-coap-lib \ --target efr32-brd4187c-unit-test \ build \ diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index 43cd5de45a7d8b..a2dca96dc6dd24 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -16,8 +16,9 @@ name: Build example - ESP32 on: push: - branches-ignore: - - 'dependabot/**' + branches: + - master + - 'v*-branch' pull_request: merge_group: @@ -36,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:77 + image: ghcr.io/project-chip/chip-build-esp32:81 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -126,7 +127,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:77 + image: ghcr.io/project-chip/chip-build-esp32:81 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-infineon.yaml b/.github/workflows/examples-infineon.yaml index 799b8f64ea0822..ada44f1557baaf 100644 --- a/.github/workflows/examples-infineon.yaml +++ b/.github/workflows/examples-infineon.yaml @@ -16,8 +16,9 @@ name: Build example - Infineon on: push: - branches-ignore: - - 'dependabot/**' + branches: + - master + - 'v*-branch' pull_request: merge_group: workflow_dispatch: @@ -37,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-infineon:77 + image: ghcr.io/project-chip/chip-build-infineon:81 env: # TODO: this should probably be part of the dockerfile itself CY_TOOLS_PATHS: /opt/Tools/ModusToolbox/tools_3.2 diff --git a/.github/workflows/examples-linux-arm.yaml b/.github/workflows/examples-linux-arm.yaml index 338fe3d7340458..7000082f03e32e 100644 --- a/.github/workflows/examples-linux-arm.yaml +++ b/.github/workflows/examples-linux-arm.yaml @@ -16,8 +16,9 @@ name: Build example - Linux ARM on: push: - branches-ignore: - - 'dependabot/**' + branches: + - master + - 'v*-branch' pull_request: merge_group: @@ -36,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-crosscompile:77 + image: ghcr.io/project-chip/chip-build-crosscompile:81 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -64,7 +65,7 @@ jobs: --target linux-arm64-chip-tool-nodeps-ipv6only \ --target linux-arm64-lock-clang \ --target linux-arm64-minmdns-clang \ - --target linux-arm64-light-rpc-ipv6only-clang \ + --target linux-arm64-light-data-model-enabled-rpc-ipv6only-clang \ --target linux-arm64-thermostat-no-ble-clang \ --target linux-arm64-lit-icd-no-ble-clang \ --target linux-arm64-fabric-admin-clang-rpc \ diff --git a/.github/workflows/examples-linux-imx.yaml b/.github/workflows/examples-linux-imx.yaml index dce469095b723c..d2f1014eb576cf 100644 --- a/.github/workflows/examples-linux-imx.yaml +++ b/.github/workflows/examples-linux-imx.yaml @@ -16,8 +16,9 @@ name: Build example - i.MX Linux on: push: - branches-ignore: - - 'dependabot/**' + branches: + - master + - 'v*-branch' pull_request: merge_group: @@ -36,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-imx:77 + image: ghcr.io/project-chip/chip-build-imx:81 steps: - name: Checkout diff --git a/.github/workflows/examples-linux-standalone.yaml b/.github/workflows/examples-linux-standalone.yaml index 0eff5db371300d..83b82369ba4878 100644 --- a/.github/workflows/examples-linux-standalone.yaml +++ b/.github/workflows/examples-linux-standalone.yaml @@ -16,8 +16,9 @@ name: Build example - Linux Standalone on: push: - branches-ignore: - - 'dependabot/**' + branches: + - master + - 'v*-branch' pull_request: merge_group: @@ -36,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:77 + image: ghcr.io/project-chip/chip-build:81 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-linux-tv-casting-app.yaml b/.github/workflows/examples-linux-tv-casting-app.yaml index f3ef14bf8a4905..e2617aeec7f42e 100644 --- a/.github/workflows/examples-linux-tv-casting-app.yaml +++ b/.github/workflows/examples-linux-tv-casting-app.yaml @@ -16,8 +16,9 @@ name: Test TV Casting Example on: push: - branches-ignore: - - "dependabot/**" + branches: + - master + - 'v*-branch' pull_request: merge_group: @@ -36,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:77 + image: ghcr.io/project-chip/chip-build:81 steps: - name: Checkout diff --git a/.github/workflows/examples-mw320.yaml b/.github/workflows/examples-mw320.yaml index bc2035c23b2fa3..8f76321a0c0242 100644 --- a/.github/workflows/examples-mw320.yaml +++ b/.github/workflows/examples-mw320.yaml @@ -16,8 +16,9 @@ name: Build example - MW320 on: push: - branches-ignore: - - 'dependabot/**' + branches: + - master + - 'v*-branch' pull_request: merge_group: @@ -39,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:77 + image: ghcr.io/project-chip/chip-build:81 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-nrfconnect.yaml b/.github/workflows/examples-nrfconnect.yaml index 48a94eef07c0ac..d781087fc84760 100644 --- a/.github/workflows/examples-nrfconnect.yaml +++ b/.github/workflows/examples-nrfconnect.yaml @@ -16,8 +16,9 @@ name: Build example - nRF Connect SDK on: push: - branches-ignore: - - 'dependabot/**' + branches: + - master + - 'v*-branch' pull_request: merge_group: @@ -39,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nrf-platform:77 + image: ghcr.io/project-chip/chip-build-nrf-platform:81 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-nuttx.yaml b/.github/workflows/examples-nuttx.yaml index 6be7cfb7d233ff..f1f682e00898f6 100644 --- a/.github/workflows/examples-nuttx.yaml +++ b/.github/workflows/examples-nuttx.yaml @@ -16,6 +16,9 @@ name: Build example - NuttX on: push: + branches: + - master + - 'v*-branch' pull_request: merge_group: workflow_dispatch: @@ -35,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nuttx:77 + image: ghcr.io/project-chip/chip-build-nuttx:81 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-nxp.yaml b/.github/workflows/examples-nxp.yaml index e8e335997db24d..6354718f25b700 100644 --- a/.github/workflows/examples-nxp.yaml +++ b/.github/workflows/examples-nxp.yaml @@ -16,8 +16,9 @@ name: Build example - NXP on: push: - branches-ignore: - - 'dependabot/**' + branches: + - master + - 'v*-branch' pull_request: merge_group: @@ -39,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-k32w:77 + image: ghcr.io/project-chip/chip-build-nxp:80 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: @@ -96,7 +97,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nxp:71 + image: ghcr.io/project-chip/chip-build-nxp:81 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: @@ -157,7 +158,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nxp:71 + image: ghcr.io/project-chip/chip-build-nxp:81 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: @@ -218,7 +219,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nxp:77 + image: ghcr.io/project-chip/chip-build-nxp:81 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: @@ -279,7 +280,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nxp-zephyr:77 + image: ghcr.io/project-chip/chip-build-nxp-zephyr:81 steps: - name: Checkout diff --git a/.github/workflows/examples-openiotsdk.yaml b/.github/workflows/examples-openiotsdk.yaml index 579a9d7b4eccee..95389cb157f5ee 100644 --- a/.github/workflows/examples-openiotsdk.yaml +++ b/.github/workflows/examples-openiotsdk.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-openiotsdk:77 + image: ghcr.io/project-chip/chip-build-openiotsdk:81 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" options: --privileged diff --git a/.github/workflows/examples-qpg.yaml b/.github/workflows/examples-qpg.yaml index 8b85f358b7e73e..312c49329283cd 100644 --- a/.github/workflows/examples-qpg.yaml +++ b/.github/workflows/examples-qpg.yaml @@ -16,8 +16,9 @@ name: Build example - QPG on: push: - branches-ignore: - - 'dependabot/**' + branches: + - master + - 'v*-branch' pull_request: merge_group: @@ -39,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:77 + image: ghcr.io/project-chip/chip-build:81 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-stm32.yaml b/.github/workflows/examples-stm32.yaml index f018e32f3ba199..2e8f8576735bfe 100644 --- a/.github/workflows/examples-stm32.yaml +++ b/.github/workflows/examples-stm32.yaml @@ -16,8 +16,9 @@ name: Build example - stm32 on: push: - branches-ignore: - - 'dependabot/**' + branches: + - master + - 'v*-branch' pull_request: merge_group: @@ -40,7 +41,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:77 + image: ghcr.io/project-chip/chip-build:81 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-telink.yaml b/.github/workflows/examples-telink.yaml index bcab5a1aa334eb..64b3d6bb7c93ce 100644 --- a/.github/workflows/examples-telink.yaml +++ b/.github/workflows/examples-telink.yaml @@ -16,8 +16,9 @@ name: Build example - Telink on: push: - branches-ignore: - - 'dependabot/**' + branches: + - master + - 'v*-branch' pull_request: merge_group: @@ -38,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-telink:77 + image: ghcr.io/project-chip/chip-build-telink:81 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -57,7 +58,7 @@ jobs: gh-context: ${{ toJson(github) }} # - name: Update Zephyr to specific revision (for developers purpose) - # run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py ab81a585fca6a83b30e1f4e58a021113d6a3acb8" + # run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py 3ed7686a9378de6be1368c912f9a42f998bbfb18" - name: Build example Telink (B92 retention) Air Quality Sensor App run: | @@ -72,6 +73,7 @@ jobs: run: rm -rf ./out - name: Build example Telink (W91) All Clusters App + continue-on-error: true run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py --target 'telink-tlsr9118bdk40d-all-clusters' build" @@ -130,6 +132,7 @@ jobs: run: rm -rf ./out/telink* - name: Build example Telink (W91) Lighting App with OTA, Factory Data + continue-on-error: true run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py --target 'telink-tlsr9118bdk40d-light-ota-factory-data' build" @@ -262,6 +265,7 @@ jobs: run: rm -rf ./out - name: Build example Telink (W91) Window Covering App + continue-on-error: true run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py --target 'telink-tlsr9118bdk40d-window-covering' build" diff --git a/.github/workflows/examples-tizen.yaml b/.github/workflows/examples-tizen.yaml index 3f4c68f35e7873..f0e4dfb3a206dd 100644 --- a/.github/workflows/examples-tizen.yaml +++ b/.github/workflows/examples-tizen.yaml @@ -16,8 +16,9 @@ name: Build example - Tizen on: push: - branches-ignore: - - 'dependabot/**' + branches: + - master + - 'v*-branch' pull_request: merge_group: @@ -36,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-tizen:77 + image: ghcr.io/project-chip/chip-build-tizen:81 options: --user root volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/full-android.yaml b/.github/workflows/full-android.yaml index ccaf534b28a09e..c3871ad8815152 100644 --- a/.github/workflows/full-android.yaml +++ b/.github/workflows/full-android.yaml @@ -16,8 +16,9 @@ name: Full builds - Android on: push: - branches-ignore: - - 'dependabot/**' + branches: + - master + - 'v*-branch' workflow_dispatch: concurrency: @@ -38,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-android:77 + image: ghcr.io/project-chip/chip-build-android:81 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/fuzzing-build.yaml b/.github/workflows/fuzzing-build.yaml index c70d750554c53e..c37ca98e1a513e 100644 --- a/.github/workflows/fuzzing-build.yaml +++ b/.github/workflows/fuzzing-build.yaml @@ -33,7 +33,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:77 + image: ghcr.io/project-chip/chip-build:81 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/gradle-wrapper-validation.yml b/.github/workflows/gradle-wrapper-validation.yml index ab3f49942329ce..ba0ade69c91b2c 100644 --- a/.github/workflows/gradle-wrapper-validation.yml +++ b/.github/workflows/gradle-wrapper-validation.yml @@ -1,8 +1,9 @@ name: "Validate Gradle Wrapper" on: push: - branches-ignore: - - 'dependabot/**' + branches: + - master + - 'v*-branch' pull_request: jobs: diff --git a/.github/workflows/java-tests.yaml b/.github/workflows/java-tests.yaml index 5dd637024642de..abf2e75027b489 100644 --- a/.github/workflows/java-tests.yaml +++ b/.github/workflows/java-tests.yaml @@ -16,8 +16,9 @@ name: Java Tests on: push: - branches-ignore: - - 'dependabot/**' + branches: + - master + - 'v*-branch' pull_request: merge_group: workflow_dispatch: @@ -42,7 +43,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-java:77 + image: ghcr.io/project-chip/chip-build-java:81 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=0 net.ipv6.conf.all.forwarding=0" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0bb74745cf96af..a914e5ae369b50 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -16,8 +16,9 @@ name: Lint Code Base on: push: - branches-ignore: - - 'dependabot/**' + branches: + - master + - 'v*-branch' pull_request: merge_group: workflow_dispatch: @@ -35,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:76 + image: ghcr.io/project-chip/chip-build:81 steps: - name: Checkout diff --git a/.github/workflows/minimal-build.yaml b/.github/workflows/minimal-build.yaml index 4866f9ebd16523..dae8a2b8ce0a7f 100644 --- a/.github/workflows/minimal-build.yaml +++ b/.github/workflows/minimal-build.yaml @@ -16,8 +16,9 @@ name: Minimal Build (Linux / configure) on: push: - branches-ignore: - - "dependabot/**" + branches: + - master + - 'v*-branch' pull_request: merge_group: @@ -33,7 +34,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-minimal:77 + image: ghcr.io/project-chip/chip-build-minimal:81 steps: - name: Checkout @@ -55,7 +56,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-minimal:77 + image: ghcr.io/project-chip/chip-build-minimal:81 steps: - name: Checkout diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index bff7dcfb4373c9..b3115f2ff3113a 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -16,8 +16,9 @@ name: QEMU on: push: - branches-ignore: - - 'dependabot/**' + branches: + - master + - 'v*-branch' pull_request: merge_group: @@ -40,7 +41,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32-qemu:77 + image: ghcr.io/project-chip/chip-build-esp32-qemu:81 volumes: - "/tmp/log_output:/tmp/test_logs" @@ -78,7 +79,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-tizen-qemu:76 + image: ghcr.io/project-chip/chip-build-tizen-qemu:81 options: --user root volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/release_artifacts.yaml b/.github/workflows/release_artifacts.yaml index 42bd9209abb007..22cf6b335eaa12 100644 --- a/.github/workflows/release_artifacts.yaml +++ b/.github/workflows/release_artifacts.yaml @@ -32,7 +32,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-esp32:77 + image: ghcr.io/project-chip/chip-build-esp32:81 steps: - name: Checkout @@ -64,7 +64,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-efr32:78 + image: ghcr.io/project-chip/chip-build-efr32:81 steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/restyled.yml b/.github/workflows/restyled.yml new file mode 100644 index 00000000000000..9174483ecb7069 --- /dev/null +++ b/.github/workflows/restyled.yml @@ -0,0 +1,35 @@ +name: Restyled + +on: + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + restyled: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - uses: restyled-io/actions/setup@v4 + - id: restyler + uses: restyled-io/actions/run@v4 + with: + fail-on-differences: true + + - if: | + !cancelled() && + steps.restyler.outputs.success == 'true' && + github.event.pull_request.head.repo.full_name == github.repository + uses: peter-evans/create-pull-request@v6 + with: + base: ${{ steps.restyler.outputs.restyled-base }} + branch: ${{ steps.restyler.outputs.restyled-head }} + title: ${{ steps.restyler.outputs.restyled-title }} + body: ${{ steps.restyler.outputs.restyled-body }} + labels: "restyled" + reviewers: ${{ github.event.pull_request.user.login }} + delete-branch: true diff --git a/.github/workflows/smoketest-android.yaml b/.github/workflows/smoketest-android.yaml index 46a83a850c66b5..7d0e124ca5656b 100644 --- a/.github/workflows/smoketest-android.yaml +++ b/.github/workflows/smoketest-android.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-android:77 + image: ghcr.io/project-chip/chip-build-android:81 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/spell.yml b/.github/workflows/spell.yml index f37a0e28711c6f..fa0fc222c8daa4 100644 --- a/.github/workflows/spell.yml +++ b/.github/workflows/spell.yml @@ -16,8 +16,9 @@ name: Run misspell on: push: - branches-ignore: - - 'dependabot/**' + branches: + - master + - 'v*-branch' paths: - "**.md" - ".github/.wordlist.txt" diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index d14d188a2fb6e4..c96c4ea023a59d 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -16,8 +16,9 @@ name: Tests on: push: - branches-ignore: - - 'dependabot/**' + branches: + - master + - 'v*-branch' pull_request: merge_group: workflow_dispatch: @@ -37,7 +38,7 @@ jobs: strategy: matrix: - build_variant: [no-ble-tsan-clang] + build_variant: [no-ble-no-shell-tsan-clang] chip_tool: [""] env: BUILD_VARIANT: ${{matrix.build_variant}} @@ -49,7 +50,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:77 + image: ghcr.io/project-chip/chip-build:81 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" @@ -91,6 +92,7 @@ jobs: --no-print \ --log-level info \ src/app/zap-templates/zcl/data-model/chip/global-attributes.xml \ + src/app/zap-templates/zcl/data-model/chip/chime-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/global-bitmaps.xml \ src/app/zap-templates/zcl/data-model/chip/global-enums.xml \ src/app/zap-templates/zcl/data-model/chip/global-structs.xml \ @@ -197,6 +199,8 @@ jobs: src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/water-heater-management-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/webrtc-requestor-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/webrtc-provider-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/wifi-network-management-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/window-covering.xml \ @@ -331,7 +335,7 @@ jobs: strategy: matrix: - build_variant: [no-ble-asan-clang, no-ble-tsan-clang] + build_variant: [no-ble-no-shell-asan-clang, no-ble-no-shell-tsan-clang] chip_tool: [""] env: BUILD_VARIANT: ${{matrix.build_variant}} @@ -451,7 +455,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:77 + image: ghcr.io/project-chip/chip-build:81 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=0 net.ipv6.conf.all.forwarding=0" diff --git a/.github/workflows/unit_integration_test.yaml b/.github/workflows/unit_integration_test.yaml index 7816c741c187f2..b51dfaa8fc2fde 100644 --- a/.github/workflows/unit_integration_test.yaml +++ b/.github/workflows/unit_integration_test.yaml @@ -16,8 +16,9 @@ name: Unit / Integration Tests on: push: - branches-ignore: - - 'dependabot/**' + branches: + - master + - 'v*-branch' pull_request: merge_group: @@ -39,7 +40,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:77 + image: ghcr.io/project-chip/chip-build:81 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/zap_regeneration.yaml b/.github/workflows/zap_regeneration.yaml index e8213e09d85428..483b9486d1bdc6 100644 --- a/.github/workflows/zap_regeneration.yaml +++ b/.github/workflows/zap_regeneration.yaml @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: ghcr.io/project-chip/chip-build:77 + image: ghcr.io/project-chip/chip-build:81 defaults: run: shell: sh diff --git a/.github/workflows/zap_templates.yaml b/.github/workflows/zap_templates.yaml index 85b7ffa78bdc2e..717f8ca95628fa 100644 --- a/.github/workflows/zap_templates.yaml +++ b/.github/workflows/zap_templates.yaml @@ -16,8 +16,9 @@ name: ZAP on: push: - branches-ignore: - - 'dependabot/**' + branches: + - master + - 'v*-branch' pull_request: merge_group: @@ -34,7 +35,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: ghcr.io/project-chip/chip-build:77 + image: ghcr.io/project-chip/chip-build:81 defaults: run: shell: sh diff --git a/.pullapprove.yml b/.pullapprove.yml index 5be3f21a28a327..81267526ee8e21 100644 --- a/.pullapprove.yml +++ b/.pullapprove.yml @@ -8,257 +8,250 @@ github_api_version: "shadow-cat-preview" ############################################################ overrides: - - if: "'hotfix' in labels" - status: success - explanation: "Hotfix label added, bypassing reviews" + - if: "'hotfix' in labels" + status: success + explanation: "Hotfix label added, bypassing reviews" - ############################################################ - # Draft PRs - ############################################################ - - if: "draft" - status: pending - explanation: "PR is draft, pending review" + ############################################################ + # Draft PRs + ############################################################ + - if: "draft" + status: pending + explanation: "PR is draft, pending review" - ############################################################ - # License Checks - ############################################################ - - if: "'*license/cla*' not in statuses.successful" - status: pending - explanation: "CLA must be agreed to by all contributors" + ############################################################ + # License Checks + ############################################################ + - if: "'*license/cla*' not in statuses.successful" + status: pending + explanation: "CLA must be agreed to by all contributors" - ############################################################ - # Conditions to Skip Review - ############################################################ - - if: "base.ref != 'master'" - status: success - explanation: "Review not required unless merging to master" + ############################################################ + # Conditions to Skip Review + ############################################################ + - if: "base.ref != 'master'" + status: success + explanation: "Review not required unless merging to master" - ############################################################ - # Required status checks - ############################################################ - - if: "'*restyle*' not in statuses.successful" - status: failure - explanation: "Style must be inline before reviewing can be complete" + ############################################################ + # Require Issues + ############################################################ + # disabling until we have PRs up to date + # - if: "'*issue*' not in statuses.successful" + # status: failure + # explanation: "An issue is required for all PRs" - ############################################################ - # Require Issues - ############################################################ - # disabling until we have PRs up to date - # - if: "'*issue*' not in statuses.successful" - # status: failure - # explanation: "An issue is required for all PRs" - - ############################################################ - # Fast tracking - ############################################################ - - if: "'fast track' in labels" - status: success - explanation: "PR has been fast tracked, bypassing reviews" + ############################################################ + # Fast tracking + ############################################################ + - if: "'fast track' in labels" + status: success + explanation: "PR has been fast tracked, bypassing reviews" ############################################################ # Notifications ############################################################ notifications: - ############################################################ - # New contributors - ############################################################ - - when: pull_request.opened - if: "author_association == 'FIRST_TIME_CONTRIBUTOR'" - comment: | - Hey @{{ author }}, thanks for the PR! The review will start once - the tests and CI checks have passed. If they don't, please review - the logs and try to fix the issues (ask for help if you can't - figure it out). A reviewer will be assigned once the tests are - passing and they'll walk you through getting the PR finished - and merged. + ############################################################ + # New contributors + ############################################################ + - when: pull_request.opened + if: "author_association == 'FIRST_TIME_CONTRIBUTOR'" + comment: | + Hey @{{ author }}, thanks for the PR! The review will start once + the tests and CI checks have passed. If they don't, please review + the logs and try to fix the issues (ask for help if you can't + figure it out). A reviewer will be assigned once the tests are + passing and they'll walk you through getting the PR finished + and merged. groups: - ############################################################ - # Shared Reviewer Groups - ############################################################ - shared-reviewers-amazon: - type: optional - conditions: - - files.include('*') - reviewers: - teams: [reviewers-amazon] - reviews: - request: 10 - shared-reviewers-apple: - type: optional - conditions: - - files.include('*') - reviewers: - teams: [reviewers-apple] - reviews: - request: 10 - shared-reviewers-bosch: - type: optional - conditions: - - files.include('*') - reviewers: - teams: [reviewers-bosch] - reviews: - request: 10 - shared-reviewers-comcast: - type: optional - conditions: - - files.include('*') - reviewers: - teams: [reviewers-comcast] - reviews: - request: 10 - shared-reviewers-dyson: - type: optional - conditions: - - files.include('*') - reviewers: - teams: [reviewers-dyson] - reviews: - request: 10 - shared-reviewers-espressif: - type: optional - conditions: - - files.include('*') - reviewers: - teams: [reviewers-espressif] - reviews: - request: 10 - shared-reviewers-google: - type: optional - conditions: - - files.include('*') - reviewers: - teams: [reviewers-google] - reviews: - request: 10 - shared-reviewers-grundfos: - type: optional - conditions: - - files.include('*') - reviewers: - teams: [reviewers-grundfos] - reviews: - request: 10 - shared-reviewers-irobot: - type: optional - conditions: - - files.include('*') - reviewers: - teams: [reviewers-irobot] - reviews: - request: 10 - shared-reviewers-lg: - type: optional - conditions: - - files.include('*') - reviewers: - teams: [reviewers-lg] - reviews: - request: 10 - shared-reviewers-logitech: - type: optional - conditions: - - files.include('*') - reviewers: - teams: [reviewers-logitech] - reviews: - request: 0 # Requested to be only on demand - shared-reviewers-nordic: - type: optional - conditions: - - files.include('*') - reviewers: - teams: [reviewers-nordic] - reviews: - request: 10 - shared-reviewers-nxp: - type: optional - conditions: - - files.include('*') - reviewers: - teams: [reviewers-nxp] - reviews: - request: 10 - shared-reviewers-samsung: - type: optional - conditions: - - files.include('*') - reviewers: - teams: [reviewers-samsung] - reviews: - request: 10 - shared-reviewers-eve: - type: optional - conditions: - - files.include('*') - reviewers: - teams: [reviewers-eve] - reviews: - request: 10 - # shared-reviewers-signify disabled for now, because the reviewers-signify - # team is empty and pullapprove seems to mis-handle that badly and treats - # _all_ reviewers as being in this group. - # - # See https://github.com/dropseed/pullapprove/issues/71 - # - # shared-reviewers-signify: - # type: optional - # conditions: - # - files.include('*') - # reviewers: - # teams: [reviewers-signify] - # reviews: - # request: 10 - shared-reviewers-silabs: - type: optional - conditions: - - files.include('*') - reviewers: - teams: [reviewers-silabs] - reviews: - request: 10 - shared-reviewers-somfy: - type: optional - conditions: - - files.include('*') - reviewers: - teams: [reviewers-somfy] - reviews: - request: 10 - shared-reviewers-tcl: - type: optional - conditions: - - files.include('*') - reviewers: - teams: [reviewers-tcl] - reviews: - request: 10 - shared-reviewers-qorvo: - type: optional - conditions: - - files.include('*') - reviewers: - teams: [reviewers-qorvo] - reviews: - request: 10 + ############################################################ + # Shared Reviewer Groups + ############################################################ + shared-reviewers-amazon: + type: optional + conditions: + - files.include('*') + reviewers: + teams: [reviewers-amazon] + reviews: + request: 0 # Do not auto-add + shared-reviewers-apple: + type: optional + conditions: + - files.include('*') + reviewers: + teams: [reviewers-apple] + reviews: + request: 0 # Do not auto-add + shared-reviewers-bosch: + type: optional + conditions: + - files.include('*') + reviewers: + teams: [reviewers-bosch] + reviews: + request: 0 # Do not auto-add + shared-reviewers-comcast: + type: optional + conditions: + - files.include('*') + reviewers: + teams: [reviewers-comcast] + reviews: + request: 0 # Do not auto-add + shared-reviewers-dyson: + type: optional + conditions: + - files.include('*') + reviewers: + teams: [reviewers-dyson] + reviews: + request: 0 # Do not auto-add + shared-reviewers-espressif: + type: optional + conditions: + - files.include('*') + reviewers: + teams: [reviewers-espressif] + reviews: + request: 0 # Do not auto-add + shared-reviewers-google: + type: optional + conditions: + - files.include('*') + reviewers: + teams: [reviewers-google] + reviews: + request: 0 # Do not auto-add + shared-reviewers-grundfos: + type: optional + conditions: + - files.include('*') + reviewers: + teams: [reviewers-grundfos] + reviews: + request: 0 # Do not auto-add + shared-reviewers-irobot: + type: optional + conditions: + - files.include('*') + reviewers: + teams: [reviewers-irobot] + reviews: + request: 0 # Do not auto-add + shared-reviewers-lg: + type: optional + conditions: + - files.include('*') + reviewers: + teams: [reviewers-lg] + reviews: + request: 0 # Do not auto-add + shared-reviewers-logitech: + type: optional + conditions: + - files.include('*') + reviewers: + teams: [reviewers-logitech] + reviews: + request: 0 # Requested to be only on demand + shared-reviewers-nordic: + type: optional + conditions: + - files.include('*') + reviewers: + teams: [reviewers-nordic] + reviews: + request: 0 # Do not auto-add + shared-reviewers-nxp: + type: optional + conditions: + - files.include('*') + reviewers: + teams: [reviewers-nxp] + reviews: + request: 0 # Do not auto-add + shared-reviewers-samsung: + type: optional + conditions: + - files.include('*') + reviewers: + teams: [reviewers-samsung] + reviews: + request: 0 # Do not auto-add + shared-reviewers-eve: + type: optional + conditions: + - files.include('*') + reviewers: + teams: [reviewers-eve] + reviews: + request: 0 # Do not auto-add + # shared-reviewers-signify disabled for now, because the reviewers-signify + # team is empty and pullapprove seems to mis-handle that badly and treats + # _all_ reviewers as being in this group. + # + # See https://github.com/dropseed/pullapprove/issues/71 + # + # shared-reviewers-signify: + # type: optional + # conditions: + # - files.include('*') + # reviewers: + # teams: [reviewers-signify] + # reviews: + # request: 0 # Do not auto-add + shared-reviewers-silabs: + type: optional + conditions: + - files.include('*') + reviewers: + teams: [reviewers-silabs] + reviews: + request: 0 # Do not auto-add + shared-reviewers-somfy: + type: optional + conditions: + - files.include('*') + reviewers: + teams: [reviewers-somfy] + reviews: + request: 0 # Do not auto-add + shared-reviewers-tcl: + type: optional + conditions: + - files.include('*') + reviewers: + teams: [reviewers-tcl] + reviews: + request: 0 # Do not auto-add + shared-reviewers-qorvo: + type: optional + conditions: + - files.include('*') + reviewers: + teams: [reviewers-qorvo] + reviews: + request: 0 # Do not auto-add - ############################################################ - # Base Required Reviewers - ############################################################ - required-reviewers: - description: > - [Required - Reviewers](https://github.com/project-chip/connectedhomeip/blob/master/CONTRIBUTING.md#review-requirements) - This is the main group of required reviews for general pull - requests. - type: required - requirements: - - len(groups.approved.include('shared-reviewers-*')) >= 2 - reviews: - required: 0 - labels: - approved: "review - approved" - pending: "review - pending" - rejected: "review - changed requested" + ############################################################ + # Base Required Reviewers + ############################################################ + required-reviewers: + description: > + [Required + Reviewers](https://github.com/project-chip/connectedhomeip/blob/master/CONTRIBUTING.md#review-requirements) + This is the main group of required reviews for general pull + requests. + type: required + requirements: + - len(groups.approved.include('shared-reviewers-*')) >= 2 + reviews: + required: 0 + labels: + approved: "review - approved" + pending: "review - pending" + rejected: "review - changed requested" diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 00000000000000..970981cefcc33a --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,71 @@ +/src/platform/ASR/ @tx2rx +asr/ @tx2rx +chip-build-asr/ @tx2rx + +/src/platform/Ameba/ @pankore +ameba/ @pankore +chip-build-ameba/ @pankore + +/src/platform/Beken/ @zhengyaohan + +*.mm @project-chip/reviewers-apple +darwin/ @project-chip/reviewers-apple +/src/darwin/ @project-chip/reviewers-apple +/src/platform/Darwin/ @project-chip/reviewers-apple +/examples/darwin-framework-tool/ @project-chip/reviewers-apple + +/src/platform/ESP32/ @project-chip/reviewers-espressif +esp32/ @project-chip/reviewers-espressif +chip-build-esp32/ @project-chip/reviewers-espressif +chip-build-esp32-qemu/ @project-chip/reviewers-espressif + +/src/platform/Infineon/ @ifyall +infineon/ @ifyall +chip-build-infineon/ @ifyall + +/src/platform/NuttX/ @zhhyu7 +chip-build-nuttx/ @zhhyu7 + +/src/platform/Tizen/ @arkq +tizen/ @arkq +chip-build-tizen/ @arkq +chip-build-tizen-qemu/ @arkq + +*.java @project-chip/reviewers-google +*.kt @project-chip/reviewers-google +android/ @project-chip/reviewers-google +/src/examples/chef/ @project-chip/reviewers-google +/integrations/appengine/ @project-chip/reviewers-google +/integrations/cloudbuild/ @project-chip/reviewers-google +/integrations/compute_engine/ @project-chip/reviewers-google +chip-build-java/ @project-chip/reviewers-google +chip-build-android/ @project-chip/reviewers-google + +/src/platform/bouffalolab/ @wy-hh +chip-build-bouffalolab/ @wy-hh + +cc13xx_26xx/ @s-jain2022 +cc32xx/ @s-jain2022 + +/src/platform/mt793x/ @pakls +nrfconnect/ @project-chip/reviewers-nordic +chip-build-nrf-platform/ @project-chip/reviewers-nordic +Zephyr/ @project-chip/reviewers-nordic @project-chip/reviewers-nxp @s07641069 + + +nxp/ @project-chip/reviewers-nxp +chip-build-nxp/ @project-chip/reviewers-nxp +chip-build-nxp-zephyr/ @project-chip/reviewers-nxp +chip-build-k32w/ @project-chip/reviewers-nxp + +qpg/ @dvdm-qorvo + +silabs/ @project-chip/reviewers-silabs +chip-build-efr32/ @project-chip/reviewers-silabs + +stm32/ @STYoannZamaron + +telink/ @s07641069 +chip-build-telink/ @s07641069 + +webos/ @joonhaengHeo diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index 2e2ebe606f089f..0310e2a365eb66 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn @@ -24,10 +24,40 @@ if (current_os == "mac" || current_os == "ios") { import("${build_root}/config/mac/mac_sdk.gni") } +# To use different sanitizer options, use `gn args .` in the out folder and +# use settings like: +# +# is_clang=true +# is_debug=true +# optimize_for_size=false +# is_asan=true +# is_sanitize_fatal=false +# + declare_args() { # Enable -Werror. This can be disabled if using a different compiler # with unfixed or unsupported wanings. treat_warnings_as_errors = true + + # Enable Thread sanitizer + is_tsan = false + + # Enable memory sanitizer + is_msan = false + + # enable undefined behavior sanitizer + is_ubsan = false + + # Exit on sanitize error. Generally standard libraries may get errors + # so not stopping on the first error is often useful + is_sanitize_fatal = true + + # Enable or disable Runtime Type Information (RTTI). + # Defaults true on darwin because Darwin.framework uses it. + enable_rtti = current_os == "mac" || current_os == "ios" + + # Enable or disable support for C++ exceptions. + enable_exceptions = false } if (current_cpu == "arm" || current_cpu == "arm64") { @@ -397,21 +427,6 @@ config("runtime_default") { # is_sanitize_fatal=false # -declare_args() { - # Enable Thread sanitizer - is_tsan = false - - # Enable memory sanitizer - is_msan = false - - # enable undefined behavior sanitizer - is_ubsan = false - - # Exit on sanitize error. Generally standard libraries may get errors - # so not stopping on the first error is often useful - is_sanitize_fatal = true -} - config("sanitize_address") { defines = [] cflags = [ @@ -452,10 +467,14 @@ config("sanitize_undefined_behavior") { "-fsanitize=unsigned-integer-overflow", "-fsanitize=implicit-conversion", "-fsanitize=nullability", - "-fno-sanitize=vptr,function", ] } + #According to the LLVM UBSan documentation, sanitizing vptr is incompatible with the -fno-rtti flag. + if (!enable_rtti) { + cflags += [ "-fno-sanitize=vptr" ] + } + ldflags = cflags } @@ -522,15 +541,6 @@ config("coverage_default") { } } -declare_args() { - # Enable or disable Runtime Type Information (RTTI). - # Defaults true on darwin because Darwin.framework uses it. - enable_rtti = current_os == "mac" || current_os == "ios" - - # Enable or disable support for C++ exceptions. - enable_exceptions = false -} - config("no_rtti") { cflags_cc = [ "-fno-rtti" ] } diff --git a/config/esp32/components/chip/CMakeLists.txt b/config/esp32/components/chip/CMakeLists.txt index 161a3ce6e2249c..fde62765dda808 100644 --- a/config/esp32/components/chip/CMakeLists.txt +++ b/config/esp32/components/chip/CMakeLists.txt @@ -143,9 +143,6 @@ endif() if(CONFIG_ENABLE_ICD_SERVER) chip_gn_arg_append("chip_enable_icd_server" "true") - if(CONFIG_ICD_ENFORCE_SIT_SLOW_POLL_LIMIT) - chip_gn_arg_append("icd_enforce_sit_slow_poll_limit" "true") - endif() if(CONFIG_ICD_REPORT_ON_ACTIVE_MODE) chip_gn_arg_append("chip_icd_report_on_active_mode" "true") endif() @@ -321,10 +318,6 @@ if (CONFIG_ENABLE_ESP_INSIGHTS_TRACE) target_include_directories(${COMPONENT_LIB} INTERFACE "${CHIP_ROOT}/src/tracing/esp32_trace/include") endif() -if (CONFIG_ENABLE_MATTER_EVENT_LIST) - chip_gn_arg_append ("enable_eventlist_attribute" "true") -endif() - set(args_gn_input "${CMAKE_CURRENT_BINARY_DIR}/args.gn.in") file(GENERATE OUTPUT "${args_gn_input}" CONTENT "${chip_gn_args}") diff --git a/config/esp32/components/chip/Kconfig b/config/esp32/components/chip/Kconfig index de2963901fd7be..c61ac770a608ff 100644 --- a/config/esp32/components/chip/Kconfig +++ b/config/esp32/components/chip/Kconfig @@ -32,7 +32,7 @@ menu "CHIP Core" default 8 help The maximum number of simultaneously active CHIP exchange contexts. - + An exchange context object is used to track the state of an ongoing CHIP message exchange (conversation) with a peer, e.g. a cloud service, a mobile application, or another device. @@ -410,13 +410,6 @@ menu "CHIP Device Layer" help Enables or Disables ICD server - config ICD_ENFORCE_SIT_SLOW_POLL_LIMIT - bool "Enforce SIT Slow Polling Max value to 15 seconds" - depends on ENABLE_ICD_SERVER - default n - help - Set to true to enforce SIT Slow Polling Max value to 15seconds - config ICD_REPORT_ON_ACTIVE_MODE bool "Emit a report on entering active mode" depends on ENABLE_ICD_SERVER @@ -1298,15 +1291,6 @@ menu "CHIP Device Layer" endmenu - menu "Enable Matter Event List" - config ENABLE_MATTER_EVENT_LIST - bool "Enable Matter support Event List attribute" - default n - help - Enable Matter support Event List attribute. - - endmenu - menu "Enable BLE Extended Announcement" config ENABLE_BLE_EXT_ANNOUNCEMENT bool "Enable BLE Extended Announcement" diff --git a/config/nrfconnect/chip-module/CMakeLists.txt b/config/nrfconnect/chip-module/CMakeLists.txt index 3896ed6be7d9ad..b3180fdc1b391f 100644 --- a/config/nrfconnect/chip-module/CMakeLists.txt +++ b/config/nrfconnect/chip-module/CMakeLists.txt @@ -156,7 +156,6 @@ if (CONFIG_CHIP_ENABLE_ICD_SUPPORT) matter_add_gn_arg_bool ("chip_enable_icd_checkin" CONFIG_CHIP_ICD_CHECK_IN_SUPPORT) matter_add_gn_arg_bool ("chip_enable_icd_user_active_mode_trigger" CONFIG_CHIP_ICD_UAT_SUPPORT) matter_add_gn_arg_bool ("chip_enable_icd_dsls" CONFIG_CHIP_ICD_DSLS_SUPPORT) - matter_add_gn_arg_bool ("icd_enforce_sit_slow_poll_limit" TRUE) endif() if (CONFIG_CHIP_FACTORY_DATA OR CONFIG_CHIP_FACTORY_DATA_CUSTOM_BACKEND) diff --git a/config/nxp/cmake/common.cmake b/config/nxp/cmake/common.cmake index df169ef7089343..9fca4177d8c3cc 100644 --- a/config/nxp/cmake/common.cmake +++ b/config/nxp/cmake/common.cmake @@ -47,7 +47,6 @@ matter_add_gn_arg_bool ("chip_enable_wifi" CONFIG_CHIP_WI matter_add_gn_arg_bool ("chip_enable_ethernet" CONFIG_CHIP_ETHERNET) matter_add_gn_arg_bool ("chip_system_config_provide_statistics" CONFIG_CHIP_STATISTICS) matter_add_gn_arg_bool ("chip_enable_icd_server" CONFIG_CHIP_ENABLE_ICD_SUPPORT) -matter_add_gn_arg_bool ("enable_eventlist_attribute" TRUE) matter_add_gn_arg_bool ("chip_enable_ota_requestor" CONFIG_CHIP_OTA_REQUESTOR) if(CONFIG_DEBUG) diff --git a/config/telink/chip-module/CMakeLists.txt b/config/telink/chip-module/CMakeLists.txt index d4c02aa5d621b8..bfc26ce5d96e56 100644 --- a/config/telink/chip-module/CMakeLists.txt +++ b/config/telink/chip-module/CMakeLists.txt @@ -152,6 +152,7 @@ matter_generate_args_tmp_file() # ============================================================================== # Build chip library # ============================================================================== + matter_build(chip LIB_SHELL ${CONFIG_CHIP_LIB_SHELL} DEVICE_INFO_EXAMPLE_PROVIDER ${CONFIG_CHIP_EXAMPLE_DEVICE_INFO_PROVIDER} @@ -159,60 +160,43 @@ matter_build(chip ) set_property(GLOBAL APPEND PROPERTY ZEPHYR_INTERFACE_LIBS chip) +include(${TELINK_COMMON}/common.cmake) + # ============================================================================== -# Define 'chip-ota-image' target for building CHIP OTA image +# Define 'process_binaries' target for collecting final binary to flash # ============================================================================== -include(${TELINK_COMMON}/common.cmake) - -set(BLOCK_SIZE "1024") +add_custom_target( + process_binaries ALL + COMMAND ${Python3_EXECUTABLE} ${CHIP_ROOT}/scripts/tools/telink/process_binaries.py + WORKING_DIRECTORY ${PROJECT_BINARY_DIR} +) +add_dependencies(process_binaries ${ZEPHYR_FINAL_EXECUTABLE}) -if (CONFIG_BOOTLOADER_MCUBOOT) - dt_nodelabel(dts_partition_path NODELABEL "boot_partition") - dt_reg_size(mcuboot_size PATH ${dts_partition_path}) - math(EXPR boot_blocks "${mcuboot_size} / ${BLOCK_SIZE}" OUTPUT_FORMAT DECIMAL) +# ============================================================================== +# Define 'build_mcuboot' target for building the MCUBoot bootloader +# ============================================================================== +if (CONFIG_BOOTLOADER_MCUBOOT AND CONFIG_SOC_SERIES_RISCV_TELINK_B9X) add_custom_target(build_mcuboot ALL COMMAND west build -b ${BASE_BOARD} -d build_mcuboot ${ZEPHYR_BASE}/../bootloader/mcuboot/boot/zephyr -- -DOVERLAY_CONFIG=${GLOBAL_BOOT_CONF_OVERLAY_FILE} -DDTC_OVERLAY_FILE="${GLOBAL_BOOT_DTC_OVERLAY_FILE};${FLASH_DTC_OVERLAY_FILE};${USB_BOOT_DTC_OVERLAY_FILE};${MARS_BOOT_DTC_OVERLAY_FILE}" COMMAND - cp ${PROJECT_BINARY_DIR}/../modules/chip-module/build_mcuboot/zephyr/zephyr.bin ${PROJECT_BINARY_DIR}/zephyr.mcuboot.bin - ) - - add_custom_target(merge_mcuboot ALL - COMMAND - dd if=${PROJECT_BINARY_DIR}/zephyr.mcuboot.bin of=${PROJECT_BINARY_DIR}/zephyr.bin - COMMAND - dd if=${PROJECT_BINARY_DIR}/zephyr.signed.bin of=${PROJECT_BINARY_DIR}/zephyr.bin bs=${BLOCK_SIZE} seek=${boot_blocks} + cp ${PROJECT_BINARY_DIR}/../modules/chip-module/build_mcuboot/zephyr/zephyr.bin ${PROJECT_BINARY_DIR}/mcuboot.bin ) - - add_dependencies(merge_mcuboot ${ZEPHYR_FINAL_EXECUTABLE}) - - if (CONFIG_CHIP_OTA_IMAGE_BUILD) - chip_ota_image(chip-ota-image - INPUT_FILES ${PROJECT_BINARY_DIR}/zephyr.signed.bin - OUTPUT_FILE ${PROJECT_BINARY_DIR}/zephyr-ota.bin - ) - - add_dependencies(chip-ota-image ${ZEPHYR_FINAL_EXECUTABLE}) - endif() endif() -if (CONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE) - dt_nodelabel(dts_partition_path NODELABEL "factory_partition") - dt_reg_addr(factory_size PATH ${dts_partition_path}) - math(EXPR factory_blocks "${factory_size} / ${BLOCK_SIZE}" OUTPUT_FORMAT DECIMAL) +# ============================================================================== +# Define 'chip-ota-image' target for building CHIP OTA image +# ============================================================================== - add_custom_target(merge_factory_data ALL - COMMAND - dd if=${PROJECT_BINARY_DIR}/factory/factory_data.bin of=${PROJECT_BINARY_DIR}/zephyr.bin bs=${BLOCK_SIZE} seek=${factory_blocks} +if (CONFIG_CHIP_OTA_IMAGE_BUILD) + chip_ota_image(chip-ota-image + INPUT_FILES ${PROJECT_BINARY_DIR}/zephyr.signed.bin + OUTPUT_FILE ${PROJECT_BINARY_DIR}/${CONFIG_CHIP_OTA_IMAGE_FILE_NAME} ) - if (CONFIG_CHIP_OTA_IMAGE_BUILD) - add_dependencies(merge_factory_data merge_mcuboot) - else() - add_dependencies(merge_factory_data ${ZEPHYR_FINAL_EXECUTABLE}) - endif() + add_dependencies(chip-ota-image process_binaries) endif() # ============================================================================== @@ -223,27 +207,4 @@ if (CONFIG_CHIP_FACTORY_DATA_BUILD) telink_generate_factory_data() endif() -if (CONFIG_SOC_SERIES_RISCV_TELINK_W91 AND CONFIG_TELINK_W91_FETCH_N22_BIN) - dt_nodelabel(flash_path NODELABEL "flash") - dt_reg_size(flash_size PATH ${flash_path}) - math(EXPR flash_blocks "${flash_size} / ${BLOCK_SIZE}" OUTPUT_FORMAT DECIMAL) - - add_custom_target(merge_n22 ALL - COMMAND - [ -f ${PROJECT_BINARY_DIR}/n22.bin ] && ( - dd if=/dev/zero bs=${BLOCK_SIZE} count=${flash_blocks} | tr '\\000' '\\377' > ${PROJECT_BINARY_DIR}/merged.bin && - dd if=${PROJECT_BINARY_DIR}/zephyr.bin of=${PROJECT_BINARY_DIR}/merged.bin conv=notrunc && - dd if=${PROJECT_BINARY_DIR}/n22.bin of=${PROJECT_BINARY_DIR}/merged.bin bs=${BLOCK_SIZE} seek=${flash_blocks} conv=notrunc - ) || true - ) - - if (CONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE) - add_dependencies(merge_n22 merge_factory_data) - elseif (CONFIG_CHIP_OTA_IMAGE_BUILD) - add_dependencies(merge_n22 merge_mcuboot) - else() - add_dependencies(merge_n22 ${ZEPHYR_FINAL_EXECUTABLE}) - endif() -endif() - endif() # CONFIG_CHIP diff --git a/config/telink/chip-module/Kconfig b/config/telink/chip-module/Kconfig index d09f4534835ddf..7d9296bed5dfcc 100644 --- a/config/telink/chip-module/Kconfig +++ b/config/telink/chip-module/Kconfig @@ -1,5 +1,5 @@ # -# Copyright (c) 2023 Project CHIP Authors +# Copyright (c) 2023-2024 Project CHIP Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -46,6 +46,7 @@ config BOOTLOADER_MCUBOOT select IMG_MANAGER select STREAM_FLASH select STREAM_FLASH_ERASE + select TELINK_W91_N22_MATTER_OTA_LAYOUT if BOARD_TLSR9118BDK40D config CHIP_OTA_REQUESTOR_BUFFER_SIZE int "OTA Requestor image buffer size" @@ -123,9 +124,14 @@ config CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE default y help Enables merging generated factory data with the build target zephyr.bin file. - As a result, output file zephyr.bin will consist of all partitions including + As a result, output file merged.bin will consist of all partitions including factory data. +config TELINK_FACTORY_DATA_PARTITION_ADDR + hex "factory-data partition address" + default $(dt_node_reg_addr_hex,$(dt_nodelabel_path,factory_partition),0) + depends on CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE + # Use default certificates without generating or providing them config CHIP_FACTORY_DATA_USE_DEFAULT_CERTS bool "Use default certificates located in Matter repository" @@ -180,6 +186,7 @@ config CHIP_IPV4 config CHIP_BUTTON_MANAGER_IRQ_MODE bool "Use GPIO in an IRQ mode instead of polling the GPIO" + default y if BOARD_TLSR9118BDK40D default PM help Use GPIO in an IRQ mode to avoid button polling loop and extend the battery lifetime by waking up by GPIO event. diff --git a/config/telink/chip-module/Kconfig.defaults b/config/telink/chip-module/Kconfig.defaults index 80d07150f291d9..ed8172b1824584 100644 --- a/config/telink/chip-module/Kconfig.defaults +++ b/config/telink/chip-module/Kconfig.defaults @@ -180,7 +180,8 @@ config PWM endif # Board non-retention config -if BOARD_TLSR9118BDK40D || BOARD_TLSR9528A || BOARD_TLSR9258A || BOARD_TLSR9518ADK80D +if BOARD_TLSR9118BDK40D || BOARD_TLSR9118BDK40D_V1 || \ + BOARD_TLSR9528A || BOARD_TLSR9258A || BOARD_TLSR9518ADK80D config PWM default y endif @@ -192,6 +193,10 @@ config DYNAMIC_INTERRUPTS config CHIP_OTA_REQUESTOR default y +config MCUBOOT_SIGNATURE_KEY_FILE + default "bootloader/mcuboot/root-ec-p256.pem" if BOARD_TLSR9118BDK40D + depends on BOOTLOADER_MCUBOOT + # In current config/zephyr/Kconfig # next deprecated values are selected # warning: Deprecated symbol CPLUSPLUS is enabled. @@ -292,7 +297,7 @@ config NET_CONFIG_INIT_TIMEOUT config CHIP_WIFI bool "Enable Telink Wi-Fi support" - default y if BOARD_TLSR9118BDK40D + default y if BOARD_TLSR9118BDK40D || BOARD_TLSR9118BDK40D_V1 select WIFI_W91 select WIFI select NET_STATISTICS diff --git a/data_model/in_progress/clusters/ACL-Cluster.xml b/data_model/1.4/clusters/ACL-Cluster.xml similarity index 100% rename from data_model/in_progress/clusters/ACL-Cluster.xml rename to data_model/1.4/clusters/ACL-Cluster.xml diff --git a/data_model/in_progress/clusters/AccountLogin.xml b/data_model/1.4/clusters/AccountLogin.xml similarity index 100% rename from data_model/in_progress/clusters/AccountLogin.xml rename to data_model/1.4/clusters/AccountLogin.xml diff --git a/data_model/in_progress/clusters/AdminCommissioningCluster.xml b/data_model/1.4/clusters/AdminCommissioningCluster.xml similarity index 100% rename from data_model/in_progress/clusters/AdminCommissioningCluster.xml rename to data_model/1.4/clusters/AdminCommissioningCluster.xml diff --git a/data_model/in_progress/clusters/AirQuality.xml b/data_model/1.4/clusters/AirQuality.xml similarity index 100% rename from data_model/in_progress/clusters/AirQuality.xml rename to data_model/1.4/clusters/AirQuality.xml diff --git a/data_model/in_progress/clusters/AlarmBase.xml b/data_model/1.4/clusters/AlarmBase.xml similarity index 100% rename from data_model/in_progress/clusters/AlarmBase.xml rename to data_model/1.4/clusters/AlarmBase.xml diff --git a/data_model/in_progress/clusters/ApplicationBasic.xml b/data_model/1.4/clusters/ApplicationBasic.xml similarity index 100% rename from data_model/in_progress/clusters/ApplicationBasic.xml rename to data_model/1.4/clusters/ApplicationBasic.xml diff --git a/data_model/in_progress/clusters/ApplicationLauncher.xml b/data_model/1.4/clusters/ApplicationLauncher.xml similarity index 100% rename from data_model/in_progress/clusters/ApplicationLauncher.xml rename to data_model/1.4/clusters/ApplicationLauncher.xml diff --git a/data_model/in_progress/clusters/AudioOutput.xml b/data_model/1.4/clusters/AudioOutput.xml similarity index 100% rename from data_model/in_progress/clusters/AudioOutput.xml rename to data_model/1.4/clusters/AudioOutput.xml diff --git a/data_model/in_progress/clusters/BallastConfiguration.xml b/data_model/1.4/clusters/BallastConfiguration.xml similarity index 100% rename from data_model/in_progress/clusters/BallastConfiguration.xml rename to data_model/1.4/clusters/BallastConfiguration.xml diff --git a/data_model/in_progress/clusters/BasicInformationCluster.xml b/data_model/1.4/clusters/BasicInformationCluster.xml similarity index 97% rename from data_model/in_progress/clusters/BasicInformationCluster.xml rename to data_model/1.4/clusters/BasicInformationCluster.xml index 168a0353761159..483cd643e65bda 100644 --- a/data_model/in_progress/clusters/BasicInformationCluster.xml +++ b/data_model/1.4/clusters/BasicInformationCluster.xml @@ -60,7 +60,7 @@ Davis, CA 95616, USA - + @@ -303,11 +303,6 @@ Davis, CA 95616, USA - - - - - diff --git a/data_model/in_progress/clusters/Binding-Cluster.xml b/data_model/1.4/clusters/Binding-Cluster.xml similarity index 100% rename from data_model/in_progress/clusters/Binding-Cluster.xml rename to data_model/1.4/clusters/Binding-Cluster.xml diff --git a/data_model/in_progress/clusters/BooleanState.xml b/data_model/1.4/clusters/BooleanState.xml similarity index 100% rename from data_model/in_progress/clusters/BooleanState.xml rename to data_model/1.4/clusters/BooleanState.xml diff --git a/data_model/in_progress/clusters/BooleanStateConfiguration.xml b/data_model/1.4/clusters/BooleanStateConfiguration.xml similarity index 100% rename from data_model/in_progress/clusters/BooleanStateConfiguration.xml rename to data_model/1.4/clusters/BooleanStateConfiguration.xml diff --git a/data_model/in_progress/clusters/Channel.xml b/data_model/1.4/clusters/Channel.xml similarity index 100% rename from data_model/in_progress/clusters/Channel.xml rename to data_model/1.4/clusters/Channel.xml diff --git a/data_model/in_progress/clusters/ColorControl.xml b/data_model/1.4/clusters/ColorControl.xml similarity index 100% rename from data_model/in_progress/clusters/ColorControl.xml rename to data_model/1.4/clusters/ColorControl.xml diff --git a/data_model/in_progress/clusters/CommissionerControlCluster.xml b/data_model/1.4/clusters/CommissionerControlCluster.xml similarity index 98% rename from data_model/in_progress/clusters/CommissionerControlCluster.xml rename to data_model/1.4/clusters/CommissionerControlCluster.xml index d3b8380aaba929..d02e9592ee232d 100644 --- a/data_model/in_progress/clusters/CommissionerControlCluster.xml +++ b/data_model/1.4/clusters/CommissionerControlCluster.xml @@ -116,7 +116,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/in_progress/clusters/ConcentrationMeasurement.xml b/data_model/1.4/clusters/ConcentrationMeasurement.xml similarity index 100% rename from data_model/in_progress/clusters/ConcentrationMeasurement.xml rename to data_model/1.4/clusters/ConcentrationMeasurement.xml diff --git a/data_model/in_progress/clusters/ContentAppObserver.xml b/data_model/1.4/clusters/ContentAppObserver.xml similarity index 100% rename from data_model/in_progress/clusters/ContentAppObserver.xml rename to data_model/1.4/clusters/ContentAppObserver.xml diff --git a/data_model/in_progress/clusters/ContentControl.xml b/data_model/1.4/clusters/ContentControl.xml similarity index 100% rename from data_model/in_progress/clusters/ContentControl.xml rename to data_model/1.4/clusters/ContentControl.xml diff --git a/data_model/in_progress/clusters/ContentLauncher.xml b/data_model/1.4/clusters/ContentLauncher.xml similarity index 100% rename from data_model/in_progress/clusters/ContentLauncher.xml rename to data_model/1.4/clusters/ContentLauncher.xml diff --git a/data_model/in_progress/clusters/Descriptor-Cluster.xml b/data_model/1.4/clusters/Descriptor-Cluster.xml similarity index 100% rename from data_model/in_progress/clusters/Descriptor-Cluster.xml rename to data_model/1.4/clusters/Descriptor-Cluster.xml diff --git a/data_model/in_progress/clusters/DeviceEnergyManagement.xml b/data_model/1.4/clusters/DeviceEnergyManagement.xml similarity index 100% rename from data_model/in_progress/clusters/DeviceEnergyManagement.xml rename to data_model/1.4/clusters/DeviceEnergyManagement.xml diff --git a/data_model/in_progress/clusters/DiagnosticLogsCluster.xml b/data_model/1.4/clusters/DiagnosticLogsCluster.xml similarity index 100% rename from data_model/in_progress/clusters/DiagnosticLogsCluster.xml rename to data_model/1.4/clusters/DiagnosticLogsCluster.xml diff --git a/data_model/in_progress/clusters/DiagnosticsEthernet.xml b/data_model/1.4/clusters/DiagnosticsEthernet.xml similarity index 100% rename from data_model/in_progress/clusters/DiagnosticsEthernet.xml rename to data_model/1.4/clusters/DiagnosticsEthernet.xml diff --git a/data_model/in_progress/clusters/DiagnosticsGeneral.xml b/data_model/1.4/clusters/DiagnosticsGeneral.xml similarity index 99% rename from data_model/in_progress/clusters/DiagnosticsGeneral.xml rename to data_model/1.4/clusters/DiagnosticsGeneral.xml index 1266705ba6d0dc..44b891fbcd6ea4 100644 --- a/data_model/in_progress/clusters/DiagnosticsGeneral.xml +++ b/data_model/1.4/clusters/DiagnosticsGeneral.xml @@ -263,6 +263,7 @@ Davis, CA 95616, USA + diff --git a/data_model/in_progress/clusters/DiagnosticsSoftware.xml b/data_model/1.4/clusters/DiagnosticsSoftware.xml similarity index 100% rename from data_model/in_progress/clusters/DiagnosticsSoftware.xml rename to data_model/1.4/clusters/DiagnosticsSoftware.xml diff --git a/data_model/in_progress/clusters/DiagnosticsThread.xml b/data_model/1.4/clusters/DiagnosticsThread.xml similarity index 100% rename from data_model/in_progress/clusters/DiagnosticsThread.xml rename to data_model/1.4/clusters/DiagnosticsThread.xml diff --git a/data_model/in_progress/clusters/DiagnosticsWiFi.xml b/data_model/1.4/clusters/DiagnosticsWiFi.xml similarity index 100% rename from data_model/in_progress/clusters/DiagnosticsWiFi.xml rename to data_model/1.4/clusters/DiagnosticsWiFi.xml diff --git a/data_model/in_progress/clusters/DishwasherAlarm.xml b/data_model/1.4/clusters/DishwasherAlarm.xml similarity index 100% rename from data_model/in_progress/clusters/DishwasherAlarm.xml rename to data_model/1.4/clusters/DishwasherAlarm.xml diff --git a/data_model/in_progress/clusters/DoorLock.xml b/data_model/1.4/clusters/DoorLock.xml similarity index 100% rename from data_model/in_progress/clusters/DoorLock.xml rename to data_model/1.4/clusters/DoorLock.xml diff --git a/data_model/in_progress/clusters/ElectricalEnergyMeasurement.xml b/data_model/1.4/clusters/ElectricalEnergyMeasurement.xml similarity index 100% rename from data_model/in_progress/clusters/ElectricalEnergyMeasurement.xml rename to data_model/1.4/clusters/ElectricalEnergyMeasurement.xml diff --git a/data_model/in_progress/clusters/ElectricalPowerMeasurement.xml b/data_model/1.4/clusters/ElectricalPowerMeasurement.xml similarity index 100% rename from data_model/in_progress/clusters/ElectricalPowerMeasurement.xml rename to data_model/1.4/clusters/ElectricalPowerMeasurement.xml diff --git a/data_model/in_progress/clusters/EnergyEVSE.xml b/data_model/1.4/clusters/EnergyEVSE.xml similarity index 100% rename from data_model/in_progress/clusters/EnergyEVSE.xml rename to data_model/1.4/clusters/EnergyEVSE.xml diff --git a/data_model/in_progress/clusters/EnergyPreference.xml b/data_model/1.4/clusters/EnergyPreference.xml similarity index 100% rename from data_model/in_progress/clusters/EnergyPreference.xml rename to data_model/1.4/clusters/EnergyPreference.xml diff --git a/data_model/in_progress/clusters/FanControl.xml b/data_model/1.4/clusters/FanControl.xml similarity index 100% rename from data_model/in_progress/clusters/FanControl.xml rename to data_model/1.4/clusters/FanControl.xml diff --git a/data_model/in_progress/clusters/FlowMeasurement.xml b/data_model/1.4/clusters/FlowMeasurement.xml similarity index 100% rename from data_model/in_progress/clusters/FlowMeasurement.xml rename to data_model/1.4/clusters/FlowMeasurement.xml diff --git a/data_model/in_progress/clusters/GeneralCommissioningCluster.xml b/data_model/1.4/clusters/GeneralCommissioningCluster.xml similarity index 82% rename from data_model/in_progress/clusters/GeneralCommissioningCluster.xml rename to data_model/1.4/clusters/GeneralCommissioningCluster.xml index a569fef5d44118..01450f959dfea3 100644 --- a/data_model/in_progress/clusters/GeneralCommissioningCluster.xml +++ b/data_model/1.4/clusters/GeneralCommissioningCluster.xml @@ -64,6 +64,11 @@ Davis, CA 95616, USA + + + + + @@ -81,6 +86,21 @@ Davis, CA 95616, USA + + + + + + + + + + + + + + + @@ -131,37 +151,52 @@ Davis, CA 95616, USA - - - + + + + + + - - - + + + + + + - - - + + + + + + - - - + + + + + + - - - + + + + + + @@ -223,9 +258,12 @@ Davis, CA 95616, USA - - - + + + + + + @@ -234,9 +272,15 @@ Davis, CA 95616, USA - - - + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/Group-Key-Management-Cluster.xml b/data_model/1.4/clusters/Group-Key-Management-Cluster.xml similarity index 99% rename from data_model/in_progress/clusters/Group-Key-Management-Cluster.xml rename to data_model/1.4/clusters/Group-Key-Management-Cluster.xml index 784bdc903ec186..1974047c01acf0 100644 --- a/data_model/in_progress/clusters/Group-Key-Management-Cluster.xml +++ b/data_model/1.4/clusters/Group-Key-Management-Cluster.xml @@ -220,7 +220,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/in_progress/clusters/Groups.xml b/data_model/1.4/clusters/Groups.xml similarity index 100% rename from data_model/in_progress/clusters/Groups.xml rename to data_model/1.4/clusters/Groups.xml diff --git a/data_model/in_progress/clusters/ICDManagement.xml b/data_model/1.4/clusters/ICDManagement.xml similarity index 81% rename from data_model/in_progress/clusters/ICDManagement.xml rename to data_model/1.4/clusters/ICDManagement.xml index 830f62fba2a63f..b6f76f48e2b137 100644 --- a/data_model/in_progress/clusters/ICDManagement.xml +++ b/data_model/1.4/clusters/ICDManagement.xml @@ -103,7 +103,6 @@ Davis, CA 95616, USA - @@ -112,6 +111,59 @@ Davis, CA 95616, USA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data_model/in_progress/clusters/Identify.xml b/data_model/1.4/clusters/Identify.xml similarity index 100% rename from data_model/in_progress/clusters/Identify.xml rename to data_model/1.4/clusters/Identify.xml diff --git a/data_model/in_progress/clusters/IlluminanceMeasurement.xml b/data_model/1.4/clusters/IlluminanceMeasurement.xml similarity index 100% rename from data_model/in_progress/clusters/IlluminanceMeasurement.xml rename to data_model/1.4/clusters/IlluminanceMeasurement.xml diff --git a/data_model/in_progress/clusters/JointFabricDatastoreCluster.xml b/data_model/1.4/clusters/JointFabricDatastoreCluster.xml similarity index 99% rename from data_model/in_progress/clusters/JointFabricDatastoreCluster.xml rename to data_model/1.4/clusters/JointFabricDatastoreCluster.xml index 137edd2857f74d..4557cfae7fdf41 100644 --- a/data_model/in_progress/clusters/JointFabricDatastoreCluster.xml +++ b/data_model/1.4/clusters/JointFabricDatastoreCluster.xml @@ -60,7 +60,9 @@ Davis, CA 95616, USA - + + + diff --git a/data_model/in_progress/clusters/JointFabricPKICluster.xml b/data_model/1.4/clusters/JointFabricPKICluster.xml similarity index 95% rename from data_model/in_progress/clusters/JointFabricPKICluster.xml rename to data_model/1.4/clusters/JointFabricPKICluster.xml index 847d2548e3b1f1..41c9823626b528 100644 --- a/data_model/in_progress/clusters/JointFabricPKICluster.xml +++ b/data_model/1.4/clusters/JointFabricPKICluster.xml @@ -60,7 +60,9 @@ Davis, CA 95616, USA - + + + @@ -121,18 +123,17 @@ Davis, CA 95616, USA - + - - + - + diff --git a/data_model/in_progress/clusters/KeypadInput.xml b/data_model/1.4/clusters/KeypadInput.xml similarity index 100% rename from data_model/in_progress/clusters/KeypadInput.xml rename to data_model/1.4/clusters/KeypadInput.xml diff --git a/data_model/in_progress/clusters/Label-Cluster-FixedLabelCluster.xml b/data_model/1.4/clusters/Label-Cluster-FixedLabelCluster.xml similarity index 100% rename from data_model/in_progress/clusters/Label-Cluster-FixedLabelCluster.xml rename to data_model/1.4/clusters/Label-Cluster-FixedLabelCluster.xml diff --git a/data_model/in_progress/clusters/Label-Cluster-LabelCluster.xml b/data_model/1.4/clusters/Label-Cluster-LabelCluster.xml similarity index 100% rename from data_model/in_progress/clusters/Label-Cluster-LabelCluster.xml rename to data_model/1.4/clusters/Label-Cluster-LabelCluster.xml diff --git a/data_model/in_progress/clusters/Label-Cluster-UserLabelCluster.xml b/data_model/1.4/clusters/Label-Cluster-UserLabelCluster.xml similarity index 100% rename from data_model/in_progress/clusters/Label-Cluster-UserLabelCluster.xml rename to data_model/1.4/clusters/Label-Cluster-UserLabelCluster.xml diff --git a/data_model/in_progress/clusters/LaundryDryerControls.xml b/data_model/1.4/clusters/LaundryDryerControls.xml similarity index 100% rename from data_model/in_progress/clusters/LaundryDryerControls.xml rename to data_model/1.4/clusters/LaundryDryerControls.xml diff --git a/data_model/in_progress/clusters/LaundryWasherControls.xml b/data_model/1.4/clusters/LaundryWasherControls.xml similarity index 100% rename from data_model/in_progress/clusters/LaundryWasherControls.xml rename to data_model/1.4/clusters/LaundryWasherControls.xml diff --git a/data_model/in_progress/clusters/LevelControl.xml b/data_model/1.4/clusters/LevelControl.xml similarity index 98% rename from data_model/in_progress/clusters/LevelControl.xml rename to data_model/1.4/clusters/LevelControl.xml index de342812287b0f..404b1250e90acc 100644 --- a/data_model/in_progress/clusters/LevelControl.xml +++ b/data_model/1.4/clusters/LevelControl.xml @@ -136,7 +136,7 @@ Davis, CA 95616, USA - + @@ -145,6 +145,7 @@ Davis, CA 95616, USA + diff --git a/data_model/in_progress/clusters/LocalizationConfiguration.xml b/data_model/1.4/clusters/LocalizationConfiguration.xml similarity index 100% rename from data_model/in_progress/clusters/LocalizationConfiguration.xml rename to data_model/1.4/clusters/LocalizationConfiguration.xml diff --git a/data_model/in_progress/clusters/LocalizationTimeFormat.xml b/data_model/1.4/clusters/LocalizationTimeFormat.xml similarity index 100% rename from data_model/in_progress/clusters/LocalizationTimeFormat.xml rename to data_model/1.4/clusters/LocalizationTimeFormat.xml diff --git a/data_model/in_progress/clusters/LocalizationUnit.xml b/data_model/1.4/clusters/LocalizationUnit.xml similarity index 100% rename from data_model/in_progress/clusters/LocalizationUnit.xml rename to data_model/1.4/clusters/LocalizationUnit.xml diff --git a/data_model/in_progress/clusters/LowPower.xml b/data_model/1.4/clusters/LowPower.xml similarity index 100% rename from data_model/in_progress/clusters/LowPower.xml rename to data_model/1.4/clusters/LowPower.xml diff --git a/data_model/in_progress/clusters/MediaInput.xml b/data_model/1.4/clusters/MediaInput.xml similarity index 100% rename from data_model/in_progress/clusters/MediaInput.xml rename to data_model/1.4/clusters/MediaInput.xml diff --git a/data_model/in_progress/clusters/MediaPlayback.xml b/data_model/1.4/clusters/MediaPlayback.xml similarity index 100% rename from data_model/in_progress/clusters/MediaPlayback.xml rename to data_model/1.4/clusters/MediaPlayback.xml diff --git a/data_model/in_progress/clusters/Messages.xml b/data_model/1.4/clusters/Messages.xml similarity index 100% rename from data_model/in_progress/clusters/Messages.xml rename to data_model/1.4/clusters/Messages.xml diff --git a/data_model/in_progress/clusters/MicrowaveOvenControl.xml b/data_model/1.4/clusters/MicrowaveOvenControl.xml similarity index 100% rename from data_model/in_progress/clusters/MicrowaveOvenControl.xml rename to data_model/1.4/clusters/MicrowaveOvenControl.xml diff --git a/data_model/in_progress/clusters/ModeBase.xml b/data_model/1.4/clusters/ModeBase.xml similarity index 100% rename from data_model/in_progress/clusters/ModeBase.xml rename to data_model/1.4/clusters/ModeBase.xml diff --git a/data_model/in_progress/clusters/ModeSelect.xml b/data_model/1.4/clusters/ModeSelect.xml similarity index 100% rename from data_model/in_progress/clusters/ModeSelect.xml rename to data_model/1.4/clusters/ModeSelect.xml diff --git a/data_model/in_progress/clusters/Mode_DeviceEnergyManagement.xml b/data_model/1.4/clusters/Mode_DeviceEnergyManagement.xml similarity index 100% rename from data_model/in_progress/clusters/Mode_DeviceEnergyManagement.xml rename to data_model/1.4/clusters/Mode_DeviceEnergyManagement.xml diff --git a/data_model/in_progress/clusters/Mode_Dishwasher.xml b/data_model/1.4/clusters/Mode_Dishwasher.xml similarity index 100% rename from data_model/in_progress/clusters/Mode_Dishwasher.xml rename to data_model/1.4/clusters/Mode_Dishwasher.xml diff --git a/data_model/in_progress/clusters/Mode_EVSE.xml b/data_model/1.4/clusters/Mode_EVSE.xml similarity index 100% rename from data_model/in_progress/clusters/Mode_EVSE.xml rename to data_model/1.4/clusters/Mode_EVSE.xml diff --git a/data_model/in_progress/clusters/Mode_LaundryWasher.xml b/data_model/1.4/clusters/Mode_LaundryWasher.xml similarity index 100% rename from data_model/in_progress/clusters/Mode_LaundryWasher.xml rename to data_model/1.4/clusters/Mode_LaundryWasher.xml diff --git a/data_model/in_progress/clusters/Mode_MicrowaveOven.xml b/data_model/1.4/clusters/Mode_MicrowaveOven.xml similarity index 100% rename from data_model/in_progress/clusters/Mode_MicrowaveOven.xml rename to data_model/1.4/clusters/Mode_MicrowaveOven.xml diff --git a/data_model/in_progress/clusters/Mode_Oven.xml b/data_model/1.4/clusters/Mode_Oven.xml similarity index 100% rename from data_model/in_progress/clusters/Mode_Oven.xml rename to data_model/1.4/clusters/Mode_Oven.xml diff --git a/data_model/in_progress/clusters/Mode_RVCClean.xml b/data_model/1.4/clusters/Mode_RVCClean.xml similarity index 100% rename from data_model/in_progress/clusters/Mode_RVCClean.xml rename to data_model/1.4/clusters/Mode_RVCClean.xml diff --git a/data_model/in_progress/clusters/Mode_RVCRun.xml b/data_model/1.4/clusters/Mode_RVCRun.xml similarity index 100% rename from data_model/in_progress/clusters/Mode_RVCRun.xml rename to data_model/1.4/clusters/Mode_RVCRun.xml diff --git a/data_model/in_progress/clusters/Mode_Refrigerator.xml b/data_model/1.4/clusters/Mode_Refrigerator.xml similarity index 100% rename from data_model/in_progress/clusters/Mode_Refrigerator.xml rename to data_model/1.4/clusters/Mode_Refrigerator.xml diff --git a/data_model/in_progress/clusters/Mode_WaterHeater.xml b/data_model/1.4/clusters/Mode_WaterHeater.xml similarity index 100% rename from data_model/in_progress/clusters/Mode_WaterHeater.xml rename to data_model/1.4/clusters/Mode_WaterHeater.xml diff --git a/data_model/in_progress/clusters/NetworkCommissioningCluster.xml b/data_model/1.4/clusters/NetworkCommissioningCluster.xml similarity index 99% rename from data_model/in_progress/clusters/NetworkCommissioningCluster.xml rename to data_model/1.4/clusters/NetworkCommissioningCluster.xml index 1a511ed18fda3a..8ee15e1b47ad3d 100644 --- a/data_model/in_progress/clusters/NetworkCommissioningCluster.xml +++ b/data_model/1.4/clusters/NetworkCommissioningCluster.xml @@ -185,7 +185,7 @@ Davis, CA 95616, USA - + @@ -452,7 +452,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/in_progress/clusters/OTAProvider.xml b/data_model/1.4/clusters/OTAProvider.xml similarity index 100% rename from data_model/in_progress/clusters/OTAProvider.xml rename to data_model/1.4/clusters/OTAProvider.xml diff --git a/data_model/in_progress/clusters/OTARequestor.xml b/data_model/1.4/clusters/OTARequestor.xml similarity index 100% rename from data_model/in_progress/clusters/OTARequestor.xml rename to data_model/1.4/clusters/OTARequestor.xml diff --git a/data_model/in_progress/clusters/OccupancySensing.xml b/data_model/1.4/clusters/OccupancySensing.xml similarity index 100% rename from data_model/in_progress/clusters/OccupancySensing.xml rename to data_model/1.4/clusters/OccupancySensing.xml diff --git a/data_model/in_progress/clusters/OnOff.xml b/data_model/1.4/clusters/OnOff.xml similarity index 100% rename from data_model/in_progress/clusters/OnOff.xml rename to data_model/1.4/clusters/OnOff.xml diff --git a/data_model/in_progress/clusters/OperationalCredentialCluster.xml b/data_model/1.4/clusters/OperationalCredentialCluster.xml similarity index 99% rename from data_model/in_progress/clusters/OperationalCredentialCluster.xml rename to data_model/1.4/clusters/OperationalCredentialCluster.xml index 338a8af007c5b9..26ae2c57a257b2 100644 --- a/data_model/in_progress/clusters/OperationalCredentialCluster.xml +++ b/data_model/1.4/clusters/OperationalCredentialCluster.xml @@ -264,7 +264,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/in_progress/clusters/OperationalState.xml b/data_model/1.4/clusters/OperationalState.xml similarity index 100% rename from data_model/in_progress/clusters/OperationalState.xml rename to data_model/1.4/clusters/OperationalState.xml diff --git a/data_model/in_progress/clusters/OperationalState_Oven.xml b/data_model/1.4/clusters/OperationalState_Oven.xml similarity index 100% rename from data_model/in_progress/clusters/OperationalState_Oven.xml rename to data_model/1.4/clusters/OperationalState_Oven.xml diff --git a/data_model/in_progress/clusters/OperationalState_RVC.xml b/data_model/1.4/clusters/OperationalState_RVC.xml similarity index 100% rename from data_model/in_progress/clusters/OperationalState_RVC.xml rename to data_model/1.4/clusters/OperationalState_RVC.xml diff --git a/data_model/in_progress/clusters/PowerSourceCluster.xml b/data_model/1.4/clusters/PowerSourceCluster.xml similarity index 99% rename from data_model/in_progress/clusters/PowerSourceCluster.xml rename to data_model/1.4/clusters/PowerSourceCluster.xml index a0b6b91c565dd8..82491aaa741720 100644 --- a/data_model/in_progress/clusters/PowerSourceCluster.xml +++ b/data_model/1.4/clusters/PowerSourceCluster.xml @@ -67,10 +67,10 @@ Davis, CA 95616, USA - + - + @@ -636,7 +636,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/in_progress/clusters/PowerSourceConfigurationCluster.xml b/data_model/1.4/clusters/PowerSourceConfigurationCluster.xml similarity index 100% rename from data_model/in_progress/clusters/PowerSourceConfigurationCluster.xml rename to data_model/1.4/clusters/PowerSourceConfigurationCluster.xml diff --git a/data_model/in_progress/clusters/PowerTopology.xml b/data_model/1.4/clusters/PowerTopology.xml similarity index 100% rename from data_model/in_progress/clusters/PowerTopology.xml rename to data_model/1.4/clusters/PowerTopology.xml diff --git a/data_model/in_progress/clusters/PressureMeasurement.xml b/data_model/1.4/clusters/PressureMeasurement.xml similarity index 100% rename from data_model/in_progress/clusters/PressureMeasurement.xml rename to data_model/1.4/clusters/PressureMeasurement.xml diff --git a/data_model/in_progress/clusters/ProxyConfiguration-Cluster.xml b/data_model/1.4/clusters/ProxyConfiguration-Cluster.xml similarity index 100% rename from data_model/in_progress/clusters/ProxyConfiguration-Cluster.xml rename to data_model/1.4/clusters/ProxyConfiguration-Cluster.xml diff --git a/data_model/in_progress/clusters/ProxyDiscovery-Cluster.xml b/data_model/1.4/clusters/ProxyDiscovery-Cluster.xml similarity index 100% rename from data_model/in_progress/clusters/ProxyDiscovery-Cluster.xml rename to data_model/1.4/clusters/ProxyDiscovery-Cluster.xml diff --git a/data_model/in_progress/clusters/PumpConfigurationControl.xml b/data_model/1.4/clusters/PumpConfigurationControl.xml similarity index 100% rename from data_model/in_progress/clusters/PumpConfigurationControl.xml rename to data_model/1.4/clusters/PumpConfigurationControl.xml diff --git a/data_model/in_progress/clusters/RefrigeratorAlarm.xml b/data_model/1.4/clusters/RefrigeratorAlarm.xml similarity index 100% rename from data_model/in_progress/clusters/RefrigeratorAlarm.xml rename to data_model/1.4/clusters/RefrigeratorAlarm.xml diff --git a/data_model/in_progress/clusters/ResourceMonitoring.xml b/data_model/1.4/clusters/ResourceMonitoring.xml similarity index 100% rename from data_model/in_progress/clusters/ResourceMonitoring.xml rename to data_model/1.4/clusters/ResourceMonitoring.xml diff --git a/data_model/in_progress/clusters/Scenes.xml b/data_model/1.4/clusters/Scenes.xml similarity index 100% rename from data_model/in_progress/clusters/Scenes.xml rename to data_model/1.4/clusters/Scenes.xml diff --git a/data_model/in_progress/clusters/ServiceArea.xml b/data_model/1.4/clusters/ServiceArea.xml similarity index 99% rename from data_model/in_progress/clusters/ServiceArea.xml rename to data_model/1.4/clusters/ServiceArea.xml index 2533d4b549d2f0..3ea629625cb1ee 100644 --- a/data_model/in_progress/clusters/ServiceArea.xml +++ b/data_model/1.4/clusters/ServiceArea.xml @@ -227,7 +227,6 @@ Davis, CA 95616, USA - diff --git a/data_model/in_progress/clusters/SmokeCOAlarm.xml b/data_model/1.4/clusters/SmokeCOAlarm.xml similarity index 100% rename from data_model/in_progress/clusters/SmokeCOAlarm.xml rename to data_model/1.4/clusters/SmokeCOAlarm.xml diff --git a/data_model/in_progress/clusters/Switch.xml b/data_model/1.4/clusters/Switch.xml similarity index 100% rename from data_model/in_progress/clusters/Switch.xml rename to data_model/1.4/clusters/Switch.xml diff --git a/data_model/in_progress/clusters/TargetNavigator.xml b/data_model/1.4/clusters/TargetNavigator.xml similarity index 100% rename from data_model/in_progress/clusters/TargetNavigator.xml rename to data_model/1.4/clusters/TargetNavigator.xml diff --git a/data_model/in_progress/clusters/TemperatureControl.xml b/data_model/1.4/clusters/TemperatureControl.xml similarity index 100% rename from data_model/in_progress/clusters/TemperatureControl.xml rename to data_model/1.4/clusters/TemperatureControl.xml diff --git a/data_model/in_progress/clusters/TemperatureMeasurement.xml b/data_model/1.4/clusters/TemperatureMeasurement.xml similarity index 100% rename from data_model/in_progress/clusters/TemperatureMeasurement.xml rename to data_model/1.4/clusters/TemperatureMeasurement.xml diff --git a/data_model/in_progress/clusters/Thermostat.xml b/data_model/1.4/clusters/Thermostat.xml similarity index 100% rename from data_model/in_progress/clusters/Thermostat.xml rename to data_model/1.4/clusters/Thermostat.xml diff --git a/data_model/in_progress/clusters/ThermostatUserInterfaceConfiguration.xml b/data_model/1.4/clusters/ThermostatUserInterfaceConfiguration.xml similarity index 100% rename from data_model/in_progress/clusters/ThermostatUserInterfaceConfiguration.xml rename to data_model/1.4/clusters/ThermostatUserInterfaceConfiguration.xml diff --git a/data_model/in_progress/clusters/ThreadBorderRouterManagement.xml b/data_model/1.4/clusters/ThreadBorderRouterManagement.xml similarity index 100% rename from data_model/in_progress/clusters/ThreadBorderRouterManagement.xml rename to data_model/1.4/clusters/ThreadBorderRouterManagement.xml diff --git a/data_model/in_progress/clusters/ThreadNetworkDirectory.xml b/data_model/1.4/clusters/ThreadNetworkDirectory.xml similarity index 100% rename from data_model/in_progress/clusters/ThreadNetworkDirectory.xml rename to data_model/1.4/clusters/ThreadNetworkDirectory.xml diff --git a/data_model/in_progress/clusters/TimeSync.xml b/data_model/1.4/clusters/TimeSync.xml similarity index 100% rename from data_model/in_progress/clusters/TimeSync.xml rename to data_model/1.4/clusters/TimeSync.xml diff --git a/data_model/in_progress/clusters/ValidProxies-Cluster.xml b/data_model/1.4/clusters/ValidProxies-Cluster.xml similarity index 100% rename from data_model/in_progress/clusters/ValidProxies-Cluster.xml rename to data_model/1.4/clusters/ValidProxies-Cluster.xml diff --git a/data_model/in_progress/clusters/ValveConfigurationControl.xml b/data_model/1.4/clusters/ValveConfigurationControl.xml similarity index 100% rename from data_model/in_progress/clusters/ValveConfigurationControl.xml rename to data_model/1.4/clusters/ValveConfigurationControl.xml diff --git a/data_model/in_progress/clusters/WakeOnLAN.xml b/data_model/1.4/clusters/WakeOnLAN.xml similarity index 100% rename from data_model/in_progress/clusters/WakeOnLAN.xml rename to data_model/1.4/clusters/WakeOnLAN.xml diff --git a/data_model/in_progress/clusters/WaterContentMeasurement.xml b/data_model/1.4/clusters/WaterContentMeasurement.xml similarity index 100% rename from data_model/in_progress/clusters/WaterContentMeasurement.xml rename to data_model/1.4/clusters/WaterContentMeasurement.xml diff --git a/data_model/in_progress/clusters/WaterHeaterManagement.xml b/data_model/1.4/clusters/WaterHeaterManagement.xml similarity index 100% rename from data_model/in_progress/clusters/WaterHeaterManagement.xml rename to data_model/1.4/clusters/WaterHeaterManagement.xml diff --git a/data_model/in_progress/clusters/WiFiNetworkManagement.xml b/data_model/1.4/clusters/WiFiNetworkManagement.xml similarity index 100% rename from data_model/in_progress/clusters/WiFiNetworkManagement.xml rename to data_model/1.4/clusters/WiFiNetworkManagement.xml diff --git a/data_model/in_progress/clusters/WindowCovering.xml b/data_model/1.4/clusters/WindowCovering.xml similarity index 96% rename from data_model/in_progress/clusters/WindowCovering.xml rename to data_model/1.4/clusters/WindowCovering.xml index 09133513af736a..dd6d2293cc31f2 100644 --- a/data_model/in_progress/clusters/WindowCovering.xml +++ b/data_model/1.4/clusters/WindowCovering.xml @@ -305,23 +305,33 @@ Davis, CA 95616, USA - - + + - + + + - + + + - + + + - + + + - + + + @@ -343,10 +353,14 @@ Davis, CA 95616, USA - + + + - + + + @@ -480,7 +494,6 @@ Davis, CA 95616, USA - @@ -523,7 +536,7 @@ Davis, CA 95616, USA - + @@ -534,7 +547,7 @@ Davis, CA 95616, USA - + @@ -546,7 +559,7 @@ Davis, CA 95616, USA - + @@ -558,7 +571,7 @@ Davis, CA 95616, USA - + @@ -570,7 +583,7 @@ Davis, CA 95616, USA - + @@ -582,7 +595,7 @@ Davis, CA 95616, USA - + @@ -593,7 +606,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/in_progress/clusters/bridge-clusters-ActionsCluster.xml b/data_model/1.4/clusters/bridge-clusters-ActionsCluster.xml similarity index 98% rename from data_model/in_progress/clusters/bridge-clusters-ActionsCluster.xml rename to data_model/1.4/clusters/bridge-clusters-ActionsCluster.xml index 4874aca26bc504..354e24c424417d 100644 --- a/data_model/in_progress/clusters/bridge-clusters-ActionsCluster.xml +++ b/data_model/1.4/clusters/bridge-clusters-ActionsCluster.xml @@ -166,6 +166,7 @@ Davis, CA 95616, USA + @@ -189,6 +190,7 @@ Davis, CA 95616, USA + diff --git a/data_model/in_progress/clusters/bridge-clusters-BridgedDeviceBasicInformationCluster.xml b/data_model/1.4/clusters/bridge-clusters-BridgedDeviceBasicInformationCluster.xml similarity index 97% rename from data_model/in_progress/clusters/bridge-clusters-BridgedDeviceBasicInformationCluster.xml rename to data_model/1.4/clusters/bridge-clusters-BridgedDeviceBasicInformationCluster.xml index 62633f55cf08cc..3f7eda5f1ea87c 100644 --- a/data_model/in_progress/clusters/bridge-clusters-BridgedDeviceBasicInformationCluster.xml +++ b/data_model/1.4/clusters/bridge-clusters-BridgedDeviceBasicInformationCluster.xml @@ -62,7 +62,7 @@ Davis, CA 95616, USA - + @@ -141,9 +141,6 @@ Davis, CA 95616, USA - - - diff --git a/data_model/in_progress/clusters/bridge-clusters-EcosystemInformationCluster.xml b/data_model/1.4/clusters/bridge-clusters-EcosystemInformationCluster.xml similarity index 87% rename from data_model/in_progress/clusters/bridge-clusters-EcosystemInformationCluster.xml rename to data_model/1.4/clusters/bridge-clusters-EcosystemInformationCluster.xml index ddebe95679370e..67c2bbbd108cd0 100644 --- a/data_model/in_progress/clusters/bridge-clusters-EcosystemInformationCluster.xml +++ b/data_model/1.4/clusters/bridge-clusters-EcosystemInformationCluster.xml @@ -120,18 +120,4 @@ Davis, CA 95616, USA - - - - - - - - - - - - - - \ No newline at end of file diff --git a/data_model/in_progress/clusters/cluster_ids.json b/data_model/1.4/clusters/cluster_ids.json similarity index 97% rename from data_model/in_progress/clusters/cluster_ids.json rename to data_model/1.4/clusters/cluster_ids.json index 9de2f243b377d6..687bbc32298a3c 100644 --- a/data_model/in_progress/clusters/cluster_ids.json +++ b/data_model/1.4/clusters/cluster_ids.json @@ -64,11 +64,9 @@ "144": "Electrical Power Measurement", "145": "Electrical Energy Measurement", "148": "Water Heater Management", - "150": "Demand Response Load Control", "151": "Messages", "152": "Device Energy Management", "153": "Energy EVSE", - "154": "Energy Calendar", "155": "Energy Preference", "156": "Power Topology", "157": "Energy EVSE Mode", @@ -81,7 +79,6 @@ "513": "Thermostat", "514": "Fan Control", "516": "Thermostat User Interface Configuration", - "517": "Humidistat", "768": "Color Control", "769": "Ballast Configuration", "1024": "Illuminance Measurement", diff --git a/data_model/in_progress/device_types/Aggregator.xml b/data_model/1.4/device_types/Aggregator.xml similarity index 90% rename from data_model/in_progress/device_types/Aggregator.xml rename to data_model/1.4/device_types/Aggregator.xml index a99ee1108c3b50..be604976521c54 100644 --- a/data_model/in_progress/device_types/Aggregator.xml +++ b/data_model/1.4/device_types/Aggregator.xml @@ -55,12 +55,12 @@ Connectivity Standards Alliance 508 Second Street, Suite 206 Davis, CA 95616, USA --> - + + - @@ -68,5 +68,10 @@ Davis, CA 95616, USA + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/AirPurifier.xml b/data_model/1.4/device_types/AirPurifier.xml similarity index 100% rename from data_model/in_progress/device_types/AirPurifier.xml rename to data_model/1.4/device_types/AirPurifier.xml diff --git a/data_model/in_progress/device_types/AirQualitySensor.xml b/data_model/1.4/device_types/AirQualitySensor.xml similarity index 100% rename from data_model/in_progress/device_types/AirQualitySensor.xml rename to data_model/1.4/device_types/AirQualitySensor.xml diff --git a/data_model/in_progress/device_types/BaseDeviceType.xml b/data_model/1.4/device_types/BaseDeviceType.xml similarity index 100% rename from data_model/in_progress/device_types/BaseDeviceType.xml rename to data_model/1.4/device_types/BaseDeviceType.xml diff --git a/data_model/in_progress/device_types/BasicVideoPlayer.xml b/data_model/1.4/device_types/BasicVideoPlayer.xml similarity index 100% rename from data_model/in_progress/device_types/BasicVideoPlayer.xml rename to data_model/1.4/device_types/BasicVideoPlayer.xml diff --git a/data_model/in_progress/device_types/BatteryStorage.xml b/data_model/1.4/device_types/BatteryStorage.xml similarity index 100% rename from data_model/in_progress/device_types/BatteryStorage.xml rename to data_model/1.4/device_types/BatteryStorage.xml diff --git a/data_model/in_progress/device_types/BridgedNode.xml b/data_model/1.4/device_types/BridgedNode.xml similarity index 86% rename from data_model/in_progress/device_types/BridgedNode.xml rename to data_model/1.4/device_types/BridgedNode.xml index 6f309001975627..1ea7a1984f57f5 100644 --- a/data_model/in_progress/device_types/BridgedNode.xml +++ b/data_model/1.4/device_types/BridgedNode.xml @@ -55,13 +55,13 @@ Connectivity Standards Alliance 508 Second Street, Suite 206 Davis, CA 95616, USA --> - + + - @@ -79,5 +79,18 @@ Davis, CA 95616, USA + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/CastingVideoClient.xml b/data_model/1.4/device_types/CastingVideoClient.xml similarity index 100% rename from data_model/in_progress/device_types/CastingVideoClient.xml rename to data_model/1.4/device_types/CastingVideoClient.xml diff --git a/data_model/in_progress/device_types/CastingVideoPlayer.xml b/data_model/1.4/device_types/CastingVideoPlayer.xml similarity index 100% rename from data_model/in_progress/device_types/CastingVideoPlayer.xml rename to data_model/1.4/device_types/CastingVideoPlayer.xml diff --git a/data_model/in_progress/device_types/ColorDimmerSwitch.xml b/data_model/1.4/device_types/ColorDimmerSwitch.xml similarity index 100% rename from data_model/in_progress/device_types/ColorDimmerSwitch.xml rename to data_model/1.4/device_types/ColorDimmerSwitch.xml diff --git a/data_model/in_progress/device_types/ColorTemperatureLight.xml b/data_model/1.4/device_types/ColorTemperatureLight.xml similarity index 100% rename from data_model/in_progress/device_types/ColorTemperatureLight.xml rename to data_model/1.4/device_types/ColorTemperatureLight.xml diff --git a/data_model/in_progress/device_types/ContactSensor.xml b/data_model/1.4/device_types/ContactSensor.xml similarity index 100% rename from data_model/in_progress/device_types/ContactSensor.xml rename to data_model/1.4/device_types/ContactSensor.xml diff --git a/data_model/in_progress/device_types/ContentApp.xml b/data_model/1.4/device_types/ContentApp.xml similarity index 100% rename from data_model/in_progress/device_types/ContentApp.xml rename to data_model/1.4/device_types/ContentApp.xml diff --git a/data_model/in_progress/device_types/ControlBridge.xml b/data_model/1.4/device_types/ControlBridge.xml similarity index 100% rename from data_model/in_progress/device_types/ControlBridge.xml rename to data_model/1.4/device_types/ControlBridge.xml diff --git a/data_model/in_progress/device_types/CookSurface.xml b/data_model/1.4/device_types/CookSurface.xml similarity index 100% rename from data_model/in_progress/device_types/CookSurface.xml rename to data_model/1.4/device_types/CookSurface.xml diff --git a/data_model/in_progress/device_types/Cooktop.xml b/data_model/1.4/device_types/Cooktop.xml similarity index 100% rename from data_model/in_progress/device_types/Cooktop.xml rename to data_model/1.4/device_types/Cooktop.xml diff --git a/data_model/in_progress/device_types/DeviceEnergyManagement.xml b/data_model/1.4/device_types/DeviceEnergyManagement.xml similarity index 100% rename from data_model/in_progress/device_types/DeviceEnergyManagement.xml rename to data_model/1.4/device_types/DeviceEnergyManagement.xml diff --git a/data_model/in_progress/device_types/DimmableLight.xml b/data_model/1.4/device_types/DimmableLight.xml similarity index 100% rename from data_model/in_progress/device_types/DimmableLight.xml rename to data_model/1.4/device_types/DimmableLight.xml diff --git a/data_model/in_progress/device_types/DimmablePlug-InUnit.xml b/data_model/1.4/device_types/DimmablePlug-InUnit.xml similarity index 100% rename from data_model/in_progress/device_types/DimmablePlug-InUnit.xml rename to data_model/1.4/device_types/DimmablePlug-InUnit.xml diff --git a/data_model/in_progress/device_types/DimmerSwitch.xml b/data_model/1.4/device_types/DimmerSwitch.xml similarity index 100% rename from data_model/in_progress/device_types/DimmerSwitch.xml rename to data_model/1.4/device_types/DimmerSwitch.xml diff --git a/data_model/in_progress/device_types/Dishwasher.xml b/data_model/1.4/device_types/Dishwasher.xml similarity index 100% rename from data_model/in_progress/device_types/Dishwasher.xml rename to data_model/1.4/device_types/Dishwasher.xml diff --git a/data_model/in_progress/device_types/DoorLock.xml b/data_model/1.4/device_types/DoorLock.xml similarity index 98% rename from data_model/in_progress/device_types/DoorLock.xml rename to data_model/1.4/device_types/DoorLock.xml index e2eb1e9152085d..622b9a8bfc6300 100644 --- a/data_model/in_progress/device_types/DoorLock.xml +++ b/data_model/1.4/device_types/DoorLock.xml @@ -85,6 +85,7 @@ Davis, CA 95616, USA + diff --git a/data_model/in_progress/device_types/DoorLockController.xml b/data_model/1.4/device_types/DoorLockController.xml similarity index 100% rename from data_model/in_progress/device_types/DoorLockController.xml rename to data_model/1.4/device_types/DoorLockController.xml diff --git a/data_model/in_progress/device_types/EVSE.xml b/data_model/1.4/device_types/EVSE.xml similarity index 100% rename from data_model/in_progress/device_types/EVSE.xml rename to data_model/1.4/device_types/EVSE.xml diff --git a/data_model/in_progress/device_types/ElectricalSensor.xml b/data_model/1.4/device_types/ElectricalSensor.xml similarity index 100% rename from data_model/in_progress/device_types/ElectricalSensor.xml rename to data_model/1.4/device_types/ElectricalSensor.xml diff --git a/data_model/in_progress/device_types/ExtendedColorLight.xml b/data_model/1.4/device_types/ExtendedColorLight.xml similarity index 100% rename from data_model/in_progress/device_types/ExtendedColorLight.xml rename to data_model/1.4/device_types/ExtendedColorLight.xml diff --git a/data_model/in_progress/device_types/ExtractorHood.xml b/data_model/1.4/device_types/ExtractorHood.xml similarity index 100% rename from data_model/in_progress/device_types/ExtractorHood.xml rename to data_model/1.4/device_types/ExtractorHood.xml diff --git a/data_model/in_progress/device_types/Fan.xml b/data_model/1.4/device_types/Fan.xml similarity index 100% rename from data_model/in_progress/device_types/Fan.xml rename to data_model/1.4/device_types/Fan.xml diff --git a/data_model/in_progress/device_types/FlowSensor.xml b/data_model/1.4/device_types/FlowSensor.xml similarity index 100% rename from data_model/in_progress/device_types/FlowSensor.xml rename to data_model/1.4/device_types/FlowSensor.xml diff --git a/data_model/in_progress/device_types/GenericSwitch.xml b/data_model/1.4/device_types/GenericSwitch.xml similarity index 100% rename from data_model/in_progress/device_types/GenericSwitch.xml rename to data_model/1.4/device_types/GenericSwitch.xml diff --git a/data_model/in_progress/device_types/HeatPump.xml b/data_model/1.4/device_types/HeatPump.xml similarity index 100% rename from data_model/in_progress/device_types/HeatPump.xml rename to data_model/1.4/device_types/HeatPump.xml diff --git a/data_model/in_progress/device_types/HumiditySensor.xml b/data_model/1.4/device_types/HumiditySensor.xml similarity index 100% rename from data_model/in_progress/device_types/HumiditySensor.xml rename to data_model/1.4/device_types/HumiditySensor.xml diff --git a/data_model/in_progress/device_types/JointFabricAdmin.xml b/data_model/1.4/device_types/JointFabricAdmin.xml similarity index 100% rename from data_model/in_progress/device_types/JointFabricAdmin.xml rename to data_model/1.4/device_types/JointFabricAdmin.xml diff --git a/data_model/in_progress/device_types/LaundryDryer.xml b/data_model/1.4/device_types/LaundryDryer.xml similarity index 100% rename from data_model/in_progress/device_types/LaundryDryer.xml rename to data_model/1.4/device_types/LaundryDryer.xml diff --git a/data_model/in_progress/device_types/LaundryWasher.xml b/data_model/1.4/device_types/LaundryWasher.xml similarity index 100% rename from data_model/in_progress/device_types/LaundryWasher.xml rename to data_model/1.4/device_types/LaundryWasher.xml diff --git a/data_model/in_progress/device_types/LightSensor.xml b/data_model/1.4/device_types/LightSensor.xml similarity index 100% rename from data_model/in_progress/device_types/LightSensor.xml rename to data_model/1.4/device_types/LightSensor.xml diff --git a/data_model/in_progress/device_types/MicrowaveOven.xml b/data_model/1.4/device_types/MicrowaveOven.xml similarity index 100% rename from data_model/in_progress/device_types/MicrowaveOven.xml rename to data_model/1.4/device_types/MicrowaveOven.xml diff --git a/data_model/in_progress/device_types/ModeSelectDeviceType.xml b/data_model/1.4/device_types/ModeSelectDeviceType.xml similarity index 100% rename from data_model/in_progress/device_types/ModeSelectDeviceType.xml rename to data_model/1.4/device_types/ModeSelectDeviceType.xml diff --git a/data_model/in_progress/device_types/MountedDimmableLoadControl.xml b/data_model/1.4/device_types/MountedDimmableLoadControl.xml similarity index 100% rename from data_model/in_progress/device_types/MountedDimmableLoadControl.xml rename to data_model/1.4/device_types/MountedDimmableLoadControl.xml diff --git a/data_model/in_progress/device_types/MountedOnOffControl.xml b/data_model/1.4/device_types/MountedOnOffControl.xml similarity index 100% rename from data_model/in_progress/device_types/MountedOnOffControl.xml rename to data_model/1.4/device_types/MountedOnOffControl.xml diff --git a/data_model/in_progress/device_types/NetworkInfraIntro.xml b/data_model/1.4/device_types/NetworkInfraIntro.xml similarity index 100% rename from data_model/in_progress/device_types/NetworkInfraIntro.xml rename to data_model/1.4/device_types/NetworkInfraIntro.xml diff --git a/data_model/in_progress/device_types/NetworkInfraManager.xml b/data_model/1.4/device_types/NetworkInfraManager.xml similarity index 97% rename from data_model/in_progress/device_types/NetworkInfraManager.xml rename to data_model/1.4/device_types/NetworkInfraManager.xml index 58cbae2e7ab440..a4d17e11c0faaa 100644 --- a/data_model/in_progress/device_types/NetworkInfraManager.xml +++ b/data_model/1.4/device_types/NetworkInfraManager.xml @@ -57,7 +57,7 @@ Davis, CA 95616, USA --> - + diff --git a/data_model/in_progress/device_types/OccupancySensor.xml b/data_model/1.4/device_types/OccupancySensor.xml similarity index 100% rename from data_model/in_progress/device_types/OccupancySensor.xml rename to data_model/1.4/device_types/OccupancySensor.xml diff --git a/data_model/in_progress/device_types/OnOffLight.xml b/data_model/1.4/device_types/OnOffLight.xml similarity index 100% rename from data_model/in_progress/device_types/OnOffLight.xml rename to data_model/1.4/device_types/OnOffLight.xml diff --git a/data_model/in_progress/device_types/OnOffLightSwitch.xml b/data_model/1.4/device_types/OnOffLightSwitch.xml similarity index 100% rename from data_model/in_progress/device_types/OnOffLightSwitch.xml rename to data_model/1.4/device_types/OnOffLightSwitch.xml diff --git a/data_model/in_progress/device_types/OnOffPlug-inUnit.xml b/data_model/1.4/device_types/OnOffPlug-inUnit.xml similarity index 100% rename from data_model/in_progress/device_types/OnOffPlug-inUnit.xml rename to data_model/1.4/device_types/OnOffPlug-inUnit.xml diff --git a/data_model/in_progress/device_types/OnOffSensor.xml b/data_model/1.4/device_types/OnOffSensor.xml similarity index 100% rename from data_model/in_progress/device_types/OnOffSensor.xml rename to data_model/1.4/device_types/OnOffSensor.xml diff --git a/data_model/in_progress/device_types/OtaProvider.xml b/data_model/1.4/device_types/OtaProvider.xml similarity index 100% rename from data_model/in_progress/device_types/OtaProvider.xml rename to data_model/1.4/device_types/OtaProvider.xml diff --git a/data_model/in_progress/device_types/OtaRequestor.xml b/data_model/1.4/device_types/OtaRequestor.xml similarity index 100% rename from data_model/in_progress/device_types/OtaRequestor.xml rename to data_model/1.4/device_types/OtaRequestor.xml diff --git a/data_model/in_progress/device_types/Oven.xml b/data_model/1.4/device_types/Oven.xml similarity index 100% rename from data_model/in_progress/device_types/Oven.xml rename to data_model/1.4/device_types/Oven.xml diff --git a/data_model/in_progress/device_types/PowerSource.xml b/data_model/1.4/device_types/PowerSource.xml similarity index 100% rename from data_model/in_progress/device_types/PowerSource.xml rename to data_model/1.4/device_types/PowerSource.xml diff --git a/data_model/in_progress/device_types/PressureSensor.xml b/data_model/1.4/device_types/PressureSensor.xml similarity index 100% rename from data_model/in_progress/device_types/PressureSensor.xml rename to data_model/1.4/device_types/PressureSensor.xml diff --git a/data_model/in_progress/device_types/Pump.xml b/data_model/1.4/device_types/Pump.xml similarity index 100% rename from data_model/in_progress/device_types/Pump.xml rename to data_model/1.4/device_types/Pump.xml diff --git a/data_model/in_progress/device_types/PumpController.xml b/data_model/1.4/device_types/PumpController.xml similarity index 100% rename from data_model/in_progress/device_types/PumpController.xml rename to data_model/1.4/device_types/PumpController.xml diff --git a/data_model/in_progress/device_types/RainSensor.xml b/data_model/1.4/device_types/RainSensor.xml similarity index 100% rename from data_model/in_progress/device_types/RainSensor.xml rename to data_model/1.4/device_types/RainSensor.xml diff --git a/data_model/in_progress/device_types/Refrigerator.xml b/data_model/1.4/device_types/Refrigerator.xml similarity index 100% rename from data_model/in_progress/device_types/Refrigerator.xml rename to data_model/1.4/device_types/Refrigerator.xml diff --git a/data_model/in_progress/device_types/RoboticVacuumCleaner.xml b/data_model/1.4/device_types/RoboticVacuumCleaner.xml similarity index 93% rename from data_model/in_progress/device_types/RoboticVacuumCleaner.xml rename to data_model/1.4/device_types/RoboticVacuumCleaner.xml index fd30668cd2e084..446410dfb7c60a 100644 --- a/data_model/in_progress/device_types/RoboticVacuumCleaner.xml +++ b/data_model/1.4/device_types/RoboticVacuumCleaner.xml @@ -55,10 +55,11 @@ Connectivity Standards Alliance 508 Second Street, Suite 206 Davis, CA 95616, USA --> - + + @@ -75,5 +76,8 @@ Davis, CA 95616, USA + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/RoomAirConditioner.xml b/data_model/1.4/device_types/RoomAirConditioner.xml similarity index 100% rename from data_model/in_progress/device_types/RoomAirConditioner.xml rename to data_model/1.4/device_types/RoomAirConditioner.xml diff --git a/data_model/in_progress/device_types/RootNodeDeviceType.xml b/data_model/1.4/device_types/RootNodeDeviceType.xml similarity index 94% rename from data_model/in_progress/device_types/RootNodeDeviceType.xml rename to data_model/1.4/device_types/RootNodeDeviceType.xml index c96759503bfb13..13473e44cacb60 100644 --- a/data_model/in_progress/device_types/RootNodeDeviceType.xml +++ b/data_model/1.4/device_types/RootNodeDeviceType.xml @@ -55,16 +55,24 @@ Connectivity Standards Alliance 508 Second Street, Suite 206 Davis, CA 95616, USA --> - + + + + + + + + + diff --git a/data_model/in_progress/device_types/SecondaryNetworkInterface.xml b/data_model/1.4/device_types/SecondaryNetworkInterface.xml similarity index 100% rename from data_model/in_progress/device_types/SecondaryNetworkInterface.xml rename to data_model/1.4/device_types/SecondaryNetworkInterface.xml diff --git a/data_model/in_progress/device_types/SmokeCOAlarm.xml b/data_model/1.4/device_types/SmokeCOAlarm.xml similarity index 100% rename from data_model/in_progress/device_types/SmokeCOAlarm.xml rename to data_model/1.4/device_types/SmokeCOAlarm.xml diff --git a/data_model/in_progress/device_types/SolarPower.xml b/data_model/1.4/device_types/SolarPower.xml similarity index 100% rename from data_model/in_progress/device_types/SolarPower.xml rename to data_model/1.4/device_types/SolarPower.xml diff --git a/data_model/in_progress/device_types/Speaker.xml b/data_model/1.4/device_types/Speaker.xml similarity index 100% rename from data_model/in_progress/device_types/Speaker.xml rename to data_model/1.4/device_types/Speaker.xml diff --git a/data_model/in_progress/device_types/TemperatureControlledCabinet.xml b/data_model/1.4/device_types/TemperatureControlledCabinet.xml similarity index 100% rename from data_model/in_progress/device_types/TemperatureControlledCabinet.xml rename to data_model/1.4/device_types/TemperatureControlledCabinet.xml diff --git a/data_model/in_progress/device_types/TemperatureSensor.xml b/data_model/1.4/device_types/TemperatureSensor.xml similarity index 100% rename from data_model/in_progress/device_types/TemperatureSensor.xml rename to data_model/1.4/device_types/TemperatureSensor.xml diff --git a/data_model/in_progress/device_types/Thermostat.xml b/data_model/1.4/device_types/Thermostat.xml similarity index 100% rename from data_model/in_progress/device_types/Thermostat.xml rename to data_model/1.4/device_types/Thermostat.xml diff --git a/data_model/in_progress/device_types/ThreadBorderRouter.xml b/data_model/1.4/device_types/ThreadBorderRouter.xml similarity index 100% rename from data_model/in_progress/device_types/ThreadBorderRouter.xml rename to data_model/1.4/device_types/ThreadBorderRouter.xml diff --git a/data_model/in_progress/device_types/VideoRemoteControl.xml b/data_model/1.4/device_types/VideoRemoteControl.xml similarity index 100% rename from data_model/in_progress/device_types/VideoRemoteControl.xml rename to data_model/1.4/device_types/VideoRemoteControl.xml diff --git a/data_model/in_progress/device_types/WaterFreezeDetector.xml b/data_model/1.4/device_types/WaterFreezeDetector.xml similarity index 100% rename from data_model/in_progress/device_types/WaterFreezeDetector.xml rename to data_model/1.4/device_types/WaterFreezeDetector.xml diff --git a/data_model/in_progress/device_types/WaterHeater.xml b/data_model/1.4/device_types/WaterHeater.xml similarity index 93% rename from data_model/in_progress/device_types/WaterHeater.xml rename to data_model/1.4/device_types/WaterHeater.xml index 9d038d89c55563..975e9f2bb4b850 100644 --- a/data_model/in_progress/device_types/WaterHeater.xml +++ b/data_model/1.4/device_types/WaterHeater.xml @@ -68,9 +68,6 @@ Davis, CA 95616, USA - - - @@ -80,9 +77,6 @@ Davis, CA 95616, USA - - - diff --git a/data_model/in_progress/device_types/WaterLeakDetector.xml b/data_model/1.4/device_types/WaterLeakDetector.xml similarity index 100% rename from data_model/in_progress/device_types/WaterLeakDetector.xml rename to data_model/1.4/device_types/WaterLeakDetector.xml diff --git a/data_model/in_progress/device_types/WaterValve.xml b/data_model/1.4/device_types/WaterValve.xml similarity index 100% rename from data_model/in_progress/device_types/WaterValve.xml rename to data_model/1.4/device_types/WaterValve.xml diff --git a/data_model/in_progress/device_types/WindowCovering.xml b/data_model/1.4/device_types/WindowCovering.xml similarity index 100% rename from data_model/in_progress/device_types/WindowCovering.xml rename to data_model/1.4/device_types/WindowCovering.xml diff --git a/data_model/in_progress/device_types/WindowCoveringController.xml b/data_model/1.4/device_types/WindowCoveringController.xml similarity index 100% rename from data_model/in_progress/device_types/WindowCoveringController.xml rename to data_model/1.4/device_types/WindowCoveringController.xml diff --git a/data_model/in_progress/scraper_version b/data_model/1.4/scraper_version similarity index 100% rename from data_model/in_progress/scraper_version rename to data_model/1.4/scraper_version diff --git a/data_model/1.4/spec_sha b/data_model/1.4/spec_sha new file mode 100644 index 00000000000000..094141d3c099c6 --- /dev/null +++ b/data_model/1.4/spec_sha @@ -0,0 +1 @@ +2760ea4338a4b612ac025bfa5677e6918041c1d4 diff --git a/data_model/in_progress/clusters/DemandResponseLoadControl.xml b/data_model/in_progress/clusters/DemandResponseLoadControl.xml deleted file mode 100644 index 1acd1ea26c6088..00000000000000 --- a/data_model/in_progress/clusters/DemandResponseLoadControl.xml +++ /dev/null @@ -1,453 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/data_model/in_progress/clusters/EnergyCalendar.xml b/data_model/in_progress/clusters/EnergyCalendar.xml deleted file mode 100644 index 2ba93203618609..00000000000000 --- a/data_model/in_progress/clusters/EnergyCalendar.xml +++ /dev/null @@ -1,287 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/data_model/in_progress/clusters/Humidistat.xml b/data_model/in_progress/clusters/Humidistat.xml deleted file mode 100644 index 1af54698489d31..00000000000000 --- a/data_model/in_progress/clusters/Humidistat.xml +++ /dev/null @@ -1,283 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/data_model/in_progress/device_types/EnergyTariff.xml b/data_model/in_progress/device_types/EnergyTariff.xml deleted file mode 100644 index 887bfa420d8fd8..00000000000000 --- a/data_model/in_progress/device_types/EnergyTariff.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/data_model/in_progress/device_types/EnergyTariffCalendar.xml b/data_model/in_progress/device_types/EnergyTariffCalendar.xml deleted file mode 100644 index 70d74b7239f41c..00000000000000 --- a/data_model/in_progress/device_types/EnergyTariffCalendar.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/data_model/in_progress/device_types/HumidifierDehumidifier.xml b/data_model/in_progress/device_types/HumidifierDehumidifier.xml deleted file mode 100644 index 973919635fb4ae..00000000000000 --- a/data_model/in_progress/device_types/HumidifierDehumidifier.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/data_model/in_progress/spec_sha b/data_model/in_progress/spec_sha deleted file mode 100644 index a399f222280c76..00000000000000 --- a/data_model/in_progress/spec_sha +++ /dev/null @@ -1 +0,0 @@ -ec20ddf482db8deffe8b2eb745e34d2f9cea72b2 diff --git a/docs/getting_started/changing_examples.md b/docs/getting_started/changing_examples.md new file mode 100644 index 00000000000000..611610ce43fb59 --- /dev/null +++ b/docs/getting_started/changing_examples.md @@ -0,0 +1,64 @@ +# Changing Examples + +The composition of most examples in the SDK is static and code generated. + +The tool used to describe and change the composition of an example is called +ZAP. More information about ZAP and a walk-through of the tool can be found in +the [ZAP introduction](./zap.md). The composition of the device is captured in a +.zap file, which is readable by the ZAP tool. This is then compiled into a +human-readable .matter file, which is used to build the static features of the +example. + +To change the composition of a device example, you need to + +1. Change the zap file to implement your desired changes +2. Run the code generation tool to generate the .matter file +3. Re-build the example + +## Changing the zap file in an example + +Most examples in the SDK keep the .zap file in a sub-directory called +example-name-common (ex. lighting-common). To load an existing .zap file into +the ZAP tool, from the chip-root use + +``` +./scripts/tools/zap/run_zaptool.sh +``` + +For example, to make changes to the lighting app, use: + +``` +./scripts/tools/zap/run_zaptool.sh examples/lighting-app/lighting-common/lighting-app.zap +``` + +This will open the ZAP GUI tool, which can be used to change the endpoint +composition, clusters, features, attributes, commands and events exposed by the +device. + +Details of how to use the tool can be found in the [ZAP Introduction](./zap.md). + +## Running code generation + +To compile the .matter file for use in building, use: + +``` +./scripts/tools/zap/generate.py +``` + +For example, for changes to the lighting app, use: + +``` +./scripts/tools/zap/generate.py examples/lighting-app/lighting-common/lighting-app.zap +``` + +If there are changes to many .zap files, the following script can be used to +recompile the .zap files for all the examples and the controller. + +``` + ./scripts/tools/zap_regen_all.py +``` + +## Rebuilding the example + +After generating the .matter file, re-build the example. Instructions for +building examples are given in [Building your first example](./first_example.md) diff --git a/docs/getting_started/first_example.md b/docs/getting_started/first_example.md index fefa1916c2ef83..89ab7d493d6aa8 100644 --- a/docs/getting_started/first_example.md +++ b/docs/getting_started/first_example.md @@ -6,8 +6,11 @@ familiarize yourself with the SDK and the Matter ecosystem. ## Example Devices The example devices (occasionally referred to as "apps") are located in the -[examples](../../examples/) directory. The examples often implement one -particular device type. Some have implementations for various platforms. +[examples](https://github.com/project-chip/connectedhomeip/tree/master/examples) +directory. The examples often implement one particular device type. Some have +implementations for various platforms. + + The linux platform examples are provided as examples, and are used in the CI. These can be used for preliminary testing. @@ -43,7 +46,8 @@ This quick start guide will walk you through ### Building the lighting app -- Install prerequisites from docs/guides/BUILDING\.md +- Install prerequisites from + [docs/guides/BUILDING\.md](../guides/BUILDING.md#prerequisites) - Run bootstrap or activate to install all the required tools etc. - `. scripts/bootstrap.sh` \- run this first\, or if builds fail - `. scripts/activate.sh` \- faster\, use if you’ve already bootstrapped @@ -78,10 +82,11 @@ Scripts can be used to build both the lighting app and chip tool ### Building / Interacting with Matter Examples The first thing you need to do is to commission the device. First start up the -app in one terminal. By default it will start up with the default discriminator -(3840) and passcode (20202021) and save its non-volatile information in a KVS in -/temp/chip_kvs. You can change these, and multiple other options on the command -line. For a full description, use the `--help` command. +lighting app in one terminal. By default it will start up with the default +discriminator (3840) and passcode (20202021) and save its non-volatile +information in a key-value-store file ("KVS") in /tmp/chip_kvs. You can change +this, and multiple other options on the command line. For a full description, +use the `--help` command. Start the lighting app in one terminal using @@ -96,12 +101,13 @@ Open a new terminal to use chip tool. Commission the device using: NOTE: pairing is the old name for commissioning. 0x12344321 is the node ID you want to assign to the node. 0x12344321 is the default for testing. -MT:-24J0AFN00KA0648G0 is the QR code for a device with the default discriminator -and passcode. If you have changed these, the code will be different. +MT:-24J0AFN00KA0648G00 is the QR code for a device with the default +discriminator and passcode. If you have changed these, the code will be +different. #### Basic device interactions - Sending a command -`./chip-tool onoff on 0x12344321 1` +`./out/linux-x64-chip-tool/chip-tool onoff on 0x12344321 1` where: @@ -112,12 +118,12 @@ where: #### Basic device interactions - Reading an attribute -`./chip-tool onoff read on-off 0x12344321 1` +`./out/linux-x64-chip-tool/chip-tool onoff read on-off 0x12344321 1` where: - onoff is the cluster name - read is the desired action -- on is the attribute name +- on-off is the attribute name - 0x12344321 is the node ID you used for commissioning - 1 is the endpoint diff --git a/docs/getting_started/index.md b/docs/getting_started/index.md index ea881141ff43ec..098f047ed75393 100644 --- a/docs/getting_started/index.md +++ b/docs/getting_started/index.md @@ -12,5 +12,6 @@ The following docs are a brief introduction to SDK development. ``` - [Running your first example](./first_example.md) -- [SDK Basics](./SDKBasics.md) -- [ZAP](./zap.md) +- [Changing examples](./changing_examples.md) +- [SDK Architecture Introduction](./SDKBasics.md) +- [ZAP Introduction](./zap.md) diff --git a/docs/guides/BUILDING.md b/docs/guides/BUILDING.md index 0cbd2fc3c64920..6fc46950465fb9 100644 --- a/docs/guides/BUILDING.md +++ b/docs/guides/BUILDING.md @@ -401,7 +401,11 @@ Tests will be located in: `chip_pw_fuzztest` is the name of the toolchain used. - Details on How To Run Fuzz Tests in - [Running FuzzTests](https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/fuzz_testing.md) + [Running FuzzTests](https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/fuzz_testing.md#running-fuzztests) + +FAQ: In the event of a build failure related to missing files or dependencies +for pw_fuzzer, check the +[FuzzTest FAQ](https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/fuzz_testing.md#FAQ) ## Build custom configuration diff --git a/docs/guides/nxp/nxp_manufacturing_flow.md b/docs/guides/nxp/nxp_manufacturing_flow.md index 0551d43966f08e..08e09c866388ff 100644 --- a/docs/guides/nxp/nxp_manufacturing_flow.md +++ b/docs/guides/nxp/nxp_manufacturing_flow.md @@ -137,34 +137,14 @@ Here is the interpretation of the **optional** parameters: ## 3. Write provisioning data -For the **K32W0x1** variants, the binary needs to be written in the internal -flash at location **0x9D600** using `DK6Programmer.exe`: - -```shell -DK6Programmer.exe -Y -V2 -s -P 1000000 -Y -p FLASH@0x9D600="factory_data.bin" -``` - -For **K32W1** platform, the binary needs to be written in the internal flash at -location given by **0xFE080**, using `JLink`: - -``` -loadfile factory_data.bin 0xFE080 -``` - -For **RW61X** platform, the binary needs to be written in the internal flash at -location given by `__MATTER_FACTORY_DATA_START`, using `JLink`: - -``` -loadfile factory_data.bin 0xBFFF000 -``` - -where `0xBFFF000` is the value of `__FACTORY_DATA_START` in the corresponding -.map file (can be different if using a custom linker script). - -For the **RT1060** and **RT1170** platform, the binary needs to be written using -`MCUXpresso Flash Tool GUI` at the address value corresponding to -`__FACTORY_DATA_START` (the map file of the application should be checked to get -the exact value). +| platform | tool | command | details | +| --------- | -------------------------------- | ------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------- | +| `k32w0x1` | `DK6Programmer.exe` or `dk6prog` | `DK6Programmer.exe -Y -V2 -s -P 1000000 -Y -p FLASH@0x9D600="factory_data.bin"` | NA | +| `k32w1` | `JLink` | `loadfile factory_data.bin 0xFE080` | NA | +| `mcxw71` | `JLink` | `loadfile factory_data.bin 0xFE080` | NA | +| `rw61x` | `JLink` | `loadfile factory_data.bin 0xBFFF000` | Here, `0xBFFF000` is the value of symbol `__FACTORY_DATA_START` from the corresponding `.map` file | +| `rt1060` | `MCUXpresso Flash Tool GUI` | NA | The address is given by the `__FACTORY_DATA_START` symbol in the `.map` file | +| `rt1170` | `MCUXpresso Flash Tool GUI` | NA | The address is given by the `__FACTORY_DATA_START` symbol in the `.map` file | ## 4. Build app and usage @@ -202,11 +182,12 @@ Also, demo **DAC**, **PAI** and **PAA** certificates needed in case ## 6. Increased security for DAC private key -### 6.1 K32W1 +### 6.1 SSS-based platforms Supported platforms: -- K32W1 - `src/plaftorm/nxp/k32w1/FactoryDataProviderImpl.h` +- `k32w1` +- `mcxw71` For platforms that have a secure subsystem (`SSS`), the DAC private key can be converted to an encrypted blob. This blob will overwrite the DAC private key in diff --git a/docs/guides/python_chip_controller_building.md b/docs/guides/python_chip_controller_building.md index 8a7acc884ab2fa..62e60b819b7db2 100644 --- a/docs/guides/python_chip_controller_building.md +++ b/docs/guides/python_chip_controller_building.md @@ -77,7 +77,8 @@ To build and run the Python CHIP controller: 5. Build and install the Python CHIP controller: ``` - scripts/build_python.sh -m platform -i separate + scripts/build_python.sh -m platform -i out/python_env + source out/python_env/bin/activate ``` > Note: This builds the Python CHIP Controller along with the CHIP REPL as diff --git a/docs/guides/ti/matter-users-guide/enabling_icd_on_ti_devices.md b/docs/guides/ti/matter-users-guide/enabling_icd_on_ti_devices.md index 50495a601e3fad..b024b90b40dd86 100644 --- a/docs/guides/ti/matter-users-guide/enabling_icd_on_ti_devices.md +++ b/docs/guides/ti/matter-users-guide/enabling_icd_on_ti_devices.md @@ -24,9 +24,6 @@ Trigger Support, set the following parameter to true: chip_enable_icd_lit = true ``` -TI examples have only been tested with the ICD Server configuration. To enable -the client configuration, set `chip_enable_icd_client` to true. - Persistent subscriptions allow devices to attempt resuming existing subscriptions following a device reset. To enable persistent subscriptions, set the following parameter to true: diff --git a/docs/testing/fuzz_testing.md b/docs/testing/fuzz_testing.md index 7660e18032ef9a..68f08f4885c48e 100644 --- a/docs/testing/fuzz_testing.md +++ b/docs/testing/fuzz_testing.md @@ -256,6 +256,25 @@ $ ./fuzz-chip-cert-pw --fuzz=ChipCert.DecodeChipCertFuzzer ``` +### FAQ + +#### What revision should the FuzzTest and Abseil submodules be for running `pw_fuzzer` with FuzzTest? + +- Google FuzzTest is integrated into Matter using `pw_fuzzer`, which has + several dependencies. These dependencies are listed here: + [Step 0: Set up FuzzTest for your project](https://pigweed.dev/pw_fuzzer/guides/fuzztest.html#step-0-set-up-fuzztest-for-your-project). +- Matter integrates these dependencies as submodules, including Google + FuzzTest and Abseil. +- Since FuzzTest and Abseil only support the `bazel` and `CMake` build systems + and do not support GN, Pigweed maintainers use a script to generate GN files + for these dependencies. +- the revision of FuzzTest and Abseil submodules in Matter should match or at + least be as new as the specific version (SHA1) used when generating these GN + files. +- You can find the version used for the generated GN files here: + [FuzzTest Version](https://pigweed.dev/third_party/fuzztest/#version) and + [Abseil Version](https://pigweed.dev/third_party/abseil-cpp/#version). + #### TO ADD: - More Information on Test Fixtures (After issues are resolved) diff --git a/docs/testing/python.md b/docs/testing/python.md index c631550b040082..00a9c3fc3131ae 100644 --- a/docs/testing/python.md +++ b/docs/testing/python.md @@ -50,12 +50,19 @@ Python tests located in src/python_testing # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factoryreset: true +# quiet: true # === END CI TEST ARGUMENTS === class TC_MYTEST_1_1(MatterBaseTest): @@ -587,7 +594,7 @@ Next build the python wheels and create / activate a venv (called `pyenv` here, but any name may be used) ``` -./scripts/build_python.sh -i pyenv +./scripts/build_python.sh -i out/python_env source pyenv/bin/activate ``` @@ -628,7 +635,10 @@ example DUT on the host and includes factory reset support - Don’t forget to set the PICS file to the ci-pics-values - If there are steps in your test that will fail on CI (e.g. test vendor checks), gate them on the PICS_SDK_CI_ONLY - - `is_ci = self.check_pics('PICS_SDK_CI_ONLY')` + - ```python + if not self.is_pics_sdk_ci_only: + ... # Step that will fail on CI + ``` The CI test runner uses a structured environment setup that can be declared using structured comments at the top of the test file. To use this structured @@ -644,76 +654,71 @@ single command. Example to compile all prerequisites and then running all python tests: -``` +```shell ./scripts/tests/local.py build # will compile python in out/pyenv and ALL application prerequisites ./scripts/tests/local.py python-tests # Runs all python tests that are runnable in CI ``` ## Defining the CI test arguments -Below is the format of the structured environment definition comments: +Arguments required to run a test can be defined in the comment block at the top +of the test script. The section with the arguments should be placed between the +`# === BEGIN CI TEST ARGUMENTS ===` and `# === END CI TEST ARGUMENTS ===` +markers. Arguments should be structured as a valid YAML dictionary with a root +key `test-runner-runs`, followed by the run identifier, and then the parameters +for that run, e.g.: -``` +```python # See https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/python.md#defining-the-ci-test-arguments # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: -# test-runner-run//app: ${TYPE_OF_APP} -# test-runner-run//factoryreset: -# test-runner-run//quiet: -# test-runner-run//app-args: -# test-runner-run//script-args: +# test-runner-runs: +# run1: +# app: ${TYPE_OF_APP} +# app-args: +# script-args: +# factoryreset: +# quiet: # === END CI TEST ARGUMENTS === ``` -NOTE: The `=== BEGIN CI TEST ARGUMENTS ===` and `=== END CI TEST ARGUMENTS ===` -markers must be present. - ### Description of Parameters -- `test-runner-runs`: Specifies the identifier for the run. This can be any - unique identifier. - - - Example: `run1` - -- `test-runner-run//app`: Indicates the application to be used - in the test. Different app types as needed could be referenced from section - [name: Generate an argument environment file ] of the file +- `app`: Indicates the application to be used in the test. Different app types + as needed could be referenced from section [name: Generate an argument + environment file ] of the file [.github/workflows/tests.yaml](https://github.com/project-chip/connectedhomeip/blob/master/.github/workflows/tests.yaml) - - Example: `${TYPE_OF_APP}` + - Example: `${TYPE_OF_APP}` -- `test-runner-run//factoryreset`: Determines whether a - factory reset should be performed before the test. +- `factoryreset`: Determines whether a factory reset should be performed + before the test. - - Example: `True` + - Example: `true` -- `test-runner-run//quiet`: Sets the verbosity level of the - test run. When set to True, the test run will be quieter. +- `quiet`: Sets the verbosity level of the test run. When set to True, the + test run will be quieter. - - Example: `True` + - Example: `true` -- `test-runner-run//app-args`: Specifies the arguments to be - passed to the application during the test. +- `app-args`: Specifies the arguments to be passed to the application during + the test. - Example: `--discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json` -- `test-runner-run//script-args`: Specifies the arguments to - be passed to the test script. +- `app-ready-pattern`: Regular expression pattern to match against the output + of the application to determine when the application is ready. If this + parameter is specified, the test runner will not run the test script until + the pattern is found. - - Example: - `--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto` + - Example: `"Manual pairing code: \\[\\d+\\]"` -- `test-runner-run//script-start-delay`: Specifies the number - of seconds to wait before starting the test script. This parameter can be - used to allow the application to initialize itself properly before the test - script will try to commission it (e.g. in case if the application needs to - be commissioned to some other controller first). By default, the delay is 0 - seconds. +- `script-args`: Specifies the arguments to be passed to the test script. - - Example: `10` + - Example: + `--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto` This structured format ensures that all necessary configurations are clearly defined and easily understood, allowing for consistent and reliable test diff --git a/docs/testing/yaml.md b/docs/testing/yaml.md index 9f65b1fed426b5..e3736d6272f1ab 100644 --- a/docs/testing/yaml.md +++ b/docs/testing/yaml.md @@ -334,7 +334,7 @@ Next build the python wheels and create a venv (called `py` here, but any name may be used) ``` -./scripts/build_python.sh -i py +./scripts/build_python.sh -i out/python_env source py/bin/activate ``` diff --git a/docs/zap_clusters.md b/docs/zap_clusters.md index 41679143b5c428..5803545d3e9533 100644 --- a/docs/zap_clusters.md +++ b/docs/zap_clusters.md @@ -129,6 +129,9 @@ Generally regenerate using one of: | 1294 | 0x50E | AccountLogin | | 1295 | 0x50F | ContentControl | | 1296 | 0x510 | ContentAppObserver | +| 1363 | 0x553 | WebRTCTransportProvider | +| 1364 | 0x554 | WebRTCTransportRequestor | +| 1366 | 0x556 | Chime | | 1872 | 0x750 | EcosystemInformation | | 1873 | 0x751 | CommissionerControl | | 4294048773 | 0xFFF1FC05 | UnitTesting | diff --git a/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter b/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter index ef3be8e5f2e630..95cd8bc2d0799e 100644 --- a/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter +++ b/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -732,6 +739,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter index 408754950cdf6b..b9da1aef2413f9 100644 --- a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter +++ b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -732,6 +739,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/air-quality-sensor-app/air-quality-sensor-common/include/air-quality-sensor-manager.h b/examples/air-quality-sensor-app/air-quality-sensor-common/include/air-quality-sensor-manager.h index 93e7bff871c942..a4d6367596e3c5 100644 --- a/examples/air-quality-sensor-app/air-quality-sensor-common/include/air-quality-sensor-manager.h +++ b/examples/air-quality-sensor-app/air-quality-sensor-common/include/air-quality-sensor-manager.h @@ -29,6 +29,11 @@ class AirQualitySensorManager } }; + /** + * @return The current AirQuality value. + */ + AirQuality::AirQualityEnum GetAirQuality(); + /** * @brief Get an Air Quality Manager object - this class acts as a singleton device manager for the air quality device * @param[in] aEndpointId Endpoint that the air quality is on diff --git a/examples/air-quality-sensor-app/air-quality-sensor-common/src/air-quality-sensor-manager.cpp b/examples/air-quality-sensor-app/air-quality-sensor-common/src/air-quality-sensor-manager.cpp index a6e94765d86cf8..5fc8bd86c5f821 100644 --- a/examples/air-quality-sensor-app/air-quality-sensor-common/src/air-quality-sensor-manager.cpp +++ b/examples/air-quality-sensor-app/air-quality-sensor-common/src/air-quality-sensor-manager.cpp @@ -134,6 +134,11 @@ void AirQualitySensorManager::Init() mFormaldehydeConcentrationMeasurementInstance.SetLevelValue(LevelValueEnum::kLow); } +AirQualityEnum AirQualitySensorManager::GetAirQuality() +{ + return mAirQualityInstance.GetAirQuality(); +} + void AirQualitySensorManager::OnAirQualityChangeHandler(AirQualityEnum newValue) { mAirQualityInstance.UpdateAirQuality(newValue); diff --git a/examples/air-quality-sensor-app/silabs/.gn b/examples/air-quality-sensor-app/silabs/.gn new file mode 100644 index 00000000000000..b05216fc9d7eae --- /dev/null +++ b/examples/air-quality-sensor-app/silabs/.gn @@ -0,0 +1,29 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") + +# The location of the build configuration file. +buildconfig = "${build_root}/config/BUILDCONFIG.gn" + +# CHIP uses angle bracket includes. +check_system_includes = true + +default_args = { + target_cpu = "arm" + target_os = "freertos" + chip_openthread_ftd = true + + import("//openthread.gni") +} diff --git a/examples/air-quality-sensor-app/silabs/BUILD.gn b/examples/air-quality-sensor-app/silabs/BUILD.gn new file mode 100644 index 00000000000000..ed3077a3f16c65 --- /dev/null +++ b/examples/air-quality-sensor-app/silabs/BUILD.gn @@ -0,0 +1,226 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") +import("//build_overrides/chip.gni") +import("//build_overrides/efr32_sdk.gni") +import("//build_overrides/pigweed.gni") + +import("${build_root}/config/defaults.gni") +import("${efr32_sdk_build_root}/silabs_executable.gni") + +import("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni") +import("${chip_root}/src/platform/device.gni") +import("${chip_root}/third_party/silabs/silabs_board.gni") + +if (chip_enable_pw_rpc) { + import("//build_overrides/pigweed.gni") + import("$dir_pw_build/target_types.gni") +} + +assert(current_os == "freertos") + +silabs_project_dir = "${chip_root}/examples/air-quality-sensor-app/silabs" +examples_common_plat_dir = "${chip_root}/examples/platform/silabs" + +if (wifi_soc) { + import("${chip_root}/third_party/silabs/SiWx917_sdk.gni") + examples_plat_dir = "${chip_root}/examples/platform/silabs/SiWx917" +} else { + import("${efr32_sdk_build_root}/efr32_sdk.gni") + examples_plat_dir = "${chip_root}/examples/platform/silabs/efr32" +} + +import("${examples_common_plat_dir}/args.gni") + +declare_args() { + # Dump memory usage at link time. + chip_print_memory_usage = false + + # Enable the air quality sensor + # Some boards do not have a air quality sensor + use_air_quality_sensor = false +} + +if (wifi_soc) { + siwx917_sdk("sdk") { + sources = [ + "${examples_common_plat_dir}/FreeRTOSConfig.h", + "${silabs_project_dir}/include/CHIPProjectConfig.h", + ] + + include_dirs = [ + "${chip_root}/src/platform/silabs/SiWx917", + "${silabs_project_dir}/include", + "${examples_plat_dir}", + "${chip_root}/src/lib", + "${examples_common_plat_dir}", + ] + + defines = [] + if (chip_enable_pw_rpc) { + defines += [ + "HAL_VCOM_ENABLE=1", + "PW_RPC_ENABLED", + ] + } + } +} else { + efr32_sdk("sdk") { + sources = [ + "${examples_common_plat_dir}/FreeRTOSConfig.h", + "${silabs_project_dir}/include/CHIPProjectConfig.h", + ] + + include_dirs = [ + "${chip_root}/src/platform/silabs/efr32", + "${silabs_project_dir}/include", + "${examples_plat_dir}", + "${chip_root}/src/lib", + "${examples_common_plat_dir}", + ] + + defines = [] + if (chip_enable_pw_rpc) { + defines += [ + "HAL_VCOM_ENABLE=1", + "PW_RPC_ENABLED", + ] + } + + #TODO: This is a placeholder for the actual implementation + if (use_air_quality_sensor) { + include_dirs += + [ "${efr32_sdk_root}/examples/platform/silabs/sensors/AirQuality" ] + + defines += [ "USE_AIR_QUALITY_SENSOR" ] + } + } +} + +#ENDTODO + +silabs_executable("air_quality_sensor_app") { + output_name = "matter-silabs-air-quality-sensor-example.out" + include_dirs = [ + "include", + "${chip_root}/examples/air-quality-sensor-app/air-quality-sensor-common/include", + ] + defines = [] + + sources = [ + "${chip_root}/examples/air-quality-sensor-app/air-quality-sensor-common/src/air-quality-sensor-manager.cpp", + "${examples_common_plat_dir}/main.cpp", + "src/AppTask.cpp", + "src/SensorManager.cpp", + "src/ZclCallbacks.cpp", + ] + + #TODO: This is a placeholder for the actual implementation + if (use_air_quality_sensor) { + sources += [ "${efr32_sdk_root}/examples/platform/silabs/sensors/AirQuality/AirQualitySensor.cpp" ] + } + + #ENDTODO + + if (!disable_lcd) { + sources += [ "src/AirQualitySensorUI.cpp" ] + } + + deps = [ + ":sdk", + "${chip_root}/src/platform/logging:default", + app_data_model, + ] + + if (wifi_soc) { + deps += [ "${examples_plat_dir}:siwx917-common" ] + } else { + deps += [ "${examples_plat_dir}:efr32-common" ] + } + + if (chip_enable_pw_rpc) { + defines += [ + "PW_RPC_ENABLED", + "PW_RPC_ATTRIBUTE_SERVICE=1", + "PW_RPC_BUTTON_SERVICE=1", + "PW_RPC_DESCRIPTOR_SERVICE=1", + "PW_RPC_DEVICE_SERVICE=1", + "PW_RPC_LIGHTING_SERVICE=1", + ] + + sources += [ + "${chip_root}/examples/common/pigweed/RpcService.cpp", + "${chip_root}/examples/common/pigweed/efr32/PigweedLoggerMutex.cpp", + "${examples_common_plat_dir}/PigweedLogger.cpp", + "${examples_common_plat_dir}/Rpc.cpp", + ] + + deps += [ + "$dir_pw_hdlc:default_addresses", + "$dir_pw_hdlc:rpc_channel_output", + "$dir_pw_stream:sys_io_stream", + "${chip_root}/config/efr32/lib/pw_rpc:pw_rpc", + "${chip_root}/examples/common/pigweed:attributes_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:button_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:descriptor_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:device_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:lighting_service.nanopb_rpc", + ] + + if (wifi_soc) { + deps += [ "${examples_plat_dir}/pw_sys_io:pw_sys_io_siwx917" ] + } else { + deps += [ "${examples_common_plat_dir}/pw_sys_io:pw_sys_io_silabs" ] + } + + deps += pw_build_LINK_DEPS + + include_dirs += [ + "${chip_root}/examples/common", + "${chip_root}/examples/common/pigweed/efr32", + ] + } + + ldscript = "${examples_common_plat_dir}/ldscripts/${silabs_family}.ld" + + inputs = [ ldscript ] + + ldflags = [ "-T" + rebase_path(ldscript, root_build_dir) ] + + if (chip_print_memory_usage) { + ldflags += [ + "-Wl,--print-memory-usage", + "-fstack-usage", + ] + } + + # WiFi Settings + if (chip_enable_wifi) { + ldflags += [ + "-Wl,--defsym", + "-Wl,SILABS_WIFI=1", + ] + } + + output_dir = root_out_dir +} + +group("silabs") { + deps = [ ":air_quality_sensor_app" ] +} + +group("default") { + deps = [ ":silabs" ] +} diff --git a/examples/air-quality-sensor-app/silabs/README.md b/examples/air-quality-sensor-app/silabs/README.md new file mode 100644 index 00000000000000..d0e89d363dd7b9 --- /dev/null +++ b/examples/air-quality-sensor-app/silabs/README.md @@ -0,0 +1,366 @@ +# Matter Air Quality Sensor Example + +An example showing the use of CHIP on the Silicon Labs EFR32 MG12 and MG24. + +
+ +- [Matter Air Quality Sensor Example](#matter-air-quality-sensor-example) + - [Introduction](#introduction) + - [Building](#building) + - [Linux](#linux) + - [Mac OS X](#mac-os-x) + - [Flashing the Application](#flashing-the-application) + - [Viewing Logging Output](#viewing-logging-output) + - [Running the Complete Example](#running-the-complete-example) + - [Notes](#notes) + - [On Border Router:](#on-border-router) + - [On PC(Linux):](#on-pclinux) + - [Running RPC console](#running-rpc-console) + - [Memory settings](#memory-settings) + - [OTA Software Update](#ota-software-update) + - [Building options](#building-options) + - [Disabling logging](#disabling-logging) + - [Debug build / release build](#debug-build--release-build) + - [Disabling LCD](#disabling-lcd) + - [KVS maximum entry count](#kvs-maximum-entry-count) + +
+ +> **NOTE:** Silicon Laboratories now maintains a public matter GitHub repo with +> frequent releases thoroughly tested and validated. Developers looking to +> develop matter products with silabs hardware are encouraged to use our latest +> release with added tools and documentation. +> [Silabs Matter Github](https://github.com/SiliconLabs/matter/releases) + +## Introduction + +The EFR32 Air Quality Sensor example provides a baseline demonstration of a air +quality sensor device, built using Matter and the Silicon Labs gecko SDK. It can +be controlled by a Chip controller over an Openthread or Wifi network. + +The EFR32 device can be commissioned over Bluetooth Low Energy where the device +and the Chip controller will exchange security information with the Rendez-vous +procedure. If using Thread, Thread Network credentials are then provided to the +EFR32 device which will then join the Thread network. + +If the LCD is enabled, the LCD on the Silabs WSTK shows a QR Code containing the +needed commissioning information for the BLE connection and starting the +Rendez-vous procedure. + +The air quality sensor example is intended to serve both as a means to explore +the workings of Matter as well as a template for creating real products based on +the Silicon Labs platform. + +## Building + +- Download the + [Simplicity Commander](https://www.silabs.com/mcu/programming-options) + command line tool, and ensure that `commander` is your shell search path. + (For Mac OS X, `commander` is located inside + `Commander.app/Contents/MacOS/`.) + +- Download and install a suitable ARM gcc tool chain (For most Host, the + bootstrap already installs the toolchain): + [GNU Arm Embedded Toolchain 12.2 Rel1](https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads) + +- Install some additional tools(likely already present for CHIP developers): + +#### Linux + + $ sudo apt-get install git ninja-build + +#### Mac OS X + + $ brew install ninja + +- Supported hardware: + + - > For the latest supported hardware please refer to the + > [Hardware Requirements](https://github.com/SiliconLabs/matter/blob/latest/docs/silabs/general/HARDWARE_REQUIREMENTS.md) + > in the Silicon Labs Matter Github Repo + + MG21 boards: Currently not supported due to RAM limitation. + + - BRD4180A / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@20dBm + + MG24 boards : + + - BRD2601B / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@10dBm + - BRD2703A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@10dBm + - BRD4186A / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@10dBm + - BRD4186C / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@10dBm + - BRD4187A / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@20dBm + - BRD4187C / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@20dBm + +* Build the example application: + + cd ~/connectedhomeip + ./scripts/examples/gn_silabs_example.sh ./examples/air-quality-sensor-app/silabs/ ./out/air-quality-sensor-app BRD4187C + +- To delete generated executable, libraries and object files use: + + $ cd ~/connectedhomeip + $ rm -rf ./out/ + + OR use GN/Ninja directly + + $ cd ~/connectedhomeip/examples/air-quality-sensor-app/silabs + $ git submodule update --init + $ source third_party/connectedhomeip/scripts/activate.sh + $ export SILABS_BOARD=BRD4187C + $ gn gen out/debug + $ ninja -C out/debug + +- To delete generated executable, libraries and object files use: + + $ cd ~/connectedhomeip/examples/air-quality-sensor-app/silabs + $ rm -rf out/ + +* Build the example with Matter shell + + ./scripts/examples/gn_silabs_example.sh examples/air-quality-sensor-app/silabs/ out/air-quality-sensor-app-app BRD4187C chip_build_libshell=true + +* Build the example as Intermittently Connected Device (ICD) + + $ ./scripts/examples/gn_silabs_example.sh ./examples/air-quality-sensor-app/silabs/ ./out/air-quality-sensor-app-app_ICD BRD4187C --icd + + or use gn as previously mentioned but adding the following arguments: + + $ gn gen out/debug '--args=SILABS_BOARD="BRD4187C" enable_sleepy_device=true chip_openthread_ftd=false chip_build_libshell=true' + +* Build the example with pigweed RCP + + $ ./scripts/examples/gn_silabs_example.sh examples/air-quality-sensor-app/silabs/ out/air-quality-sensor-app-app_rpc BRD4187C 'import("//with_pw_rpc.gni")' + + or use GN/Ninja Directly + + $ cd ~/connectedhomeip/examples/air-quality-sensor-app/silabs + $ git submodule update --init + $ source third_party/connectedhomeip/scripts/activate.sh + $ export SILABS_BOARD=BRD4187C + $ gn gen out/debug --args='import("//with_pw_rpc.gni")' + $ ninja -C out/debug + +For more build options, help is provided when running the build script without +arguments + + ./scripts/examples/gn_silabs_example.sh + +## Flashing the Application + +- On the command line: + + $ cd ~/connectedhomeip/examples/air-quality-sensor-app/silabs + $ python3 out/debug/matter-silabs-air-quality-sensor-app-switch-example.flash.py + +- Or with the Ozone debugger, just load the .out file. + +All EFR32 boards require a bootloader, see Silicon Labs documentation for more +info. Pre-built bootloader binaries are available in the Assets section of the +Releases page on +[Silabs Matter Github](https://github.com/SiliconLabs/matter/releases) . + +## Viewing Logging Output + +The example application is built to use the SEGGER Real Time Transfer (RTT) +facility for log output. RTT is a feature built-in to the J-Link Interface MCU +on the WSTK development board. It allows bi-directional communication with an +embedded application without the need for a dedicated UART. + +Using the RTT facility requires downloading and installing the _SEGGER J-Link +Software and Documentation Pack_ +([web site](https://www.segger.com/downloads/jlink#J-LinkSoftwareAndDocumentationPack)). + +Alternatively, SEGGER Ozone J-Link debugger can be used to view RTT logs too +after flashing the .out file. + +- Download the J-Link installer by navigating to the appropriate URL and + agreeing to the license agreement. + +- [JLink_Linux_x86_64.deb](https://www.segger.com/downloads/jlink/JLink_Linux_x86_64.deb) +- [JLink_MacOSX.pkg](https://www.segger.com/downloads/jlink/JLink_MacOSX.pkg) + +* Install the J-Link software + + $ cd ~/Downloads + $ sudo dpkg -i JLink_Linux_V*_x86_64.deb + +* In Linux, grant the logged in user the ability to talk to the development + hardware via the linux tty device (/dev/ttyACMx) by adding them to the + dialout group. + + $ sudo usermod -a -G dialout ${USER} + +Once the above is complete, log output can be viewed using the JLinkExe tool in +combination with JLinkRTTClient as follows: + +- Run the JLinkExe tool with arguments to autoconnect to the WSTK board: + + For MG12 use: + + $ JLinkExe -device EFR32MG12PXXXF1024 -if JTAG -speed 4000 -autoconnect 1 + + For MG21 use: + + $ JLinkExe -device EFR32MG21AXXXF1024 -if SWD -speed 4000 -autoconnect 1 + +- In a second terminal, run the JLinkRTTClient to view logs: + + $ JLinkRTTClient + +## Running the Complete Example + +- It is assumed here that you already have an OpenThread border router + configured and running. If not see the following guide + [Openthread_border_router](https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/openthread_border_router_pi.md) + for more information on how to setup a border router on a raspberryPi. + + Take note that the RCP code is available directly through + [Simplicity Studio 5](https://www.silabs.com/products/development-tools/software/simplicity-studio/simplicity-studio-5) + under File->New->Project Wizard->Examples->Thread : ot-rcp + +- For this example to work, it is necessary to have a second efr32 device + running the + [air quality sensor app example](https://github.com/project-chip/connectedhomeip/blob/master/examples/air-quality-sensor-app/silabs/README.md) + commissioned on the same openthread network + +- User interface : **LCD** The LCD on Silabs WSTK shows a QR Code. This QR + Code is be scanned by the CHIP Tool app For the Rendez-vous procedure over + BLE + + * On devices that do not have or support the LCD Display like the BRD4166A Thunderboard Sense 2, + a URL can be found in the RTT logs. + + [SVR] Copy/paste the below URL in a browser to see the QR Code: + [SVR] https://project-chip.github.io/connectedhomeip/qrcode.html?data=CH%3AI34NM%20-00%200C9SS0 + + **LED 0** shows the overall state of the device and its connectivity. The + following states are possible: + + - Short Flash On (50 ms on/950 ms off): The device is in the + unprovisioned (unpaired) state and is waiting for a commissioning + application to connect. + + - Rapid Even Flashing (100 ms on/100 ms off): The device is in the + unprovisioned state and a commissioning application is connected through + Bluetooth LE. + + - Short Flash Off (950ms on/50ms off): The device is fully + provisioned, but does not yet have full Thread network or service + connectivity. + + - Solid On: The device is fully provisioned and has full Thread + network and service connectivity. + + **Push Button 0** + + - _Press and Release_ : Start, or restart, BLE advertisement in fast mode. It will advertise in this mode + for 30 seconds. The device will then switch to a slower interval advertisement. + After 15 minutes, the advertisement stops. + + - _Pressed and hold for 6 s_ : Initiates the factory reset of the device. + Releasing the button within the 6-second window cancels the factory reset + procedure. **LEDs** blink in unison when the factory reset procedure is + initiated. + +* You can provision and control the Chip device using the python controller, + [CHIPTool](https://github.com/project-chip/connectedhomeip/blob/master/examples/chip-tool/README.md) + standalone, Android or iOS app + + Here is an example with the CHIPTool: + + ``` + chip-tool pairing ble-thread 1 hex: 20202021 3840 + ``` + +### Notes + +- Depending on your network settings your router might not provide native ipv6 + addresses to your devices (Border router / PC). If this is the case, you + need to add a static ipv6 addresses on both device and then an ipv6 route to + the border router on your PC + +#### On Border Router: + +`$ sudo ip addr add dev 2002::2/64` + +#### On PC(Linux): + +`$ sudo ip addr add dev 2002::1/64` + +#Add Ipv6 route on PC(Linux) \$ sudo ip route add /64 +via 2002::2 + +## Running RPC console + +- As part of building the example with RPCs enabled the chip_rpc python + interactive console is installed into your venv. The python wheel files are + also created in the output folder: out/debug/chip_rpc_console_wheels. To + install the wheel files without rebuilding: + + `pip3 install out/debug/chip_rpc_console_wheels/*.whl` + +- To use the chip-rpc console after it has been installed run: + + `chip-console --device /dev/tty. -b 115200 -o //pw_log.out` + +- Then you can simulate a button press or release using the following command + where : idx = 0 or 1 for Button PB0 or PB1 action = 0 for PRESSED, 1 for + RELEASE Test toggling the LED with + + `rpcs.chip.rpc.Button.Event(idx=1, pushed=True)` + +## Memory settings + +While most of the RAM usage in CHIP is static, allowing easier debugging and +optimization with symbols analysis, we still need some HEAP for the crypto and +OpenThread. Size of the HEAP can be modified by changing the value of the +`configTOTAL_HEAP_SIZE` define inside of the FreeRTOSConfig.h file of this +example. Please take note that a HEAP size smaller than 13k can and will cause a +Mbedtls failure during the BLE rendez-vous or CASE session + +To track memory usage you can set `enable_heap_monitoring = true` either in the +BUILD.gn file or pass it as a build argument to gn. This will print on the RTT +console the RAM usage of each individual task and the number of Memory +allocation and Free. While this is not extensive monitoring you're welcome to +modify `examples/platform/efr32/MemMonitoring.cpp` to add your own memory +tracking code inside the `trackAlloc` and `trackFree` function + +## OTA Software Update + +For the description of Software Update process with EFR32 example applications +see +[EFR32 OTA Software Update](../../../docs/guides/silabs_efr32_software_update.md) + +## Building options + +All of Silabs's examples within the Matter repo have all the features enabled by +default, as to provide the best end user experience. However some of those +features can easily be toggled on or off. Here is a short list of options : + +### Disabling logging + +chip_progress_logging, chip_detail_logging, chip_automation_logging + + $ ./scripts/examples/gn_silabs_example.sh ./examples/air-quality-sensor-app/silabs ./out/air-quality-sensor-app-app BRD4164A "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false" + +### Debug build / release build + +is_debug + + $ ./scripts/examples/gn_silabs_example.sh ./examples/air-quality-sensor-app/silabs ./out/air-quality-sensor-app-app BRD4164A "is_debug=false" + +### Disabling LCD + +show_qr_code + + $ ./scripts/examples/gn_silabs_example.sh ./examples/air-quality-sensor-app/silabs ./out/air-quality-sensor-app-app BRD4164A "show_qr_code=false" + +### KVS maximum entry count + +kvs_max_entries + + Set the maximum Kvs entries that can be stored in NVM (Default 75) + Thresholds: 30 <= kvs_max_entries <= 255 + + $ ./scripts/examples/gn_silabs_example.sh ./examples/air-quality-sensor-app/silabs ./out/air-quality-sensor-app-app BRD4164A kvs_max_entries=50 diff --git a/examples/air-quality-sensor-app/silabs/build_for_wifi_args.gni b/examples/air-quality-sensor-app/silabs/build_for_wifi_args.gni new file mode 100644 index 00000000000000..718600a8115e59 --- /dev/null +++ b/examples/air-quality-sensor-app/silabs/build_for_wifi_args.gni @@ -0,0 +1,22 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//build_overrides/chip.gni") +import("${chip_root}/config/standalone/args.gni") + +silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") +import("${chip_root}/src/platform/silabs/wifi_args.gni") +chip_enable_wifi = true +chip_enable_ota_requestor = true +app_data_model = + "${chip_root}/examples/air-quality-sensor-app/air-quality-sensor-common" diff --git a/examples/air-quality-sensor-app/silabs/build_for_wifi_gnfile.gn b/examples/air-quality-sensor-app/silabs/build_for_wifi_gnfile.gn new file mode 100644 index 00000000000000..d391814190d09f --- /dev/null +++ b/examples/air-quality-sensor-app/silabs/build_for_wifi_gnfile.gn @@ -0,0 +1,28 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") + +# The location of the build configuration file. +buildconfig = "${build_root}/config/BUILDCONFIG.gn" + +# CHIP uses angle bracket includes. +check_system_includes = true + +default_args = { + target_cpu = "arm" + target_os = "freertos" + chip_enable_wifi = true + import("//build_for_wifi_args.gni") +} diff --git a/examples/air-quality-sensor-app/silabs/build_overrides b/examples/air-quality-sensor-app/silabs/build_overrides new file mode 120000 index 00000000000000..e578e73312ebd1 --- /dev/null +++ b/examples/air-quality-sensor-app/silabs/build_overrides @@ -0,0 +1 @@ +../../build_overrides \ No newline at end of file diff --git a/examples/air-quality-sensor-app/silabs/include/AirQualityConfig.h b/examples/air-quality-sensor-app/silabs/include/AirQualityConfig.h new file mode 100644 index 00000000000000..9cc9d770c33180 --- /dev/null +++ b/examples/air-quality-sensor-app/silabs/include/AirQualityConfig.h @@ -0,0 +1,41 @@ +#ifndef SL_MATTER_AIR_QUALITY_CONFIG_H +#define SL_MATTER_AIR_QUALITY_CONFIG_H + +// <<< Use Configuration Wizard in Context Menu >>> + +// AirQualityConfig.h +// This header file contains preprocessor directives to set air quality thresholds. +// Users should modify these #define statements to customize thresholds for their application. +// These thresholds are used to categorize air quality into various levels. + +// Minimum Threshold Value +// Default: 0 +#define MIN_THRESHOLD 0 + +// Good Threshold Value +// Default: 50 +#define GOOD_THRESHOLD 50 + +// Fair Threshold Value +// Default: 100 +#define FAIR_THRESHOLD 100 + +// Moderate Threshold Value +// Default: 150 +#define MODERATE_THRESHOLD 150 + +// Poor Threshold Value +// Default: 200 +#define POOR_THRESHOLD 200 + +// Very Poor Threshold Value +// Default: 250 +#define VERY_POOR_THRESHOLD 250 + +// Extremely Poor Threshold Value +// Default: 300 +#define EXTREMELY_POOR_THRESHOLD 300 + +// <<< end of configuration section >>> + +#endif // SL_MATTER_AIR_QUALITY_CONFIG_H diff --git a/examples/air-quality-sensor-app/silabs/include/AirQualitySensorUI.h b/examples/air-quality-sensor-app/silabs/include/AirQualitySensorUI.h new file mode 100644 index 00000000000000..0ee7123ed08472 --- /dev/null +++ b/examples/air-quality-sensor-app/silabs/include/AirQualitySensorUI.h @@ -0,0 +1,38 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include "demo-ui-bitmaps.h" +#include "dmd.h" +#include "glib.h" +#include "lcd.h" + +class AirQualitySensorUI +{ + +public: + static void DrawUI(GLIB_Context_t * glibContext); + +private: + static void DrawHeader(GLIB_Context_t * glibContext); + static void DrawFooter(GLIB_Context_t * glibContext); + static void DrawCurrentAirQuality(GLIB_Context_t * glibContext); + static void DrawFont(GLIB_Context_t * glibContext, uint8_t initial_x, uint8_t initial_y, uint8_t width, uint8_t * data, + uint32_t size); +}; diff --git a/examples/air-quality-sensor-app/silabs/include/AppConfig.h b/examples/air-quality-sensor-app/silabs/include/AppConfig.h new file mode 100644 index 00000000000000..fafcfd3e830cd7 --- /dev/null +++ b/examples/air-quality-sensor-app/silabs/include/AppConfig.h @@ -0,0 +1,59 @@ +/* + * + * Copyright (c) 2020-2024 Project CHIP Authors + * Copyright (c) 2019-2024 Google LLC. + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include "silabs_utils.h" + +// ---- Air Quality Sensor Example App Config ---- + +#define APP_TASK_NAME "AQS" + +#define BLE_DEV_NAME "SiLabs-Air-Quality-Sensor" + +// Time it takes in ms for the simulated actuator to move from one +// APP Logo, boolean only. must be 64x64 +#define ON_DEMO_BITMAP \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xE0, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0x81, 0x81, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x83, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x07, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xE0, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x07, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xE0, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, \ + 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0x0F, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, \ + 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0x07, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, \ + 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0x0F, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0x00, \ + 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xE0, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF +#define OFF_DEMO_BITMAP ON_DEMO_BITMAP diff --git a/examples/air-quality-sensor-app/silabs/include/AppEvent.h b/examples/air-quality-sensor-app/silabs/include/AppEvent.h new file mode 100644 index 00000000000000..f5218299bd26aa --- /dev/null +++ b/examples/air-quality-sensor-app/silabs/include/AppEvent.h @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2020-2024 Project CHIP Authors + * Copyright (c) 2018-2024 Nest Labs, Inc. + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once +#include + +struct AppEvent; +typedef void (*EventHandler)(AppEvent *); + +struct AppEvent +{ + enum AppEventTypes + { + kEventType_Button = 0, + kEventType_Timer, + kEventType_AirQualitySensor, + kEventType_Install, + }; + + uint16_t Type; + + union + { + struct + { + uint8_t Action; + } ButtonEvent; + struct + { + void * Context; + } TimerEvent; + struct + { + uint8_t Action; + int32_t Actor; + } AirQualitySensorEvent; + }; + + EventHandler Handler; +}; diff --git a/examples/air-quality-sensor-app/silabs/include/AppTask.h b/examples/air-quality-sensor-app/silabs/include/AppTask.h new file mode 100644 index 00000000000000..4a42295ffd6bfa --- /dev/null +++ b/examples/air-quality-sensor-app/silabs/include/AppTask.h @@ -0,0 +1,108 @@ +/* + * + * Copyright (c) 2020-2024 Project CHIP Authors + * Copyright (c) 2019-2024 Google LLC. + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +/********************************************************** + * Includes + *********************************************************/ + +#include +#include + +#ifdef DISPLAY_ENABLED +#include "AirQualitySensorUI.h" +#endif + +#include "AppEvent.h" +#include "BaseApplication.h" +#include "SensorManager.h" +#include +#include +#include +#include + +/********************************************************** + * Defines + *********************************************************/ + +// Application-defined error codes in the CHIP_ERROR space. +#define APP_ERROR_EVENT_QUEUE_FAILED CHIP_APPLICATION_ERROR(0x01) +#define APP_ERROR_CREATE_TASK_FAILED CHIP_APPLICATION_ERROR(0x02) +#define APP_ERROR_UNHANDLED_EVENT CHIP_APPLICATION_ERROR(0x03) +#define APP_ERROR_CREATE_TIMER_FAILED CHIP_APPLICATION_ERROR(0x04) +#define APP_ERROR_START_TIMER_FAILED CHIP_APPLICATION_ERROR(0x05) +#define APP_ERROR_STOP_TIMER_FAILED CHIP_APPLICATION_ERROR(0x06) + +/********************************************************** + * AppTask Declaration + *********************************************************/ +class AppTask : public BaseApplication +{ + +public: + AppTask() = default; + + static AppTask & GetAppTask() { return sAppTask; } + + /** + * @brief AppTask task main loop function + * + * @param pvParameter FreeRTOS task parameter + */ + static void AppTaskMain(void * pvParameter); + + CHIP_ERROR StartAppTask(); + + /** + * @brief Request an update of the Air Quality Senor LCD UI + */ + void UpdateAirQualitySensorUI(); + + /** + * @brief Event handler when a button is pressed + * Function posts an event for button processing + * + * @param buttonHandle APP_CONTROL_BUTTON or APP_FUNCTION_BUTTON + * @param btnAction button action - SL_SIMPLE_BUTTON_PRESSED, + * SL_SIMPLE_BUTTON_RELEASED or SL_SIMPLE_BUTTON_DISABLED + */ + static void ButtonEventHandler(uint8_t button, uint8_t btnAction); + +private: + static AppTask sAppTask; + + /** + * @brief AppTask initialisation function + * + * @return CHIP_ERROR + */ + CHIP_ERROR Init(); + + /** + * @brief PB0 Button event processing function + * Press and hold will trigger a factory reset timer start + * Press and release will restart BLEAdvertising if not commisionned + * + * @param aEvent button event being processed + */ + static void ButtonHandler(AppEvent * aEvent); + + static void AirQualitySensorActionEventHandler(AppEvent * aEvent); +}; diff --git a/examples/air-quality-sensor-app/silabs/include/CHIPProjectConfig.h b/examples/air-quality-sensor-app/silabs/include/CHIPProjectConfig.h new file mode 100644 index 00000000000000..f4e9709f90ade0 --- /dev/null +++ b/examples/air-quality-sensor-app/silabs/include/CHIPProjectConfig.h @@ -0,0 +1,110 @@ +/* + * + * Copyright (c) 2020-2024 Project CHIP Authors + * Copyright (c) 2019-2024 Google LLC. + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Example project configuration file for CHIP. + * + * This is a place to put application or project-specific overrides + * to the default configuration values for general CHIP features. + * + */ + +#pragma once + +// Use a default pairing code if one hasn't been provisioned in flash. +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 +#endif + +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 +#endif + +// For convenience, Chip Security Test Mode can be enabled and the +// requirement for authentication in various protocols can be disabled. +// +// WARNING: These options make it possible to circumvent basic Chip security functionality, +// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. +// +#define CHIP_CONFIG_SECURITY_TEST_MODE 0 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID + * + * 0xFFF1: Test vendor + */ +#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 0xFFF1 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID + * + * 0x800E: example Air Quality Sensor app + */ +#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x800E + +/** + * CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE + * + * Enable support for Chip-over-BLE (CHIPoBLE). + */ +#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 1 + +/** + * CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC + * + * Enables synchronizing the device's real time clock with a remote Chip Time service + * using the Chip Time Sync protocol. + */ +#define CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC 0 + +/** + * CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER + * + * Enables the use of a hard-coded default serial number if none + * is found in Chip NV storage. + */ +#define CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER "TEST_SN" + +/** + * CHIP_DEVICE_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS + * + * Enable recording UTC timestamps. + */ +#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS 1 + +/** + * CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE + * + * A size, in bytes, of the individual debug event logging buffer. + */ +#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (512) + +/** + * @def CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL + * + * @brief + * Active retransmit interval, or time to wait before retransmission after + * subsequent failures in milliseconds. + * + * This is the default value, that might be adjusted by end device depending on its + * needs (e.g. sleeping period) using Service Discovery TXT record CRA key. + * + */ +#define CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL (2000_ms32) diff --git a/examples/air-quality-sensor-app/silabs/include/SensorManager.h b/examples/air-quality-sensor-app/silabs/include/SensorManager.h new file mode 100644 index 00000000000000..52b753c4410d28 --- /dev/null +++ b/examples/air-quality-sensor-app/silabs/include/SensorManager.h @@ -0,0 +1,43 @@ +/* + * + * Copyright (c) 2019-2024 Google LLC. + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include "AppEvent.h" +#include +#include +#include +#include + +class SensorManager +{ +public: + CHIP_ERROR Init(); + static SensorManager & SensorMgr() { return sSensorManager; } + +private: + SensorManager() = default; + ~SensorManager() = default; + + osTimerId_t mSensorTimer; + + // Reads new generated sensor value, stores it, and updates local Air Quality attribute + static void SensorTimerEventHandler(void * arg); + + static SensorManager sSensorManager; +}; diff --git a/examples/air-quality-sensor-app/silabs/openthread.gn b/examples/air-quality-sensor-app/silabs/openthread.gn new file mode 100644 index 00000000000000..b05216fc9d7eae --- /dev/null +++ b/examples/air-quality-sensor-app/silabs/openthread.gn @@ -0,0 +1,29 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") + +# The location of the build configuration file. +buildconfig = "${build_root}/config/BUILDCONFIG.gn" + +# CHIP uses angle bracket includes. +check_system_includes = true + +default_args = { + target_cpu = "arm" + target_os = "freertos" + chip_openthread_ftd = true + + import("//openthread.gni") +} diff --git a/examples/air-quality-sensor-app/silabs/openthread.gni b/examples/air-quality-sensor-app/silabs/openthread.gni new file mode 100644 index 00000000000000..c6a8cbf29c7b0a --- /dev/null +++ b/examples/air-quality-sensor-app/silabs/openthread.gni @@ -0,0 +1,27 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/chip.gni") +import("${chip_root}/config/standalone/args.gni") +import("${chip_root}/src/platform/silabs/efr32/args.gni") + +silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") + +app_data_model = + "${chip_root}/examples/air-quality-sensor-app/air-quality-sensor-common" +chip_enable_ota_requestor = true +chip_enable_openthread = true + +openthread_external_platform = + "${chip_root}/third_party/openthread/platforms/efr32:libopenthread-efr32" diff --git a/examples/air-quality-sensor-app/silabs/src/AirQualitySensorUI.cpp b/examples/air-quality-sensor-app/silabs/src/AirQualitySensorUI.cpp new file mode 100644 index 00000000000000..ee2ceb3df46ac7 --- /dev/null +++ b/examples/air-quality-sensor-app/silabs/src/AirQualitySensorUI.cpp @@ -0,0 +1,184 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +#include "AirQualitySensorUI.h" +#include "AppTask.h" +#include "SensorManager.h" +#include "demo-ui-bitmaps.h" +#include "dmd.h" +#include +#if DISPLAY_ENABLED +#include "glib.h" +#include "lcd.h" +#endif + +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::AirQuality; + +namespace { +// Bitmap +const uint8_t silabsLogo[] = { SILABS_LOGO_SMALL }; +const uint8_t matterLogoBitmap[] = { MATTER_LOGO_BITMAP }; + +const uint8_t wifiLogo[] = { WIFI_BITMAP }; +const uint8_t threadLogo[] = { THREAD_BITMAP }; +const uint8_t bleLogo[] = { BLUETOOTH_ICON_SMALL }; + +const unsigned char monaco_48pt[] = { MONACO_48PT }; + +#ifdef SL_WIFI +constexpr bool UI_WIFI = true; +#else +constexpr bool UI_WIFI = false; +#endif +} // namespace + +void AirQualitySensorUI::DrawUI(GLIB_Context_t * glibContext) +{ + if (glibContext == nullptr) + { + ChipLogDetail(AppServer, "Context is null"); + return; + } + + GLIB_clear(glibContext); + DrawHeader(glibContext); + DrawCurrentAirQuality(glibContext); + DrawFooter(glibContext); + +#if SL_LCDCTRL_MUX + sl_wfx_host_pre_lcd_spi_transfer(); +#endif // SL_LCDCTRL_MUX + DMD_updateDisplay(); +#if SL_LCDCTRL_MUX + sl_wfx_host_post_lcd_spi_transfer(); +#endif // SL_LCDCTRL_MUX +} + +void AirQualitySensorUI::DrawHeader(GLIB_Context_t * glibContext) +{ + // Draw Silabs Corner icon + GLIB_drawBitmap(glibContext, SILABS_ICON_POSITION_X, STATUS_ICON_LINE, SILABS_LOGO_WIDTH, SILABS_LOGO_HEIGHT, silabsLogo); + // Draw BLE Icon + GLIB_drawBitmap(glibContext, BLE_ICON_POSITION_X, STATUS_ICON_LINE, BLUETOOTH_ICON_SIZE, BLUETOOTH_ICON_SIZE, bleLogo); + // Draw WiFi/OpenThread Icon + GLIB_drawBitmap(glibContext, NETWORK_ICON_POSITION_X, STATUS_ICON_LINE, (UI_WIFI) ? WIFI_BITMAP_HEIGHT : THREAD_BITMAP_WIDTH, + WIFI_BITMAP_HEIGHT, (UI_WIFI) ? wifiLogo : threadLogo); + // Draw Matter Icon + GLIB_drawBitmap(glibContext, MATTER_ICON_POSITION_X, STATUS_ICON_LINE, MATTER_LOGO_WIDTH, MATTER_LOGO_HEIGHT, matterLogoBitmap); +#if SL_LCDCTRL_MUX + sl_wfx_host_pre_lcd_spi_transfer(); +#endif // SL_LCDCTRL_MUX + DMD_updateDisplay(); +#if SL_LCDCTRL_MUX + sl_wfx_host_post_lcd_spi_transfer(); +#endif // SL_LCDCTRL_MUX +} + +void AirQualitySensorUI::DrawFooter(GLIB_Context_t * glibContext) +{ + switch (AirQualitySensorManager::GetInstance()->GetAirQuality()) + { + case AirQualityEnum::kGood: + GLIB_drawStringOnLine(glibContext, "AQ : Good", 11, GLIB_ALIGN_LEFT, 0, 0, true); + break; + case AirQualityEnum::kFair: + GLIB_drawStringOnLine(glibContext, "AQ : Fair", 11, GLIB_ALIGN_LEFT, 0, 0, true); + break; + case AirQualityEnum::kModerate: + GLIB_drawStringOnLine(glibContext, "AQ : Moderate", 11, GLIB_ALIGN_LEFT, 0, 0, true); + break; + case AirQualityEnum::kPoor: + GLIB_drawStringOnLine(glibContext, "AQ : Poor", 11, GLIB_ALIGN_LEFT, 0, 0, true); + break; + case AirQualityEnum::kVeryPoor: + GLIB_drawStringOnLine(glibContext, "AQ : VPoor", 11, GLIB_ALIGN_LEFT, 0, 0, true); + break; + case AirQualityEnum::kExtremelyPoor: + GLIB_drawStringOnLine(glibContext, "AQ : EPoor", 11, GLIB_ALIGN_LEFT, 0, 0, true); + break; + case AirQualityEnum::kUnknown: + GLIB_drawStringOnLine(glibContext, "AQ : Unknown", 11, GLIB_ALIGN_LEFT, 0, 0, true); + break; + default: + break; + } + +#if SL_LCDCTRL_MUX + sl_wfx_host_pre_lcd_spi_transfer(); +#endif // SL_LCDCTRL_MUX + DMD_updateDisplay(); +#if SL_LCDCTRL_MUX + sl_wfx_host_post_lcd_spi_transfer(); +#endif // SL_LCDCTRL_MUX +} + +/** + * @brief Draw a 2 digit Air Quality of screen. Because of this Celsius is used by default + * @param GLIB_Context_t * pointer to the context for the GLIB library + * @param int8_t current Air Quality + */ +void AirQualitySensorUI::DrawCurrentAirQuality(GLIB_Context_t * glibContext) +{ + // LCD line define + constexpr uint8_t kAirQualityLcdInitialX = 30; + uint8_t position_x = 10; + uint8_t * data; + uint8_t print_val; + + // Print Current air quality + print_val = 0; + data = (uint8_t *) &monaco_48pt[print_val * MONACO_FONT_NB_LENGTH]; + DrawFont(glibContext, position_x, kAirQualityLcdInitialX, MONACO_FONT_WIDTH, data, MONACO_FONT_NB_LENGTH); + position_x += MONACO_FONT_WIDTH; + + print_val = static_cast(AirQualitySensorManager::GetInstance()->GetAirQuality()); + data = (uint8_t *) &monaco_48pt[print_val * MONACO_FONT_NB_LENGTH]; + DrawFont(glibContext, position_x, kAirQualityLcdInitialX, MONACO_FONT_WIDTH, data, MONACO_FONT_NB_LENGTH); +} + +void AirQualitySensorUI::DrawFont(GLIB_Context_t * glibContext, uint8_t initial_x, uint8_t initial_y, uint8_t width, uint8_t * data, + uint32_t size) +{ + uint8_t x = initial_x, y = initial_y; + for (uint16_t i = 0; i < size; i++) + { + for (uint8_t mask = 0; mask < 8; mask++) + { + if (!(data[i] & (0x01 << mask))) + { + GLIB_drawPixel(glibContext, x, y); + } + // Check line changes + if (((x - initial_x) % width) == 0 && x != initial_x) + { + x = initial_x; + y++; + // Font is 8 bit align with paddings bits; + mask = 8; + } + else + { + x++; + } + } + } +} diff --git a/examples/air-quality-sensor-app/silabs/src/AppTask.cpp b/examples/air-quality-sensor-app/silabs/src/AppTask.cpp new file mode 100644 index 00000000000000..572ec66dd5dd34 --- /dev/null +++ b/examples/air-quality-sensor-app/silabs/src/AppTask.cpp @@ -0,0 +1,154 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors\ + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/********************************************************** + * Includes + *********************************************************/ + +#include "AppTask.h" +#include "AppConfig.h" +#include "AppEvent.h" + +#include "LEDWidget.h" + +#ifdef DISPLAY_ENABLED +#include "AirQualitySensorUI.h" +#include "lcd.h" +#ifdef QR_CODE_ENABLED +#include "qrcodegen.h" +#endif // QR_CODE_ENABLED +#endif // DISPLAY_ENABLED + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/********************************************************** + * Defines and Constants + *********************************************************/ + +#define APP_FUNCTION_BUTTON 0 + +using namespace chip; +using namespace chip::app; +using namespace chip::TLV; +using namespace chip::DeviceLayer; +using namespace chip::app::Clusters::AirQuality; +using namespace chip::app::Clusters; + +/********************************************************** + * AppTask Definitions + *********************************************************/ + +AppTask AppTask::sAppTask; + +CHIP_ERROR AppTask::Init() +{ + CHIP_ERROR err = CHIP_NO_ERROR; + chip::DeviceLayer::Silabs::GetPlatform().SetButtonsCb(AppTask::ButtonEventHandler); +#ifdef DISPLAY_ENABLED + GetLCD().Init((uint8_t *) "Air-Quality-Sensor"); + GetLCD().SetCustomUI(AirQualitySensorUI::DrawUI); +#endif + + err = BaseApplication::Init(); + if (err != CHIP_NO_ERROR) + { + ChipLogDetail(AppServer, "BaseApplication::Init() failed"); + appError(err); + } + err = SensorManager::SensorMgr().Init(); + if (err != CHIP_NO_ERROR) + { + ChipLogDetail(AppServer, "SensorMgr::Init() failed"); + appError(err); + } + + return err; +} + +CHIP_ERROR AppTask::StartAppTask() +{ + return BaseApplication::StartAppTask(AppTaskMain); +} + +void AppTask::AppTaskMain(void * pvParameter) +{ + AppEvent event; + osMessageQueueId_t sAppEventQueue = *(static_cast(pvParameter)); + + CHIP_ERROR err = sAppTask.Init(); + if (err != CHIP_NO_ERROR) + { + ChipLogDetail(AppServer, "AppTask.Init() failed"); + appError(err); + } + +#if !(defined(CHIP_CONFIG_ENABLE_ICD_SERVER) && CHIP_CONFIG_ENABLE_ICD_SERVER) + sAppTask.StartStatusLEDTimer(); +#endif + + ChipLogDetail(AppServer, "App Task started"); + while (true) + { + osStatus_t eventReceived = osMessageQueueGet(sAppEventQueue, &event, NULL, osWaitForever); + while (eventReceived == osOK) + { + sAppTask.DispatchEvent(&event); + eventReceived = osMessageQueueGet(sAppEventQueue, &event, NULL, 0); + } + } +} + +void AppTask::UpdateAirQualitySensorUI() +{ +// Update the LCD with the Stored value. Show QR Code if not provisioned +#ifdef DISPLAY_ENABLED + GetLCD().WriteDemoUI(false); +#ifdef QR_CODE_ENABLED + if (BaseApplication::GetProvisionStatus()) + { + GetLCD().ShowQRCode(true); + } +#endif // QR_CODE_ENABLED +#endif +} + +void AppTask::ButtonEventHandler(uint8_t button, uint8_t btnAction) +{ + AppEvent aEvent = {}; + aEvent.Type = AppEvent::kEventType_Button; + aEvent.ButtonEvent.Action = btnAction; + + if (button == APP_FUNCTION_BUTTON) + { + aEvent.Handler = BaseApplication::ButtonHandler; + sAppTask.PostEvent(&aEvent); + } +} diff --git a/examples/air-quality-sensor-app/silabs/src/SensorManager.cpp b/examples/air-quality-sensor-app/silabs/src/SensorManager.cpp new file mode 100644 index 00000000000000..3b76450e171a86 --- /dev/null +++ b/examples/air-quality-sensor-app/silabs/src/SensorManager.cpp @@ -0,0 +1,180 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/********************************************************** + * Includes + *********************************************************/ + +#include "SensorManager.h" +#include "AppConfig.h" +#include "AppEvent.h" +#include "AppTask.h" +#include +#include + +#ifdef USE_AIR_QUALITY_SENSOR +#include "AirQualitySensor.h" +#endif +/********************************************************** + * Defines and Constants + *********************************************************/ + +using namespace chip; +using namespace chip::DeviceLayer; +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::AirQuality; + +/********************************************************** + * Variable declarations + *********************************************************/ +SensorManager SensorManager::sSensorManager; +namespace { +constexpr uint16_t kSensorTImerPeriodMs = 30000; // 30s timer period + +#ifndef USE_AIR_QUALITY_SENSOR +constexpr uint16_t kSimulatedReadingFrequency = + (60000 / kSensorTImerPeriodMs); // for every two timer cycles, a simulated sensor update is triggered. +int32_t mSimulatedAirQuality[] = { 5, 55, 105, 155, 205, 255, 305, 355, 400 }; +#endif + +} // namespace + +/** + * @brief Classifies the air quality based on a given sensor value. + * + * This function compares the input value against predefined thresholds + * defined in the AirQualityConfig.h file. The thresholds are used + * to classify the air quality into categories defined by the AirQualityEnum. + * The thresholds are defined in the SensorThresholds enum. + * + * @param value The sensor value used to classify air quality. + * @return AirQualityEnum The classified air quality category. + */ +AirQualityEnum classifyAirQuality(int32_t value) +{ + if (value < MIN_THRESHOLD) + { + return AirQualityEnum::kUnknown; + } + else if (value < GOOD_THRESHOLD) + { + return AirQualityEnum::kGood; + } + else if (value < FAIR_THRESHOLD) + { + return AirQualityEnum::kFair; + } + else if (value < MODERATE_THRESHOLD) + { + return AirQualityEnum::kModerate; + } + else if (value < POOR_THRESHOLD) + { + return AirQualityEnum::kPoor; + } + else if (value < VERY_POOR_THRESHOLD) + { + return AirQualityEnum::kVeryPoor; + } + else + { + return AirQualityEnum::kExtremelyPoor; + } +} + +void InitAirQualitySensorManager(intptr_t arg) +{ + AirQualitySensorManager::InitInstance(); +} + +CHIP_ERROR SensorManager::Init() +{ + DeviceLayer::PlatformMgr().ScheduleWork(InitAirQualitySensorManager); + // Create cmsisos sw timer for air quality sensor timer. + mSensorTimer = osTimerNew(SensorTimerEventHandler, osTimerPeriodic, nullptr, nullptr); + if (mSensorTimer == NULL) + { + ChipLogDetail(AppServer, "mSensorTimer timer create failed"); + return APP_ERROR_CREATE_TIMER_FAILED; + } + +#ifdef USE_AIR_QUALITY_SENSOR + if (SL_STATUS_OK != AirQualitySensor::Init()) + { + ChipLogDetail(AppServer, "Failed to Init Sensor"); + return CHIP_ERROR_INTERNAL; + } +#endif + // Update Air Quality immediatly at bootup + SensorTimerEventHandler(nullptr); + // Trigger periodic update + uint32_t delayTicks = ((uint64_t) osKernelGetTickFreq() * kSensorTImerPeriodMs) / 1000; + + // Starts or restarts the function timer + if (osTimerStart(mSensorTimer, delayTicks)) + { + ChipLogDetail(AppServer, "mSensor Timer start() failed"); + appError(APP_ERROR_START_TIMER_FAILED); + } + return CHIP_NO_ERROR; +} + +void writeAirQualityToAttribute(intptr_t context) +{ + int32_t * air_quality_ptr = reinterpret_cast(context); + AirQualitySensorManager::GetInstance()->OnAirQualityChangeHandler(classifyAirQuality(*air_quality_ptr)); + ChipLogDetail(AppServer, "RAW AirQuality value: %ld and corresponding Enum value : %d", *air_quality_ptr, + chip::to_underlying(AirQualitySensorManager::GetInstance()->GetAirQuality())); + AppTask::GetAppTask().UpdateAirQualitySensorUI(); + delete air_quality_ptr; +} + +void SensorManager::SensorTimerEventHandler(void * arg) +{ + int32_t air_quality; +#ifdef USE_AIR_QUALITY_SENSOR + if (SL_STATUS_OK != AirQualitySensor::GetAirQuality(air_quality)) + { + ChipLogDetail(AppServer, "Failed to read Air Quality !!!"); + return; + } +#else + // Initialize static variables to keep track of the current index and repetition count + static uint8_t nbOfRepetition = 0; + static uint8_t simulatedIndex = 0; + + // Ensure the simulatedIndex wraps around the array size to avoid out-of-bounds access + simulatedIndex = simulatedIndex % ArraySize(mSimulatedAirQuality); + // Retrieve the current air quality value from the simulated data array using the simulatedIndex + air_quality = mSimulatedAirQuality[simulatedIndex]; + + // Increment the repetition count + nbOfRepetition++; + // Check if the number of repetitions has reached the threshold to simulate a new reading + if (nbOfRepetition >= kSimulatedReadingFrequency) + { + // Move to the next index for the next simulated reading + simulatedIndex++; + // Reset the repetition count + nbOfRepetition = 0; + } +#endif // USE_AIR_QUALITY_SENSOR + // create pointer for the int32_t air_quality + int32_t * air_quality_ptr = new int32_t(air_quality); + DeviceLayer::PlatformMgr().ScheduleWork(writeAirQualityToAttribute, reinterpret_cast(air_quality_ptr)); +} diff --git a/examples/air-quality-sensor-app/silabs/src/ZclCallbacks.cpp b/examples/air-quality-sensor-app/silabs/src/ZclCallbacks.cpp new file mode 100644 index 00000000000000..5bd4dd3b4a01c4 --- /dev/null +++ b/examples/air-quality-sensor-app/silabs/src/ZclCallbacks.cpp @@ -0,0 +1,50 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * This file implements the handler for data model messages. + */ + +#include "AppConfig.h" + +#include +#include +#include +#include +#include + +#ifdef DIC_ENABLE +#include "dic_control.h" +#endif // DIC_ENABLE + +using namespace ::chip; +using namespace ::chip::app::Clusters; + +void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, + uint8_t * value) +{ + ClusterId clusterId = attributePath.mClusterId; + [[maybe_unused]] AttributeId attributeId = attributePath.mAttributeId; + ChipLogProgress(Zcl, "Cluster callback: " ChipLogFormatMEI, ChipLogValueMEI(clusterId)); + + if (clusterId == Identify::Id) + { + ChipLogProgress(Zcl, "Identify attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", + ChipLogValueMEI(attributeId), type, *value, size); + } +} diff --git a/examples/air-quality-sensor-app/silabs/third_party/connectedhomeip b/examples/air-quality-sensor-app/silabs/third_party/connectedhomeip new file mode 120000 index 00000000000000..c866b86874994d --- /dev/null +++ b/examples/air-quality-sensor-app/silabs/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../.. \ No newline at end of file diff --git a/examples/air-quality-sensor-app/telink/README.md b/examples/air-quality-sensor-app/telink/README.md index e2c4b49a699991..c3d403f450ee45 100644 --- a/examples/air-quality-sensor-app/telink/README.md +++ b/examples/air-quality-sensor-app/telink/README.md @@ -138,10 +138,10 @@ feature for another Telink example: After build application with enabled OTA feature, use next binary files: -- zephyr.bin - main binary to flash PCB (Use at least 2MB PCB). -- zephyr-ota.bin - binary for OTA Provider +- merged.bin - main binary to flash PCB (Use at least 2MB PCB). +- matter.ota - binary for OTA Provider -All binaries has the same SW version. To test OTA “zephyr-ota.bin” should have +All binaries has the same SW version. To test OTA “matter.ota” should have higher SW version than base SW. Set CONFIG_CHIP_DEVICE_SOFTWARE_VERSION=2 in corresponding “prj.conf” configuration file. @@ -156,7 +156,7 @@ Usage of OTA: - Run the Linux OTA Provider with OTA image. ``` - ./chip-ota-provider-app -f zephyr-ota.bin + ./chip-ota-provider-app -f matter.ota ``` - Provision the Linux OTA Provider using chip-tool diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 33a676bc15b1cf..45e58fffca24ea 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -1635,6 +1642,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp b/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp index 94345600cf53fd..59bccf11faa481 100644 --- a/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp @@ -1,7 +1,6 @@ #include #include -using namespace std; using namespace chip; using namespace chip::app::Clusters; using namespace chip::app::Clusters::ModeSelect; diff --git a/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp b/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp index 6019006c2a2868..5ed8a0c40f5e89 100644 --- a/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp @@ -19,7 +19,6 @@ #include #include -using namespace std; using namespace chip; using namespace chip::app::Clusters; using namespace chip::app::Clusters::TemperatureControl; diff --git a/examples/all-clusters-app/ameba/README.md b/examples/all-clusters-app/ameba/README.md index 0569c919fc330e..9c442d6652e84f 100644 --- a/examples/all-clusters-app/ameba/README.md +++ b/examples/all-clusters-app/ameba/README.md @@ -27,11 +27,11 @@ The CHIP demo application is supported on - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:76 + $ docker pull ghcr.io/project-chip/chip-build-ameba:81 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:76 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:81 - Setup build environment: diff --git a/examples/all-clusters-app/nxp/common/main/DeviceCallbacks.cpp b/examples/all-clusters-app/nxp/common/main/DeviceCallbacks.cpp index 3b189b257e3e2b..5226daf7295177 100644 --- a/examples/all-clusters-app/nxp/common/main/DeviceCallbacks.cpp +++ b/examples/all-clusters-app/nxp/common/main/DeviceCallbacks.cpp @@ -56,14 +56,6 @@ void OnTriggerEffect(::Identify * identify) } } -Identify gIdentify0 = { - chip::EndpointId{ 0 }, - [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStart"); }, - [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStop"); }, - chip::app::Clusters::Identify::IdentifyTypeEnum::kNone, - OnTriggerEffect, -}; - Identify gIdentify1 = { chip::EndpointId{ 1 }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStart"); }, diff --git a/examples/all-clusters-app/nxp/rt/rw61x/BUILD.gn b/examples/all-clusters-app/nxp/rt/rw61x/BUILD.gn index bdc878cc0f5250..19fa822ec24688 100644 --- a/examples/all-clusters-app/nxp/rt/rw61x/BUILD.gn +++ b/examples/all-clusters-app/nxp/rt/rw61x/BUILD.gn @@ -170,7 +170,7 @@ rt_executable("all_cluster_app") { "${common_example_dir}/device_callbacks/source/CommonDeviceCallbacks.cpp", "${common_example_dir}/device_manager/source/CHIPDeviceManager.cpp", "${common_example_dir}/icd/source/ICDUtil.cpp", - "${common_example_dir}/matter_button/source/AppMatterButtonEmpty.cpp", + "${common_example_dir}/matter_button/source/ButtonRegistrationEmpty.cpp", ] deps = [ diff --git a/examples/all-clusters-app/telink/README.md b/examples/all-clusters-app/telink/README.md index 8404672d3134e6..b702fd6e3567db 100644 --- a/examples/all-clusters-app/telink/README.md +++ b/examples/all-clusters-app/telink/README.md @@ -140,10 +140,10 @@ feature for another Telink example: After build application with enabled OTA feature, use next binary files: -- zephyr.bin - main binary to flash PCB (Use at least 2MB PCB). -- zephyr-ota.bin - binary for OTA Provider +- merged.bin - main binary to flash PCB (Use at least 2MB PCB). +- matter.ota - binary for OTA Provider -All binaries has the same SW version. To test OTA “zephyr-ota.bin” should have +All binaries has the same SW version. To test OTA “matter.ota” should have higher SW version than base SW. Set CONFIG_CHIP_DEVICE_SOFTWARE_VERSION=2 in corresponding “prj.conf” configuration file. @@ -158,7 +158,7 @@ Usage of OTA: - Run the Linux OTA Provider with OTA image. ``` - ./chip-ota-provider-app -f zephyr-ota.bin + ./chip-ota-provider-app -f matter.ota ``` - Provision the Linux OTA Provider using chip-tool diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter index a261fb4070e0ed..630f3a6d2e98df 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -1550,6 +1557,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5445,9 +5453,9 @@ cluster ContentLauncher = 1290 { bitmap Feature : bitmap32 { kContentSearch = 0x1; kURLPlayback = 0x2; - kAdvancedSeek = 0x3; - kTextTracks = 0x4; - kAudioTracks = 0x5; + kAdvancedSeek = 0x4; + kTextTracks = 0x8; + kAudioTracks = 0x10; } bitmap SupportedProtocolsBitmap : bitmap32 { diff --git a/examples/all-clusters-minimal-app/ameba/README.md b/examples/all-clusters-minimal-app/ameba/README.md index c136008cb18456..b120d9c4bfebfa 100644 --- a/examples/all-clusters-minimal-app/ameba/README.md +++ b/examples/all-clusters-minimal-app/ameba/README.md @@ -27,13 +27,13 @@ The CHIP demo application is supported on - Pull docker image: ``` - $ docker pull ghcr.io/project-chip/chip-build-ameba:76 + $ docker pull ghcr.io/project-chip/chip-build-ameba:81 ``` - Run docker container: ``` - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:76 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:81 ``` - Setup build environment: diff --git a/examples/all-clusters-minimal-app/telink/README.md b/examples/all-clusters-minimal-app/telink/README.md index f3a0646df97743..33ad1fb6cf9f8d 100644 --- a/examples/all-clusters-minimal-app/telink/README.md +++ b/examples/all-clusters-minimal-app/telink/README.md @@ -125,10 +125,10 @@ feature for another Telink example: After build application with enabled OTA feature, use next binary files: -- zephyr.bin - main binary to flash PCB (Use at least 2MB PCB). -- zephyr-ota.bin - binary for OTA Provider +- merged.bin - main binary to flash PCB (Use at least 2MB PCB). +- matter.ota - binary for OTA Provider -All binaries has the same SW version. To test OTA “zephyr-ota.bin” should have +All binaries has the same SW version. To test OTA “matter.ota” should have higher SW version than base SW. Set CONFIG_CHIP_DEVICE_SOFTWARE_VERSION=2 in corresponding “prj.conf” configuration file. @@ -143,7 +143,7 @@ Usage of OTA: - Run the Linux OTA Provider with OTA image. ``` - ./chip-ota-provider-app -f zephyr-ota.bin + ./chip-ota-provider-app -f matter.ota ``` - Provision the Linux OTA Provider using chip-tool diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index d64624281236cc..8274cbb34f2f39 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -1185,6 +1192,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/bridge-app/telink/README.md b/examples/bridge-app/telink/README.md index 7dc29dff9d1d58..00b050e93c945e 100644 --- a/examples/bridge-app/telink/README.md +++ b/examples/bridge-app/telink/README.md @@ -285,10 +285,10 @@ feature for another Telink example: After build application with enabled OTA feature, use next binary files: -- zephyr.bin - main binary to flash PCB (Use at least 2MB PCB). -- zephyr-ota.bin - binary for OTA Provider +- merged.bin - main binary to flash PCB (Use at least 2MB PCB). +- matter.ota - binary for OTA Provider -All binaries has the same SW version. To test OTA “zephyr-ota.bin” should have +All binaries has the same SW version. To test OTA “matter.ota” should have higher SW version than base SW. Set CONFIG_CHIP_DEVICE_SOFTWARE_VERSION=2 in corresponding “prj.conf” configuration file. @@ -303,7 +303,7 @@ Usage of OTA: - Run the Linux OTA Provider with OTA image. ``` - ./chip-ota-provider-app -f zephyr-ota.bin + ./chip-ota-provider-app -f matter.ota ``` - Provision the Linux OTA Provider using chip-tool diff --git a/examples/chef/common/clusters/audio-output/AudioOutputManager.cpp b/examples/chef/common/clusters/audio-output/AudioOutputManager.cpp index 06a123a6549679..65df8db9ff0bb2 100644 --- a/examples/chef/common/clusters/audio-output/AudioOutputManager.cpp +++ b/examples/chef/common/clusters/audio-output/AudioOutputManager.cpp @@ -20,7 +20,6 @@ #ifdef MATTER_DM_PLUGIN_AUDIO_OUTPUT_SERVER #include "AudioOutputManager.h" -using namespace std; using namespace chip::app; using namespace chip::app::Clusters::AudioOutput; using chip::app::AttributeValueEncoder; diff --git a/examples/chef/common/clusters/media-input/MediaInputManager.cpp b/examples/chef/common/clusters/media-input/MediaInputManager.cpp index 53cc22cd65cce8..4d11d9934ae8ab 100644 --- a/examples/chef/common/clusters/media-input/MediaInputManager.cpp +++ b/examples/chef/common/clusters/media-input/MediaInputManager.cpp @@ -22,7 +22,6 @@ #ifdef MATTER_DM_PLUGIN_MEDIA_INPUT_SERVER #include "MediaInputManager.h" -using namespace std; using namespace chip; using namespace chip::app::Clusters::MediaInput; using Protocols::InteractionModel::Status; diff --git a/examples/chef/common/clusters/media-playback/MediaPlaybackManager.cpp b/examples/chef/common/clusters/media-playback/MediaPlaybackManager.cpp index db3af119c5b286..cf8bcda33cd757 100644 --- a/examples/chef/common/clusters/media-playback/MediaPlaybackManager.cpp +++ b/examples/chef/common/clusters/media-playback/MediaPlaybackManager.cpp @@ -22,7 +22,6 @@ #ifdef MATTER_DM_PLUGIN_MEDIA_PLAYBACK_SERVER #include "MediaPlaybackManager.h" -using namespace std; using namespace chip; using namespace chip::app; using namespace chip::app::DataModel; diff --git a/examples/chef/common/clusters/refrigerator-and-temperature-controlled-cabinet-mode/tcc-mode.cpp b/examples/chef/common/clusters/refrigerator-and-temperature-controlled-cabinet-mode/tcc-mode.cpp new file mode 100644 index 00000000000000..bee737011195e2 --- /dev/null +++ b/examples/chef/common/clusters/refrigerator-and-temperature-controlled-cabinet-mode/tcc-mode.cpp @@ -0,0 +1,149 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include + +#ifdef MATTER_DM_PLUGIN_REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_SERVER + +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode; +using chip::Protocols::InteractionModel::Status; +template +using List = chip::app::DataModel::List; +using ModeTagStructType = chip::app::Clusters::detail::Structs::ModeTagStruct::Type; + +static std::unique_ptr gTccModeDelegate; +static std::unique_ptr gTccModeInstance; + +CHIP_ERROR TccModeDelegate::Init() +{ + return CHIP_NO_ERROR; +} + +void TccModeDelegate::HandleChangeToMode(uint8_t NewMode, ModeBase::Commands::ChangeToModeResponse::Type & response) +{ + response.status = to_underlying(ModeBase::StatusCode::kSuccess); +} + +CHIP_ERROR TccModeDelegate::GetModeLabelByIndex(uint8_t modeIndex, chip::MutableCharSpan & label) +{ + if (modeIndex >= ArraySize(kModeOptions)) + { + return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; + } + return chip::CopyCharSpanToMutableCharSpan(kModeOptions[modeIndex].label, label); +} + +CHIP_ERROR TccModeDelegate::GetModeValueByIndex(uint8_t modeIndex, uint8_t & value) +{ + if (modeIndex >= ArraySize(kModeOptions)) + { + return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; + } + value = kModeOptions[modeIndex].mode; + return CHIP_NO_ERROR; +} + +CHIP_ERROR TccModeDelegate::GetModeTagsByIndex(uint8_t modeIndex, List & tags) +{ + if (modeIndex >= ArraySize(kModeOptions)) + { + return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; + } + + if (tags.size() < kModeOptions[modeIndex].modeTags.size()) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + std::copy(kModeOptions[modeIndex].modeTags.begin(), kModeOptions[modeIndex].modeTags.end(), tags.begin()); + tags.reduce_size(kModeOptions[modeIndex].modeTags.size()); + + return CHIP_NO_ERROR; +} + +void RefrigeratorAndTemperatureControlledCabinetMode::Shutdown() +{ + gTccModeInstance.reset(); + gTccModeDelegate.reset(); +} + +chip::Protocols::InteractionModel::Status +chefRefrigeratorAndTemperatureControlledCabinetModeExternalReadCallback(chip::EndpointId endpointId, chip::ClusterId clusterId, + const EmberAfAttributeMetadata * attributeMetadata, + uint8_t * buffer, uint16_t maxReadLength) +{ + chip::Protocols::InteractionModel::Status ret = chip::Protocols::InteractionModel::Status::Success; + chip::AttributeId attributeId = attributeMetadata->attributeId; + + switch (attributeId) + { + case chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::Id: { + *buffer = gTccModeInstance->GetCurrentMode(); + ChipLogDetail(DeviceLayer, "Reading RunMode CurrentMode : %d", static_cast(attributeId)); + } + break; + default: + ret = chip::Protocols::InteractionModel::Status::UnsupportedRead; + ChipLogDetail(DeviceLayer, "Unsupported attributeId %d from reading RefrigeratorAndTemperatureControlledCabinetMode", + static_cast(attributeId)); + break; + } + + return ret; +} + +chip::Protocols::InteractionModel::Status chefRefrigeratorAndTemperatureControlledCabinetModeExternalWriteCallback( + chip::EndpointId endpointId, chip::ClusterId clusterId, const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer) +{ + VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1 + VerifyOrDie(gTccModeInstance != nullptr); + chip::Protocols::InteractionModel::Status ret; + chip::AttributeId attributeId = attributeMetadata->attributeId; + + switch (attributeId) + { + case chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::Id: { + uint8_t m = static_cast(buffer[0]); + ret = gTccModeInstance->UpdateCurrentMode(m); + if (chip::Protocols::InteractionModel::Status::Success != ret) + { + ChipLogError(DeviceLayer, "Invalid Attribute Update status: %d", static_cast(ret)); + } + } + break; + default: + ret = chip::Protocols::InteractionModel::Status::UnsupportedWrite; + ChipLogError(DeviceLayer, "Unsupported Writng Attribute ID: %d", static_cast(attributeId)); + break; + } + + return ret; +} + +void emberAfRefrigeratorAndTemperatureControlledCabinetModeClusterInitCallback(chip::EndpointId endpointId) +{ + VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1. + VerifyOrDie(gTccModeDelegate == nullptr && gTccModeInstance == nullptr); + gTccModeDelegate = std::make_unique(); + gTccModeInstance = + std::make_unique(gTccModeDelegate.get(), 0x1, RefrigeratorAndTemperatureControlledCabinetMode::Id, 0); + gTccModeInstance->Init(); +} + +#endif // MATTER_DM_PLUGIN_REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_SERVER diff --git a/examples/chef/common/clusters/refrigerator-and-temperature-controlled-cabinet-mode/tcc-mode.h b/examples/chef/common/clusters/refrigerator-and-temperature-controlled-cabinet-mode/tcc-mode.h new file mode 100644 index 00000000000000..278004520502ed --- /dev/null +++ b/examples/chef/common/clusters/refrigerator-and-temperature-controlled-cabinet-mode/tcc-mode.h @@ -0,0 +1,83 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include +#include + +namespace chip { +namespace app { +namespace Clusters { + +namespace RefrigeratorAndTemperatureControlledCabinetMode { + +const uint8_t ModeNormal = 0; +const uint8_t ModeRapidCool = 1; +const uint8_t ModeRapidFreeze = 2; + +/// This is an application level delegate to handle RefrigeratorAndTemperatureControlledCabinet commands according to the specific +/// business logic. +class TccModeDelegate : public ModeBase::Delegate +{ +private: + using ModeTagStructType = detail::Structs::ModeTagStruct::Type; + ModeTagStructType modeTagsTccNormal[1] = { { .value = to_underlying(ModeBase::ModeTag::kAuto) } }; + ModeTagStructType modeTagsTccRapidCool[1] = { { .value = to_underlying(ModeTag::kRapidCool) } }; + ModeTagStructType modeTagsTccRapidFreeze[1] = { { .value = to_underlying(ModeTag::kRapidFreeze) } }; + + const detail::Structs::ModeOptionStruct::Type kModeOptions[3] = { + detail::Structs::ModeOptionStruct::Type{ .label = CharSpan::fromCharString("Normal"), + .mode = ModeNormal, + .modeTags = DataModel::List(modeTagsTccNormal) }, + detail::Structs::ModeOptionStruct::Type{ .label = CharSpan::fromCharString("Rapid Cool"), + .mode = ModeRapidCool, + .modeTags = DataModel::List(modeTagsTccRapidCool) }, + detail::Structs::ModeOptionStruct::Type{ .label = CharSpan::fromCharString("Rapid Freeze"), + .mode = ModeRapidFreeze, + .modeTags = DataModel::List(modeTagsTccRapidFreeze) }, + }; + + CHIP_ERROR Init() override; + void HandleChangeToMode(uint8_t mode, ModeBase::Commands::ChangeToModeResponse::Type & response) override; + + CHIP_ERROR GetModeLabelByIndex(uint8_t modeIndex, MutableCharSpan & label) override; + CHIP_ERROR GetModeValueByIndex(uint8_t modeIndex, uint8_t & value) override; + CHIP_ERROR GetModeTagsByIndex(uint8_t modeIndex, DataModel::List & tags) override; + +public: + ~TccModeDelegate() override = default; +}; + +void Shutdown(); + +} // namespace RefrigeratorAndTemperatureControlledCabinetMode + +} // namespace Clusters +} // namespace app +} // namespace chip + +chip::Protocols::InteractionModel::Status +chefRefrigeratorAndTemperatureControlledCabinetModeExternalReadCallback(chip::EndpointId endpointId, chip::ClusterId clusterId, + const EmberAfAttributeMetadata * attributeMetadata, + uint8_t * buffer, uint16_t maxReadLength); + +chip::Protocols::InteractionModel::Status chefRefrigeratorAndTemperatureControlledCabinetModeExternalWriteCallback( + chip::EndpointId endpointId, chip::ClusterId clusterId, const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer); diff --git a/examples/chef/common/clusters/target-navigator/TargetNavigatorManager.cpp b/examples/chef/common/clusters/target-navigator/TargetNavigatorManager.cpp index be20f92f53a8fe..1f2dcdedb048e6 100644 --- a/examples/chef/common/clusters/target-navigator/TargetNavigatorManager.cpp +++ b/examples/chef/common/clusters/target-navigator/TargetNavigatorManager.cpp @@ -23,7 +23,6 @@ #include #include -using namespace std; using namespace chip::app; using namespace chip::app::Clusters::TargetNavigator; diff --git a/examples/chef/common/stubs.cpp b/examples/chef/common/stubs.cpp index 6ec7c9e92f4cd0..687b572a4ceefb 100644 --- a/examples/chef/common/stubs.cpp +++ b/examples/chef/common/stubs.cpp @@ -1,8 +1,16 @@ #include #include #include +#include #include #include + +using chip::app::DataModel::Nullable; + +using namespace chip; +using namespace chip::app; +using namespace chip::app::Clusters; + #ifdef MATTER_DM_PLUGIN_AIR_QUALITY_SERVER #include "chef-air-quality.h" #endif // MATTER_DM_PLUGIN_AIR_QUALITY_SERVER @@ -26,6 +34,26 @@ #include "chef-rvc-mode-delegate.h" #endif +#ifdef MATTER_DM_PLUGIN_REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_SERVER +#include "refrigerator-and-temperature-controlled-cabinet-mode/tcc-mode.h" +#endif // MATTER_DM_PLUGIN_REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_SERVER + +#ifdef MATTER_DM_PLUGIN_REFRIGERATOR_ALARM_SERVER +namespace { + +// Please refer to https://github.com/CHIP-Specifications/connectedhomeip-spec/blob/master/src/namespaces +constexpr const uint8_t kNamespaceRefrigerator = 0x41; +// Refrigerator Namespace: 0x41, tag 0x00 (Refrigerator) +constexpr const uint8_t kTagRefrigerator = 0x00; +// Refrigerator Namespace: 0x41, tag 0x01 (Freezer) +constexpr const uint8_t kTagFreezer = 0x01; +const Clusters::Descriptor::Structs::SemanticTagStruct::Type refrigeratorTagList[] = { { .namespaceID = kNamespaceRefrigerator, + .tag = kTagRefrigerator } }; +const Clusters::Descriptor::Structs::SemanticTagStruct::Type freezerTagList[] = { { .namespaceID = kNamespaceRefrigerator, + .tag = kTagFreezer } }; +} // namespace +#endif // MATTER_DM_PLUGIN_REFRIGERATOR_ALARM_SERVER + #ifdef MATTER_DM_PLUGIN_RVC_OPERATIONAL_STATE_SERVER #include "chef-rvc-operational-state-delegate.h" #endif @@ -38,12 +66,6 @@ #include "chef-operational-state-delegate-impl.h" #endif // MATTER_DM_PLUGIN_OPERATIONAL_STATE_SERVER -using chip::app::DataModel::Nullable; - -using namespace chip; -using namespace chip::app; -using namespace chip::app::Clusters; - Protocols::InteractionModel::Status emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer, uint16_t maxReadLength) @@ -93,6 +115,11 @@ Protocols::InteractionModel::Status emberAfExternalAttributeReadCallback(Endpoin case chip::app::Clusters::RvcOperationalState::Id: return chefRvcOperationalStateReadCallback(endpoint, clusterId, attributeMetadata, buffer, maxReadLength); #endif +#ifdef MATTER_DM_PLUGIN_REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_SERVER + case chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id: + return chefRefrigeratorAndTemperatureControlledCabinetModeExternalReadCallback(endpoint, clusterId, attributeMetadata, + buffer, maxReadLength); +#endif #ifdef MATTER_DM_PLUGIN_DISHWASHER_MODE_SERVER case chip::app::Clusters::DishwasherMode::Id: return chefDishwasherModeReadCallback(endpoint, clusterId, attributeMetadata, buffer, maxReadLength); @@ -166,6 +193,11 @@ Protocols::InteractionModel::Status emberAfExternalAttributeWriteCallback(Endpoi case chip::app::Clusters::RvcOperationalState::Id: return chefRvcOperationalStateWriteCallback(endpoint, clusterId, attributeMetadata, buffer); #endif +#ifdef MATTER_DM_PLUGIN_REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_SERVER + case chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id: + return chefRefrigeratorAndTemperatureControlledCabinetModeExternalWriteCallback(endpoint, clusterId, attributeMetadata, + buffer); +#endif #ifdef MATTER_DM_PLUGIN_DISHWASHER_MODE_SERVER case chip::app::Clusters::DishwasherMode::Id: return chefDishwasherModeWriteCallback(endpoint, clusterId, attributeMetadata, buffer); @@ -287,6 +319,19 @@ void emberAfWakeOnLanClusterInitCallback(EndpointId endpoint) void ApplicationInit() { ChipLogProgress(NotSpecified, "Chef Application Init !!!") + +#ifdef MATTER_DM_PLUGIN_REFRIGERATOR_ALARM_SERVER + // set Parent Endpoint and Composition Type for an Endpoint + EndpointId kRefEndpointId = 1; + EndpointId kColdCabinetEndpointId = 2; + EndpointId kFreezeCabinetEndpointId = 3; + SetTreeCompositionForEndpoint(kRefEndpointId); + SetParentEndpointForEndpoint(kColdCabinetEndpointId, kRefEndpointId); + SetParentEndpointForEndpoint(kFreezeCabinetEndpointId, kRefEndpointId); + // set TagList + SetTagList(kColdCabinetEndpointId, Span(refrigeratorTagList)); + SetTagList(kFreezeCabinetEndpointId, Span(freezerTagList)); +#endif // MATTER_DM_PLUGIN_REFRIGERATOR_ALARM_SERVER } void ApplicationShutdown() diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter index 1d27e85467bc08..283e591a563d8f 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -1027,6 +1034,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter b/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter index a9706c7fb0fd64..6dc1faa51f4c03 100644 --- a/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter +++ b/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -804,6 +811,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1930,7 +1938,7 @@ endpoint 1 { } server cluster OnOff { - ram attribute onOff default = 0; + persist attribute onOff default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; @@ -1991,7 +1999,7 @@ endpoint 1 { } server cluster FanControl { - ram attribute fanMode default = 0; + persist attribute fanMode default = 0; ram attribute fanModeSequence default = 2; ram attribute percentSetting default = 0; ram attribute percentCurrent default = 0; diff --git a/examples/chef/devices/rootnode_airpurifier_73a6fe2651.zap b/examples/chef/devices/rootnode_airpurifier_73a6fe2651.zap index da6333deeef08f..2530faaa456ce3 100644 --- a/examples/chef/devices/rootnode_airpurifier_73a6fe2651.zap +++ b/examples/chef/devices/rootnode_airpurifier_73a6fe2651.zap @@ -2492,7 +2492,7 @@ "side": "server", "type": "boolean", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -3218,7 +3218,7 @@ "side": "server", "type": "FanModeEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", diff --git a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter index 2af9aa19a2f1f5..8271fefe262f09 100644 --- a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter +++ b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -655,6 +662,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2750,7 +2758,7 @@ endpoint 1 { } server cluster FanControl { - ram attribute fanMode default = 0; + persist attribute fanMode default = 0; ram attribute fanModeSequence default = 2; ram attribute percentSetting default = 0; ram attribute percentCurrent default = 0; @@ -3136,11 +3144,11 @@ endpoint 5 { ram attribute absMinHeatSetpointLimit default = 700; ram attribute absMaxHeatSetpointLimit default = 3000; persist attribute PIHeatingDemand default = 0; - ram attribute occupiedHeatingSetpoint default = 2000; - ram attribute minHeatSetpointLimit default = 700; - ram attribute maxHeatSetpointLimit default = 3000; - ram attribute controlSequenceOfOperation default = 2; - ram attribute systemMode default = 4; + persist attribute occupiedHeatingSetpoint default = 2000; + persist attribute minHeatSetpointLimit default = 700; + persist attribute maxHeatSetpointLimit default = 3000; + persist attribute controlSequenceOfOperation default = 2; + persist attribute systemMode default = 4; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; diff --git a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap index 0cfb36a59885d7..53956dbbdd230f 100644 --- a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap +++ b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap @@ -2927,7 +2927,7 @@ "side": "server", "type": "FanModeEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -7993,7 +7993,7 @@ "side": "server", "type": "temperature", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "2000", @@ -8009,7 +8009,7 @@ "side": "server", "type": "temperature", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "700", @@ -8025,7 +8025,7 @@ "side": "server", "type": "temperature", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "3000", @@ -8041,7 +8041,7 @@ "side": "server", "type": "ControlSequenceOfOperationEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "2", @@ -8057,7 +8057,7 @@ "side": "server", "type": "SystemModeEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "4", diff --git a/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter b/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter index ca3d431c3e81e8..cfdae69816e667 100644 --- a/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter +++ b/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -991,6 +998,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2581,7 +2589,7 @@ endpoint 1 { emits event BatFaultChange; emits event BatChargeFaultChange; ram attribute status default = 1; - ram attribute order default = 1; + persist attribute order default = 1; ram attribute description default = "Primary Battery"; ram attribute batVoltage default = 4100; ram attribute batPercentRemaining default = 95; diff --git a/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.zap b/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.zap index c5ad356e6d292a..bd93cb017f5645 100644 --- a/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.zap +++ b/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.zap @@ -2652,7 +2652,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "1", diff --git a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter index bded4104eae359..0bf91385a5e179 100644 --- a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter +++ b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -929,6 +936,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter index 84b188e58f4fe8..63b7de859704ae 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -1006,6 +1013,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter b/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter index 8b30190553c843..77375d8443e990 100644 --- a/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter +++ b/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -991,6 +998,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2484,7 +2492,7 @@ endpoint 1 { server cluster PowerSource { ram attribute status default = 1; - ram attribute order default = 1; + persist attribute order default = 1; ram attribute description default = "Primary Battery"; ram attribute batVoltage default = 4100; ram attribute batPercentRemaining default = 95; diff --git a/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.zap b/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.zap index 76b4309c6cf250..0e390cdb7f4a13 100644 --- a/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.zap +++ b/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.zap @@ -2660,7 +2660,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "1", diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter index fd8ddbe72bc1ca..5265088575f8ca 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -1089,6 +1096,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2084,7 +2092,7 @@ endpoint 1 { server cluster PowerSource { ram attribute status default = 1; - ram attribute order default = 1; + persist attribute order default = 1; ram attribute description default = "Battery"; ram attribute batVoltage default = 2590; ram attribute batPercentRemaining default = 98; diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap index 5b66f7b9718212..bab2b45d7a4f5c 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap @@ -2840,7 +2840,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "1", diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter index b6ca20a4a986e9..183eb0c5938f3b 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -1027,6 +1034,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2057,11 +2065,11 @@ endpoint 1 { } server cluster OnOff { - ram attribute onOff default = 0; + persist attribute onOff default = 0; ram attribute globalSceneControl default = 1; ram attribute onTime default = 0; ram attribute offWaitTime default = 0; - ram attribute startUpOnOff default = 0; + persist attribute startUpOnOff default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; @@ -2074,13 +2082,13 @@ endpoint 1 { } server cluster LevelControl { - ram attribute currentLevel default = 0x01; + persist attribute currentLevel default = 0x01; ram attribute remainingTime default = 0x0000; ram attribute minLevel default = 0x01; ram attribute maxLevel default = 0xFE; ram attribute options default = 0x03; ram attribute onLevel default = 0xFE; - ram attribute startUpCurrentLevel default = 0x00; + persist attribute startUpCurrentLevel default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap index 0651533b3cdb2f..78ea7d87648f74 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap @@ -2704,7 +2704,7 @@ "side": "server", "type": "boolean", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -2768,7 +2768,7 @@ "side": "server", "type": "StartUpOnOffEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -2940,7 +2940,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x01", @@ -3036,7 +3036,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x00", diff --git a/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter b/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter index 564154ce2112c6..f48076c4d2a808 100644 --- a/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter +++ b/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -1027,6 +1034,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2214,11 +2222,11 @@ endpoint 1 { } server cluster OnOff { - ram attribute onOff default = 0; + persist attribute onOff default = 0; ram attribute globalSceneControl default = 1; ram attribute onTime default = 0; ram attribute offWaitTime default = 0; - ram attribute startUpOnOff default = 0; + persist attribute startUpOnOff default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; @@ -2235,13 +2243,13 @@ endpoint 1 { } server cluster LevelControl { - ram attribute currentLevel default = 0x01; + persist attribute currentLevel default = 0x01; ram attribute remainingTime default = 0x0000; ram attribute minLevel default = 0x01; ram attribute maxLevel default = 0xFE; ram attribute options default = 0x00; ram attribute onLevel default = 0xFE; - ram attribute startUpCurrentLevel default = 0x00; + persist attribute startUpCurrentLevel default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; diff --git a/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.zap b/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.zap index fc429171835ec5..4fa09375fde860 100644 --- a/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.zap +++ b/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.zap @@ -2736,7 +2736,7 @@ "side": "server", "type": "boolean", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -2800,7 +2800,7 @@ "side": "server", "type": "StartUpOnOffEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -2988,7 +2988,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x01", @@ -3084,7 +3084,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x00", diff --git a/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter b/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter index 7ad1d3487e8c2b..8f49c108e20fab 100644 --- a/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter +++ b/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -693,6 +700,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter index 36a7822ede2aa3..c461e7324caf6d 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -991,6 +998,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2602,7 +2610,7 @@ endpoint 1 { server cluster PowerSource { ram attribute status default = 1; - ram attribute order default = 1; + persist attribute order default = 1; ram attribute description default = "Battery"; ram attribute batVoltage; ram attribute batPercentRemaining; diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap index 85fd040970f9c1..1c9d2505fc684a 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap @@ -2676,7 +2676,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "1", diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter index 70713aa72d3a44..d9f033b0e0009b 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -1027,6 +1034,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2318,11 +2326,11 @@ endpoint 1 { } server cluster OnOff { - ram attribute onOff default = 0; + persist attribute onOff default = 0; ram attribute globalSceneControl default = 1; ram attribute onTime default = 0; ram attribute offWaitTime default = 0; - ram attribute startUpOnOff default = 0; + persist attribute startUpOnOff default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; @@ -2335,13 +2343,13 @@ endpoint 1 { } server cluster LevelControl { - ram attribute currentLevel default = 0x01; + persist attribute currentLevel default = 0x01; ram attribute remainingTime default = 0x0000; ram attribute minLevel default = 0x01; ram attribute maxLevel default = 0xFE; ram attribute options default = 0x03; ram attribute onLevel default = 0xFE; - ram attribute startUpCurrentLevel default = 0x00; + persist attribute startUpCurrentLevel default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; @@ -2371,27 +2379,27 @@ endpoint 1 { } server cluster ColorControl { - ram attribute currentHue default = 0x00; - ram attribute currentSaturation default = 0x00; + persist attribute currentHue default = 0x00; + persist attribute currentSaturation default = 0x00; ram attribute remainingTime default = 0x0000; - ram attribute currentX default = 0x616B; - ram attribute currentY default = 0x607D; - ram attribute colorTemperatureMireds default = 0x00FA; - ram attribute colorMode default = 0x01; + persist attribute currentX default = 0x616B; + persist attribute currentY default = 0x607D; + persist attribute colorTemperatureMireds default = 0x00FA; + persist attribute colorMode default = 0x01; ram attribute options default = 0x00; ram attribute numberOfPrimaries default = 0; - ram attribute enhancedCurrentHue default = 0x0000; - ram attribute enhancedColorMode default = 0x01; - ram attribute colorLoopActive default = 0x00; - ram attribute colorLoopDirection default = 0x00; - ram attribute colorLoopTime default = 0x0019; + persist attribute enhancedCurrentHue default = 0x0000; + persist attribute enhancedColorMode default = 0x01; + persist attribute colorLoopActive default = 0x00; + persist attribute colorLoopDirection default = 0x00; + persist attribute colorLoopTime default = 0x0019; ram attribute colorLoopStartEnhancedHue default = 0x2300; ram attribute colorLoopStoredEnhancedHue default = 0x0000; ram attribute colorCapabilities default = 0x0000; ram attribute colorTempPhysicalMinMireds default = 0x009A; ram attribute colorTempPhysicalMaxMireds default = 0x01C6; ram attribute coupleColorTempToLevelMinMireds default = 0x0000; - ram attribute startUpColorTemperatureMireds default = 0x00FA; + persist attribute startUpColorTemperatureMireds default = 0x00FA; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap index a4f09cc013f125..19288d4d83a2f0 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap @@ -2672,7 +2672,7 @@ "side": "server", "type": "boolean", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -2736,7 +2736,7 @@ "side": "server", "type": "StartUpOnOffEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -2908,7 +2908,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x01", @@ -3004,7 +3004,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x00", @@ -3426,7 +3426,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x00", @@ -3442,7 +3442,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x00", @@ -3474,7 +3474,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x616B", @@ -3490,7 +3490,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x607D", @@ -3506,7 +3506,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x00FA", @@ -3522,7 +3522,7 @@ "side": "server", "type": "ColorModeEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x01", @@ -3570,7 +3570,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -3586,7 +3586,7 @@ "side": "server", "type": "EnhancedColorModeEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x01", @@ -3602,7 +3602,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x00", @@ -3618,7 +3618,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x00", @@ -3634,7 +3634,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x0019", @@ -3746,7 +3746,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x00FA", diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter index 1d3ab9d65ac6ad..d772e29c3c26fb 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -809,6 +816,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter index 522000c18f2b44..466dbe2c419115 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -830,6 +837,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_genericswitch_2dfff6e516.matter b/examples/chef/devices/rootnode_genericswitch_2dfff6e516.matter index 98e363345d855c..ba63c3ee079d8e 100644 --- a/examples/chef/devices/rootnode_genericswitch_2dfff6e516.matter +++ b/examples/chef/devices/rootnode_genericswitch_2dfff6e516.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -837,6 +844,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter index 57040749ebc510..60699fd679f7ba 100644 --- a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter +++ b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -837,6 +844,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index 6313ced446ae52..36a655d47df5b6 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -1027,6 +1034,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2428,7 +2436,7 @@ endpoint 1 { } server cluster OnOff { - ram attribute onOff default = 0; + persist attribute onOff default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; @@ -2441,7 +2449,7 @@ endpoint 1 { } server cluster LevelControl { - ram attribute currentLevel default = 0; + persist attribute currentLevel default = 0; ram attribute minLevel default = 0; ram attribute maxLevel default = 0xFE; ram attribute options default = 1; @@ -2475,7 +2483,7 @@ endpoint 1 { } server cluster FanControl { - ram attribute fanMode default = 0x00; + persist attribute fanMode default = 0x00; ram attribute fanModeSequence default = 0x02; ram attribute percentSetting default = 0x00; ram attribute percentCurrent default = 0x00; diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap index 912729e0646dc2..9c52de3b16f942 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap @@ -2672,7 +2672,7 @@ "side": "server", "type": "boolean", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -2844,7 +2844,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -3184,7 +3184,7 @@ "side": "server", "type": "FanModeEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x00", diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter index 900b2933d0c4fc..e633b0f2bebc4c 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -830,6 +837,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_laundrydryer_01796fe396.matter b/examples/chef/devices/rootnode_laundrydryer_01796fe396.matter new file mode 100644 index 00000000000000..b917fa102e6228 --- /dev/null +++ b/examples/chef/devices/rootnode_laundrydryer_01796fe396.matter @@ -0,0 +1,1813 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + +enum TestGlobalEnum : enum8 { + kSomeValue = 0; + kSomeOtherValue = 1; + kFinalValue = 2; +} + +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + +bitmap TestGlobalBitmap : bitmap32 { + kFirstBit = 0x1; + kSecondBit = 0x2; +} + +struct TestGlobalStruct { + char_string<128> name = 0; + nullable TestGlobalBitmap myBitmap = 1; + optional nullable TestGlobalEnum myEnum = 2; +} + +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + +/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ +cluster Identify = 3 { + revision 4; + + enum EffectIdentifierEnum : enum8 { + kBlink = 0; + kBreathe = 1; + kOkay = 2; + kChannelChange = 11; + kFinishEffect = 254; + kStopEffect = 255; + } + + enum EffectVariantEnum : enum8 { + kDefault = 0; + } + + enum IdentifyTypeEnum : enum8 { + kNone = 0; + kLightOutput = 1; + kVisibleIndicator = 2; + kAudibleBeep = 3; + kDisplay = 4; + kActuator = 5; + } + + attribute int16u identifyTime = 0; + readonly attribute IdentifyTypeEnum identifyType = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct IdentifyRequest { + int16u identifyTime = 0; + } + + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ + command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; +} + +/** Attributes and commands for switching devices between 'On' and 'Off' states. */ +cluster OnOff = 6 { + revision 6; + + enum DelayedAllOffEffectVariantEnum : enum8 { + kDelayedOffFastFade = 0; + kNoFade = 1; + kDelayedOffSlowFade = 2; + } + + enum DyingLightEffectVariantEnum : enum8 { + kDyingLightFadeOff = 0; + } + + enum EffectIdentifierEnum : enum8 { + kDelayedAllOff = 0; + kDyingLight = 1; + } + + enum StartUpOnOffEnum : enum8 { + kOff = 0; + kOn = 1; + kToggle = 2; + } + + bitmap Feature : bitmap32 { + kLighting = 0x1; + kDeadFrontBehavior = 0x2; + kOffOnly = 0x4; + } + + bitmap OnOffControlBitmap : bitmap8 { + kAcceptOnlyWhenOn = 0x1; + } + + readonly attribute boolean onOff = 0; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct OffWithEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + enum8 effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControlBitmap onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ + command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ + command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ + command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; +} + +/** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ +cluster Descriptor = 29 { + revision 2; + + bitmap Feature : bitmap32 { + kTagList = 0x1; + } + + struct DeviceTypeStruct { + devtype_id deviceType = 0; + int16u revision = 1; + } + + struct SemanticTagStruct { + nullable vendor_id mfgCode = 0; + enum8 namespaceID = 1; + enum8 tag = 2; + optional nullable char_string label = 3; + } + + readonly attribute DeviceTypeStruct deviceTypeList[] = 0; + readonly attribute cluster_id serverList[] = 1; + readonly attribute cluster_id clientList[] = 2; + readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** The Access Control Cluster exposes a data model view of a + Node's Access Control List (ACL), which codifies the rules used to manage + and enforce Access Control for the Node's endpoints and their associated + cluster instances. */ +cluster AccessControl = 31 { + revision 2; + + enum AccessControlEntryAuthModeEnum : enum8 { + kPASE = 1; + kCASE = 2; + kGroup = 3; + } + + enum AccessControlEntryPrivilegeEnum : enum8 { + kView = 1; + kProxyView = 2; + kOperate = 3; + kManage = 4; + kAdminister = 5; + } + + enum AccessRestrictionTypeEnum : enum8 { + kAttributeAccessForbidden = 0; + kAttributeWriteForbidden = 1; + kCommandForbidden = 2; + kEventForbidden = 3; + } + + enum ChangeTypeEnum : enum8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + bitmap Feature : bitmap32 { + kExtension = 0x1; + kManagedDevice = 0x2; + } + + struct AccessRestrictionStruct { + AccessRestrictionTypeEnum type = 0; + nullable int32u id = 1; + } + + struct CommissioningAccessRestrictionEntryStruct { + endpoint_no endpoint = 0; + cluster_id cluster = 1; + AccessRestrictionStruct restrictions[] = 2; + } + + fabric_scoped struct AccessRestrictionEntryStruct { + fabric_sensitive endpoint_no endpoint = 0; + fabric_sensitive cluster_id cluster = 1; + fabric_sensitive AccessRestrictionStruct restrictions[] = 2; + fabric_idx fabricIndex = 254; + } + + struct AccessControlTargetStruct { + nullable cluster_id cluster = 0; + nullable endpoint_no endpoint = 1; + nullable devtype_id deviceType = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; + nullable fabric_sensitive int64u subjects[] = 3; + nullable fabric_sensitive AccessControlTargetStruct targets[] = 4; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct AccessControlExtensionStruct { + fabric_sensitive octet_string<128> data = 1; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlEntryChanged = 0 { + nullable node_id adminNodeID = 1; + nullable int16u adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlEntryStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlExtensionChanged = 1 { + nullable node_id adminNodeID = 1; + nullable int16u adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlExtensionStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { + int64u token = 0; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; + fabric_idx fabricIndex = 254; + } + + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; + readonly attribute optional CommissioningAccessRestrictionEntryStruct commissioningARL[] = 5; + readonly attribute optional AccessRestrictionEntryStruct arl[] = 6; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ReviewFabricRestrictionsRequest { + CommissioningAccessRestrictionEntryStruct arl[] = 0; + } + + response struct ReviewFabricRestrictionsResponse = 1 { + int64u token = 0; + } + + /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; +} + +/** This cluster provides attributes and events for determining basic information about Nodes, which supports both + Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, + which apply to the whole Node. Also allows setting user device information such as location. */ +cluster BasicInformation = 40 { + revision 3; + + enum ColorEnum : enum8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : enum8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + + struct CapabilityMinimaStruct { + int16u caseSessionsPerFabric = 0; + int16u subscriptionsPerFabric = 1; + } + + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + + critical event StartUp = 0 { + int32u softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + fabric_idx fabricIndex = 0; + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + readonly attribute int16u dataModelRevision = 0; + readonly attribute char_string<32> vendorName = 1; + readonly attribute vendor_id vendorID = 2; + readonly attribute char_string<32> productName = 3; + readonly attribute int16u productID = 4; + attribute access(write: manage) char_string<32> nodeLabel = 5; + attribute access(write: administer) char_string<2> location = 6; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string<64> hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string<64> softwareVersionString = 10; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; + readonly attribute int32u specificationVersion = 21; + readonly attribute int16u maxPathsPerInvoke = 22; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; +} + +/** Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing common languages, units of measurements, and numerical formatting + standards. As such, Nodes that visually or audibly convey information need a mechanism by which + they can be configured to use a user’s preferred language, units, etc */ +cluster LocalizationConfiguration = 43 { + revision 1; // NOTE: Default/not specifically set + + attribute access(write: manage) char_string<35> activeLocale = 0; + readonly attribute char_string supportedLocales[] = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing preferences for the units in which values are conveyed in communication to a + user. As such, Nodes that visually or audibly convey measurable values to the user need a + mechanism by which they can be configured to use a user’s preferred unit. */ +cluster UnitLocalization = 45 { + revision 1; + + enum TempUnitEnum : enum8 { + kFahrenheit = 0; + kCelsius = 1; + kKelvin = 2; + } + + bitmap Feature : bitmap32 { + kTemperatureUnit = 0x1; + } + + attribute access(write: manage) optional TempUnitEnum temperatureUnit = 0; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** This cluster is used to manage global aspects of the Commissioning flow. */ +cluster GeneralCommissioning = 48 { + revision 1; // NOTE: Default/not specifically set + + enum CommissioningErrorEnum : enum8 { + kOK = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNoFailSafe = 3; + kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; + } + + enum RegulatoryLocationTypeEnum : enum8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + + struct BasicCommissioningInfo { + int16u failSafeExpiryLengthSeconds = 0; + int16u maxCumulativeFailsafeSeconds = 1; + } + + attribute access(write: administer) int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; + readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; + readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + int16u expiryLengthSeconds = 0; + int64u breadcrumb = 1; + } + + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationTypeEnum newRegulatoryConfig = 0; + char_string<2> countryCode = 1; + int64u breadcrumb = 2; + } + + response struct SetRegulatoryConfigResponse = 3 { + CommissioningErrorEnum errorCode = 0; + char_string debugText = 1; + } + + response struct CommissioningCompleteResponse = 5 { + CommissioningErrorEnum errorCode = 0; + char_string debugText = 1; + } + + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ + command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ + command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; +} + +/** Functionality to configure, enable, disable network credentials and access on a Matter device. */ +cluster NetworkCommissioning = 49 { + revision 1; // NOTE: Default/not specifically set + + enum NetworkCommissioningStatusEnum : enum8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBandEnum : enum8 { + k2G4 = 0; + k3G65 = 1; + k5G = 2; + k6G = 3; + k60G = 4; + k1G = 5; + } + + bitmap Feature : bitmap32 { + kWiFiNetworkInterface = 0x1; + kThreadNetworkInterface = 0x2; + kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; + } + + bitmap ThreadCapabilitiesBitmap : bitmap16 { + kIsBorderRouterCapable = 0x1; + kIsRouterCapable = 0x2; + kIsSleepyEndDeviceCapable = 0x4; + kIsFullThreadDevice = 0x8; + kIsSynchronizedSleepyEndDeviceCapable = 0x10; + } + + bitmap WiFiSecurityBitmap : bitmap8 { + kUnencrypted = 0x1; + kWEP = 0x2; + kWPAPersonal = 0x4; + kWPA2Personal = 0x8; + kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; + } + + struct NetworkInfoStruct { + octet_string<32> networkID = 0; + boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; + } + + struct ThreadInterfaceScanResultStruct { + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; + } + + struct WiFiInterfaceScanResultStruct { + WiFiSecurityBitmap security = 0; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; + WiFiBandEnum wiFiBand = 4; + int8s rssi = 5; + } + + readonly attribute access(read: administer) int8u maxNetworks = 0; + readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; + attribute access(write: administer) boolean interfaceEnabled = 4; + readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; + readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; + readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + provisional readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + provisional readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + provisional readonly attribute optional int16u threadVersion = 10; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ScanNetworksRequest { + optional nullable octet_string<32> ssid = 0; + optional int64u breadcrumb = 1; + } + + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + + request struct AddOrUpdateWiFiNetworkRequest { + octet_string<32> ssid = 0; + octet_string<64> credentials = 1; + optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; + } + + request struct AddOrUpdateThreadNetworkRequest { + octet_string<254> operationalDataset = 0; + optional int64u breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + octet_string<32> networkID = 0; + optional int64u breadcrumb = 1; + } + + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + + request struct ConnectNetworkRequest { + octet_string<32> networkID = 0; + optional int64u breadcrumb = 1; + } + + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + + request struct ReorderNetworkRequest { + octet_string<32> networkID = 0; + int8u networkIndex = 1; + optional int64u breadcrumb = 2; + } + + request struct QueryIdentityRequest { + octet_string<20> keyIdentifier = 0; + optional octet_string<32> possessionNonce = 1; + } + + response struct QueryIdentityResponse = 10 { + octet_string<140> identity = 0; + optional octet_string<64> possessionSignature = 1; + } + + /** Detemine the set of networks the device sees as available. */ + command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ + command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ + command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ + command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ + command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ + command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; +} + +/** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster GeneralDiagnostics = 51 { + revision 2; + + enum BootReasonEnum : enum8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultEnum : enum8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceTypeEnum : enum8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultEnum : enum8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultEnum : enum8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + bitmap Feature : bitmap32 { + kDataModelTest = 0x1; + } + + struct NetworkInterface { + char_string<32> name = 0; + boolean isOperational = 1; + nullable boolean offPremiseServicesReachableIPv4 = 2; + nullable boolean offPremiseServicesReachableIPv6 = 3; + octet_string<8> hardwareAddress = 4; + octet_string IPv4Addresses[] = 5; + octet_string IPv6Addresses[] = 6; + InterfaceTypeEnum type = 7; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultEnum current[] = 0; + HardwareFaultEnum previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultEnum current[] = 0; + RadioFaultEnum previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultEnum current[] = 0; + NetworkFaultEnum previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonEnum bootReason = 0; + } + + readonly attribute NetworkInterface networkInterfaces[] = 0; + readonly attribute int16u rebootCount = 1; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute boolean testEventTriggersEnabled = 8; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct TestEventTriggerRequest { + octet_string<16> enableKey = 0; + int64u eventTrigger = 1; + } + + response struct TimeSnapshotResponse = 2 { + systime_ms systemTimeMs = 0; + nullable posix_ms posixTimeMs = 1; + } + + request struct PayloadTestRequestRequest { + octet_string<16> enableKey = 0; + int8u value = 1; + int16u count = 2; + } + + response struct PayloadTestResponse = 4 { + octet_string payload = 0; + } + + /** Provide a means for certification tests to trigger some test-plan-specific events */ + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ + command TimeSnapshot(): TimeSnapshotResponse = 1; + /** Request a variable length payload response. */ + command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; +} + +/** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster WiFiNetworkDiagnostics = 54 { + revision 1; // NOTE: Default/not specifically set + + enum AssociationFailureCauseEnum : enum8 { + kUnknown = 0; + kAssociationFailed = 1; + kAuthenticationFailed = 2; + kSsidNotFound = 3; + } + + enum ConnectionStatusEnum : enum8 { + kConnected = 0; + kNotConnected = 1; + } + + enum SecurityTypeEnum : enum8 { + kUnspecified = 0; + kNone = 1; + kWEP = 2; + kWPA = 3; + kWPA2 = 4; + kWPA3 = 5; + } + + enum WiFiVersionEnum : enum8 { + kA = 0; + kB = 1; + kG = 2; + kN = 3; + kAc = 4; + kAx = 5; + kAh = 6; + } + + bitmap Feature : bitmap32 { + kPacketCounts = 0x1; + kErrorCounts = 0x2; + } + + info event Disconnection = 0 { + int16u reasonCode = 0; + } + + info event AssociationFailure = 1 { + AssociationFailureCauseEnum associationFailureCause = 0; + int16u status = 1; + } + + info event ConnectionStatus = 2 { + ConnectionStatusEnum connectionStatus = 0; + } + + readonly attribute nullable octet_string<6> bssid = 0; + readonly attribute nullable SecurityTypeEnum securityType = 1; + readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; + readonly attribute nullable int16u channelNumber = 3; + readonly attribute nullable int8s rssi = 4; + readonly attribute optional nullable int32u beaconLostCount = 5; + readonly attribute optional nullable int32u beaconRxCount = 6; + readonly attribute optional nullable int32u packetMulticastRxCount = 7; + readonly attribute optional nullable int32u packetMulticastTxCount = 8; + readonly attribute optional nullable int32u packetUnicastRxCount = 9; + readonly attribute optional nullable int32u packetUnicastTxCount = 10; + readonly attribute optional nullable int64u currentMaxRate = 11; + readonly attribute optional nullable int64u overrunCount = 12; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + /** Reception of this command SHALL reset the Breacon and Packet related count attributes to 0 */ + command ResetCounts(): DefaultSuccess = 0; +} + +/** Commands to trigger a Node to allow a new Administrator to commission it. */ +cluster AdministratorCommissioning = 60 { + revision 1; // NOTE: Default/not specifically set + + enum CommissioningWindowStatusEnum : enum8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : enum8 { + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; + } + + bitmap Feature : bitmap32 { + kBasic = 0x1; + } + + readonly attribute CommissioningWindowStatusEnum windowStatus = 0; + readonly attribute nullable fabric_idx adminFabricIndex = 1; + readonly attribute nullable vendor_id adminVendorId = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct OpenCommissioningWindowRequest { + int16u commissioningTimeout = 0; + octet_string PAKEPasscodeVerifier = 1; + int16u discriminator = 2; + int32u iterations = 3; + octet_string<32> salt = 4; + } + + request struct OpenBasicCommissioningWindowRequest { + int16u commissioningTimeout = 0; + } + + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ + timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ + timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ + timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; +} + +/** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ +cluster OperationalCredentials = 62 { + revision 1; // NOTE: Default/not specifically set + + enum CertificateChainTypeEnum : enum8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : enum8 { + kOK = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInvalidAdminSubject = 6; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + fabric_scoped struct FabricDescriptorStruct { + octet_string<65> rootPublicKey = 1; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; + char_string<32> label = 5; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct NOCStruct { + fabric_sensitive octet_string noc = 1; + nullable fabric_sensitive octet_string icac = 2; + fabric_idx fabricIndex = 254; + } + + readonly attribute access(read: administer) NOCStruct NOCs[] = 0; + readonly attribute FabricDescriptorStruct fabrics[] = 1; + readonly attribute int8u supportedFabrics = 2; + readonly attribute int8u commissionedFabrics = 3; + readonly attribute octet_string trustedRootCertificates[] = 4; + readonly attribute int8u currentFabricIndex = 5; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AttestationRequestRequest { + octet_string<32> attestationNonce = 0; + } + + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + + request struct CertificateChainRequestRequest { + CertificateChainTypeEnum certificateType = 0; + } + + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + + request struct CSRRequestRequest { + octet_string<32> CSRNonce = 0; + optional boolean isForUpdateNOC = 1; + } + + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + + request struct AddNOCRequest { + octet_string<400> NOCValue = 0; + optional octet_string<400> ICACValue = 1; + octet_string<16> IPKValue = 2; + int64u caseAdminSubject = 3; + vendor_id adminVendorId = 4; + } + + request struct UpdateNOCRequest { + octet_string NOCValue = 0; + optional octet_string ICACValue = 1; + } + + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + + request struct UpdateFabricLabelRequest { + char_string<32> label = 0; + } + + request struct RemoveFabricRequest { + fabric_idx fabricIndex = 0; + } + + request struct AddTrustedRootCertificateRequest { + octet_string rootCACertificate = 0; + } + + /** Sender is requesting attestation information from the receiver. */ + command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ + command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ + command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ + command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ + fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ + fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ + command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ + command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; +} + +/** The Group Key Management Cluster is the mechanism by which group keys are managed. */ +cluster GroupKeyManagement = 63 { + revision 1; // NOTE: Default/not specifically set + + enum GroupKeySecurityPolicyEnum : enum8 { + kTrustFirst = 0; + kCacheAndSync = 1; + } + + bitmap Feature : bitmap32 { + kCacheAndSync = 0x1; + } + + fabric_scoped struct GroupInfoMapStruct { + group_id groupId = 1; + endpoint_no endpoints[] = 2; + optional char_string<16> groupName = 3; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct GroupKeyMapStruct { + group_id groupId = 1; + int16u groupKeySetID = 2; + fabric_idx fabricIndex = 254; + } + + struct GroupKeySetStruct { + int16u groupKeySetID = 0; + GroupKeySecurityPolicyEnum groupKeySecurityPolicy = 1; + nullable octet_string<16> epochKey0 = 2; + nullable epoch_us epochStartTime0 = 3; + nullable octet_string<16> epochKey1 = 4; + nullable epoch_us epochStartTime1 = 5; + nullable octet_string<16> epochKey2 = 6; + nullable epoch_us epochStartTime2 = 7; + } + + attribute access(write: manage) GroupKeyMapStruct groupKeyMap[] = 0; + readonly attribute GroupInfoMapStruct groupTable[] = 1; + readonly attribute int16u maxGroupsPerFabric = 2; + readonly attribute int16u maxGroupKeysPerFabric = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct KeySetWriteRequest { + GroupKeySetStruct groupKeySet = 0; + } + + request struct KeySetReadRequest { + int16u groupKeySetID = 0; + } + + response struct KeySetReadResponse = 2 { + GroupKeySetStruct groupKeySet = 0; + } + + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + + response struct KeySetReadAllIndicesResponse = 5 { + int16u groupKeySetIDs[] = 0; + } + + /** Write a new set of keys for the given key set id. */ + fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ + fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ + fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; +} + +/** Attributes and commands for configuring the temperature control, and reporting temperature. */ +cluster TemperatureControl = 86 { + revision 1; // NOTE: Default/not specifically set + + bitmap Feature : bitmap32 { + kTemperatureNumber = 0x1; + kTemperatureLevel = 0x2; + kTemperatureStep = 0x4; + } + + readonly attribute optional temperature temperatureSetpoint = 0; + readonly attribute optional temperature minTemperature = 1; + readonly attribute optional temperature maxTemperature = 2; + readonly attribute optional temperature step = 3; + readonly attribute optional int8u selectedTemperatureLevel = 4; + readonly attribute optional char_string supportedTemperatureLevels[] = 5; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct SetTemperatureRequest { + optional temperature targetTemperature = 0; + optional int8u targetTemperatureLevel = 1; + } + + /** Set Temperature */ + command SetTemperature(SetTemperatureRequest): DefaultSuccess = 0; +} + +/** This cluster supports remotely monitoring and, where supported, changing the operational state of any device where a state machine is a part of the operation. */ +cluster OperationalState = 96 { + revision 1; + + enum ErrorStateEnum : enum8 { + kNoError = 0; + kUnableToStartOrResume = 1; + kUnableToCompleteOperation = 2; + kCommandInvalidInState = 3; + } + + enum OperationalStateEnum : enum8 { + kStopped = 0; + kRunning = 1; + kPaused = 2; + kError = 3; + } + + struct ErrorStateStruct { + enum8 errorStateID = 0; + optional char_string<64> errorStateLabel = 1; + optional char_string<64> errorStateDetails = 2; + } + + struct OperationalStateStruct { + enum8 operationalStateID = 0; + optional char_string<64> operationalStateLabel = 1; + } + + critical event OperationalError = 0 { + ErrorStateStruct errorState = 0; + } + + info event OperationCompletion = 1 { + enum8 completionErrorCode = 0; + optional nullable elapsed_s totalOperationalTime = 1; + optional nullable elapsed_s pausedTime = 2; + } + + readonly attribute nullable char_string phaseList[] = 0; + readonly attribute nullable int8u currentPhase = 1; + readonly attribute optional nullable elapsed_s countdownTime = 2; + readonly attribute OperationalStateStruct operationalStateList[] = 3; + readonly attribute OperationalStateEnum operationalState = 4; + readonly attribute ErrorStateStruct operationalError = 5; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + response struct OperationalCommandResponse = 4 { + ErrorStateStruct commandResponseState = 0; + } + + /** Upon receipt, the device SHALL pause its operation if it is possible based on the current function of the server. */ + command Pause(): OperationalCommandResponse = 0; + /** Upon receipt, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted. */ + command Stop(): OperationalCommandResponse = 1; + /** Upon receipt, the device SHALL start its operation if it is safe to do so and the device is in an operational state from which it can be started. */ + command Start(): OperationalCommandResponse = 2; + /** Upon receipt, the device SHALL resume its operation from the point it was at when it received the Pause command, or from the point when it was paused by means outside of this cluster (for example by manual button press). */ + command Resume(): OperationalCommandResponse = 3; +} + +endpoint 0 { + device type ma_rootdevice = 22, version 1; + + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + } + + server cluster AccessControl { + emits event AccessControlEntryChanged; + emits event AccessControlExtensionChanged; + callback attribute acl; + callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + callback attribute clusterRevision; + } + + server cluster BasicInformation { + emits event StartUp; + emits event ShutDown; + emits event Leave; + callback attribute dataModelRevision; + callback attribute vendorName; + callback attribute vendorID; + callback attribute productName; + callback attribute productID; + persist attribute nodeLabel; + callback attribute location; + callback attribute hardwareVersion; + callback attribute hardwareVersionString; + callback attribute softwareVersion; + callback attribute softwareVersionString; + callback attribute manufacturingDate; + callback attribute partNumber; + callback attribute productURL; + callback attribute productLabel; + callback attribute serialNumber; + persist attribute localConfigDisabled default = 0; + ram attribute reachable default = 1; + callback attribute uniqueID; + callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster LocalizationConfiguration { + ram attribute activeLocale; + callback attribute supportedLocales; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster UnitLocalization { + persist attribute temperatureUnit default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 1; + ram attribute clusterRevision default = 1; + } + + server cluster GeneralCommissioning { + ram attribute breadcrumb default = 0x0000000000000000; + callback attribute basicCommissioningInfo; + callback attribute regulatoryConfig; + callback attribute locationCapability; + callback attribute supportsConcurrentConnection; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command ArmFailSafe; + handle command ArmFailSafeResponse; + handle command SetRegulatoryConfig; + handle command SetRegulatoryConfigResponse; + handle command CommissioningComplete; + handle command CommissioningCompleteResponse; + } + + server cluster NetworkCommissioning { + ram attribute maxNetworks; + callback attribute networks; + ram attribute scanMaxTimeSeconds; + ram attribute connectMaxTimeSeconds; + ram attribute interfaceEnabled; + ram attribute lastNetworkingStatus; + ram attribute lastNetworkID; + ram attribute lastConnectErrorValue; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 2; + ram attribute clusterRevision default = 1; + + handle command ScanNetworks; + handle command ScanNetworksResponse; + handle command AddOrUpdateWiFiNetwork; + handle command AddOrUpdateThreadNetwork; + handle command RemoveNetwork; + handle command NetworkConfigResponse; + handle command ConnectNetwork; + handle command ConnectNetworkResponse; + handle command ReorderNetwork; + } + + server cluster GeneralDiagnostics { + emits event HardwareFaultChange; + emits event RadioFaultChange; + emits event NetworkFaultChange; + emits event BootReason; + callback attribute networkInterfaces; + callback attribute rebootCount; + callback attribute upTime; + callback attribute totalOperationalHours; + callback attribute bootReason; + callback attribute activeHardwareFaults; + callback attribute activeRadioFaults; + callback attribute activeNetworkFaults; + callback attribute testEventTriggersEnabled default = false; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + + handle command TestEventTrigger; + handle command TimeSnapshot; + handle command TimeSnapshotResponse; + } + + server cluster WiFiNetworkDiagnostics { + emits event Disconnection; + emits event AssociationFailure; + emits event ConnectionStatus; + callback attribute bssid; + callback attribute securityType; + callback attribute wiFiVersion; + callback attribute channelNumber; + callback attribute rssi; + callback attribute beaconLostCount; + callback attribute beaconRxCount; + callback attribute packetMulticastRxCount; + callback attribute packetMulticastTxCount; + callback attribute packetUnicastRxCount; + callback attribute packetUnicastTxCount; + callback attribute currentMaxRate; + callback attribute overrunCount; + ram attribute featureMap default = 3; + ram attribute clusterRevision default = 1; + + handle command ResetCounts; + } + + server cluster AdministratorCommissioning { + callback attribute windowStatus; + callback attribute adminFabricIndex; + callback attribute adminVendorId; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command OpenCommissioningWindow; + handle command OpenBasicCommissioningWindow; + handle command RevokeCommissioning; + } + + server cluster OperationalCredentials { + callback attribute NOCs; + callback attribute fabrics; + callback attribute supportedFabrics; + callback attribute commissionedFabrics; + callback attribute trustedRootCertificates; + callback attribute currentFabricIndex; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command AttestationRequest; + handle command AttestationResponse; + handle command CertificateChainRequest; + handle command CertificateChainResponse; + handle command CSRRequest; + handle command CSRResponse; + handle command AddNOC; + handle command UpdateNOC; + handle command NOCResponse; + handle command UpdateFabricLabel; + handle command RemoveFabric; + handle command AddTrustedRootCertificate; + } + + server cluster GroupKeyManagement { + callback attribute groupKeyMap; + callback attribute groupTable; + callback attribute maxGroupsPerFabric; + callback attribute maxGroupKeysPerFabric; + callback attribute featureMap; + callback attribute clusterRevision; + + handle command KeySetWrite; + handle command KeySetRead; + handle command KeySetReadResponse; + handle command KeySetRemove; + handle command KeySetReadAllIndices; + handle command KeySetReadAllIndicesResponse; + } +} +endpoint 1 { + device type ma_laundry_dryer = 124, version 1; + + + server cluster Identify { + ram attribute identifyTime default = 0x0000; + ram attribute identifyType default = 0x0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 5; + + handle command Identify; + handle command TriggerEffect; + } + + server cluster OnOff { + ram attribute onOff default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 2; + ram attribute clusterRevision default = 6; + + handle command Off; + handle command On; + handle command Toggle; + } + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + } + + server cluster TemperatureControl { + ram attribute selectedTemperatureLevel; + callback attribute supportedTemperatureLevels; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 2; + ram attribute clusterRevision default = 1; + + handle command SetTemperature; + } + + server cluster OperationalState { + emits event OperationalError; + emits event OperationCompletion; + callback attribute phaseList; + callback attribute currentPhase; + callback attribute countdownTime; + callback attribute operationalStateList; + callback attribute operationalState; + callback attribute operationalError; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + + handle command Pause; + handle command Stop; + handle command Start; + handle command Resume; + handle command OperationalCommandResponse; + } +} + + diff --git a/examples/chef/devices/rootnode_laundrydryer_01796fe396.zap b/examples/chef/devices/rootnode_laundrydryer_01796fe396.zap new file mode 100644 index 00000000000000..a00af798c9823b --- /dev/null +++ b/examples/chef/devices/rootnode_laundrydryer_01796fe396.zap @@ -0,0 +1,3718 @@ +{ + "fileFormat": 2, + "featureLevel": 103, + "creator": "zap", + "keyValuePairs": [ + { + "key": "commandDiscovery", + "value": "1" + }, + { + "key": "defaultResponsePolicy", + "value": "always" + }, + { + "key": "manufacturerCodes", + "value": "0x1002" + } + ], + "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/zcl/zcl.json", + "type": "zcl-properties", + "category": "matter", + "version": 1, + "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "category": "matter", + "version": "chip-v1" + } + ], + "endpointTypes": [ + { + "id": 1, + "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], + "deviceTypeName": "MA-rootdevice", + "deviceTypeCode": 22, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ACL", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Extension", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "AccessControlEntryChanged", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AccessControlExtensionChanged", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Basic Information", + "code": 40, + "mfgCode": null, + "define": "BASIC_INFORMATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DataModelRevision", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorName", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorID", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductName", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductID", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NodeLabel", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Location", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersion", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersionString", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersion", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersionString", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ManufacturingDate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartNumber", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductURL", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "long_char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductLabel", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SerialNumber", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LocalConfigDisabled", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Reachable", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UniqueID", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxPathsPerInvoke", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "StartUp", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "ShutDown", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "Leave", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "TemperatureUnit", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "TempUnitEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ArmFailSafe", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ArmFailSafeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfig", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfigResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CommissioningComplete", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CommissioningCompleteResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "Breadcrumb", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BasicCommissioningInfo", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "BasicCommissioningInfo", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RegulatoryConfig", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocationCapability", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ScanNetworks", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ScanNetworksResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddOrUpdateWiFiNetwork", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddOrUpdateThreadNetwork", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveNetwork", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NetworkConfigResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ConnectNetwork", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ConnectNetworkResponse", + "code": 7, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ReorderNetwork", + "code": 8, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "MaxNetworks", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Networks", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ScanMaxTimeSeconds", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ConnectMaxTimeSeconds", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InterfaceEnabled", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkingStatus", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "NetworkCommissioningStatusEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkID", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastConnectErrorValue", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "TestEventTrigger", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TimeSnapshot", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TimeSnapshotResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NetworkInterfaces", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RebootCount", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TotalOperationalHours", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BootReason", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "BootReasonEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveHardwareFaults", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveRadioFaults", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaults", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TestEventTriggersEnabled", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "false", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "HardwareFaultChange", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "RadioFaultChange", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "NetworkFaultChange", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "BootReason", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Wi-Fi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "BSSID", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SecurityType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "SecurityTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "WiFiVersion", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "WiFiVersionEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChannelNumber", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RSSI", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BeaconLostCount", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BeaconRxCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastRxCount", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastTxCount", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastRxCount", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastTxCount", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMaxRate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "Disconnection", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AssociationFailure", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "ConnectionStatus", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "OpenCommissioningWindow", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "OpenBasicCommissioningWindow", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RevokeCommissioning", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "WindowStatus", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "CommissioningWindowStatusEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminFabricIndex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "fabric_idx", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminVendorId", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AttestationRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AttestationResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CertificateChainRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CertificateChainResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CSRRequest", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CSRResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddNOC", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "UpdateNOC", + "code": 7, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NOCResponse", + "code": 8, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "UpdateFabricLabel", + "code": 9, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveFabric", + "code": 10, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddTrustedRootCertificate", + "code": 11, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Fabrics", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SupportedFabrics", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CommissionedFabrics", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TrustedRootCertificates", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentFabricIndex", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "KeySetWrite", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetRead", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "KeySetRemove", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadAllIndices", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadAllIndicesResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "GroupKeyMap", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GroupTable", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupsPerFabric", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupKeysPerFabric", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + }, + { + "id": 2, + "name": "MA-dishwasher", + "deviceTypeRef": { + "code": 124, + "profileId": 259, + "label": "MA-laundry-dryer", + "name": "MA-laundry-dryer" + }, + "deviceTypes": [ + { + "code": 124, + "profileId": 259, + "label": "MA-laundry-dryer", + "name": "MA-laundry-dryer" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 124 + ], + "deviceTypeName": "MA-laundry-dryer", + "deviceTypeCode": 124, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TriggerEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "IdentifyType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "IdentifyTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "Off", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "On", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "Toggle", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "OnOff", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "6", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Control", + "code": 86, + "mfgCode": null, + "define": "TEMPERATURE_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "SetTemperature", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "SelectedTemperatureLevel", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedTemperatureLevels", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational State", + "code": 96, + "mfgCode": null, + "define": "OPERATIONAL_STATE_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "Pause", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "Stop", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "Start", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "Resume", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "OperationalCommandResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "PhaseList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentPhase", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CountdownTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalStateList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalState", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "OperationalStateEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalError", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "ErrorStateStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "OperationalError", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "OperationCompletion", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + } + ] + } + ], + "endpoints": [ + { + "endpointTypeName": "MA-rootdevice", + "endpointTypeIndex": 0, + "profileId": 259, + "endpointId": 0, + "networkId": 0, + "parentEndpointIdentifier": null + }, + { + "endpointTypeName": "MA-dishwasher", + "endpointTypeIndex": 1, + "profileId": 259, + "endpointId": 1, + "networkId": 0, + "parentEndpointIdentifier": null + } + ] +} \ No newline at end of file diff --git a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter index b7b8c92c1e655c..e595c866c2a47b 100644 --- a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter +++ b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -554,6 +561,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter index 724f3b69af8a2c..32528515cf121b 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -830,6 +837,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter index de46def1ea4999..04cf5fb646d7bb 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -830,6 +837,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter index dc0c1077468544..f63c51eb699eb8 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -1027,6 +1034,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1990,11 +1998,11 @@ endpoint 13 { } server cluster OnOff { - ram attribute onOff default = 0; + persist attribute onOff default = 0; ram attribute globalSceneControl default = 1; ram attribute onTime default = 0; ram attribute offWaitTime default = 0; - ram attribute startUpOnOff default = 0; + persist attribute startUpOnOff default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; @@ -2007,13 +2015,13 @@ endpoint 13 { } server cluster LevelControl { - ram attribute currentLevel default = 0x01; + persist attribute currentLevel default = 0x01; ram attribute remainingTime default = 0x0000; ram attribute minLevel default = 0x01; ram attribute maxLevel default = 0xFE; ram attribute options default = 0x01; ram attribute onLevel default = 0xFE; - ram attribute startUpCurrentLevel default = 0x01; + persist attribute startUpCurrentLevel default = 0x01; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap index d696db7a086855..d77eca38e6e7d6 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap @@ -2672,7 +2672,7 @@ "side": "server", "type": "boolean", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -2736,7 +2736,7 @@ "side": "server", "type": "StartUpOnOffEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -2908,7 +2908,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x01", @@ -3004,7 +3004,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x01", diff --git a/examples/chef/devices/rootnode_onofflight_samplemei.matter b/examples/chef/devices/rootnode_onofflight_samplemei.matter index 75c0b20fb975a7..5f8e70cc64ab97 100644 --- a/examples/chef/devices/rootnode_onofflight_samplemei.matter +++ b/examples/chef/devices/rootnode_onofflight_samplemei.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -1027,6 +1034,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2022,11 +2030,11 @@ endpoint 1 { } server cluster OnOff { - ram attribute onOff default = 0; + persist attribute onOff default = 0; ram attribute globalSceneControl default = 1; ram attribute onTime default = 0; ram attribute offWaitTime default = 0; - ram attribute startUpOnOff default = 0; + persist attribute startUpOnOff default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; @@ -2039,13 +2047,13 @@ endpoint 1 { } server cluster LevelControl { - ram attribute currentLevel default = 0x01; + persist attribute currentLevel default = 0x01; ram attribute remainingTime default = 0x0000; ram attribute minLevel default = 0x01; ram attribute maxLevel default = 0xFE; ram attribute options default = 0x01; ram attribute onLevel default = 0xFE; - ram attribute startUpCurrentLevel default = 0x01; + persist attribute startUpCurrentLevel default = 0x01; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; diff --git a/examples/chef/devices/rootnode_onofflight_samplemei.zap b/examples/chef/devices/rootnode_onofflight_samplemei.zap index 480eb4a073f849..bf7bb8efdf2b5b 100644 --- a/examples/chef/devices/rootnode_onofflight_samplemei.zap +++ b/examples/chef/devices/rootnode_onofflight_samplemei.zap @@ -2672,7 +2672,7 @@ "side": "server", "type": "boolean", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -2736,7 +2736,7 @@ "side": "server", "type": "StartUpOnOffEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -2908,7 +2908,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x01", @@ -3004,7 +3004,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x01", diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter index 18c776de2ab970..81fb81958f8f5d 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -902,6 +909,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter index d8c6175497d76e..94414ae3165662 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -902,6 +909,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1865,11 +1873,11 @@ endpoint 1 { } server cluster OnOff { - ram attribute onOff default = 0; + persist attribute onOff default = 0; ram attribute globalSceneControl default = 1; ram attribute onTime default = 0; ram attribute offWaitTime default = 0; - ram attribute startUpOnOff default = 0; + persist attribute startUpOnOff default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap index 4242c860e86e00..b13e31cb33d3d1 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap @@ -2672,7 +2672,7 @@ "side": "server", "type": "boolean", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -2736,7 +2736,7 @@ "side": "server", "type": "StartUpOnOffEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter index db33ccdc120233..43e8de7b5f4ee1 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -830,6 +837,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_pump_5f904818cc.matter b/examples/chef/devices/rootnode_pump_5f904818cc.matter index a28cc3fe719da3..8ea352ca7c785f 100644 --- a/examples/chef/devices/rootnode_pump_5f904818cc.matter +++ b/examples/chef/devices/rootnode_pump_5f904818cc.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -676,6 +683,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1675,7 +1683,7 @@ endpoint 1 { } server cluster OnOff { - ram attribute onOff default = 0; + persist attribute onOff default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; @@ -1706,12 +1714,12 @@ endpoint 1 { ram attribute minConstTemp default = 0; ram attribute maxConstTemp default = 10000; ram attribute pumpStatus default = 5; - ram attribute effectiveOperationMode default = 0; - ram attribute effectiveControlMode default = 5; + persist attribute effectiveOperationMode default = 0; + persist attribute effectiveControlMode default = 5; ram attribute capacity; ram attribute speed default = 1000; - ram attribute operationMode default = 0; - ram attribute controlMode default = 5; + persist attribute operationMode default = 0; + persist attribute controlMode default = 5; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; diff --git a/examples/chef/devices/rootnode_pump_5f904818cc.zap b/examples/chef/devices/rootnode_pump_5f904818cc.zap index 77f757a6681e46..a64d2c9c63f730 100644 --- a/examples/chef/devices/rootnode_pump_5f904818cc.zap +++ b/examples/chef/devices/rootnode_pump_5f904818cc.zap @@ -2359,7 +2359,7 @@ "side": "server", "type": "boolean", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -2715,7 +2715,7 @@ "side": "server", "type": "OperationModeEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -2731,7 +2731,7 @@ "side": "server", "type": "ControlModeEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "5", @@ -2779,7 +2779,7 @@ "side": "server", "type": "OperationModeEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -2795,7 +2795,7 @@ "side": "server", "type": "ControlModeEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "5", diff --git a/examples/chef/devices/rootnode_pump_a811bb33a0.matter b/examples/chef/devices/rootnode_pump_a811bb33a0.matter index 5faf56143e53b2..5b2371526d9a59 100644 --- a/examples/chef/devices/rootnode_pump_a811bb33a0.matter +++ b/examples/chef/devices/rootnode_pump_a811bb33a0.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -676,6 +683,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1618,7 +1626,7 @@ endpoint 1 { } server cluster OnOff { - ram attribute onOff default = 0; + persist attribute onOff default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; @@ -1646,10 +1654,10 @@ endpoint 1 { ram attribute maxPressure; ram attribute maxSpeed; ram attribute maxFlow; - ram attribute effectiveOperationMode; - ram attribute effectiveControlMode; + persist attribute effectiveOperationMode; + persist attribute effectiveControlMode; ram attribute capacity; - ram attribute operationMode default = 0x00; + persist attribute operationMode default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; diff --git a/examples/chef/devices/rootnode_pump_a811bb33a0.zap b/examples/chef/devices/rootnode_pump_a811bb33a0.zap index 1d7c10b1eb33e5..dba461f0635e91 100644 --- a/examples/chef/devices/rootnode_pump_a811bb33a0.zap +++ b/examples/chef/devices/rootnode_pump_a811bb33a0.zap @@ -2359,7 +2359,7 @@ "side": "server", "type": "boolean", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -2667,7 +2667,7 @@ "side": "server", "type": "OperationModeEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2683,7 +2683,7 @@ "side": "server", "type": "ControlModeEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2715,7 +2715,7 @@ "side": "server", "type": "OperationModeEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x00", diff --git a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter index 9f7942e9284b44..80faecb735c5ff 100644 --- a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter +++ b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -554,6 +561,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1248,6 +1256,65 @@ cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } +/** Attributes and commands for selecting a mode from a list of supported options. */ +cluster RefrigeratorAndTemperatureControlledCabinetMode = 82 { + revision 2; + + enum ModeTag : enum16 { + kAuto = 0; + kQuick = 1; + kQuiet = 2; + kLowNoise = 3; + kLowEnergy = 4; + kVacation = 5; + kMin = 6; + kMax = 7; + kNight = 8; + kDay = 9; + kRapidCool = 16384; + kRapidFreeze = 16385; + } + + bitmap Feature : bitmap32 { + kOnOff = 0x1; + } + + struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + } + + struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; + } + + readonly attribute ModeOptionStruct supportedModes[] = 0; + readonly attribute int8u currentMode = 1; + attribute optional nullable int8u startUpMode = 2; + attribute optional nullable int8u onMode = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ChangeToModeRequest { + int8u newMode = 0; + } + + response struct ChangeToModeResponse = 1 { + enum8 status = 0; + optional char_string statusText = 1; + } + + /** This command is used to change device modes. + On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ + command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0; +} + /** Attributes and commands for configuring the temperature control, and reporting temperature. */ cluster TemperatureControl = 86 { revision 1; // NOTE: Default/not specifically set @@ -1280,6 +1347,48 @@ cluster TemperatureControl = 86 { command SetTemperature(SetTemperatureRequest): DefaultSuccess = 0; } +/** Attributes and commands for configuring the Refrigerator alarm. */ +cluster RefrigeratorAlarm = 87 { + revision 1; // NOTE: Default/not specifically set + + bitmap AlarmBitmap : bitmap32 { + kDoorOpen = 0x1; + } + + info event Notify = 0 { + AlarmBitmap active = 0; + AlarmBitmap inactive = 1; + AlarmBitmap state = 2; + AlarmBitmap mask = 3; + } + + readonly attribute AlarmBitmap mask = 0; + readonly attribute AlarmBitmap state = 2; + readonly attribute AlarmBitmap supported = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** Attributes and commands for configuring the measurement of temperature, and reporting temperature measurements. */ +cluster TemperatureMeasurement = 1026 { + revision 1; // NOTE: Default/not specifically set + + readonly attribute nullable temperature measuredValue = 0; + readonly attribute nullable temperature minMeasuredValue = 1; + readonly attribute nullable temperature maxMeasuredValue = 2; + readonly attribute optional int16u tolerance = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + endpoint 0 { device type ma_rootdevice = 22, version 1; @@ -1307,7 +1416,7 @@ endpoint 0 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + ram attribute featureMap default = 0x1; callback attribute clusterRevision; } @@ -1363,7 +1472,7 @@ endpoint 0 { callback attribute acceptedCommandList; callback attribute attributeList; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; + ram attribute clusterRevision default = 2; handle command ArmFailSafe; handle command ArmFailSafeResponse; @@ -1454,7 +1563,7 @@ endpoint 0 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + ram attribute featureMap default = 0x1; ram attribute clusterRevision default = 1; handle command OpenCommissioningWindow; @@ -1520,6 +1629,33 @@ endpoint 1 { callback attribute featureMap; callback attribute clusterRevision; } + + server cluster RefrigeratorAndTemperatureControlledCabinetMode { + callback attribute supportedModes; + callback attribute currentMode; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + callback attribute featureMap; + ram attribute clusterRevision default = 2; + + handle command ChangeToMode; + handle command ChangeToModeResponse; + } + + server cluster RefrigeratorAlarm { + emits event Notify; + ram attribute mask default = 0x1; + ram attribute state default = 0; + ram attribute supported default = 0x1; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } } endpoint 2 { device type ma_temperature_controlled_cabinet = 113, version 1; @@ -1530,6 +1666,7 @@ endpoint 2 { callback attribute serverList; callback attribute clientList; callback attribute partsList; + callback attribute tagList; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; @@ -1538,16 +1675,30 @@ endpoint 2 { } server cluster TemperatureControl { - ram attribute selectedTemperatureLevel; - callback attribute supportedTemperatureLevels; + ram attribute temperatureSetpoint default = 200; + ram attribute minTemperature default = 200; + ram attribute maxTemperature default = 400; + ram attribute step default = 10; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 2; + ram attribute featureMap default = 5; ram attribute clusterRevision default = 1; handle command SetTemperature; } + + server cluster TemperatureMeasurement { + ram attribute measuredValue default = 200; + ram attribute minMeasuredValue default = -4000; + ram attribute maxMeasuredValue default = 2000; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 4; + } } endpoint 3 { device type ma_temperature_controlled_cabinet = 113, version 1; @@ -1558,6 +1709,7 @@ endpoint 3 { callback attribute serverList; callback attribute clientList; callback attribute partsList; + callback attribute tagList; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; @@ -1566,16 +1718,30 @@ endpoint 3 { } server cluster TemperatureControl { - ram attribute selectedTemperatureLevel; - callback attribute supportedTemperatureLevels; + ram attribute temperatureSetpoint default = -1800; + ram attribute minTemperature default = -1800; + ram attribute maxTemperature default = -1500; + ram attribute step default = 10; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 2; + ram attribute featureMap default = 5; ram attribute clusterRevision default = 1; handle command SetTemperature; } + + server cluster TemperatureMeasurement { + ram attribute measuredValue default = -1800; + ram attribute minMeasuredValue default = -4000; + ram attribute maxMeasuredValue default = 2000; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 4; + } } diff --git a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.zap b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.zap index 79d3f881487e8e..c2f352d7d8f5a1 100644 --- a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.zap +++ b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.zap @@ -361,7 +361,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "0x1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -1184,7 +1184,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -2197,7 +2197,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "0x1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2843,64 +2843,37 @@ "reportableChange": 0 } ] - } - ] - }, - { - "id": 3, - "name": "Anonymous Endpoint Type", - "deviceTypeRef": { - "code": 113, - "profileId": 259, - "label": "MA-temperature-controlled-cabinet", - "name": "MA-temperature-controlled-cabinet" - }, - "deviceTypes": [ - { - "code": 113, - "profileId": 259, - "label": "MA-temperature-controlled-cabinet", - "name": "MA-temperature-controlled-cabinet" - } - ], - "deviceVersions": [ - 1 - ], - "deviceIdentifiers": [ - 113 - ], - "deviceTypeName": "MA-temperature-controlled-cabinet", - "deviceTypeCode": 113, - "deviceTypeProfileId": 259, - "clusters": [ + }, { - "name": "Descriptor", - "code": 29, + "name": "Refrigerator And Temperature Controlled Cabinet Mode", + "code": 82, "mfgCode": null, - "define": "DESCRIPTOR_CLUSTER", + "define": "REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_CLUSTER", "side": "server", "enabled": 1, - "attributes": [ + "commands": [ { - "name": "DeviceTypeList", + "name": "ChangeToMode", "code": 0, "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "source": "client", + "isIncoming": 1, + "isEnabled": 1 }, { - "name": "ServerList", + "name": "ChangeToModeResponse", "code": 1, "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "SupportedModes", + "code": 0, + "mfgCode": null, "side": "server", "type": "array", "included": 1, @@ -2914,11 +2887,11 @@ "reportableChange": 0 }, { - "name": "ClientList", - "code": 2, + "name": "CurrentMode", + "code": 1, "mfgCode": null, "side": "server", - "type": "array", + "type": "int8u", "included": 1, "storageOption": "External", "singleton": 0, @@ -2930,8 +2903,8 @@ "reportableChange": 0 }, { - "name": "PartsList", - "code": 3, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", "type": "array", @@ -2946,8 +2919,8 @@ "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", "type": "array", @@ -2962,8 +2935,8 @@ "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", "type": "array", @@ -3016,10 +2989,10 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3028,50 +3001,56 @@ ] }, { - "name": "Temperature Control", - "code": 86, + "name": "Refrigerator Alarm", + "code": 87, "mfgCode": null, - "define": "TEMPERATURE_CONTROL_CLUSTER", + "define": "REFRIGERATOR_ALARM_CLUSTER", "side": "server", "enabled": 1, - "commands": [ + "attributes": [ { - "name": "SetTemperature", + "name": "Mask", "code": 0, "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ + "side": "server", + "type": "AlarmBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { - "name": "SelectedTemperatureLevel", - "code": 4, + "name": "State", + "code": 2, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "AlarmBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "SupportedTemperatureLevels", - "code": 5, + "name": "Supported", + "code": 3, "mfgCode": null, "side": "server", - "type": "array", + "type": "AlarmBitmap", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "0x1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3109,6 +3088,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AttributeList", "code": 65531, @@ -3135,7 +3130,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3157,12 +3152,21 @@ "maxInterval": 65534, "reportableChange": 0 } + ], + "events": [ + { + "name": "Notify", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + } ] } ] }, { - "id": 4, + "id": 3, "name": "Anonymous Endpoint Type", "deviceTypeRef": { "code": 113, @@ -3260,6 +3264,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "TagList", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -3361,32 +3381,64 @@ ], "attributes": [ { - "name": "SelectedTemperatureLevel", - "code": 4, + "name": "TemperatureSetpoint", + "code": 0, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "200", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "SupportedTemperatureLevels", - "code": 5, + "name": "MinTemperature", + "code": 1, "mfgCode": null, "side": "server", - "type": "array", + "type": "temperature", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "200", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxTemperature", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "400", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Step", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "10", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3450,7 +3502,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "5", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3473,6 +3525,677 @@ "reportableChange": 0 } ] + }, + { + "name": "Temperature Measurement", + "code": 1026, + "mfgCode": null, + "define": "TEMPERATURE_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "200", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "-4000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + }, + { + "id": 4, + "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 113, + "profileId": 259, + "label": "MA-temperature-controlled-cabinet", + "name": "MA-temperature-controlled-cabinet" + }, + "deviceTypes": [ + { + "code": 113, + "profileId": 259, + "label": "MA-temperature-controlled-cabinet", + "name": "MA-temperature-controlled-cabinet" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 113 + ], + "deviceTypeName": "MA-temperature-controlled-cabinet", + "deviceTypeCode": 113, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TagList", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Control", + "code": 86, + "mfgCode": null, + "define": "TEMPERATURE_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "SetTemperature", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "TemperatureSetpoint", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "-1800", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinTemperature", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "-1800", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxTemperature", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "-1500", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Step", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "10", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Measurement", + "code": 1026, + "mfgCode": null, + "define": "TEMPERATURE_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "-1800", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "-4000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] } ] } diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter index 6870f3cd42718a..b4094e13d84761 100644 --- a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -914,6 +921,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2012,7 +2020,7 @@ endpoint 1 { server cluster PowerSource { ram attribute status; - ram attribute order; + persist attribute order; ram attribute description; ram attribute batPercentRemaining default = 95; ram attribute batPresent default = 1; diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap index 0463c7d0fb801c..202206a9889908 100644 --- a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap @@ -2517,7 +2517,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "", diff --git a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter index 654c955586b685..3ebdc0a23132a1 100644 --- a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter +++ b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -727,6 +734,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2106,7 +2114,7 @@ endpoint 1 { } server cluster OnOff { - ram attribute onOff default = 0; + persist attribute onOff default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; @@ -2138,15 +2146,15 @@ endpoint 1 { ram attribute absMaxHeatSetpointLimit default = 3000; ram attribute absMinCoolSetpointLimit default = 1600; ram attribute absMaxCoolSetpointLimit default = 3200; - ram attribute occupiedCoolingSetpoint default = 2600; - ram attribute occupiedHeatingSetpoint default = 2000; - ram attribute minHeatSetpointLimit default = 700; - ram attribute maxHeatSetpointLimit default = 3000; - ram attribute minCoolSetpointLimit default = 1600; - ram attribute maxCoolSetpointLimit default = 3200; - ram attribute controlSequenceOfOperation default = 0x04; - ram attribute systemMode default = 0x01; - ram attribute ACLouverPosition default = 0; + persist attribute occupiedCoolingSetpoint default = 2600; + persist attribute occupiedHeatingSetpoint default = 2000; + persist attribute minHeatSetpointLimit default = 700; + persist attribute maxHeatSetpointLimit default = 3000; + persist attribute minCoolSetpointLimit default = 1600; + persist attribute maxCoolSetpointLimit default = 3200; + persist attribute controlSequenceOfOperation default = 0x04; + persist attribute systemMode default = 0x01; + persist attribute ACLouverPosition default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; @@ -2158,16 +2166,18 @@ endpoint 1 { } server cluster FanControl { - ram attribute fanMode default = 0; + persist attribute fanMode default = 0; ram attribute fanModeSequence default = 2; ram attribute percentSetting default = 0; ram attribute percentCurrent default = 0; + ram attribute rockSupport default = 0x00; + ram attribute rockSetting default = 0x00; ram attribute airflowDirection default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 33; + ram attribute featureMap default = 37; ram attribute clusterRevision default = 1; handle command Step; diff --git a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap index 80384bf72b175b..f32262142ce86b 100644 --- a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap +++ b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap @@ -2333,7 +2333,7 @@ "side": "server", "type": "boolean", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -2715,7 +2715,7 @@ "side": "server", "type": "temperature", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "2600", @@ -2731,7 +2731,7 @@ "side": "server", "type": "temperature", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "2000", @@ -2747,7 +2747,7 @@ "side": "server", "type": "temperature", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "700", @@ -2763,7 +2763,7 @@ "side": "server", "type": "temperature", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "3000", @@ -2779,7 +2779,7 @@ "side": "server", "type": "temperature", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "1600", @@ -2795,7 +2795,7 @@ "side": "server", "type": "temperature", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "3200", @@ -2811,7 +2811,7 @@ "side": "server", "type": "ControlSequenceOfOperationEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x04", @@ -2827,7 +2827,7 @@ "side": "server", "type": "SystemModeEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x01", @@ -2843,7 +2843,7 @@ "side": "server", "type": "ACLouverPositionEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -2975,7 +2975,7 @@ "side": "server", "type": "FanModeEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -3032,6 +3032,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "RockSupport", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "RockBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RockSetting", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "RockBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AirflowDirection", "code": 11, @@ -3122,7 +3154,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "33", + "defaultValue": "37", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter index 1057b859f6abf3..1f6e1c17b7828e 100644 --- a/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter +++ b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -914,6 +921,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1918,7 +1926,7 @@ endpoint 1 { server cluster PowerSource { emits event BatFaultChange; ram attribute status default = 0; - ram attribute order default = 2; + persist attribute order default = 2; ram attribute description default = "B2"; ram attribute batChargeLevel default = 0; ram attribute batReplacementNeeded; diff --git a/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.zap b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.zap index 3439c0c6c04ab9..41d0fde16ae6aa 100644 --- a/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.zap +++ b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.zap @@ -2501,7 +2501,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "2", diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter index 223f47a4dfa346..c5a1ccc522a4c3 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -950,6 +957,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1893,7 +1901,7 @@ endpoint 1 { } server cluster OnOff { - ram attribute onOff default = 0; + persist attribute onOff default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; @@ -1906,7 +1914,7 @@ endpoint 1 { } server cluster LevelControl { - ram attribute currentLevel default = 0x00; + persist attribute currentLevel default = 0x00; ram attribute minLevel default = 0x00; ram attribute maxLevel default = 0xFE; ram attribute options default = 0x00; diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap index 509ebc9db82193..9c2bea2037f5e5 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap @@ -2484,7 +2484,7 @@ "side": "server", "type": "boolean", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -2656,7 +2656,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x00", diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter index 5e23267e1b9b6c..6199388887e069 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -830,6 +837,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index c38c38b0a1d88c..79930324883042 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -891,6 +898,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2461,20 +2469,20 @@ endpoint 1 { ram attribute absMaxCoolSetpointLimit default = 3200; ram attribute PICoolingDemand default = 0; ram attribute PIHeatingDemand default = 0; - ram attribute HVACSystemTypeConfiguration default = 0x00; - ram attribute localTemperatureCalibration default = 0; - ram attribute occupiedCoolingSetpoint default = 0x0A28; - ram attribute occupiedHeatingSetpoint default = 0x07D0; - ram attribute unoccupiedCoolingSetpoint default = 0x0A28; - ram attribute unoccupiedHeatingSetpoint default = 0x07D0; - ram attribute minHeatSetpointLimit default = 700; - ram attribute maxHeatSetpointLimit default = 3000; - ram attribute minCoolSetpointLimit default = 1600; - ram attribute maxCoolSetpointLimit default = 3200; - ram attribute minSetpointDeadBand default = 0x19; - ram attribute remoteSensing default = 0x00; - ram attribute controlSequenceOfOperation default = 0x04; - ram attribute systemMode default = 0x01; + persist attribute HVACSystemTypeConfiguration default = 0x00; + persist attribute localTemperatureCalibration default = 0; + persist attribute occupiedCoolingSetpoint default = 0x0A28; + persist attribute occupiedHeatingSetpoint default = 0x07D0; + persist attribute unoccupiedCoolingSetpoint default = 0x0A28; + persist attribute unoccupiedHeatingSetpoint default = 0x07D0; + persist attribute minHeatSetpointLimit default = 700; + persist attribute maxHeatSetpointLimit default = 3000; + persist attribute minCoolSetpointLimit default = 1600; + persist attribute maxCoolSetpointLimit default = 3200; + persist attribute minSetpointDeadBand default = 0x19; + persist attribute remoteSensing default = 0x00; + persist attribute controlSequenceOfOperation default = 0x04; + persist attribute systemMode default = 0x01; ram attribute thermostatRunningMode default = 0; ram attribute startOfWeek default = 0; ram attribute numberOfWeeklyTransitions default = 0; diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap index f1a0ae9c7c03ed..90c10742060ebd 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap @@ -3126,7 +3126,7 @@ "side": "server", "type": "HVACSystemTypeBitmap", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x00", @@ -3142,7 +3142,7 @@ "side": "server", "type": "int8s", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -3158,7 +3158,7 @@ "side": "server", "type": "temperature", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x0A28", @@ -3174,7 +3174,7 @@ "side": "server", "type": "temperature", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x07D0", @@ -3190,7 +3190,7 @@ "side": "server", "type": "temperature", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x0A28", @@ -3206,7 +3206,7 @@ "side": "server", "type": "temperature", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x07D0", @@ -3222,7 +3222,7 @@ "side": "server", "type": "temperature", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "700", @@ -3238,7 +3238,7 @@ "side": "server", "type": "temperature", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "3000", @@ -3254,7 +3254,7 @@ "side": "server", "type": "temperature", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "1600", @@ -3270,7 +3270,7 @@ "side": "server", "type": "temperature", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "3200", @@ -3286,7 +3286,7 @@ "side": "server", "type": "int8s", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x19", @@ -3302,7 +3302,7 @@ "side": "server", "type": "RemoteSensingBitmap", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x00", @@ -3318,7 +3318,7 @@ "side": "server", "type": "ControlSequenceOfOperationEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x04", @@ -3334,7 +3334,7 @@ "side": "server", "type": "SystemModeEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x01", diff --git a/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.matter b/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.matter index 360771d4b05336..bd89a853121fcb 100644 --- a/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.matter +++ b/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -616,6 +623,265 @@ cluster BasicInformation = 40 { command MfgSpecificPing(): DefaultSuccess = 0; } +/** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ +cluster PowerSource = 47 { + revision 1; // NOTE: Default/not specifically set + + enum BatApprovedChemistryEnum : enum16 { + kUnspecified = 0; + kAlkaline = 1; + kLithiumCarbonFluoride = 2; + kLithiumChromiumOxide = 3; + kLithiumCopperOxide = 4; + kLithiumIronDisulfide = 5; + kLithiumManganeseDioxide = 6; + kLithiumThionylChloride = 7; + kMagnesium = 8; + kMercuryOxide = 9; + kNickelOxyhydride = 10; + kSilverOxide = 11; + kZincAir = 12; + kZincCarbon = 13; + kZincChloride = 14; + kZincManganeseDioxide = 15; + kLeadAcid = 16; + kLithiumCobaltOxide = 17; + kLithiumIon = 18; + kLithiumIonPolymer = 19; + kLithiumIronPhosphate = 20; + kLithiumSulfur = 21; + kLithiumTitanate = 22; + kNickelCadmium = 23; + kNickelHydrogen = 24; + kNickelIron = 25; + kNickelMetalHydride = 26; + kNickelZinc = 27; + kSilverZinc = 28; + kSodiumIon = 29; + kSodiumSulfur = 30; + kZincBromide = 31; + kZincCerium = 32; + } + + enum BatChargeFaultEnum : enum8 { + kUnspecified = 0; + kAmbientTooHot = 1; + kAmbientTooCold = 2; + kBatteryTooHot = 3; + kBatteryTooCold = 4; + kBatteryAbsent = 5; + kBatteryOverVoltage = 6; + kBatteryUnderVoltage = 7; + kChargerOverVoltage = 8; + kChargerUnderVoltage = 9; + kSafetyTimeout = 10; + } + + enum BatChargeLevelEnum : enum8 { + kOK = 0; + kWarning = 1; + kCritical = 2; + } + + enum BatChargeStateEnum : enum8 { + kUnknown = 0; + kIsCharging = 1; + kIsAtFullCharge = 2; + kIsNotCharging = 3; + } + + enum BatCommonDesignationEnum : enum16 { + kUnspecified = 0; + kAAA = 1; + kAA = 2; + kC = 3; + kD = 4; + k4v5 = 5; + k6v0 = 6; + k9v0 = 7; + k12AA = 8; + kAAAA = 9; + kA = 10; + kB = 11; + kF = 12; + kN = 13; + kNo6 = 14; + kSubC = 15; + kA23 = 16; + kA27 = 17; + kBA5800 = 18; + kDuplex = 19; + k4SR44 = 20; + k523 = 21; + k531 = 22; + k15v0 = 23; + k22v5 = 24; + k30v0 = 25; + k45v0 = 26; + k67v5 = 27; + kJ = 28; + kCR123A = 29; + kCR2 = 30; + k2CR5 = 31; + kCRP2 = 32; + kCRV3 = 33; + kSR41 = 34; + kSR43 = 35; + kSR44 = 36; + kSR45 = 37; + kSR48 = 38; + kSR54 = 39; + kSR55 = 40; + kSR57 = 41; + kSR58 = 42; + kSR59 = 43; + kSR60 = 44; + kSR63 = 45; + kSR64 = 46; + kSR65 = 47; + kSR66 = 48; + kSR67 = 49; + kSR68 = 50; + kSR69 = 51; + kSR516 = 52; + kSR731 = 53; + kSR712 = 54; + kLR932 = 55; + kA5 = 56; + kA10 = 57; + kA13 = 58; + kA312 = 59; + kA675 = 60; + kAC41E = 61; + k10180 = 62; + k10280 = 63; + k10440 = 64; + k14250 = 65; + k14430 = 66; + k14500 = 67; + k14650 = 68; + k15270 = 69; + k16340 = 70; + kRCR123A = 71; + k17500 = 72; + k17670 = 73; + k18350 = 74; + k18500 = 75; + k18650 = 76; + k19670 = 77; + k25500 = 78; + k26650 = 79; + k32600 = 80; + } + + enum BatFaultEnum : enum8 { + kUnspecified = 0; + kOverTemp = 1; + kUnderTemp = 2; + } + + enum BatReplaceabilityEnum : enum8 { + kUnspecified = 0; + kNotReplaceable = 1; + kUserReplaceable = 2; + kFactoryReplaceable = 3; + } + + enum PowerSourceStatusEnum : enum8 { + kUnspecified = 0; + kActive = 1; + kStandby = 2; + kUnavailable = 3; + } + + enum WiredCurrentTypeEnum : enum8 { + kAC = 0; + kDC = 1; + } + + enum WiredFaultEnum : enum8 { + kUnspecified = 0; + kOverVoltage = 1; + kUnderVoltage = 2; + } + + bitmap Feature : bitmap32 { + kWired = 0x1; + kBattery = 0x2; + kRechargeable = 0x4; + kReplaceable = 0x8; + } + + struct BatChargeFaultChangeType { + BatChargeFaultEnum current[] = 0; + BatChargeFaultEnum previous[] = 1; + } + + struct BatFaultChangeType { + BatFaultEnum current[] = 0; + BatFaultEnum previous[] = 1; + } + + struct WiredFaultChangeType { + WiredFaultEnum current[] = 0; + WiredFaultEnum previous[] = 1; + } + + info event WiredFaultChange = 0 { + WiredFaultEnum current[] = 0; + WiredFaultEnum previous[] = 1; + } + + info event BatFaultChange = 1 { + BatFaultEnum current[] = 0; + BatFaultEnum previous[] = 1; + } + + info event BatChargeFaultChange = 2 { + BatChargeFaultEnum current[] = 0; + BatChargeFaultEnum previous[] = 1; + } + + readonly attribute PowerSourceStatusEnum status = 0; + readonly attribute int8u order = 1; + readonly attribute char_string<60> description = 2; + readonly attribute optional nullable int32u wiredAssessedInputVoltage = 3; + readonly attribute optional nullable int16u wiredAssessedInputFrequency = 4; + readonly attribute optional WiredCurrentTypeEnum wiredCurrentType = 5; + readonly attribute optional nullable int32u wiredAssessedCurrent = 6; + readonly attribute optional int32u wiredNominalVoltage = 7; + readonly attribute optional int32u wiredMaximumCurrent = 8; + readonly attribute optional boolean wiredPresent = 9; + readonly attribute optional WiredFaultEnum activeWiredFaults[] = 10; + readonly attribute optional nullable int32u batVoltage = 11; + readonly attribute optional nullable int8u batPercentRemaining = 12; + readonly attribute optional nullable int32u batTimeRemaining = 13; + readonly attribute optional BatChargeLevelEnum batChargeLevel = 14; + readonly attribute optional boolean batReplacementNeeded = 15; + readonly attribute optional BatReplaceabilityEnum batReplaceability = 16; + readonly attribute optional boolean batPresent = 17; + readonly attribute optional BatFaultEnum activeBatFaults[] = 18; + readonly attribute optional char_string<60> batReplacementDescription = 19; + readonly attribute optional BatCommonDesignationEnum batCommonDesignation = 20; + readonly attribute optional char_string<20> batANSIDesignation = 21; + readonly attribute optional char_string<20> batIECDesignation = 22; + readonly attribute optional BatApprovedChemistryEnum batApprovedChemistry = 23; + readonly attribute optional int32u batCapacity = 24; + readonly attribute optional int8u batQuantity = 25; + readonly attribute optional BatChargeStateEnum batChargeState = 26; + readonly attribute optional nullable int32u batTimeToFullCharge = 27; + readonly attribute optional boolean batFunctionalWhileCharging = 28; + readonly attribute optional nullable int32u batChargingCurrent = 29; + readonly attribute optional BatChargeFaultEnum activeBatChargeFaults[] = 30; + readonly attribute endpoint_no endpointList[] = 31; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + /** This cluster is used to manage global aspects of the Commissioning flow. */ cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set @@ -655,6 +921,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1569,6 +1836,7 @@ endpoint 0 { } } endpoint 1 { + device type ma_powersource = 17, version 1; device type ma_water_leak_detector = 67, version 1; @@ -1620,6 +1888,28 @@ endpoint 1 { callback attribute clusterRevision; } + server cluster PowerSource { + ram attribute status default = 1; + ram attribute order default = 1; + ram attribute description default = "Primary Battery"; + ram attribute batVoltage default = 4100; + ram attribute batPercentRemaining default = 95; + ram attribute batTimeRemaining default = 518400; + ram attribute batChargeLevel default = 0; + ram attribute batReplaceability default = 1; + ram attribute batPresent default = 1; + ram attribute batCapacity default = 350; + ram attribute batChargeState default = 4; + ram attribute batFunctionalWhileCharging default = 1; + callback attribute endpointList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0x06; + ram attribute clusterRevision default = 1; + } + server cluster BooleanState { ram attribute stateValue; callback attribute generatedCommandList; diff --git a/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.zap b/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.zap index a07441c6c7dbbd..11ebd3c2e3144e 100644 --- a/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.zap +++ b/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.zap @@ -41,14 +41,16 @@ "code": 22, "profileId": 259, "label": "MA-rootdevice", - "name": "MA-rootdevice" + "name": "MA-rootdevice", + "deviceTypeOrder": 0 }, "deviceTypes": [ { "code": 22, "profileId": 259, "label": "MA-rootdevice", - "name": "MA-rootdevice" + "name": "MA-rootdevice", + "deviceTypeOrder": 0 } ], "deviceVersions": [ @@ -1936,21 +1938,32 @@ "code": 67, "profileId": 259, "label": "MA-water-leak-detector", - "name": "MA-water-leak-detector" + "name": "MA-water-leak-detector", + "deviceTypeOrder": 0 }, "deviceTypes": [ { "code": 67, "profileId": 259, "label": "MA-water-leak-detector", - "name": "MA-water-leak-detector" + "name": "MA-water-leak-detector", + "deviceTypeOrder": 0 + }, + { + "code": 17, + "profileId": 259, + "label": "MA-powersource", + "name": "MA-powersource", + "deviceTypeOrder": 1 } ], "deviceVersions": [ + 1, 1 ], "deviceIdentifiers": [ - 67 + 67, + 17 ], "deviceTypeName": "MA-water-leak-detector", "deviceTypeCode": 67, @@ -2486,6 +2499,320 @@ } ] }, + { + "name": "Power Source", + "code": 47, + "mfgCode": null, + "define": "POWER_SOURCE_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Status", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "PowerSourceStatusEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Order", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Description", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "Primary Battery", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatVoltage", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4100", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatPercentRemaining", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "95", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatTimeRemaining", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "518400", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatChargeLevel", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "BatChargeLevelEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatReplaceability", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "BatReplaceabilityEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatPresent", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatCapacity", + "code": 24, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "350", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatChargeState", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "BatChargeStateEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatFunctionalWhileCharging", + "code": 28, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EndpointList", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x06", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Boolean State", "code": 69, @@ -2735,4 +3062,4 @@ "parentEndpointIdentifier": 0 } ] -} \ No newline at end of file +} diff --git a/examples/chef/devices/rootnode_watervalve_6bb39f1f67.matter b/examples/chef/devices/rootnode_watervalve_6bb39f1f67.matter index 28a5183881afbb..cf3009d2913f9a 100644 --- a/examples/chef/devices/rootnode_watervalve_6bb39f1f67.matter +++ b/examples/chef/devices/rootnode_watervalve_6bb39f1f67.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -854,6 +861,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter index 6056460bea24ff..0f1d25c571179f 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -830,6 +837,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1961,24 +1969,24 @@ endpoint 1 { ram attribute type default = 8; ram attribute physicalClosedLimitLift default = 0x0000; ram attribute physicalClosedLimitTilt default = 0x0000; - ram attribute currentPositionLift default = 0; - ram attribute currentPositionTilt default = 0; - ram attribute numberOfActuationsLift default = 0x0000; - ram attribute numberOfActuationsTilt default = 0x0000; - ram attribute configStatus default = 0x19; - ram attribute currentPositionLiftPercentage default = 0; - ram attribute currentPositionTiltPercentage default = 0; + persist attribute currentPositionLift default = 0; + persist attribute currentPositionTilt default = 0; + persist attribute numberOfActuationsLift default = 0x0000; + persist attribute numberOfActuationsTilt default = 0x0000; + persist attribute configStatus default = 0x19; + persist attribute currentPositionLiftPercentage default = 0; + persist attribute currentPositionTiltPercentage default = 0; ram attribute operationalStatus default = 0x00; ram attribute targetPositionLiftPercent100ths default = 0; ram attribute targetPositionTiltPercent100ths default = 0; ram attribute endProductType default = 8; - ram attribute currentPositionLiftPercent100ths default = 0; - ram attribute currentPositionTiltPercent100ths default = 0; - ram attribute installedOpenLimitLift default = 0; - ram attribute installedClosedLimitLift default = 65534; - ram attribute installedOpenLimitTilt default = 0; - ram attribute installedClosedLimitTilt default = 1800; - ram attribute mode default = 0x00; + persist attribute currentPositionLiftPercent100ths default = 0; + persist attribute currentPositionTiltPercent100ths default = 0; + persist attribute installedOpenLimitLift default = 0; + persist attribute installedClosedLimitLift default = 65534; + persist attribute installedOpenLimitTilt default = 0; + persist attribute installedClosedLimitTilt default = 1800; + persist attribute mode default = 0x00; ram attribute safetyStatus default = 0x0000; callback attribute generatedCommandList; callback attribute acceptedCommandList; diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap index 930d7bfc1b1e0b..23e48363583170 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap @@ -2914,7 +2914,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -2930,7 +2930,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -2946,7 +2946,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -2962,7 +2962,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", @@ -2978,7 +2978,7 @@ "side": "server", "type": "ConfigStatus", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x19", @@ -2994,7 +2994,7 @@ "side": "server", "type": "percent", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -3010,7 +3010,7 @@ "side": "server", "type": "percent", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -3090,7 +3090,7 @@ "side": "server", "type": "percent100ths", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -3106,7 +3106,7 @@ "side": "server", "type": "percent100ths", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -3122,7 +3122,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -3138,7 +3138,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "65534", @@ -3154,7 +3154,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -3170,7 +3170,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "1800", @@ -3186,7 +3186,7 @@ "side": "server", "type": "Mode", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x00", diff --git a/examples/chef/esp32/main/CMakeLists.txt b/examples/chef/esp32/main/CMakeLists.txt index 1614669713e5a0..49f3fbabdc7113 100644 --- a/examples/chef/esp32/main/CMakeLists.txt +++ b/examples/chef/esp32/main/CMakeLists.txt @@ -70,6 +70,7 @@ set(SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/../common/clusters/low-power/" "${CMAKE_SOURCE_DIR}/../common/clusters/media-input/" "${CMAKE_SOURCE_DIR}/../common/clusters/media-playback/" + "${CMAKE_SOURCE_DIR}/../common/clusters/refrigerator-and-temperature-controlled-cabinet-mode/" "${CMAKE_SOURCE_DIR}/../common/clusters/resource-monitoring/" "${CMAKE_SOURCE_DIR}/../common/clusters/switch/" "${CMAKE_SOURCE_DIR}/../common/clusters/target-navigator/" diff --git a/examples/chef/linux/BUILD.gn b/examples/chef/linux/BUILD.gn index 238c7b4e2c1570..a65e6e7b6ad3a0 100644 --- a/examples/chef/linux/BUILD.gn +++ b/examples/chef/linux/BUILD.gn @@ -60,6 +60,7 @@ executable("${sample_name}") { "${project_dir}/common/clusters/low-power/LowPowerManager.cpp", "${project_dir}/common/clusters/media-input/MediaInputManager.cpp", "${project_dir}/common/clusters/media-playback/MediaPlaybackManager.cpp", + "${project_dir}/common/clusters/refrigerator-and-temperature-controlled-cabinet-mode/tcc-mode.cpp", "${project_dir}/common/clusters/resource-monitoring/chef-resource-monitoring-delegates.cpp", "${project_dir}/common/clusters/switch/SwitchEventHandler.cpp", "${project_dir}/common/clusters/switch/SwitchManager.cpp", diff --git a/examples/chef/nrfconnect/CMakeLists.txt b/examples/chef/nrfconnect/CMakeLists.txt index 2f5675cc7fe0e1..732398cc1bf728 100644 --- a/examples/chef/nrfconnect/CMakeLists.txt +++ b/examples/chef/nrfconnect/CMakeLists.txt @@ -97,6 +97,7 @@ target_sources(app PRIVATE ${CHEF}/common/clusters/low-power/LowPowerManager.cpp ${CHEF}/common/clusters/media-input/MediaInputManager.cpp ${CHEF}/common/clusters/media-playback/MediaPlaybackManager.cpp + ${CHEF}/common/clusters/refrigerator-and-temperature-controlled-cabinet-mode/tcc-mode.cpp ${CHEF}/common/clusters/resource-monitoring/chef-resource-monitoring-delegates.cpp ${CHEF}/common/clusters/switch/SwitchEventHandler.cpp ${CHEF}/common/clusters/switch/SwitchManager.cpp diff --git a/examples/chef/sample_app_util/matter_device_types.json b/examples/chef/sample_app_util/matter_device_types.json index c8af1528642ae7..3390dec8a584d7 100644 --- a/examples/chef/sample_app_util/matter_device_types.json +++ b/examples/chef/sample_app_util/matter_device_types.json @@ -46,6 +46,7 @@ "Temperature Controlled Cabinet": 113, "Room Air Conditioner": 114, "Laundry Washer": 115, + "Laundry Dryer": 124, "Robotic Vacuum Cleaner": 116, "Dishwasher": 117, "Smoke CO Alarm": 118, diff --git a/examples/chip-tool/commands/discover/Commands.h b/examples/chip-tool/commands/discover/Commands.h index d308d4ab75b430..d70191f8bc8245 100644 --- a/examples/chip-tool/commands/discover/Commands.h +++ b/examples/chip-tool/commands/discover/Commands.h @@ -84,6 +84,7 @@ void registerCommandsDiscover(Commands & commands, CredentialIssuerCommands * cr make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), }; diff --git a/examples/chip-tool/commands/discover/DiscoverCommissionablesCommand.cpp b/examples/chip-tool/commands/discover/DiscoverCommissionablesCommand.cpp index ad5e7feaf7f948..35d833e5ad678a 100644 --- a/examples/chip-tool/commands/discover/DiscoverCommissionablesCommand.cpp +++ b/examples/chip-tool/commands/discover/DiscoverCommissionablesCommand.cpp @@ -122,3 +122,11 @@ CHIP_ERROR DiscoverCommissionableByDeviceTypeCommand::RunCommand() chip::Dnssd::DiscoveryFilter filter(chip::Dnssd::DiscoveryFilterType::kDeviceType, mDeviceType); return mCommissioner->DiscoverCommissionableNodes(filter); } + +CHIP_ERROR DiscoverCommissionableByInstanceNameCommand::RunCommand() +{ + mCommissioner = &CurrentCommissioner(); + mCommissioner->RegisterDeviceDiscoveryDelegate(this); + chip::Dnssd::DiscoveryFilter filter(chip::Dnssd::DiscoveryFilterType::kInstanceName, mInstanceName); + return mCommissioner->DiscoverCommissionableNodes(filter); +} diff --git a/examples/chip-tool/commands/discover/DiscoverCommissionablesCommand.h b/examples/chip-tool/commands/discover/DiscoverCommissionablesCommand.h index d1fec307eac19e..2ba81b6404efc8 100644 --- a/examples/chip-tool/commands/discover/DiscoverCommissionablesCommand.h +++ b/examples/chip-tool/commands/discover/DiscoverCommissionablesCommand.h @@ -159,3 +159,19 @@ class DiscoverCommissionableByDeviceTypeCommand : public DiscoverCommissionables // TODO: possibly 32-bit - see spec issue #3226 uint16_t mDeviceType; }; + +class DiscoverCommissionableByInstanceNameCommand : public DiscoverCommissionablesCommandBase +{ +public: + DiscoverCommissionableByInstanceNameCommand(CredentialIssuerCommands * credsIssuerConfig) : + DiscoverCommissionablesCommandBase("find-commissionable-by-instance-name", credsIssuerConfig) + { + AddArgument("value", &mInstanceName); + } + + /////////// CHIPCommand Interface ///////// + CHIP_ERROR RunCommand() override; + +private: + char * mInstanceName; +}; diff --git a/examples/chip-tool/commands/pairing/OpenCommissioningWindowCommand.cpp b/examples/chip-tool/commands/pairing/OpenCommissioningWindowCommand.cpp index bc80e568b2bd7f..8d04ca7b94290c 100644 --- a/examples/chip-tool/commands/pairing/OpenCommissioningWindowCommand.cpp +++ b/examples/chip-tool/commands/pairing/OpenCommissioningWindowCommand.cpp @@ -49,7 +49,7 @@ CHIP_ERROR OpenCommissioningWindowCommand::RunCommand() } void OpenCommissioningWindowCommand::OnOpenCommissioningWindowResponse(void * context, NodeId remoteId, CHIP_ERROR err, - chip::SetupPayload payload) + SetupPayload payload) { LogErrorOnFailure(err); diff --git a/examples/chip-tool/commands/pairing/PairingCommand.cpp b/examples/chip-tool/commands/pairing/PairingCommand.cpp index b9034cc1285d49..7e762bd690c292 100644 --- a/examples/chip-tool/commands/pairing/PairingCommand.cpp +++ b/examples/chip-tool/commands/pairing/PairingCommand.cpp @@ -151,7 +151,7 @@ CommissioningParameters PairingCommand::GetCommissioningParameters() if (!mICDSymmetricKey.HasValue()) { - chip::Crypto::DRBG_get_bytes(mRandomGeneratedICDSymmetricKey, sizeof(mRandomGeneratedICDSymmetricKey)); + Crypto::DRBG_get_bytes(mRandomGeneratedICDSymmetricKey, sizeof(mRandomGeneratedICDSymmetricKey)); mICDSymmetricKey.SetValue(ByteSpan(mRandomGeneratedICDSymmetricKey)); } if (!mICDCheckInNodeId.HasValue()) @@ -289,7 +289,7 @@ CHIP_ERROR PairingCommand::PairWithMdnsOrBleByIndexWithCode(NodeId remoteId, uin // There is no device with this index that has some resolution data. This could simply // be because the device is a ble device. In this case let's fall back to looking for // a device with this index and some RendezvousParameters. - chip::SetupPayload payload; + SetupPayload payload; bool isQRCode = strncmp(mOnboardingPayload, kQRCodePrefix, strlen(kQRCodePrefix)) == 0; if (isQRCode) { @@ -329,21 +329,21 @@ CHIP_ERROR PairingCommand::PairWithMdns(NodeId remoteId) Dnssd::DiscoveryFilter filter(mFilterType); switch (mFilterType) { - case chip::Dnssd::DiscoveryFilterType::kNone: + case Dnssd::DiscoveryFilterType::kNone: break; - case chip::Dnssd::DiscoveryFilterType::kShortDiscriminator: - case chip::Dnssd::DiscoveryFilterType::kLongDiscriminator: - case chip::Dnssd::DiscoveryFilterType::kCompressedFabricId: - case chip::Dnssd::DiscoveryFilterType::kVendorId: - case chip::Dnssd::DiscoveryFilterType::kDeviceType: + case Dnssd::DiscoveryFilterType::kShortDiscriminator: + case Dnssd::DiscoveryFilterType::kLongDiscriminator: + case Dnssd::DiscoveryFilterType::kCompressedFabricId: + case Dnssd::DiscoveryFilterType::kVendorId: + case Dnssd::DiscoveryFilterType::kDeviceType: filter.code = mDiscoveryFilterCode; break; - case chip::Dnssd::DiscoveryFilterType::kCommissioningMode: + case Dnssd::DiscoveryFilterType::kCommissioningMode: break; - case chip::Dnssd::DiscoveryFilterType::kCommissioner: + case Dnssd::DiscoveryFilterType::kCommissioner: filter.code = 1; break; - case chip::Dnssd::DiscoveryFilterType::kInstanceName: + case Dnssd::DiscoveryFilterType::kInstanceName: filter.code = 0; filter.instanceName = mDiscoveryFilterInstanceName; break; @@ -463,13 +463,13 @@ void PairingCommand::OnReadCommissioningInfo(const Controller::ReadCommissioning void PairingCommand::OnICDRegistrationComplete(ScopedNodeId nodeId, uint32_t icdCounter) { - char icdSymmetricKeyHex[chip::Crypto::kAES_CCM128_Key_Length * 2 + 1]; + char icdSymmetricKeyHex[Crypto::kAES_CCM128_Key_Length * 2 + 1]; - chip::Encoding::BytesToHex(mICDSymmetricKey.Value().data(), mICDSymmetricKey.Value().size(), icdSymmetricKeyHex, - sizeof(icdSymmetricKeyHex), chip::Encoding::HexFlags::kNullTerminate); + Encoding::BytesToHex(mICDSymmetricKey.Value().data(), mICDSymmetricKey.Value().size(), icdSymmetricKeyHex, + sizeof(icdSymmetricKeyHex), Encoding::HexFlags::kNullTerminate); app::ICDClientInfo clientInfo; - clientInfo.check_in_node = chip::ScopedNodeId(mICDCheckInNodeId.Value(), nodeId.GetFabricIndex()); + clientInfo.check_in_node = ScopedNodeId(mICDCheckInNodeId.Value(), nodeId.GetFabricIndex()); clientInfo.peer_node = nodeId; clientInfo.monitored_subject = mICDMonitoredSubject.Value(); clientInfo.start_icd_counter = icdCounter; @@ -505,7 +505,7 @@ void PairingCommand::OnICDStayActiveComplete(ScopedNodeId deviceId, uint32_t pro ChipLogValueX64(deviceId.GetNodeId()), promisedActiveDuration); } -void PairingCommand::OnDiscoveredDevice(const chip::Dnssd::CommissionNodeData & nodeData) +void PairingCommand::OnDiscoveredDevice(const Dnssd::CommissionNodeData & nodeData) { // Ignore nodes with closed commissioning window VerifyOrReturn(nodeData.commissioningMode != 0); @@ -513,7 +513,7 @@ void PairingCommand::OnDiscoveredDevice(const chip::Dnssd::CommissionNodeData & auto & resolutionData = nodeData; const uint16_t port = resolutionData.port; - char buf[chip::Inet::IPAddress::kMaxStringLength]; + char buf[Inet::IPAddress::kMaxStringLength]; resolutionData.ipAddress[0].ToString(buf); ChipLogProgress(chipTool, "Discovered Device: %s:%u", buf, port); @@ -556,20 +556,19 @@ void PairingCommand::OnCurrentFabricRemove(void * context, NodeId nodeId, CHIP_E command->SetCommandExitStatus(err); } -chip::Optional PairingCommand::FailSafeExpiryTimeoutSecs() const +Optional PairingCommand::FailSafeExpiryTimeoutSecs() const { // We don't need to set additional failsafe timeout as we don't ask the final user if he wants to continue - return chip::Optional(); + return Optional(); } -void PairingCommand::OnDeviceAttestationCompleted(chip::Controller::DeviceCommissioner * deviceCommissioner, - chip::DeviceProxy * device, - const chip::Credentials::DeviceAttestationVerifier::AttestationDeviceInfo & info, - chip::Credentials::AttestationVerificationResult attestationResult) +void PairingCommand::OnDeviceAttestationCompleted(Controller::DeviceCommissioner * deviceCommissioner, DeviceProxy * device, + const Credentials::DeviceAttestationVerifier::AttestationDeviceInfo & info, + Credentials::AttestationVerificationResult attestationResult) { // Bypass attestation verification, continue with success auto err = deviceCommissioner->ContinueCommissioningAfterDeviceAttestation( - device, chip::Credentials::AttestationVerificationResult::kSuccess); + device, Credentials::AttestationVerificationResult::kSuccess); if (CHIP_NO_ERROR != err) { SetCommandExitStatus(err); diff --git a/examples/chip-tool/commands/pairing/PairingCommand.h b/examples/chip-tool/commands/pairing/PairingCommand.h index 9965b663ec111c..66c45d5dfe3143 100644 --- a/examples/chip-tool/commands/pairing/PairingCommand.h +++ b/examples/chip-tool/commands/pairing/PairingCommand.h @@ -244,7 +244,7 @@ class PairingCommand : public CHIPCommand, const PairingNetworkType mNetworkType; const chip::Dnssd::DiscoveryFilterType mFilterType; Command::AddressWithInterface mRemoteAddr; - NodeId mNodeId; + NodeId mNodeId = chip::kUndefinedNodeId; chip::Optional mTimeout; chip::Optional mDiscoverOnce; chip::Optional mUseOnlyOnNetworkDiscovery; @@ -266,7 +266,7 @@ class PairingCommand : public CHIPCommand, TypedComplexArgument> mComplex_DSTOffsets; - uint16_t mRemotePort; + uint16_t mRemotePort = 0; // mDiscriminator is only used for some situations, but in those situations // it's mandatory. Track whether we're actually using it; the cases that do // will emplace this optional. @@ -275,15 +275,15 @@ class PairingCommand : public CHIPCommand, // it's mandatory. Track whether we're actually using it; the cases that do // will emplace this optional. std::optional mSetupPINCode; - uint16_t mIndex; + uint16_t mIndex = 0; chip::ByteSpan mOperationalDataset; chip::ByteSpan mSSID; chip::ByteSpan mPassword; - char * mOnboardingPayload; - uint64_t mDiscoveryFilterCode; - char * mDiscoveryFilterInstanceName; + char * mOnboardingPayload = nullptr; + uint64_t mDiscoveryFilterCode = 0; + char * mDiscoveryFilterInstanceName = nullptr; - bool mDeviceIsICD; + bool mDeviceIsICD = false; uint8_t mRandomGeneratedICDSymmetricKey[chip::Crypto::kAES_CCM128_Key_Length]; // For unpair diff --git a/examples/common/pigweed/BUILD.gn b/examples/common/pigweed/BUILD.gn index a7b7d97da32ba6..646b6456107f95 100644 --- a/examples/common/pigweed/BUILD.gn +++ b/examples/common/pigweed/BUILD.gn @@ -80,10 +80,19 @@ pw_proto_library("button_service") { prefix = "button_service" } +pw_proto_library("fabric_sync_common") { + sources = [ "protos/fabric_sync_common.proto" ] + strip_prefix = "protos" + prefix = "fabric_sync_common" +} + pw_proto_library("fabric_admin_service") { sources = [ "protos/fabric_admin_service.proto" ] inputs = [ "protos/fabric_admin_service.options" ] - deps = [ "$dir_pw_protobuf:common_protos" ] + deps = [ + ":fabric_sync_common", + "$dir_pw_protobuf:common_protos", + ] strip_prefix = "protos" prefix = "fabric_admin_service" } @@ -91,7 +100,10 @@ pw_proto_library("fabric_admin_service") { pw_proto_library("fabric_bridge_service") { sources = [ "protos/fabric_bridge_service.proto" ] inputs = [ "protos/fabric_bridge_service.options" ] - deps = [ "$dir_pw_protobuf:common_protos" ] + deps = [ + ":fabric_sync_common", + "$dir_pw_protobuf:common_protos", + ] strip_prefix = "protos" prefix = "fabric_bridge_service" } diff --git a/examples/common/pigweed/protos/fabric_admin_service.proto b/examples/common/pigweed/protos/fabric_admin_service.proto index 4d7b2075a2ed44..19fb76ecadf5ae 100644 --- a/examples/common/pigweed/protos/fabric_admin_service.proto +++ b/examples/common/pigweed/protos/fabric_admin_service.proto @@ -1,12 +1,13 @@ syntax = "proto3"; import 'pw_protobuf_protos/common.proto'; +import 'fabric_sync_common/fabric_sync_common.proto'; package chip.rpc; // Define the message for a synchronized end device with necessary fields message DeviceCommissioningWindowInfo { - uint64 node_id = 1; + ScopedNode id = 1; uint32 commissioning_timeout = 2; uint32 discriminator = 3; uint32 iterations = 4; @@ -25,7 +26,7 @@ message DeviceCommissioningInfo { } message KeepActiveParameters { - uint64 node_id = 1; + ScopedNode id = 1; uint32 stay_active_duration_ms = 2; uint32 timeout_ms = 3; } diff --git a/examples/common/pigweed/protos/fabric_bridge_service.proto b/examples/common/pigweed/protos/fabric_bridge_service.proto index 1c699e6942b358..4e01d4ec5c7e78 100644 --- a/examples/common/pigweed/protos/fabric_bridge_service.proto +++ b/examples/common/pigweed/protos/fabric_bridge_service.proto @@ -1,12 +1,13 @@ syntax = "proto3"; import 'pw_protobuf_protos/common.proto'; +import 'fabric_sync_common/fabric_sync_common.proto'; package chip.rpc; // Define the message for a synchronized end device with necessary fields message SynchronizedDevice { - uint64 node_id = 1; + ScopedNode id = 1; optional string unique_id = 2; optional string vendor_name = 3; @@ -22,12 +23,12 @@ message SynchronizedDevice { } message KeepActiveChanged { - uint64 node_id = 1; + ScopedNode id = 1; uint32 promised_active_duration_ms = 2; } message AdministratorCommissioningChanged { - uint64 node_id = 1; + ScopedNode id = 1; uint32 window_status = 2; optional uint32 opener_fabric_index = 3; optional uint32 opener_vendor_id = 4; diff --git a/examples/common/pigweed/protos/fabric_sync_common.proto b/examples/common/pigweed/protos/fabric_sync_common.proto new file mode 100644 index 00000000000000..95aa87cee147fa --- /dev/null +++ b/examples/common/pigweed/protos/fabric_sync_common.proto @@ -0,0 +1,6 @@ +syntax = "proto3"; + +message ScopedNode { + uint64 node_id = 1; + uint32 fabric_index = 2; +} diff --git a/examples/common/pigweed/rpc_console/py/BUILD.gn b/examples/common/pigweed/rpc_console/py/BUILD.gn index db9f22fe45fff9..01c8bd8293f06e 100644 --- a/examples/common/pigweed/rpc_console/py/BUILD.gn +++ b/examples/common/pigweed/rpc_console/py/BUILD.gn @@ -48,6 +48,7 @@ pw_python_package("chip_rpc") { "${chip_root}/examples/common/pigweed:echo_service.python", "${chip_root}/examples/common/pigweed:fabric_admin_service.python", "${chip_root}/examples/common/pigweed:fabric_bridge_service.python", + "${chip_root}/examples/common/pigweed:fabric_sync_common.python", "${chip_root}/examples/common/pigweed:lighting_service.python", "${chip_root}/examples/common/pigweed:locking_service.python", "${chip_root}/examples/common/pigweed:ot_cli_service.python", diff --git a/examples/common/pigweed/rpc_services/Attributes.h b/examples/common/pigweed/rpc_services/Attributes.h index e246c5361bd281..3ff1200be2edeb 100644 --- a/examples/common/pigweed/rpc_services/Attributes.h +++ b/examples/common/pigweed/rpc_services/Attributes.h @@ -22,6 +22,7 @@ #include "pigweed/rpc_services/internal/StatusUtils.h" #include +#include #include #include #include @@ -32,6 +33,13 @@ #include #include +#if CHIP_CONFIG_USE_DATA_MODEL_INTERFACE +#include +#include +#include +#include +#endif + namespace chip { namespace rpc { @@ -202,7 +210,37 @@ class Attributes : public pw_rpc::nanopb::Attributes::Service writer.Init(tlvBuffer); PW_TRY(ChipErrorToPwStatus(writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, outer))); PW_TRY(ChipErrorToPwStatus(attributeReports.Init(&writer, kReportContextTag))); + +#if CHIP_CONFIG_USE_DATA_MODEL_INTERFACE + // TODO: this assumes a singleton data model provider + app::DataModel::Provider * provider = app::InteractionModelEngine::GetInstance()->GetDataModelProvider(); + + app::DataModel::ReadAttributeRequest request; + request.path = path; + request.operationFlags.Set(app::DataModel::OperationFlags::kInternal); + request.subjectDescriptor = subjectDescriptor; + + std::optional info = provider->GetClusterInfo(path); + if (!info.has_value()) + { + return ::pw::Status::NotFound(); + } + + app::AttributeValueEncoder encoder(attributeReports, subjectDescriptor, path, info->dataVersion, + false /* isFabricFiltered */, nullptr /* attributeEncodingState */); + app::DataModel::ActionReturnStatus result = provider->ReadAttribute(request, encoder); + + if (!result.IsSuccess()) + { + app::DataModel::ActionReturnStatus::StringStorage storage; + ChipLogError(Support, "Failed to read data: %s", result.c_str(storage)); + return ::pw::Status::Internal(); + } + +#else PW_TRY(ChipErrorToPwStatus(app::ReadSingleClusterData(subjectDescriptor, false, path, attributeReports, nullptr))); +#endif + attributeReports.EndOfContainer(); PW_TRY(ChipErrorToPwStatus(writer.EndContainer(outer))); PW_TRY(ChipErrorToPwStatus(writer.Finalize())); diff --git a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter index 05fe9c8efe4a6f..55820ca5377f4f 100644 --- a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter +++ b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -809,6 +816,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/contact-sensor-app/nxp/common/include/AppEvent.h b/examples/contact-sensor-app/nxp/common/include/AppEvent.h index b292afaddf8c18..562c0b4df66dcb 100644 --- a/examples/contact-sensor-app/nxp/common/include/AppEvent.h +++ b/examples/contact-sensor-app/nxp/common/include/AppEvent.h @@ -24,4 +24,5 @@ typedef void (*EventHandler)(const AppEvent &); struct AppEvent { EventHandler Handler; + void * extra; }; diff --git a/examples/contact-sensor-app/nxp/k32w0/BUILD.gn b/examples/contact-sensor-app/nxp/k32w0/BUILD.gn index c51b8787ea2922..f032603d00457b 100644 --- a/examples/contact-sensor-app/nxp/k32w0/BUILD.gn +++ b/examples/contact-sensor-app/nxp/k32w0/BUILD.gn @@ -199,12 +199,17 @@ action("binsign") { output_name = "bignsign.log" outputs = [ "${root_build_dir}/${output_name}" ] + args = [ + "--sdk-root", + rebase_path(k32w0_sdk_root), + ] + if (chip_simple_hash_verification == 1) { - args = [ "--simple-hash" ] + args += [ "--simple-hash" ] } if (chip_enable_ota_requestor) { - args = [ "--ota-enabled" ] + args += [ "--ota-enabled" ] } } diff --git a/examples/contact-sensor-app/nxp/k32w0/args.gni b/examples/contact-sensor-app/nxp/k32w0/args.gni index 1709f1da735d5d..f4b68ae740c40c 100644 --- a/examples/contact-sensor-app/nxp/k32w0/args.gni +++ b/examples/contact-sensor-app/nxp/k32w0/args.gni @@ -28,7 +28,6 @@ chip_generate_link_map_file = true chip_enable_icd_server = true chip_enable_icd_lit = false -icd_enforce_sit_slow_poll_limit = true chip_persist_subscriptions = true chip_subscription_timeout_resumption = true diff --git a/examples/contact-sensor-app/nxp/k32w1/BUILD.gn b/examples/contact-sensor-app/nxp/k32w1/BUILD.gn index 8e215d4c7d6517..1b57e5f3cf9061 100644 --- a/examples/contact-sensor-app/nxp/k32w1/BUILD.gn +++ b/examples/contact-sensor-app/nxp/k32w1/BUILD.gn @@ -149,6 +149,11 @@ mcxw71_k32w1_executable("contact_sensor_app") { "${common_example_dir}/clusters/source/ZclCallbacks.cpp", "${common_example_dir}/device_callbacks/source/CommonDeviceCallbacks.cpp", "${common_example_dir}/device_manager/source/CHIPDeviceManager.cpp", + "${common_example_dir}/matter_button/source/ButtonApp.cpp", + "${common_example_dir}/matter_button/source/ButtonBle.cpp", + "${common_example_dir}/matter_button/source/ButtonManager.cpp", + "${common_example_dir}/matter_button/source/ButtonRegistrationAppAndBle.cpp", + "${common_example_dir}/matter_button/source/ButtonWithTimer.cpp", "${common_example_dir}/operational_keystore/source/OperationalKeystoreS200.cpp", "${example_platform_dir}/factory_data/source/AppFactoryDataExample.cpp", ] @@ -193,10 +198,7 @@ mcxw71_k32w1_executable("contact_sensor_app") { "${example_platform_dir}/button", ] - sources += [ - "${example_platform_dir}/button/ButtonManager.cpp", - "${example_platform_dir}/clusters/Identify.cpp", - ] + sources += [ "${example_platform_dir}/clusters/Identify.cpp" ] if (chip_enable_ota_requestor) { sources += [ "${example_platform_dir}/ota/OtaUtils.cpp" ] diff --git a/examples/contact-sensor-app/nxp/k32w1/args.gni b/examples/contact-sensor-app/nxp/k32w1/args.gni index 98372f4b8261e4..e5654bdbc707c6 100644 --- a/examples/contact-sensor-app/nxp/k32w1/args.gni +++ b/examples/contact-sensor-app/nxp/k32w1/args.gni @@ -32,7 +32,6 @@ chip_with_lwip = false chip_enable_icd_server = true chip_enable_icd_lit = false chip_enable_icd_dsls = false -icd_enforce_sit_slow_poll_limit = true chip_persist_subscriptions = true chip_subscription_timeout_resumption = true diff --git a/examples/contact-sensor-app/nxp/mcxw71/BUILD.gn b/examples/contact-sensor-app/nxp/mcxw71/BUILD.gn index cf22ec5c658509..8bba2393f8fc43 100644 --- a/examples/contact-sensor-app/nxp/mcxw71/BUILD.gn +++ b/examples/contact-sensor-app/nxp/mcxw71/BUILD.gn @@ -148,6 +148,11 @@ mcxw71_k32w1_executable("contact_sensor_app") { "${common_example_dir}/clusters/source/ZclCallbacks.cpp", "${common_example_dir}/device_callbacks/source/CommonDeviceCallbacks.cpp", "${common_example_dir}/device_manager/source/CHIPDeviceManager.cpp", + "${common_example_dir}/matter_button/source/ButtonApp.cpp", + "${common_example_dir}/matter_button/source/ButtonBle.cpp", + "${common_example_dir}/matter_button/source/ButtonManager.cpp", + "${common_example_dir}/matter_button/source/ButtonRegistrationAppAndBle.cpp", + "${common_example_dir}/matter_button/source/ButtonWithTimer.cpp", "${common_example_dir}/operational_keystore/source/OperationalKeystoreS200.cpp", "${example_platform_dir}/factory_data/source/AppFactoryDataExample.cpp", ] @@ -192,10 +197,7 @@ mcxw71_k32w1_executable("contact_sensor_app") { "${example_platform_dir}/button", ] - sources += [ - "${example_platform_dir}/button/ButtonManager.cpp", - "${example_platform_dir}/clusters/Identify.cpp", - ] + sources += [ "${example_platform_dir}/clusters/Identify.cpp" ] if (chip_enable_ota_requestor) { sources += [ "${example_platform_dir}/ota/OtaUtils.cpp" ] diff --git a/examples/contact-sensor-app/nxp/mcxw71/args.gni b/examples/contact-sensor-app/nxp/mcxw71/args.gni index 72634a2308d04b..6e6015933d6cf2 100644 --- a/examples/contact-sensor-app/nxp/mcxw71/args.gni +++ b/examples/contact-sensor-app/nxp/mcxw71/args.gni @@ -30,7 +30,6 @@ chip_with_lwip = false chip_enable_icd_server = true chip_enable_icd_lit = false -icd_enforce_sit_slow_poll_limit = true chip_persist_subscriptions = true chip_subscription_timeout_resumption = true diff --git a/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter b/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter index 25deeedf5ee495..a5e91d91f11783 100644 --- a/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter +++ b/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -732,6 +739,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2008,6 +2016,7 @@ endpoint 0 { ram attribute userActiveModeTriggerHint default = 4096; ram attribute userActiveModeTriggerInstruction default = "Push setup button for Active Mode"; ram attribute operatingMode default = 0; + callback attribute maximumCheckInBackOff; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; diff --git a/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.zap b/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.zap index 31c3577edca1a3..f2e73f974cc087 100644 --- a/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.zap +++ b/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.zap @@ -3726,6 +3726,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "MaximumCheckInBackOff", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, diff --git a/examples/contact-sensor-app/nxp/zap-sit/contact-sensor-app.matter b/examples/contact-sensor-app/nxp/zap-sit/contact-sensor-app.matter index e60ea683965225..36db43dcb6487c 100644 --- a/examples/contact-sensor-app/nxp/zap-sit/contact-sensor-app.matter +++ b/examples/contact-sensor-app/nxp/zap-sit/contact-sensor-app.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -732,6 +739,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/contact-sensor-app/telink/README.md b/examples/contact-sensor-app/telink/README.md index cbceff71361ccf..27d5721953c261 100755 --- a/examples/contact-sensor-app/telink/README.md +++ b/examples/contact-sensor-app/telink/README.md @@ -142,10 +142,10 @@ feature for another Telink example: After build application with enabled OTA feature, use next binary files: -- zephyr.bin - main binary to flash PCB (Use at least 2MB PCB). -- zephyr-ota.bin - binary for OTA Provider +- merged.bin - main binary to flash PCB (Use at least 2MB PCB). +- matter.ota - binary for OTA Provider -All binaries has the same SW version. To test OTA “zephyr-ota.bin” should have +All binaries has the same SW version. To test OTA “matter.ota” should have higher SW version than base SW. Set CONFIG_CHIP_DEVICE_SOFTWARE_VERSION=2 in corresponding “prj.conf” configuration file. @@ -160,7 +160,7 @@ Usage of OTA: - Run the Linux OTA Provider with OTA image. ``` - ./chip-ota-provider-app -f zephyr-ota.bin + ./chip-ota-provider-app -f matter.ota ``` - Provision the Linux OTA Provider using chip-tool diff --git a/examples/darwin-framework-tool/BUILD.gn b/examples/darwin-framework-tool/BUILD.gn index 665dccf4848df4..2c202475a70ea9 100644 --- a/examples/darwin-framework-tool/BUILD.gn +++ b/examples/darwin-framework-tool/BUILD.gn @@ -43,6 +43,9 @@ declare_args() { # Disable generating compiler database by default generate_compilation_database = false + + # Enable automatic leak checks before the application exits + enable_leak_checking = false } sdk = "macosx" @@ -219,6 +222,7 @@ executable("darwin-framework-tool") { "commands/provider/OTASoftwareUpdateInteractive.mm", "commands/storage/Commands.h", "commands/storage/StorageManagementCommand.mm", + "debug/LeakChecker.mm", "logging/logging.mm", "main.mm", ] @@ -280,6 +284,10 @@ executable("darwin-framework-tool") { defines += [ "MTR_ENABLE_PROVISIONAL=1" ] } + if (enable_leak_checking) { + defines += [ "DFT_ENABLE_LEAK_CHECKING=1" ] + } + public_configs = [ ":config" ] output_dir = root_out_dir diff --git a/examples/darwin-framework-tool/commands/bdx/DownloadLogCommand.mm b/examples/darwin-framework-tool/commands/bdx/DownloadLogCommand.mm index b105b6cb3098c8..e2047ec4c39b99 100644 --- a/examples/darwin-framework-tool/commands/bdx/DownloadLogCommand.mm +++ b/examples/darwin-framework-tool/commands/bdx/DownloadLogCommand.mm @@ -31,7 +31,7 @@ auto * device = [MTRDevice deviceWithNodeID:@(mNodeId) controller:commissioner]; auto logType = static_cast(mLogType); - auto queue = dispatch_queue_create("com.chip.bdx.downloader", DISPATCH_QUEUE_SERIAL); + auto queue = dispatch_queue_create("com.chip.bdx.downloader", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); bool shouldWaitForDownload = !mIsAsyncCommand.ValueOr(false); mIsAsyncCommand.ClearValue(); diff --git a/examples/darwin-framework-tool/commands/clusters/ClusterCommandBridge.h b/examples/darwin-framework-tool/commands/clusters/ClusterCommandBridge.h index 87022306220e30..4512bf219afd31 100644 --- a/examples/darwin-framework-tool/commands/clusters/ClusterCommandBridge.h +++ b/examples/darwin-framework-tool/commands/clusters/ClusterCommandBridge.h @@ -71,7 +71,7 @@ class ClusterCommand : public ModelCommand { { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); while (repeatCount--) { [device invokeCommandWithEndpointID:[NSNumber numberWithUnsignedShort:endpointId] diff --git a/examples/darwin-framework-tool/commands/clusters/ReportCommandBridge.h b/examples/darwin-framework-tool/commands/clusters/ReportCommandBridge.h index 97e480ac974844..c0cbdab84046b6 100644 --- a/examples/darwin-framework-tool/commands/clusters/ReportCommandBridge.h +++ b/examples/darwin-framework-tool/commands/clusters/ReportCommandBridge.h @@ -52,7 +52,7 @@ class ReadAttribute : public ModelCommand { CHIP_ERROR SendCommand(MTRBaseDevice * _Nonnull device, chip::EndpointId endpointId) override { - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); MTRReadParams * params = [[MTRReadParams alloc] init]; if (mFabricFiltered.HasValue()) { params.filterByFabric = mFabricFiltered.Value(); @@ -124,7 +124,7 @@ class SubscribeAttribute : public ModelCommand { CHIP_ERROR SendCommand(MTRBaseDevice * _Nonnull device, chip::EndpointId endpointId) override { - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mFabricFiltered.HasValue()) { @@ -214,7 +214,7 @@ class SubscribeEvent : public ModelCommand { CHIP_ERROR SendCommand(MTRBaseDevice * _Nonnull device, chip::EndpointId endpointId) override { - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); MTRSubscribeParams * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mEventNumber.HasValue()) { @@ -324,7 +324,7 @@ class ReadEvent : public ModelCommand { CHIP_ERROR SendCommand(MTRBaseDevice * _Nonnull device, chip::EndpointId endpointId) override { - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); MTRReadParams * params = [[MTRReadParams alloc] init]; if (mFabricFiltered.HasValue()) { params.filterByFabric = mFabricFiltered.Value(); diff --git a/examples/darwin-framework-tool/commands/clusters/WriteAttributeCommandBridge.h b/examples/darwin-framework-tool/commands/clusters/WriteAttributeCommandBridge.h index c6ba60f86388f7..e771316adf01bf 100644 --- a/examples/darwin-framework-tool/commands/clusters/WriteAttributeCommandBridge.h +++ b/examples/darwin-framework-tool/commands/clusters/WriteAttributeCommandBridge.h @@ -72,7 +72,8 @@ class WriteAttribute : public ModelCommand { CHIP_ERROR SendCommand(MTRBaseDevice * _Nonnull device, chip::EndpointId endpointId, chip::ClusterId clusterId, chip::AttributeId attributeId, id _Nonnull value) { - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); + [device writeAttributeWithEndpointID:[NSNumber numberWithUnsignedShort:endpointId] clusterID:[NSNumber numberWithUnsignedInteger:clusterId] diff --git a/examples/darwin-framework-tool/commands/discover/DiscoverCommissionablesCommand.mm b/examples/darwin-framework-tool/commands/discover/DiscoverCommissionablesCommand.mm index aef3f3969bee1b..b1d922f60fdcd0 100644 --- a/examples/darwin-framework-tool/commands/discover/DiscoverCommissionablesCommand.mm +++ b/examples/darwin-framework-tool/commands/discover/DiscoverCommissionablesCommand.mm @@ -18,7 +18,7 @@ #include "DiscoverCommissionablesCommand.h" NSMutableArray * gDiscoveredDevices = [[NSMutableArray alloc] init]; -auto gDispatchQueue = dispatch_queue_create("com.chip.discover", DISPATCH_QUEUE_SERIAL); +auto gDispatchQueue = dispatch_queue_create("com.chip.discover", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); @interface DeviceScannerDelegate : NSObject - (void)controller:(MTRDeviceController *)controller didFindCommissionableDevice:(MTRCommissionableBrowserResult *)device; diff --git a/examples/darwin-framework-tool/commands/pairing/OpenCommissioningWindowCommand.mm b/examples/darwin-framework-tool/commands/pairing/OpenCommissioningWindowCommand.mm index b774b1a971b48a..43d18c25526fc4 100644 --- a/examples/darwin-framework-tool/commands/pairing/OpenCommissioningWindowCommand.mm +++ b/examples/darwin-framework-tool/commands/pairing/OpenCommissioningWindowCommand.mm @@ -23,7 +23,7 @@ CHIP_ERROR OpenCommissioningWindowCommand::RunCommand() { - mWorkQueue = dispatch_queue_create("com.chip.open_commissioning_window", DISPATCH_QUEUE_SERIAL); + mWorkQueue = dispatch_queue_create("com.chip.open_commissioning_window", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); auto * controller = CurrentCommissioner(); auto * device = [MTRDevice deviceWithNodeID:mNodeId deviceController:controller]; diff --git a/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.mm b/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.mm index b1902677ed14ae..1a060819b5700e 100644 --- a/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.mm +++ b/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.mm @@ -83,7 +83,7 @@ - (void)deviceAttestationCompletedForController:(MTRDeviceController *)controlle MTRDeviceController * commissioner = CurrentCommissioner(); [deviceControllerDelegate setCommissioner:commissioner]; - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.pairing", DISPATCH_QUEUE_SERIAL); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.pairing", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); [commissioner setDeviceControllerDelegate:deviceControllerDelegate queue:callbackQueue]; } @@ -156,7 +156,7 @@ - (void)deviceAttestationCompletedForController:(MTRDeviceController *)controlle void PairingCommandBridge::Unpair() { - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip-tool.command", DISPATCH_QUEUE_SERIAL); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip-tool.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); auto * device = BaseDeviceWithNodeId(mNodeId); ChipLogProgress(chipTool, "Attempting to unpair device %llu", mNodeId); diff --git a/examples/darwin-framework-tool/debug/LeakChecker.h b/examples/darwin-framework-tool/debug/LeakChecker.h new file mode 100644 index 00000000000000..c83ed64910cbbc --- /dev/null +++ b/examples/darwin-framework-tool/debug/LeakChecker.h @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#pragma once + +/* + * This function performs a memory leak check if the build flag `enable_leak_checking` is set to true + * If leaks are detected, it overrides the provided exit code with `EXIT_FAILURE`. + * + * @param exitCode The initial exit code to return if no leaks are detected or if leak checking is disabled. + * @return `EXIT_FAILURE` if leaks are detected and leak checking is enabled; otherwise, the original `exitCode`. + */ +int ConditionalLeaksCheck(int exitCode); diff --git a/examples/darwin-framework-tool/debug/LeakChecker.mm b/examples/darwin-framework-tool/debug/LeakChecker.mm new file mode 100644 index 00000000000000..72a441420abc22 --- /dev/null +++ b/examples/darwin-framework-tool/debug/LeakChecker.mm @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "LeakChecker.h" + +#import +#include // For getpid() + +@interface LeakChecker : NSObject +- (BOOL)hasMemoryLeaks; +@end + +@implementation LeakChecker + +- (BOOL)hasMemoryLeaks +{ + pid_t pid = getpid(); + auto * pidString = [NSString stringWithFormat:@"%d", pid]; + + auto * task = [[NSTask alloc] init]; + task.launchPath = @"/usr/bin/leaks"; + task.arguments = @[ pidString ]; + + auto * pipe = [NSPipe pipe]; + task.standardOutput = pipe; + task.standardError = pipe; + + NSFileHandle * fileHandle = [pipe fileHandleForReading]; + [task launch]; + [task waitUntilExit]; + + int exitCode = [task terminationStatus]; + if (exitCode) { + NSData * data = [fileHandle readDataToEndOfFile]; + NSString * output = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; + NSLog(@"%@", output); + return YES; + } + + return NO; +} + +@end + +int ConditionalLeaksCheck(int exitCode) +{ +#ifdef DFT_ENABLE_LEAK_CHECKING + auto * leakChecker = [[LeakChecker alloc] init]; + if ([leakChecker hasMemoryLeaks]) { + return EXIT_FAILURE; + } +#endif // DFT_ENABLE_LEAK_CHECKING + + return exitCode; +} diff --git a/examples/darwin-framework-tool/main.mm b/examples/darwin-framework-tool/main.mm index 5f31cb6abf1cd1..ad31cfe32ee1cc 100644 --- a/examples/darwin-framework-tool/main.mm +++ b/examples/darwin-framework-tool/main.mm @@ -18,6 +18,7 @@ #import +#import "debug/LeakChecker.h" #import "logging/logging.h" #include "commands/bdx/Commands.h" @@ -35,6 +36,7 @@ int main(int argc, const char * argv[]) { + int exitCode = EXIT_SUCCESS; @autoreleasepool { dft::logging::Setup(); @@ -49,6 +51,7 @@ int main(int argc, const char * argv[]) registerCommandsStorage(commands); registerCommandsConfiguration(commands); registerClusters(commands); - return commands.Run(argc, (char **) argv); + exitCode = commands.Run(argc, (char **) argv); } + return ConditionalLeaksCheck(exitCode); } diff --git a/examples/darwin-framework-tool/templates/commands.zapt b/examples/darwin-framework-tool/templates/commands.zapt index b4fe946cf58258..3b80f653c82a14 100644 --- a/examples/darwin-framework-tool/templates/commands.zapt +++ b/examples/darwin-framework-tool/templates/commands.zapt @@ -65,7 +65,7 @@ public: ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); __auto_type * cluster = [[MTRBaseCluster{{asUpperCamelCase parent.name preserveAcronyms=true}} alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTR{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase name preserveAcronyms=true}}Params alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -159,7 +159,7 @@ public: ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); __auto_type * cluster = [[MTRBase{{>cluster}} alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; {{#if_is_fabric_scoped_struct type}} __auto_type * params = [[MTRReadParams alloc] init]; @@ -217,7 +217,7 @@ public: constexpr chip::AttributeId attributeId = chip::app::Clusters::{{asUpperCamelCase parent.name}}::Attributes::{{asUpperCamelCase name}}::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); __auto_type * cluster = [[MTRBase{{>cluster}} alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; @@ -290,7 +290,7 @@ public: constexpr chip::CommandId attributeId = chip::app::Clusters::{{asUpperCamelCase parent.name}}::Attributes::{{asUpperCamelCase name}}::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); __auto_type * cluster = [[MTRBase{{>cluster}} alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { diff --git a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter index 0c7c4044810c6b..6ee107a38f063e 100644 --- a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter +++ b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -702,6 +709,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/energy-management-app/energy-management-common/energy-management-app.matter b/examples/energy-management-app/energy-management-common/energy-management-app.matter index 3dae5dc5d7a88f..a8a10075efec17 100644 --- a/examples/energy-management-app/energy-management-common/energy-management-app.matter +++ b/examples/energy-management-app/energy-management-common/energy-management-app.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -924,6 +931,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/fabric-admin/commands/common/CHIPCommand.cpp b/examples/fabric-admin/commands/common/CHIPCommand.cpp index b18eb9f2de472a..c23ea82f202cf7 100644 --- a/examples/fabric-admin/commands/common/CHIPCommand.cpp +++ b/examples/fabric-admin/commands/common/CHIPCommand.cpp @@ -182,7 +182,7 @@ CHIP_ERROR CHIPCommand::MaybeSetUpStack() mCredIssuerCmds->SetCredentialIssuerOption(CredentialIssuerCommands::CredentialIssuerOptions::kAllowTestCdSigningKey, allowTestCdSigningKey); - PairingManager::Instance().Init(&CurrentCommissioner()); + ReturnLogErrorOnFailure(PairingManager::Instance().Init(&CurrentCommissioner(), mCredIssuerCmds)); return CHIP_NO_ERROR; } diff --git a/examples/fabric-admin/commands/common/CHIPCommand.h b/examples/fabric-admin/commands/common/CHIPCommand.h index abd68f6344ea44..79d1fcb0fe5efd 100644 --- a/examples/fabric-admin/commands/common/CHIPCommand.h +++ b/examples/fabric-admin/commands/common/CHIPCommand.h @@ -120,6 +120,8 @@ class CHIPCommand : public Command StopWaiting(); } + static chip::app::DefaultICDClientStorage sICDClientStorage; + protected: // Will be called in a setting in which it's safe to touch the CHIP // stack. The rules for Run() are as follows: @@ -167,7 +169,6 @@ class CHIPCommand : public Command static chip::Crypto::RawKeySessionKeystore sSessionKeystore; static chip::Credentials::GroupDataProviderImpl sGroupDataProvider; - static chip::app::DefaultICDClientStorage sICDClientStorage; static chip::app::CheckInHandler sCheckInHandler; CredentialIssuerCommands * mCredIssuerCmds; diff --git a/examples/fabric-admin/commands/fabric-sync/FabricSyncCommand.cpp b/examples/fabric-admin/commands/fabric-sync/FabricSyncCommand.cpp index 6e1b198ad9e924..879d28cd156956 100644 --- a/examples/fabric-admin/commands/fabric-sync/FabricSyncCommand.cpp +++ b/examples/fabric-admin/commands/fabric-sync/FabricSyncCommand.cpp @@ -30,15 +30,6 @@ using namespace ::chip; -namespace { - -void CheckFabricBridgeSynchronizationSupport(intptr_t ignored) -{ - DeviceMgr().ReadSupportedDeviceCategories(); -} - -} // namespace - void FabricSyncAddBridgeCommand::OnCommissioningComplete(NodeId deviceId, CHIP_ERROR err) { if (mBridgeNodeId != deviceId) @@ -73,7 +64,7 @@ void FabricSyncAddBridgeCommand::OnCommissioningComplete(NodeId deviceId, CHIP_E // // Note: The Fabric-Admin MUST NOT send the RequestCommissioningApproval command // if the remote Fabric-Bridge lacks Fabric Synchronization support. - DeviceLayer::PlatformMgr().ScheduleWork(CheckFabricBridgeSynchronizationSupport, 0); + DeviceLayer::SystemLayer().ScheduleLambda([]() { DeviceMgr().ReadSupportedDeviceCategories(); }); } } else @@ -94,15 +85,8 @@ CHIP_ERROR FabricSyncAddBridgeCommand::RunCommand(NodeId remoteId) return CHIP_NO_ERROR; } - PairingCommand * pairingCommand = static_cast(CommandMgr().GetCommandByName("pairing", "already-discovered")); + PairingManager::Instance().SetCommissioningDelegate(this); - if (pairingCommand == nullptr) - { - ChipLogError(NotSpecified, "Pairing already-discovered command is not available"); - return CHIP_ERROR_NOT_IMPLEMENTED; - } - - pairingCommand->RegisterCommissioningDelegate(this); mBridgeNodeId = remoteId; DeviceMgr().PairRemoteFabricBridge(remoteId, mSetupPINCode, reinterpret_cast(mRemoteAddr.data()), mRemotePort); @@ -146,16 +130,7 @@ CHIP_ERROR FabricSyncRemoveBridgeCommand::RunCommand() mBridgeNodeId = bridgeNodeId; - PairingCommand * pairingCommand = static_cast(CommandMgr().GetCommandByName("pairing", "unpair")); - - if (pairingCommand == nullptr) - { - ChipLogError(NotSpecified, "Pairing unpair command is not available"); - return CHIP_ERROR_NOT_IMPLEMENTED; - } - - pairingCommand->RegisterPairingDelegate(this); - + PairingManager::Instance().SetPairingDelegate(this); DeviceMgr().UnpairRemoteFabricBridge(); return CHIP_NO_ERROR; @@ -203,10 +178,7 @@ CHIP_ERROR FabricSyncAddLocalBridgeCommand::RunCommand(NodeId deviceId) return CHIP_NO_ERROR; } - PairingCommand * pairingCommand = static_cast(CommandMgr().GetCommandByName("pairing", "already-discovered")); - VerifyOrDie(pairingCommand != nullptr); - - pairingCommand->RegisterCommissioningDelegate(this); + PairingManager::Instance().SetCommissioningDelegate(this); mLocalBridgeNodeId = deviceId; if (mSetupPINCode.HasValue()) @@ -259,16 +231,7 @@ CHIP_ERROR FabricSyncRemoveLocalBridgeCommand::RunCommand() mLocalBridgeNodeId = bridgeNodeId; - PairingCommand * pairingCommand = static_cast(CommandMgr().GetCommandByName("pairing", "unpair")); - - if (pairingCommand == nullptr) - { - ChipLogError(NotSpecified, "Pairing unpair command is not available"); - return CHIP_ERROR_NOT_IMPLEMENTED; - } - - pairingCommand->RegisterPairingDelegate(this); - + PairingManager::Instance().SetPairingDelegate(this); DeviceMgr().UnpairLocalFabricBridge(); return CHIP_NO_ERROR; @@ -287,15 +250,7 @@ void FabricSyncDeviceCommand::OnCommissioningWindowOpened(NodeId deviceId, CHIP_ { NodeId nodeId = DeviceMgr().GetNextAvailableNodeId(); - PairingCommand * pairingCommand = static_cast(CommandMgr().GetCommandByName("pairing", "code")); - - if (pairingCommand == nullptr) - { - ChipLogError(NotSpecified, "Pairing code command is not available"); - return; - } - - pairingCommand->RegisterCommissioningDelegate(this); + PairingManager::Instance().SetCommissioningDelegate(this); mAssignedNodeId = nodeId; usleep(kCommissionPrepareTimeMs * 1000); diff --git a/examples/fabric-admin/commands/fabric-sync/FabricSyncCommand.h b/examples/fabric-admin/commands/fabric-sync/FabricSyncCommand.h index e80f10133853f7..16ee40e5b40f3e 100644 --- a/examples/fabric-admin/commands/fabric-sync/FabricSyncCommand.h +++ b/examples/fabric-admin/commands/fabric-sync/FabricSyncCommand.h @@ -19,12 +19,10 @@ #pragma once #include -#include #include // Constants constexpr uint32_t kCommissionPrepareTimeMs = 500; -constexpr uint16_t kMaxManualCodeLength = 21; class FabricSyncAddBridgeCommand : public CHIPCommand, public CommissioningDelegate { diff --git a/examples/fabric-admin/commands/pairing/PairingCommand.cpp b/examples/fabric-admin/commands/pairing/PairingCommand.cpp index 2e1cec184c2e3e..37578472b70fbd 100644 --- a/examples/fabric-admin/commands/pairing/PairingCommand.cpp +++ b/examples/fabric-admin/commands/pairing/PairingCommand.cpp @@ -30,7 +30,6 @@ #include #include #include -#include #include @@ -41,28 +40,6 @@ using namespace ::chip; using namespace ::chip::Controller; -namespace { - -CHIP_ERROR GetPayload(const char * setUpCode, SetupPayload & payload) -{ - VerifyOrReturnValue(setUpCode, CHIP_ERROR_INVALID_ARGUMENT); - bool isQRCode = strncmp(setUpCode, kQRCodePrefix, strlen(kQRCodePrefix)) == 0; - if (isQRCode) - { - ReturnErrorOnFailure(QRCodeSetupPayloadParser(setUpCode).populatePayload(payload)); - VerifyOrReturnError(payload.isValidQRCodePayload(), CHIP_ERROR_INVALID_ARGUMENT); - } - else - { - ReturnErrorOnFailure(ManualSetupPayloadParser(setUpCode).populatePayload(payload)); - VerifyOrReturnError(payload.isValidManualCode(), CHIP_ERROR_INVALID_ARGUMENT); - } - - return CHIP_NO_ERROR; -} - -} // namespace - CHIP_ERROR PairingCommand::RunCommand() { CurrentCommissioner().RegisterPairingDelegate(this); @@ -128,7 +105,10 @@ CommissioningParameters PairingCommand::GetCommissioningParameters() { auto params = CommissioningParameters(); params.SetSkipCommissioningComplete(mSkipCommissioningComplete.ValueOr(false)); - params.SetDeviceAttestationDelegate(this); + if (mBypassAttestationVerifier.ValueOr(false)) + { + params.SetDeviceAttestationDelegate(this); + } switch (mNetworkType) { @@ -442,12 +422,6 @@ void PairingCommand::OnCommissioningComplete(NodeId nodeId, CHIP_ERROR err) ChipLogProgress(NotSpecified, "Device commissioning Failure: %s", ErrorStr(err)); } - if (mCommissioningDelegate) - { - mCommissioningDelegate->OnCommissioningComplete(nodeId, err); - this->UnregisterCommissioningDelegate(); - } - SetCommandExitStatus(err); } @@ -567,7 +541,8 @@ void PairingCommand::OnCurrentFabricRemove(void * context, NodeId nodeId, CHIP_E #if defined(PW_RPC_ENABLED) app::InteractionModelEngine::GetInstance()->ShutdownSubscriptions(command->CurrentCommissioner().GetFabricIndex(), nodeId); - RemoveSynchronizedDevice(nodeId); + ScopedNodeId scopedNodeId(nodeId, command->CurrentCommissioner().GetFabricIndex()); + RemoveSynchronizedDevice(scopedNodeId); #endif } else @@ -575,13 +550,6 @@ void PairingCommand::OnCurrentFabricRemove(void * context, NodeId nodeId, CHIP_E ChipLogProgress(NotSpecified, "Device unpair Failure: " ChipLogFormatX64 " %s", ChipLogValueX64(nodeId), ErrorStr(err)); } - PairingDelegate * pairingDelegate = command->GetPairingDelegate(); - if (pairingDelegate) - { - pairingDelegate->OnDeviceRemoved(nodeId, err); - command->UnregisterPairingDelegate(); - } - command->SetCommandExitStatus(err); } @@ -591,77 +559,13 @@ Optional PairingCommand::FailSafeExpiryTimeoutSecs() const return Optional(); } -bool PairingCommand::ShouldWaitAfterDeviceAttestation() -{ - // If there is a vendor ID and product ID, request OnDeviceAttestationCompleted(). - // Currently this is added in the case that the example is performing reverse commissioning, - // but it would be an improvement to store that explicitly. - // TODO: Issue #35297 - [Fabric Sync] Improve where we get VID and PID when validating CCTRL CommissionNode command - SetupPayload payload; - CHIP_ERROR err = GetPayload(mOnboardingPayload, payload); - return err == CHIP_NO_ERROR && (payload.vendorID != 0 || payload.productID != 0); -} - void PairingCommand::OnDeviceAttestationCompleted(Controller::DeviceCommissioner * deviceCommissioner, DeviceProxy * device, const Credentials::DeviceAttestationVerifier::AttestationDeviceInfo & info, Credentials::AttestationVerificationResult attestationResult) { - SetupPayload payload; - CHIP_ERROR parse_error = GetPayload(mOnboardingPayload, payload); - if (parse_error == CHIP_NO_ERROR && (payload.vendorID != 0 || payload.productID != 0)) - { - if (payload.vendorID == 0 || payload.productID == 0) - { - ChipLogProgress(NotSpecified, - "Failed validation: vendorID or productID must not be 0." - "Requested VID: %u, Requested PID: %u.", - payload.vendorID, payload.productID); - deviceCommissioner->ContinueCommissioningAfterDeviceAttestation( - device, Credentials::AttestationVerificationResult::kInvalidArgument); - return; - } - - if (payload.vendorID != info.BasicInformationVendorId() || payload.productID != info.BasicInformationProductId()) - { - ChipLogProgress(NotSpecified, - "Failed validation of vendorID or productID." - "Requested VID: %u, Requested PID: %u," - "Detected VID: %u, Detected PID %u.", - payload.vendorID, payload.productID, info.BasicInformationVendorId(), info.BasicInformationProductId()); - deviceCommissioner->ContinueCommissioningAfterDeviceAttestation( - device, - payload.vendorID == info.BasicInformationVendorId() - ? Credentials::AttestationVerificationResult::kDacProductIdMismatch - : Credentials::AttestationVerificationResult::kDacVendorIdMismatch); - return; - } - - // NOTE: This will log errors even if the attestion was successful. - auto err = deviceCommissioner->ContinueCommissioningAfterDeviceAttestation(device, attestationResult); - if (CHIP_NO_ERROR != err) - { - SetCommandExitStatus(err); - } - return; - } - - // OnDeviceAttestationCompleted() is called if ShouldWaitAfterDeviceAttestation() returns true - // or if there is an attestation error. The conditions for ShouldWaitAfterDeviceAttestation() have - // already been checked, so the call to OnDeviceAttestationCompleted() was an error. - if (mBypassAttestationVerifier.ValueOr(false)) - { - // Bypass attestation verification, continue with success - auto err = deviceCommissioner->ContinueCommissioningAfterDeviceAttestation( - device, Credentials::AttestationVerificationResult::kSuccess); - if (CHIP_NO_ERROR != err) - { - SetCommandExitStatus(err); - } - return; - } - - // Don't bypass attestation, continue with error. - auto err = deviceCommissioner->ContinueCommissioningAfterDeviceAttestation(device, attestationResult); + // Bypass attestation verification, continue with success + auto err = deviceCommissioner->ContinueCommissioningAfterDeviceAttestation( + device, Credentials::AttestationVerificationResult::kSuccess); if (CHIP_NO_ERROR != err) { SetCommandExitStatus(err); diff --git a/examples/fabric-admin/commands/pairing/PairingCommand.h b/examples/fabric-admin/commands/pairing/PairingCommand.h index 73e717b93757c2..aafd8888dc61a3 100644 --- a/examples/fabric-admin/commands/pairing/PairingCommand.h +++ b/examples/fabric-admin/commands/pairing/PairingCommand.h @@ -45,20 +45,6 @@ enum class PairingNetworkType Thread, }; -class CommissioningDelegate -{ -public: - virtual void OnCommissioningComplete(chip::NodeId deviceId, CHIP_ERROR err) = 0; - virtual ~CommissioningDelegate() = default; -}; - -class PairingDelegate -{ -public: - virtual void OnDeviceRemoved(chip::NodeId deviceId, CHIP_ERROR err) = 0; - virtual ~PairingDelegate() = default; -}; - class PairingCommand : public CHIPCommand, public chip::Controller::DevicePairingDelegate, public chip::Controller::DeviceDiscoveryDelegate, @@ -221,20 +207,10 @@ class PairingCommand : public CHIPCommand, /////////// DeviceAttestationDelegate Interface ///////// chip::Optional FailSafeExpiryTimeoutSecs() const override; - bool ShouldWaitAfterDeviceAttestation() override; void OnDeviceAttestationCompleted(chip::Controller::DeviceCommissioner * deviceCommissioner, chip::DeviceProxy * device, const chip::Credentials::DeviceAttestationVerifier::AttestationDeviceInfo & info, chip::Credentials::AttestationVerificationResult attestationResult) override; - /////////// CommissioningDelegate ///////// - void RegisterCommissioningDelegate(CommissioningDelegate * delegate) { mCommissioningDelegate = delegate; } - void UnregisterCommissioningDelegate() { mCommissioningDelegate = nullptr; } - - /////////// PairingDelegate ///////// - void RegisterPairingDelegate(PairingDelegate * delegate) { mPairingDelegate = delegate; } - void UnregisterPairingDelegate() { mPairingDelegate = nullptr; } - PairingDelegate * GetPairingDelegate() { return mPairingDelegate; } - private: CHIP_ERROR RunInternal(NodeId remoteId); CHIP_ERROR Pair(NodeId remoteId, PeerAddress address); @@ -290,9 +266,6 @@ class PairingCommand : public CHIPCommand, chip::Platform::UniquePtr mCurrentFabricRemover; chip::Callback::Callback mCurrentFabricRemoveCallback; - CommissioningDelegate * mCommissioningDelegate = nullptr; - PairingDelegate * mPairingDelegate = nullptr; - static void OnCurrentFabricRemove(void * context, NodeId remoteNodeId, CHIP_ERROR status); void PersistIcdInfo(); }; diff --git a/examples/fabric-admin/device_manager/DeviceManager.cpp b/examples/fabric-admin/device_manager/DeviceManager.cpp index f34a8443feaa68..8acb5636f4f648 100644 --- a/examples/fabric-admin/device_manager/DeviceManager.cpp +++ b/examples/fabric-admin/device_manager/DeviceManager.cpp @@ -20,7 +20,6 @@ #include #include -#include #include #include @@ -115,7 +114,7 @@ void DeviceManager::RemoveSyncedDevice(NodeId nodeId) ChipLogValueX64(device->GetNodeId()), device->GetEndpointId()); } -void DeviceManager::OpenDeviceCommissioningWindow(NodeId nodeId, uint32_t commissioningTimeoutSec, uint32_t iterations, +void DeviceManager::OpenDeviceCommissioningWindow(NodeId nodeId, uint32_t iterations, uint16_t commissioningTimeoutSec, uint16_t discriminator, const ByteSpan & salt, const ByteSpan & verifier) { ChipLogProgress(NotSpecified, "Opening commissioning window for Node ID: " ChipLogFormatX64, ChipLogValueX64(nodeId)); @@ -153,52 +152,42 @@ void DeviceManager::OpenRemoteDeviceCommissioningWindow(EndpointId remoteEndpoin void DeviceManager::PairRemoteFabricBridge(NodeId nodeId, uint32_t setupPINCode, const char * deviceRemoteIp, uint16_t deviceRemotePort) { - StringBuilder commandBuilder; - - commandBuilder.Add("pairing already-discovered "); - commandBuilder.AddFormat("%lu %d %s %d", nodeId, setupPINCode, deviceRemoteIp, deviceRemotePort); - - PushCommand(commandBuilder.c_str()); + if (PairingManager::Instance().PairDevice(nodeId, setupPINCode, deviceRemoteIp, deviceRemotePort) != CHIP_NO_ERROR) + { + ChipLogError(NotSpecified, "Failed to pair remote fabric bridge " ChipLogFormatX64, ChipLogValueX64(nodeId)); + } } void DeviceManager::PairRemoteDevice(NodeId nodeId, const char * payload) { - StringBuilder commandBuilder; - - commandBuilder.Add("pairing code "); - commandBuilder.AddFormat("%lu %s", nodeId, payload); - - PushCommand(commandBuilder.c_str()); + if (PairingManager::Instance().PairDeviceWithCode(nodeId, payload) != CHIP_NO_ERROR) + { + ChipLogError(NotSpecified, "Failed to pair remote device " ChipLogFormatX64, ChipLogValueX64(nodeId)); + } } void DeviceManager::PairLocalFabricBridge(NodeId nodeId) { - StringBuilder commandBuilder; - - commandBuilder.Add("pairing already-discovered "); - commandBuilder.AddFormat("%lu %d ::1 %d", nodeId, mLocalBridgeSetupPinCode, mLocalBridgePort); - - PushCommand(commandBuilder.c_str()); + if (PairingManager::Instance().PairDevice(nodeId, mLocalBridgeSetupPinCode, "::1", mLocalBridgePort) != CHIP_NO_ERROR) + { + ChipLogError(NotSpecified, "Failed to pair local fabric bridge " ChipLogFormatX64, ChipLogValueX64(nodeId)); + } } void DeviceManager::UnpairRemoteFabricBridge() { - StringBuilder commandBuilder; - - commandBuilder.Add("pairing unpair "); - commandBuilder.AddFormat("%lu", mRemoteBridgeNodeId); - - PushCommand(commandBuilder.c_str()); + if (PairingManager::Instance().UnpairDevice(mRemoteBridgeNodeId) != CHIP_NO_ERROR) + { + ChipLogError(NotSpecified, "Failed to unpair remote bridge device " ChipLogFormatX64, ChipLogValueX64(mRemoteBridgeNodeId)); + } } void DeviceManager::UnpairLocalFabricBridge() { - StringBuilder commandBuilder; - - commandBuilder.Add("pairing unpair "); - commandBuilder.AddFormat("%lu", mLocalBridgeNodeId); - - PushCommand(commandBuilder.c_str()); + if (PairingManager::Instance().UnpairDevice(mLocalBridgeNodeId) != CHIP_NO_ERROR) + { + ChipLogError(NotSpecified, "Failed to unpair local bridge device " ChipLogFormatX64, ChipLogValueX64(mLocalBridgeNodeId)); + } } void DeviceManager::SubscribeRemoteFabricBridge() @@ -390,20 +379,15 @@ void DeviceManager::HandleAttributePartsListUpdate(TLV::TLVReader & data) if (mAutoSyncEnabled) { - StringBuilder commandBuilder; - commandBuilder.Add("pairing unpair "); - commandBuilder.AddFormat("%lu", device->GetNodeId()); - - PairingCommand * pairingCommand = static_cast(CommandMgr().GetCommandByName("pairing", "unpair")); - - if (pairingCommand == nullptr) + NodeId nodeId = device->GetNodeId(); + if (PairingManager::Instance().UnpairDevice(nodeId) != CHIP_NO_ERROR) { - ChipLogError(NotSpecified, "Pairing code command is not available"); - return; + ChipLogError(NotSpecified, "Failed to unpair device " ChipLogFormatX64, ChipLogValueX64(nodeId)); + } + else + { + PairingManager::Instance().SetPairingDelegate(this); } - - pairingCommand->RegisterPairingDelegate(this); - PushCommand(commandBuilder.c_str()); } } } @@ -438,7 +422,7 @@ void DeviceManager::HandleReverseOpenCommissioningWindow(TLV::TLVReader & data) ChipLogProgress(NotSpecified, " PAKEPasscodeVerifier size: %lu", value.PAKEPasscodeVerifier.size()); ChipLogProgress(NotSpecified, " salt size: %lu", value.salt.size()); - OpenDeviceCommissioningWindow(mLocalBridgeNodeId, value.commissioningTimeout, value.iterations, value.discriminator, + OpenDeviceCommissioningWindow(mLocalBridgeNodeId, value.iterations, value.commissioningTimeout, value.discriminator, ByteSpan(value.salt.data(), value.salt.size()), ByteSpan(value.PAKEPasscodeVerifier.data(), value.PAKEPasscodeVerifier.size())); } diff --git a/examples/fabric-admin/device_manager/DeviceManager.h b/examples/fabric-admin/device_manager/DeviceManager.h index 939329be82c691..1514c417be4b4d 100644 --- a/examples/fabric-admin/device_manager/DeviceManager.h +++ b/examples/fabric-admin/device_manager/DeviceManager.h @@ -19,7 +19,7 @@ #pragma once #include -#include +#include #include #include @@ -94,17 +94,17 @@ class DeviceManager : public PairingDelegate * This function initiates the process to open the commissioning window for a device identified by the given node ID. * * @param nodeId The ID of the node that should open the commissioning window. - * @param commissioningTimeoutSec The time in seconds before the commissioning window closes. This value determines - * how long the commissioning window remains open for incoming connections. * @param iterations The number of PBKDF (Password-Based Key Derivation Function) iterations to use * for deriving the PAKE (Password Authenticated Key Exchange) verifier. + * @param commissioningTimeoutSec The time in seconds before the commissioning window closes. This value determines + * how long the commissioning window remains open for incoming connections. * @param discriminator The device-specific discriminator, determined during commissioning, which helps * to uniquely identify the device among others. * @param salt The salt used in the cryptographic operations for commissioning. * @param verifier The PAKE verifier used to authenticate the commissioning process. * */ - void OpenDeviceCommissioningWindow(chip::NodeId nodeId, uint32_t commissioningTimeoutSec, uint32_t iterations, + void OpenDeviceCommissioningWindow(chip::NodeId nodeId, uint32_t iterations, uint16_t commissioningTimeoutSec, uint16_t discriminator, const chip::ByteSpan & salt, const chip::ByteSpan & verifier); /** diff --git a/examples/fabric-admin/device_manager/DeviceSubscription.cpp b/examples/fabric-admin/device_manager/DeviceSubscription.cpp index c41f73e0464cd3..a5625707a5363b 100644 --- a/examples/fabric-admin/device_manager/DeviceSubscription.cpp +++ b/examples/fabric-admin/device_manager/DeviceSubscription.cpp @@ -215,8 +215,10 @@ CHIP_ERROR DeviceSubscription::StartSubscription(OnDoneCallback onDoneCallback, mNodeId = nodeId; #if defined(PW_RPC_ENABLED) - mCurrentAdministratorCommissioningAttributes = chip_rpc_AdministratorCommissioningChanged_init_default; - mCurrentAdministratorCommissioningAttributes.node_id = nodeId; + mCurrentAdministratorCommissioningAttributes = chip_rpc_AdministratorCommissioningChanged_init_default; + mCurrentAdministratorCommissioningAttributes.has_id = true; + mCurrentAdministratorCommissioningAttributes.id.node_id = nodeId; + mCurrentAdministratorCommissioningAttributes.id.fabric_index = controller.GetFabricIndex(); mCurrentAdministratorCommissioningAttributes.window_status = static_cast(Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum::kWindowNotOpen); #endif diff --git a/examples/fabric-admin/device_manager/DeviceSynchronization.cpp b/examples/fabric-admin/device_manager/DeviceSynchronization.cpp index e70a968d726280..ec350239d7be38 100644 --- a/examples/fabric-admin/device_manager/DeviceSynchronization.cpp +++ b/examples/fabric-admin/device_manager/DeviceSynchronization.cpp @@ -205,10 +205,12 @@ void DeviceSynchronizer::StartDeviceSynchronization(Controller::DeviceController mNodeId = nodeId; #if defined(PW_RPC_ENABLED) - mCurrentDeviceData = chip_rpc_SynchronizedDevice_init_default; - mCurrentDeviceData.node_id = nodeId; - mCurrentDeviceData.has_is_icd = true; - mCurrentDeviceData.is_icd = deviceIsIcd; + mCurrentDeviceData = chip_rpc_SynchronizedDevice_init_default; + mCurrentDeviceData.has_id = true; + mCurrentDeviceData.id.node_id = nodeId; + mCurrentDeviceData.id.fabric_index = controller->GetFabricIndex(); + mCurrentDeviceData.has_is_icd = true; + mCurrentDeviceData.is_icd = deviceIsIcd; #endif ReturnOnFailure(controller->GetConnectedDevice(nodeId, &mOnDeviceConnectedCallback, &mOnDeviceConnectionFailureCallback)); diff --git a/examples/fabric-admin/device_manager/PairingManager.cpp b/examples/fabric-admin/device_manager/PairingManager.cpp index aa56af4bc6bf4e..41b4c8744e16b3 100644 --- a/examples/fabric-admin/device_manager/PairingManager.cpp +++ b/examples/fabric-admin/device_manager/PairingManager.cpp @@ -18,21 +18,100 @@ #include "PairingManager.h" -#include -#include -#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#if defined(PW_RPC_ENABLED) +#include +#endif using namespace ::chip; +using namespace ::chip::Controller; + +namespace { + +CHIP_ERROR GetPayload(const char * setUpCode, SetupPayload & payload) +{ + VerifyOrReturnValue(setUpCode, CHIP_ERROR_INVALID_ARGUMENT); + bool isQRCode = strncmp(setUpCode, kQRCodePrefix, strlen(kQRCodePrefix)) == 0; + if (isQRCode) + { + ReturnErrorOnFailure(QRCodeSetupPayloadParser(setUpCode).populatePayload(payload)); + VerifyOrReturnError(payload.isValidQRCodePayload(), CHIP_ERROR_INVALID_ARGUMENT); + } + else + { + ReturnErrorOnFailure(ManualSetupPayloadParser(setUpCode).populatePayload(payload)); + VerifyOrReturnError(payload.isValidManualCode(), CHIP_ERROR_INVALID_ARGUMENT); + } + + return CHIP_NO_ERROR; +} + +bool ParseAddressWithInterface(const char * addressString, Inet::IPAddress & address, Inet::InterfaceId & interfaceId) +{ + struct addrinfo hints; + struct addrinfo * result; + int ret; + + memset(&hints, 0, sizeof(hints)); + hints.ai_family = AF_UNSPEC; + hints.ai_socktype = SOCK_DGRAM; + ret = getaddrinfo(addressString, nullptr, &hints, &result); + if (ret < 0) + { + ChipLogError(NotSpecified, "Invalid address: %s", addressString); + return false; + } + + if (result->ai_family == AF_INET6) + { + struct sockaddr_in6 * addr = reinterpret_cast(result->ai_addr); + address = Inet::IPAddress::FromSockAddr(*addr); + interfaceId = Inet::InterfaceId(addr->sin6_scope_id); + } +#if INET_CONFIG_ENABLE_IPV4 + else if (result->ai_family == AF_INET) + { + address = Inet::IPAddress::FromSockAddr(*reinterpret_cast(result->ai_addr)); + interfaceId = Inet::InterfaceId::Null(); + } +#endif // INET_CONFIG_ENABLE_IPV4 + else + { + ChipLogError(NotSpecified, "Unsupported address: %s", addressString); + freeaddrinfo(result); + return false; + } + + freeaddrinfo(result); + return true; +} + +} // namespace PairingManager::PairingManager() : mOnOpenCommissioningWindowCallback(OnOpenCommissioningWindowResponse, this), - mOnOpenCommissioningWindowVerifierCallback(OnOpenCommissioningWindowVerifierResponse, this) + mOnOpenCommissioningWindowVerifierCallback(OnOpenCommissioningWindowVerifierResponse, this), + mCurrentFabricRemoveCallback(OnCurrentFabricRemove, this) {} -void PairingManager::Init(Controller::DeviceCommissioner * commissioner) +CHIP_ERROR PairingManager::Init(Controller::DeviceCommissioner * commissioner, CredentialIssuerCommands * credIssuerCmds) { - VerifyOrDie(mCommissioner == nullptr); - mCommissioner = commissioner; + VerifyOrReturnError(commissioner != nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(credIssuerCmds != nullptr, CHIP_ERROR_INCORRECT_STATE); + + mCommissioner = commissioner; + mCredIssuerCmds = credIssuerCmds; + + return CHIP_NO_ERROR; } CHIP_ERROR PairingManager::OpenCommissioningWindow(NodeId nodeId, EndpointId endpointId, uint16_t commissioningTimeoutSec, @@ -52,119 +131,527 @@ CHIP_ERROR PairingManager::OpenCommissioningWindow(NodeId nodeId, EndpointId end return CHIP_ERROR_INCORRECT_STATE; } - auto params = Platform::MakeUnique(); - params->nodeId = nodeId; - params->endpointId = endpointId; - params->commissioningWindowTimeout = commissioningTimeoutSec; - params->iteration = iterations; - params->discriminator = discriminator; + // Ensure salt and verifier sizes are valid + if (!salt.empty() && salt.size() > chip::Crypto::kSpake2p_Max_PBKDF_Salt_Length) + { + ChipLogError(NotSpecified, "Salt size exceeds buffer capacity"); + return CHIP_ERROR_BUFFER_TOO_SMALL; + } + + if (!verifier.empty() && verifier.size() > chip::Crypto::kSpake2p_VerifierSerialized_Length) + { + ChipLogError(NotSpecified, "Verifier size exceeds buffer capacity"); + return CHIP_ERROR_BUFFER_TOO_SMALL; + } if (!salt.empty()) { - if (salt.size() > sizeof(params->saltBuffer)) + memcpy(mSaltBuffer, salt.data(), salt.size()); + mSalt = ByteSpan(mSaltBuffer, salt.size()); + } + else + { + mSalt = ByteSpan(); + } + + if (!verifier.empty()) + { + memcpy(mVerifierBuffer, verifier.data(), verifier.size()); + mVerifier = ByteSpan(mVerifierBuffer, verifier.size()); + } + else + { + mVerifier = ByteSpan(); + } + + return DeviceLayer::SystemLayer().ScheduleLambda([nodeId, endpointId, commissioningTimeoutSec, iterations, discriminator]() { + PairingManager & self = PairingManager::Instance(); + + if (self.mCommissioner == nullptr) + { + ChipLogError(NotSpecified, "Commissioner is null, cannot open commissioning window"); + return; + } + + self.mWindowOpener = Platform::MakeUnique(self.mCommissioner); + + if (!self.mVerifier.empty()) + { + if (self.mSalt.empty()) + { + ChipLogError(NotSpecified, "Salt is required when verifier is set"); + self.mWindowOpener.reset(); + return; + } + + // Open the commissioning window with verifier parameters + CHIP_ERROR err = + self.mWindowOpener->OpenCommissioningWindow(Controller::CommissioningWindowVerifierParams() + .SetNodeId(nodeId) + .SetEndpointId(endpointId) + .SetTimeout(commissioningTimeoutSec) + .SetIteration(iterations) + .SetDiscriminator(discriminator) + .SetVerifier(self.mVerifier) + .SetSalt(self.mSalt) + .SetCallback(&self.mOnOpenCommissioningWindowVerifierCallback)); + if (err != CHIP_NO_ERROR) + { + ChipLogError(NotSpecified, "Failed to open commissioning window with verifier: %s", ErrorStr(err)); + self.mWindowOpener.reset(); + } + } + else { - ChipLogError(NotSpecified, "Salt size exceeds buffer capacity"); - return CHIP_ERROR_BUFFER_TOO_SMALL; + SetupPayload ignored; + // Open the commissioning window with passcode parameters + CHIP_ERROR err = self.mWindowOpener->OpenCommissioningWindow(Controller::CommissioningWindowPasscodeParams() + .SetNodeId(nodeId) + .SetEndpointId(endpointId) + .SetTimeout(commissioningTimeoutSec) + .SetIteration(iterations) + .SetDiscriminator(discriminator) + .SetSetupPIN(NullOptional) + .SetSalt(NullOptional) + .SetCallback(&self.mOnOpenCommissioningWindowCallback), + ignored); + if (err != CHIP_NO_ERROR) + { + ChipLogError(NotSpecified, "Failed to open commissioning window with passcode: %s", ErrorStr(err)); + self.mWindowOpener.reset(); + } } + }); +} + +void PairingManager::OnOpenCommissioningWindowResponse(void * context, NodeId remoteId, CHIP_ERROR err, SetupPayload payload) +{ + VerifyOrDie(context != nullptr); + PairingManager * self = static_cast(context); + if (self->mCommissioningWindowDelegate) + { + self->mCommissioningWindowDelegate->OnCommissioningWindowOpened(remoteId, err, payload); + self->SetOpenCommissioningWindowDelegate(nullptr); + } + + OnOpenCommissioningWindowVerifierResponse(context, remoteId, err); +} + +void PairingManager::OnOpenCommissioningWindowVerifierResponse(void * context, NodeId remoteId, CHIP_ERROR err) +{ + VerifyOrDie(context != nullptr); + PairingManager * self = static_cast(context); + LogErrorOnFailure(err); + + // Reset the window opener once the window operation is complete + self->mWindowOpener.reset(); +} - memcpy(params->saltBuffer, salt.data(), salt.size()); - params->salt = ByteSpan(params->saltBuffer, salt.size()); +void PairingManager::OnStatusUpdate(DevicePairingDelegate::Status status) +{ + switch (status) + { + case DevicePairingDelegate::Status::SecurePairingSuccess: + ChipLogProgress(NotSpecified, "CASE establishment successful"); + break; + case DevicePairingDelegate::Status::SecurePairingFailed: + ChipLogError(NotSpecified, "Secure Pairing Failed"); + break; } +} - if (!verifier.empty()) +void PairingManager::OnPairingComplete(CHIP_ERROR err) +{ + if (err == CHIP_NO_ERROR) { - if (verifier.size() > sizeof(params->verifierBuffer)) + ChipLogProgress(NotSpecified, "PASE establishment successful"); + } + else + { + ChipLogProgress(NotSpecified, "Pairing Failure: %s", ErrorStr(err)); + } +} + +void PairingManager::OnPairingDeleted(CHIP_ERROR err) +{ + if (err == CHIP_NO_ERROR) + { + ChipLogProgress(NotSpecified, "Pairing Deleted Success"); + } + else + { + ChipLogProgress(NotSpecified, "Pairing Deleted Failure: %s", ErrorStr(err)); + } +} + +void PairingManager::OnCommissioningComplete(NodeId nodeId, CHIP_ERROR err) +{ + if (err == CHIP_NO_ERROR) + { + // print to console + fprintf(stderr, "New device with Node ID: " ChipLogFormatX64 " has been successfully added.\n", ChipLogValueX64(nodeId)); + + // mCommissioner has a lifetime that is the entire life of the application itself + // so it is safe to provide to StartDeviceSynchronization. + DeviceSynchronizer::Instance().StartDeviceSynchronization(mCommissioner, nodeId, mDeviceIsICD); + } + else + { + // When ICD device commissioning fails, the ICDClientInfo stored in OnICDRegistrationComplete needs to be removed. + if (mDeviceIsICD) { - ChipLogError(NotSpecified, "Verifier size exceeds buffer capacity"); - return CHIP_ERROR_BUFFER_TOO_SMALL; + CHIP_ERROR deleteEntryError = + CHIPCommand::sICDClientStorage.DeleteEntry(ScopedNodeId(nodeId, mCommissioner->GetFabricIndex())); + if (deleteEntryError != CHIP_NO_ERROR) + { + ChipLogError(NotSpecified, "Failed to delete ICD entry: %s", ErrorStr(err)); + } } + ChipLogProgress(NotSpecified, "Device commissioning Failure: %s", ErrorStr(err)); + } + + if (mCommissioningDelegate) + { + mCommissioningDelegate->OnCommissioningComplete(nodeId, err); + SetCommissioningDelegate(nullptr); + } +} + +void PairingManager::OnReadCommissioningInfo(const Controller::ReadCommissioningInfo & info) +{ + ChipLogProgress(AppServer, "OnReadCommissioningInfo - vendorId=0x%04X productId=0x%04X", info.basic.vendorId, + info.basic.productId); + + // The string in CharSpan received from the device is not null-terminated, we use std::string here for coping and + // appending a null-terminator at the end of the string. + std::string userActiveModeTriggerInstruction; + + // Note: the callback doesn't own the buffer, should make a copy if it will be used it later. + if (info.icd.userActiveModeTriggerInstruction.size() != 0) + { + userActiveModeTriggerInstruction = + std::string(info.icd.userActiveModeTriggerInstruction.data(), info.icd.userActiveModeTriggerInstruction.size()); + } + + if (info.icd.userActiveModeTriggerHint.HasAny()) + { + ChipLogProgress(AppServer, "OnReadCommissioningInfo - LIT UserActiveModeTriggerHint=0x%08x", + info.icd.userActiveModeTriggerHint.Raw()); + ChipLogProgress(AppServer, "OnReadCommissioningInfo - LIT UserActiveModeTriggerInstruction=%s", + userActiveModeTriggerInstruction.c_str()); + } + ChipLogProgress(AppServer, "OnReadCommissioningInfo ICD - IdleModeDuration=%u activeModeDuration=%u activeModeThreshold=%u", + info.icd.idleModeDuration, info.icd.activeModeDuration, info.icd.activeModeThreshold); +} + +void PairingManager::OnICDRegistrationComplete(ScopedNodeId nodeId, uint32_t icdCounter) +{ + char icdSymmetricKeyHex[Crypto::kAES_CCM128_Key_Length * 2 + 1]; - memcpy(params->verifierBuffer, verifier.data(), verifier.size()); - params->verifier = ByteSpan(params->verifierBuffer, verifier.size()); + Encoding::BytesToHex(mICDSymmetricKey.Value().data(), mICDSymmetricKey.Value().size(), icdSymmetricKeyHex, + sizeof(icdSymmetricKeyHex), Encoding::HexFlags::kNullTerminate); + + app::ICDClientInfo clientInfo; + clientInfo.peer_node = nodeId; + clientInfo.monitored_subject = mICDMonitoredSubject.Value(); + clientInfo.start_icd_counter = icdCounter; + + CHIP_ERROR err = CHIPCommand::sICDClientStorage.SetKey(clientInfo, mICDSymmetricKey.Value()); + if (err == CHIP_NO_ERROR) + { + err = CHIPCommand::sICDClientStorage.StoreEntry(clientInfo); } - // Schedule work on the Matter thread - return DeviceLayer::PlatformMgr().ScheduleWork(OnOpenCommissioningWindow, reinterpret_cast(params.release())); + if (err != CHIP_NO_ERROR) + { + CHIPCommand::sICDClientStorage.RemoveKey(clientInfo); + ChipLogError(NotSpecified, "Failed to persist symmetric key for " ChipLogFormatX64 ": %s", + ChipLogValueX64(nodeId.GetNodeId()), err.AsString()); + return; + } + + mDeviceIsICD = true; + + ChipLogProgress(NotSpecified, "Saved ICD Symmetric key for " ChipLogFormatX64, ChipLogValueX64(nodeId.GetNodeId())); + ChipLogProgress(NotSpecified, + "ICD Registration Complete for device " ChipLogFormatX64 " / Check-In NodeID: " ChipLogFormatX64 + " / Monitored Subject: " ChipLogFormatX64 " / Symmetric Key: %s / ICDCounter %u", + ChipLogValueX64(nodeId.GetNodeId()), ChipLogValueX64(mICDCheckInNodeId.Value()), + ChipLogValueX64(mICDMonitoredSubject.Value()), icdSymmetricKeyHex, icdCounter); +} + +void PairingManager::OnICDStayActiveComplete(ScopedNodeId deviceId, uint32_t promisedActiveDuration) +{ + ChipLogProgress(NotSpecified, "ICD Stay Active Complete for device " ChipLogFormatX64 " / promisedActiveDuration: %u", + ChipLogValueX64(deviceId.GetNodeId()), promisedActiveDuration); } -void PairingManager::OnOpenCommissioningWindow(intptr_t context) +void PairingManager::OnDiscoveredDevice(const Dnssd::CommissionNodeData & nodeData) { - Platform::UniquePtr params(reinterpret_cast(context)); - PairingManager & self = PairingManager::Instance(); + // Ignore nodes with closed commissioning window + VerifyOrReturn(nodeData.commissioningMode != 0); - if (self.mCommissioner == nullptr) + auto & resolutionData = nodeData; + + const uint16_t port = resolutionData.port; + char buf[Inet::IPAddress::kMaxStringLength]; + resolutionData.ipAddress[0].ToString(buf); + ChipLogProgress(NotSpecified, "Discovered Device: %s:%u", buf, port); + + // Stop Mdns discovery. + auto err = mCommissioner->StopCommissionableDiscovery(); + + // Some platforms does not implement a mechanism to stop mdns browse, so + // we just ignore CHIP_ERROR_NOT_IMPLEMENTED instead of bailing out. + if (CHIP_NO_ERROR != err && CHIP_ERROR_NOT_IMPLEMENTED != err) { - ChipLogError(NotSpecified, "Commissioner is null, cannot open commissioning window"); return; } - self.mWindowOpener = Platform::MakeUnique(self.mCommissioner); + mCommissioner->RegisterDeviceDiscoveryDelegate(nullptr); + + auto interfaceId = resolutionData.ipAddress[0].IsIPv6LinkLocal() ? resolutionData.interfaceId : Inet::InterfaceId::Null(); + auto peerAddress = Transport::PeerAddress::UDP(resolutionData.ipAddress[0], port, interfaceId); + err = Pair(mNodeId, peerAddress); + if (CHIP_NO_ERROR != err) + { + ChipLogProgress(NotSpecified, "Failed to pair device: " ChipLogFormatX64 " %s", ChipLogValueX64(mNodeId), ErrorStr(err)); + } +} - if (!params->verifier.empty()) +Optional PairingManager::FailSafeExpiryTimeoutSecs() const +{ + // No manual input, so do not need to extend. + return Optional(); +} + +bool PairingManager::ShouldWaitAfterDeviceAttestation() +{ + // If there is a vendor ID and product ID, request OnDeviceAttestationCompleted(). + // Currently this is added in the case that the example is performing reverse commissioning, + // but it would be an improvement to store that explicitly. + // TODO: Issue #35297 - [Fabric Sync] Improve where we get VID and PID when validating CCTRL CommissionNode command + SetupPayload payload; + CHIP_ERROR err = GetPayload(mOnboardingPayload, payload); + return err == CHIP_NO_ERROR && (payload.vendorID != 0 || payload.productID != 0); +} + +void PairingManager::OnDeviceAttestationCompleted(Controller::DeviceCommissioner * deviceCommissioner, DeviceProxy * device, + const Credentials::DeviceAttestationVerifier::AttestationDeviceInfo & info, + Credentials::AttestationVerificationResult attestationResult) +{ + SetupPayload payload; + CHIP_ERROR parse_error = GetPayload(mOnboardingPayload, payload); + if (parse_error == CHIP_NO_ERROR && (payload.vendorID != 0 || payload.productID != 0)) { - if (params->salt.empty()) + if (payload.vendorID == 0 || payload.productID == 0) { - ChipLogError(NotSpecified, "Salt is required when verifier is set"); - self.mWindowOpener.reset(); + ChipLogProgress(NotSpecified, + "Failed validation: vendorID or productID must not be 0." + "Requested VID: %u, Requested PID: %u.", + payload.vendorID, payload.productID); + deviceCommissioner->ContinueCommissioningAfterDeviceAttestation( + device, Credentials::AttestationVerificationResult::kInvalidArgument); return; } - CHIP_ERROR err = - self.mWindowOpener->OpenCommissioningWindow(Controller::CommissioningWindowVerifierParams() - .SetNodeId(params->nodeId) - .SetEndpointId(params->endpointId) - .SetTimeout(params->commissioningWindowTimeout) - .SetIteration(params->iteration) - .SetDiscriminator(params->discriminator) - .SetVerifier(params->verifier) - .SetSalt(params->salt) - .SetCallback(&self.mOnOpenCommissioningWindowVerifierCallback)); - if (err != CHIP_NO_ERROR) + if (payload.vendorID != info.BasicInformationVendorId() || payload.productID != info.BasicInformationProductId()) + { + ChipLogProgress(NotSpecified, + "Failed validation of vendorID or productID." + "Requested VID: %u, Requested PID: %u," + "Detected VID: %u, Detected PID %u.", + payload.vendorID, payload.productID, info.BasicInformationVendorId(), info.BasicInformationProductId()); + deviceCommissioner->ContinueCommissioningAfterDeviceAttestation( + device, + payload.vendorID == info.BasicInformationVendorId() + ? Credentials::AttestationVerificationResult::kDacProductIdMismatch + : Credentials::AttestationVerificationResult::kDacVendorIdMismatch); + return; + } + + // NOTE: This will log errors even if the attestion was successful. + CHIP_ERROR err = deviceCommissioner->ContinueCommissioningAfterDeviceAttestation(device, attestationResult); + if (CHIP_NO_ERROR != err) { - ChipLogError(NotSpecified, "Failed to open commissioning window with verifier: %s", ErrorStr(err)); - self.mWindowOpener.reset(); + ChipLogError(NotSpecified, "Failed to continue commissioning after device attestation, error: %s", ErrorStr(err)); } + return; + } + + // Don't bypass attestation, continue with error. + CHIP_ERROR err = deviceCommissioner->ContinueCommissioningAfterDeviceAttestation(device, attestationResult); + if (CHIP_NO_ERROR != err) + { + ChipLogError(NotSpecified, "Failed to continue commissioning after device attestation, error: %s", ErrorStr(err)); + } +} + +CommissioningParameters PairingManager::GetCommissioningParameters() +{ + auto params = CommissioningParameters(); + params.SetSkipCommissioningComplete(false); + params.SetDeviceAttestationDelegate(this); + + if (mICDRegistration.ValueOr(false)) + { + params.SetICDRegistrationStrategy(ICDRegistrationStrategy::kBeforeComplete); + + if (!mICDSymmetricKey.HasValue()) + { + Crypto::DRBG_get_bytes(mRandomGeneratedICDSymmetricKey, sizeof(mRandomGeneratedICDSymmetricKey)); + mICDSymmetricKey.SetValue(ByteSpan(mRandomGeneratedICDSymmetricKey)); + } + if (!mICDCheckInNodeId.HasValue()) + { + mICDCheckInNodeId.SetValue(mCommissioner->GetNodeId()); + } + if (!mICDMonitoredSubject.HasValue()) + { + mICDMonitoredSubject.SetValue(mICDCheckInNodeId.Value()); + } + if (!mICDClientType.HasValue()) + { + mICDClientType.SetValue(app::Clusters::IcdManagement::ClientTypeEnum::kPermanent); + } + // These Optionals must have values now. + // The commissioner will verify these values. + params.SetICDSymmetricKey(mICDSymmetricKey.Value()); + if (mICDStayActiveDurationMsec.HasValue()) + { + params.SetICDStayActiveDurationMsec(mICDStayActiveDurationMsec.Value()); + } + params.SetICDCheckInNodeId(mICDCheckInNodeId.Value()); + params.SetICDMonitoredSubject(mICDMonitoredSubject.Value()); + params.SetICDClientType(mICDClientType.Value()); + } + + return params; +} + +CHIP_ERROR PairingManager::Pair(NodeId remoteId, Transport::PeerAddress address) +{ + auto params = RendezvousParameters().SetSetupPINCode(mSetupPINCode).SetDiscriminator(mDiscriminator).SetPeerAddress(address); + + CHIP_ERROR err = CHIP_NO_ERROR; + auto commissioningParams = GetCommissioningParameters(); + err = CurrentCommissioner().PairDevice(remoteId, params, commissioningParams); + + return err; +} + +void PairingManager::OnCurrentFabricRemove(void * context, NodeId nodeId, CHIP_ERROR err) +{ + PairingManager * self = reinterpret_cast(context); + VerifyOrReturn(self != nullptr, ChipLogError(NotSpecified, "OnCurrentFabricRemove: context is null")); + + if (err == CHIP_NO_ERROR) + { + // print to console + fprintf(stderr, "Device with Node ID: " ChipLogFormatX64 "has been successfully removed.\n", ChipLogValueX64(nodeId)); + +#if defined(PW_RPC_ENABLED) + FabricIndex fabricIndex = self->CurrentCommissioner().GetFabricIndex(); + app::InteractionModelEngine::GetInstance()->ShutdownSubscriptions(fabricIndex, nodeId); + ScopedNodeId scopedNodeId(nodeId, fabricIndex); + RemoveSynchronizedDevice(scopedNodeId); +#endif } else { - SetupPayload ignored; - CHIP_ERROR err = self.mWindowOpener->OpenCommissioningWindow(Controller::CommissioningWindowPasscodeParams() - .SetNodeId(params->nodeId) - .SetEndpointId(params->endpointId) - .SetTimeout(params->commissioningWindowTimeout) - .SetIteration(params->iteration) - .SetDiscriminator(params->discriminator) - .SetSetupPIN(NullOptional) - .SetSalt(NullOptional) - .SetCallback(&self.mOnOpenCommissioningWindowCallback), - ignored); + ChipLogProgress(NotSpecified, "Device unpair Failure: " ChipLogFormatX64 " %s", ChipLogValueX64(nodeId), ErrorStr(err)); + } +} + +void PairingManager::InitPairingCommand() +{ + mCommissioner->RegisterPairingDelegate(this); + // Clear the CATs in OperationalCredentialsIssuer + mCredIssuerCmds->SetCredentialIssuerCATValues(kUndefinedCATs); + mDeviceIsICD = false; +} + +CHIP_ERROR PairingManager::PairDeviceWithCode(NodeId nodeId, const char * payload) +{ + if (payload == nullptr || strlen(payload) > kMaxManualCodeLength + 1) + { + ChipLogError(NotSpecified, "PairDeviceWithCode failed: Invalid pairing payload"); + return CHIP_ERROR_INVALID_STRING_LENGTH; + } + + Platform::CopyString(mOnboardingPayload, sizeof(mOnboardingPayload), payload); + + return DeviceLayer::SystemLayer().ScheduleLambda([nodeId]() { + PairingManager & self = PairingManager::Instance(); + + self.InitPairingCommand(); + + CommissioningParameters commissioningParams = self.GetCommissioningParameters(); + auto discoveryType = DiscoveryType::kDiscoveryNetworkOnly; + + self.mNodeId = nodeId; + + CHIP_ERROR err = self.mCommissioner->PairDevice(nodeId, self.mOnboardingPayload, commissioningParams, discoveryType); if (err != CHIP_NO_ERROR) { - ChipLogError(NotSpecified, "Failed to open commissioning window with passcode: %s", ErrorStr(err)); - self.mWindowOpener.reset(); + ChipLogError(NotSpecified, "Failed to pair device with code, error: %s", ErrorStr(err)); } - } + }); } -void PairingManager::OnOpenCommissioningWindowResponse(void * context, NodeId remoteId, CHIP_ERROR err, SetupPayload payload) +CHIP_ERROR PairingManager::PairDevice(chip::NodeId nodeId, uint32_t setupPINCode, const char * deviceRemoteIp, + uint16_t deviceRemotePort) { - VerifyOrDie(context != nullptr); - PairingManager * self = static_cast(context); - if (self->mCommissioningWindowDelegate) + if (deviceRemoteIp == nullptr || strlen(deviceRemoteIp) > Inet::IPAddress::kMaxStringLength) { - self->mCommissioningWindowDelegate->OnCommissioningWindowOpened(remoteId, err, payload); - self->SetOpenCommissioningWindowDelegate(nullptr); + ChipLogError(NotSpecified, "PairDevice failed: Invalid device remote IP address"); + return CHIP_ERROR_INVALID_STRING_LENGTH; } - OnOpenCommissioningWindowVerifierResponse(context, remoteId, err); + Platform::CopyString(mRemoteIpAddr, sizeof(mRemoteIpAddr), deviceRemoteIp); + + return DeviceLayer::SystemLayer().ScheduleLambda([nodeId, setupPINCode, deviceRemotePort]() { + PairingManager & self = PairingManager::Instance(); + + self.InitPairingCommand(); + self.mSetupPINCode = setupPINCode; + + Inet::IPAddress address; + Inet::InterfaceId interfaceId; + + if (!ParseAddressWithInterface(self.mRemoteIpAddr, address, interfaceId)) + { + ChipLogError(NotSpecified, "Invalid IP address: %s", self.mRemoteIpAddr); + return; + } + + CHIP_ERROR err = self.Pair(nodeId, Transport::PeerAddress::UDP(address, deviceRemotePort, interfaceId)); + if (err != CHIP_NO_ERROR) + { + ChipLogError(NotSpecified, "Failed to pair device, error: %s", ErrorStr(err)); + } + }); } -void PairingManager::OnOpenCommissioningWindowVerifierResponse(void * context, NodeId remoteId, CHIP_ERROR err) +CHIP_ERROR PairingManager::UnpairDevice(NodeId nodeId) { - VerifyOrDie(context != nullptr); - PairingManager * self = static_cast(context); - LogErrorOnFailure(err); + return DeviceLayer::SystemLayer().ScheduleLambda([nodeId]() { + PairingManager & self = PairingManager::Instance(); - // Reset the window opener once the window operation is complete - self->mWindowOpener.reset(); + self.InitPairingCommand(); + + self.mCurrentFabricRemover = Platform::MakeUnique(self.mCommissioner); + + if (!self.mCurrentFabricRemover) + { + ChipLogError(NotSpecified, "Failed to unpair device, mCurrentFabricRemover is null"); + return; + } + + CHIP_ERROR err = self.mCurrentFabricRemover->RemoveCurrentFabric(nodeId, &self.mCurrentFabricRemoveCallback); + if (err != CHIP_NO_ERROR) + { + ChipLogError(NotSpecified, "Failed to unpair device, error: %s", ErrorStr(err)); + } + }); } diff --git a/examples/fabric-admin/device_manager/PairingManager.h b/examples/fabric-admin/device_manager/PairingManager.h index de1c0887f3b1b7..50e64f9f0ca67f 100644 --- a/examples/fabric-admin/device_manager/PairingManager.h +++ b/examples/fabric-admin/device_manager/PairingManager.h @@ -18,10 +18,16 @@ #pragma once +#include #include +#include #include +#include #include +// Constants +constexpr uint16_t kMaxManualCodeLength = 22; + class CommissioningWindowDelegate { public: @@ -29,6 +35,20 @@ class CommissioningWindowDelegate virtual ~CommissioningWindowDelegate() = default; }; +class CommissioningDelegate +{ +public: + virtual void OnCommissioningComplete(chip::NodeId deviceId, CHIP_ERROR err) = 0; + virtual ~CommissioningDelegate() = default; +}; + +class PairingDelegate +{ +public: + virtual void OnDeviceRemoved(chip::NodeId deviceId, CHIP_ERROR err) = 0; + virtual ~PairingDelegate() = default; +}; + /** * The PairingManager class is responsible for managing the commissioning and pairing process * of Matter devices. PairingManager is designed to be used as a singleton, meaning that there @@ -49,7 +69,9 @@ class CommissioningWindowDelegate * manager.OpenCommissioningWindow(); * @endcode */ -class PairingManager +class PairingManager : public chip::Controller::DevicePairingDelegate, + public chip::Controller::DeviceDiscoveryDelegate, + public chip::Credentials::DeviceAttestationDelegate { public: static PairingManager & Instance() @@ -58,7 +80,14 @@ class PairingManager return instance; } - void Init(chip::Controller::DeviceCommissioner * commissioner); + CHIP_ERROR Init(chip::Controller::DeviceCommissioner * commissioner, CredentialIssuerCommands * credIssuerCmds); + + void SetOpenCommissioningWindowDelegate(CommissioningWindowDelegate * delegate) { mCommissioningWindowDelegate = delegate; } + void SetCommissioningDelegate(CommissioningDelegate * delegate) { mCommissioningDelegate = delegate; } + void SetPairingDelegate(PairingDelegate * delegate) { mPairingDelegate = delegate; } + PairingDelegate * GetPairingDelegate() { return mPairingDelegate; } + + chip::Controller::DeviceCommissioner & CurrentCommissioner() { return *mCommissioner; }; /** * Opens a commissioning window on the specified node and endpoint. @@ -79,31 +108,98 @@ class PairingManager uint32_t iterations, uint16_t discriminator, const chip::ByteSpan & salt, const chip::ByteSpan & verifier); - void SetOpenCommissioningWindowDelegate(CommissioningWindowDelegate * delegate) { mCommissioningWindowDelegate = delegate; } + /** + * Pairs a device using a setup code payload. + * + * @param nodeId The target node ID for pairing. + * @param payload The setup code payload, which typically contains device-specific pairing information. + * + * @return CHIP_NO_ERROR on successful initiation of the pairing process, or an appropriate CHIP_ERROR if pairing fails. + */ + CHIP_ERROR PairDeviceWithCode(chip::NodeId nodeId, const char * payload); + + /** + * Pairs a device using its setup PIN code and remote IP address. + * + * @param nodeId The target node ID for pairing. + * @param setupPINCode The setup PIN code for the device, used for establishing a secure connection. + * @param deviceRemoteIp The IP address of the remote device. + * @param deviceRemotePort The port number on which the device is listening for pairing requests. + * + * @return CHIP_NO_ERROR if the pairing process is initiated successfully, or an appropriate CHIP_ERROR if pairing fails. + */ + CHIP_ERROR PairDevice(chip::NodeId nodeId, uint32_t setupPINCode, const char * deviceRemoteIp, uint16_t deviceRemotePort); + + /** + * Unpairs a device with the specified node ID. + * + * @param nodeId The node ID of the device to be unpaired. + * + * @return CHIP_NO_ERROR if the device is successfully unpaired, or an appropriate CHIP_ERROR if the process fails. + */ + CHIP_ERROR UnpairDevice(chip::NodeId nodeId); private: + // Constructors PairingManager(); PairingManager(const PairingManager &) = delete; PairingManager & operator=(const PairingManager &) = delete; - chip::Controller::DeviceCommissioner * mCommissioner = nullptr; + // Private member functions (static and non-static) + chip::Controller::CommissioningParameters GetCommissioningParameters(); + void InitPairingCommand(); + CHIP_ERROR Pair(chip::NodeId remoteId, chip::Transport::PeerAddress address); - /////////// Open Commissioning Window Command Interface ///////// - struct CommissioningWindowParams - { - chip::NodeId nodeId; - chip::EndpointId endpointId; - uint16_t commissioningWindowTimeout; - uint32_t iteration; - uint16_t discriminator; - chip::Optional setupPIN; - uint8_t verifierBuffer[chip::Crypto::kSpake2p_VerifierSerialized_Length]; - chip::ByteSpan verifier; - uint8_t saltBuffer[chip::Crypto::kSpake2p_Max_PBKDF_Salt_Length]; - chip::ByteSpan salt; - }; + /////////// DevicePairingDelegate Interface ///////// + void OnStatusUpdate(chip::Controller::DevicePairingDelegate::Status status) override; + void OnPairingComplete(CHIP_ERROR error) override; + void OnPairingDeleted(CHIP_ERROR error) override; + void OnReadCommissioningInfo(const chip::Controller::ReadCommissioningInfo & info) override; + void OnCommissioningComplete(chip::NodeId deviceId, CHIP_ERROR error) override; + void OnICDRegistrationComplete(chip::ScopedNodeId deviceId, uint32_t icdCounter) override; + void OnICDStayActiveComplete(chip::ScopedNodeId deviceId, uint32_t promisedActiveDuration) override; + + /////////// DeviceDiscoveryDelegate Interface ///////// + void OnDiscoveredDevice(const chip::Dnssd::CommissionNodeData & nodeData) override; + + /////////// DeviceAttestationDelegate Interface ///////// + chip::Optional FailSafeExpiryTimeoutSecs() const override; + bool ShouldWaitAfterDeviceAttestation() override; + void OnDeviceAttestationCompleted(chip::Controller::DeviceCommissioner * deviceCommissioner, chip::DeviceProxy * device, + const chip::Credentials::DeviceAttestationVerifier::AttestationDeviceInfo & info, + chip::Credentials::AttestationVerificationResult attestationResult) override; + + static void OnOpenCommissioningWindowResponse(void * context, chip::NodeId deviceId, CHIP_ERROR status, + chip::SetupPayload payload); + static void OnOpenCommissioningWindowVerifierResponse(void * context, chip::NodeId deviceId, CHIP_ERROR status); + static void OnCurrentFabricRemove(void * context, chip::NodeId remoteNodeId, CHIP_ERROR status); + + // Private data members + chip::Controller::DeviceCommissioner * mCommissioner = nullptr; + CredentialIssuerCommands * mCredIssuerCmds = nullptr; CommissioningWindowDelegate * mCommissioningWindowDelegate = nullptr; + CommissioningDelegate * mCommissioningDelegate = nullptr; + PairingDelegate * mPairingDelegate = nullptr; + + chip::NodeId mNodeId = chip::kUndefinedNodeId; + chip::ByteSpan mVerifier; + chip::ByteSpan mSalt; + uint16_t mDiscriminator = 0; + uint32_t mSetupPINCode = 0; + bool mDeviceIsICD = false; + uint8_t mRandomGeneratedICDSymmetricKey[chip::Crypto::kAES_CCM128_Key_Length]; + uint8_t mVerifierBuffer[chip::Crypto::kSpake2p_VerifierSerialized_Length]; + uint8_t mSaltBuffer[chip::Crypto::kSpake2p_Max_PBKDF_Salt_Length]; + char mRemoteIpAddr[chip::Inet::IPAddress::kMaxStringLength]; + char mOnboardingPayload[kMaxManualCodeLength + 1]; + + chip::Optional mICDRegistration; + chip::Optional mICDCheckInNodeId; + chip::Optional mICDClientType; + chip::Optional mICDSymmetricKey; + chip::Optional mICDMonitoredSubject; + chip::Optional mICDStayActiveDurationMsec; /** * Holds the unique_ptr to the current CommissioningWindowOpener. @@ -111,12 +207,10 @@ class PairingManager * The pointer is reset when the commissioning window is closed or when an error occurs. */ chip::Platform::UniquePtr mWindowOpener; - - static void OnOpenCommissioningWindow(intptr_t context); - static void OnOpenCommissioningWindowResponse(void * context, chip::NodeId deviceId, CHIP_ERROR status, - chip::SetupPayload payload); - static void OnOpenCommissioningWindowVerifierResponse(void * context, chip::NodeId deviceId, CHIP_ERROR status); - chip::Callback::Callback mOnOpenCommissioningWindowCallback; chip::Callback::Callback mOnOpenCommissioningWindowVerifierCallback; + + // For Unpair + chip::Platform::UniquePtr mCurrentFabricRemover; + chip::Callback::Callback mCurrentFabricRemoveCallback; }; diff --git a/examples/fabric-admin/rpc/RpcClient.cpp b/examples/fabric-admin/rpc/RpcClient.cpp index 9d094a6e102566..e33dd0472e6fe2 100644 --- a/examples/fabric-admin/rpc/RpcClient.cpp +++ b/examples/fabric-admin/rpc/RpcClient.cpp @@ -144,12 +144,14 @@ CHIP_ERROR AddSynchronizedDevice(const chip_rpc_SynchronizedDevice & data) return WaitForResponse(call); } -CHIP_ERROR RemoveSynchronizedDevice(NodeId nodeId) +CHIP_ERROR RemoveSynchronizedDevice(ScopedNodeId scopedNodeId) { ChipLogProgress(NotSpecified, "RemoveSynchronizedDevice"); chip_rpc_SynchronizedDevice device = chip_rpc_SynchronizedDevice_init_default; - device.node_id = nodeId; + device.has_id = true; + device.id.node_id = scopedNodeId.GetNodeId(); + device.id.fabric_index = scopedNodeId.GetFabricIndex(); // The RPC call is kept alive until it completes. When a response is received, it will be logged by the handler // function and the call will complete. @@ -164,12 +166,14 @@ CHIP_ERROR RemoveSynchronizedDevice(NodeId nodeId) return WaitForResponse(call); } -CHIP_ERROR ActiveChanged(NodeId nodeId, uint32_t promisedActiveDurationMs) +CHIP_ERROR ActiveChanged(ScopedNodeId scopedNodeId, uint32_t promisedActiveDurationMs) { ChipLogProgress(NotSpecified, "ActiveChanged"); chip_rpc_KeepActiveChanged parameters; - parameters.node_id = nodeId; + parameters.has_id = true; + parameters.id.node_id = scopedNodeId.GetNodeId(); + parameters.id.fabric_index = scopedNodeId.GetFabricIndex(); parameters.promised_active_duration_ms = promisedActiveDurationMs; // The RPC call is kept alive until it completes. When a response is received, it will be logged by the handler diff --git a/examples/fabric-admin/rpc/RpcClient.h b/examples/fabric-admin/rpc/RpcClient.h index 41d37cf85191b8..da6a82115a3cd2 100644 --- a/examples/fabric-admin/rpc/RpcClient.h +++ b/examples/fabric-admin/rpc/RpcClient.h @@ -18,6 +18,7 @@ #pragma once +#include #include #include "fabric_bridge_service/fabric_bridge_service.rpc.pb.h" @@ -57,25 +58,25 @@ CHIP_ERROR AddSynchronizedDevice(const chip_rpc_SynchronizedDevice & data); * It logs the progress and checks if a `RemoveSynchronizedDevice` operation is already in progress. * If an operation is in progress, it returns `CHIP_ERROR_BUSY`. * - * @param nodeId The Node ID of the device to be removed. + * @param scopedNodeId The Scoped Node ID of the device to be removed. * @return CHIP_ERROR An error code indicating the success or failure of the operation. * - CHIP_NO_ERROR: The RPC command was successfully processed. * - CHIP_ERROR_BUSY: Another operation is currently in progress. * - CHIP_ERROR_INTERNAL: An internal error occurred while activating the RPC call. */ -CHIP_ERROR RemoveSynchronizedDevice(chip::NodeId nodeId); +CHIP_ERROR RemoveSynchronizedDevice(chip::ScopedNodeId scopedNodeId); /** * @brief Received StayActiveResponse on behalf of client that previously called KeepActive * - * @param nodeId The Node ID of the device we recieved a StayActiveResponse. + * @param scopedNodeId The Scoped Node ID of the device we recieved a StayActiveResponse. * @param promisedActiveDurationMs the computed duration (in milliseconds) that the ICD intends to stay active for. * @return CHIP_ERROR An error code indicating the success or failure of the operation. * - CHIP_NO_ERROR: The RPC command was successfully processed. * - CHIP_ERROR_BUSY: Another operation is currently in progress. * - CHIP_ERROR_INTERNAL: An internal error occurred while activating the RPC call. */ -CHIP_ERROR ActiveChanged(chip::NodeId nodeId, uint32_t promisedActiveDurationMs); +CHIP_ERROR ActiveChanged(chip::ScopedNodeId scopedNodeId, uint32_t promisedActiveDurationMs); /** * @brief CADMIN attribute has changed of one of the bridged devices that was previously added. diff --git a/examples/fabric-admin/rpc/RpcServer.cpp b/examples/fabric-admin/rpc/RpcServer.cpp index d5e072305fe0dc..8613d06c6f3d9f 100644 --- a/examples/fabric-admin/rpc/RpcServer.cpp +++ b/examples/fabric-admin/rpc/RpcServer.cpp @@ -42,6 +42,17 @@ namespace { #if defined(PW_RPC_FABRIC_ADMIN_SERVICE) && PW_RPC_FABRIC_ADMIN_SERVICE +struct ScopedNodeIdHasher +{ + std::size_t operator()(const chip::ScopedNodeId & scopedNodeId) const + { + std::size_t h1 = std::hash{}(scopedNodeId.GetFabricIndex()); + std::size_t h2 = std::hash{}(scopedNodeId.GetNodeId()); + // Bitshifting h2 reduces collisions when fabricIndex == nodeId. + return h1 ^ (h2 << 1); + } +}; + class FabricAdmin final : public rpc::FabricAdmin, public IcdManager::Delegate { public: @@ -49,22 +60,22 @@ class FabricAdmin final : public rpc::FabricAdmin, public IcdManager::Delegate { // Accessing mPendingCheckIn should only be done while holding ChipStackLock assertChipStackLockedByCurrentThread(); - NodeId nodeId = clientInfo.peer_node.GetNodeId(); - auto it = mPendingCheckIn.find(nodeId); + ScopedNodeId scopedNodeId = clientInfo.peer_node; + auto it = mPendingCheckIn.find(scopedNodeId); VerifyOrReturn(it != mPendingCheckIn.end()); KeepActiveDataForCheckIn checkInData = it->second; // Removed from pending map as check-in from this node has occured and we will handle the pending KeepActive // request. - mPendingCheckIn.erase(nodeId); + mPendingCheckIn.erase(scopedNodeId); auto timeNow = System::SystemClock().GetMonotonicTimestamp(); if (timeNow > checkInData.mRequestExpiryTimestamp) { - ChipLogError( - NotSpecified, - "ICD check-in for device we have been waiting, came after KeepActive expiry. Reqeust dropped for Node ID: 0x%lx", - nodeId); + ChipLogError(NotSpecified, + "ICD check-in for device we have been waiting, came after KeepActive expiry. Request dropped for ID: " + "[%d:0x " ChipLogFormatX64 "]", + scopedNodeId.GetFabricIndex(), ChipLogValueX64(scopedNodeId.GetNodeId())); return; } @@ -74,7 +85,7 @@ class FabricAdmin final : public rpc::FabricAdmin, public IcdManager::Delegate // there is no mechanism for us to communicate with the client that sent out the KeepActive // command that there was a failure, we simply fail silently. After spec issue is // addressed, we can implement what spec defines here. - auto onDone = [=](uint32_t promisedActiveDuration) { ActiveChanged(nodeId, promisedActiveDuration); }; + auto onDone = [=](uint32_t promisedActiveDuration) { ActiveChanged(scopedNodeId, promisedActiveDuration); }; CHIP_ERROR err = StayActiveSender::SendStayActiveCommand(checkInData.mStayActiveDurationMs, clientInfo.peer_node, app::InteractionModelEngine::GetInstance(), onDone); if (err != CHIP_NO_ERROR) @@ -86,10 +97,13 @@ class FabricAdmin final : public rpc::FabricAdmin, public IcdManager::Delegate pw::Status OpenCommissioningWindow(const chip_rpc_DeviceCommissioningWindowInfo & request, chip_rpc_OperationStatus & response) override { - NodeId nodeId = request.node_id; - uint32_t commissioningTimeoutSec = request.commissioning_timeout; + VerifyOrReturnValue(request.has_id, pw::Status::InvalidArgument()); + // TODO(#35875): OpenDeviceCommissioningWindow uses the same controller every time and doesn't currently accept + // FabricIndex. For now we are dropping fabric index from the scoped node id. + NodeId nodeId = request.id.node_id; uint32_t iterations = request.iterations; uint16_t discriminator = request.discriminator; + uint16_t commissioningTimeoutSec = static_cast(request.commissioning_timeout); // Log the request details for debugging ChipLogProgress(NotSpecified, @@ -97,7 +111,7 @@ class FabricAdmin final : public rpc::FabricAdmin, public IcdManager::Delegate static_cast(nodeId), commissioningTimeoutSec, iterations, discriminator); // Open the device commissioning window using raw binary data for salt and verifier - DeviceMgr().OpenDeviceCommissioningWindow(nodeId, commissioningTimeoutSec, iterations, discriminator, + DeviceMgr().OpenDeviceCommissioningWindow(nodeId, iterations, commissioningTimeoutSec, discriminator, ByteSpan(request.salt.bytes, request.salt.size), ByteSpan(request.verifier.bytes, request.verifier.size)); @@ -149,18 +163,19 @@ class FabricAdmin final : public rpc::FabricAdmin, public IcdManager::Delegate pw::Status KeepActive(const chip_rpc_KeepActiveParameters & request, pw_protobuf_Empty & response) override { - ChipLogProgress(NotSpecified, "Received KeepActive request: 0x%lx, %u", request.node_id, request.stay_active_duration_ms); - // TODO(#33221): We should really be using ScopedNode, but that requires larger fix in communication between - // fabric-admin and fabric-bridge. For now we make the assumption that there is only one fabric used by - // fabric-admin. + VerifyOrReturnValue(request.has_id, pw::Status::InvalidArgument()); + ScopedNodeId scopedNodeId(request.id.node_id, request.id.fabric_index); + ChipLogProgress(NotSpecified, "Received KeepActive request: Id[%d, 0x" ChipLogFormatX64 "], %u", + scopedNodeId.GetFabricIndex(), ChipLogValueX64(scopedNodeId.GetNodeId()), request.stay_active_duration_ms); + KeepActiveWorkData * data = - Platform::New(this, request.node_id, request.stay_active_duration_ms, request.timeout_ms); + Platform::New(this, scopedNodeId, request.stay_active_duration_ms, request.timeout_ms); VerifyOrReturnValue(data, pw::Status::Internal()); DeviceLayer::PlatformMgr().ScheduleWork(KeepActiveWork, reinterpret_cast(data)); return pw::OkStatus(); } - void ScheduleSendingKeepActiveOnCheckIn(NodeId nodeId, uint32_t stayActiveDurationMs, uint32_t timeoutMs) + void ScheduleSendingKeepActiveOnCheckIn(ScopedNodeId scopedNodeId, uint32_t stayActiveDurationMs, uint32_t timeoutMs) { // Accessing mPendingCheckIn should only be done while holding ChipStackLock assertChipStackLockedByCurrentThread(); @@ -170,14 +185,14 @@ class FabricAdmin final : public rpc::FabricAdmin, public IcdManager::Delegate KeepActiveDataForCheckIn checkInData = { .mStayActiveDurationMs = stayActiveDurationMs, .mRequestExpiryTimestamp = expiryTimestamp }; - auto it = mPendingCheckIn.find(nodeId); + auto it = mPendingCheckIn.find(scopedNodeId); if (it != mPendingCheckIn.end()) { checkInData.mStayActiveDurationMs = std::max(checkInData.mStayActiveDurationMs, it->second.mStayActiveDurationMs); checkInData.mRequestExpiryTimestamp = std::max(checkInData.mRequestExpiryTimestamp, it->second.mRequestExpiryTimestamp); } - mPendingCheckIn[nodeId] = checkInData; + mPendingCheckIn[scopedNodeId] = checkInData; } private: @@ -189,12 +204,14 @@ class FabricAdmin final : public rpc::FabricAdmin, public IcdManager::Delegate struct KeepActiveWorkData { - KeepActiveWorkData(FabricAdmin * fabricAdmin, NodeId nodeId, uint32_t stayActiveDurationMs, uint32_t timeoutMs) : - mFabricAdmin(fabricAdmin), mNodeId(nodeId), mStayActiveDurationMs(stayActiveDurationMs), mTimeoutMs(timeoutMs) + KeepActiveWorkData(FabricAdmin * fabricAdmin, ScopedNodeId scopedNodeId, uint32_t stayActiveDurationMs, + uint32_t timeoutMs) : + mFabricAdmin(fabricAdmin), + mScopedNodeId(scopedNodeId), mStayActiveDurationMs(stayActiveDurationMs), mTimeoutMs(timeoutMs) {} FabricAdmin * mFabricAdmin; - NodeId mNodeId; + ScopedNodeId mScopedNodeId; uint32_t mStayActiveDurationMs; uint32_t mTimeoutMs; }; @@ -202,14 +219,14 @@ class FabricAdmin final : public rpc::FabricAdmin, public IcdManager::Delegate static void KeepActiveWork(intptr_t arg) { KeepActiveWorkData * data = reinterpret_cast(arg); - data->mFabricAdmin->ScheduleSendingKeepActiveOnCheckIn(data->mNodeId, data->mStayActiveDurationMs, data->mTimeoutMs); + data->mFabricAdmin->ScheduleSendingKeepActiveOnCheckIn(data->mScopedNodeId, data->mStayActiveDurationMs, data->mTimeoutMs); Platform::Delete(data); } // Modifications to mPendingCheckIn should be done on the MatterEventLoop thread // otherwise we would need a mutex protecting this data to prevent race as this // data is accessible by both RPC thread and Matter eventloop. - std::unordered_map mPendingCheckIn; + std::unordered_map mPendingCheckIn; }; FabricAdmin fabric_admin_service; diff --git a/examples/fabric-admin/scripts/fabric-sync-app.py b/examples/fabric-admin/scripts/fabric-sync-app.py index 797a08a9451047..bc26c655be9024 100755 --- a/examples/fabric-admin/scripts/fabric-sync-app.py +++ b/examples/fabric-admin/scripts/fabric-sync-app.py @@ -22,6 +22,7 @@ import sys import typing from argparse import ArgumentParser +from pathlib import Path from tempfile import TemporaryDirectory @@ -142,8 +143,7 @@ async def run_bridge(program, storage_dir=None, rpc_admin_port=None, secured_device_port=None): args = [] if storage_dir is not None: - args.extend(["--KVS", - os.path.join(storage_dir, "chip_fabric_bridge_kvs")]) + args.extend(["--KVS", storage_dir.joinpath("chip_fabric_bridge_kvs")]) if rpc_admin_port is not None: args.extend(["--fabric-admin-server-port", str(rpc_admin_port)]) if rpc_bridge_port is not None: @@ -169,14 +169,13 @@ async def main(args): storage_dir = args.storage_dir if storage_dir is not None: - os.makedirs(storage_dir, exist_ok=True) + storage_dir.mkdir(parents=True, exist_ok=True) else: storage = TemporaryDirectory(prefix="fabric-sync-app") - storage_dir = storage.name + storage_dir = Path(storage.name) - pipe = args.stdin_pipe - if pipe and not os.path.exists(pipe): - os.mkfifo(pipe) + if args.stdin_pipe and not args.stdin_pipe.exists(): + os.mkfifo(args.stdin_pipe) admin, bridge = await asyncio.gather( run_admin( @@ -206,6 +205,8 @@ def terminate(): admin.terminate() with contextlib.suppress(ProcessLookupError): bridge.terminate() + if args.stdin_pipe: + args.stdin_pipe.unlink(missing_ok=True) loop.remove_signal_handler(signal.SIGINT) loop.remove_signal_handler(signal.SIGTERM) @@ -247,13 +248,17 @@ def terminate(): await admin.send(f"pairing open-commissioning-window {bridge_node_id} {cw_endpoint_id}" f" {cw_option} {cw_timeout} {cw_iteration} {cw_discriminator}") + def get_input_forwarder(): + if args.stdin_pipe: + return forward_pipe(args.stdin_pipe, admin.p.stdin) + return forward_stdin(admin.p.stdin) + try: - forward = forward_pipe(pipe, admin.p.stdin) if pipe else forward_stdin(admin.p.stdin) # Wait for any of the tasks to complete. _, pending = await asyncio.wait([ asyncio.create_task(admin.wait()), asyncio.create_task(bridge.wait()), - asyncio.create_task(forward), + asyncio.create_task(get_input_forwarder()), ], return_when=asyncio.FIRST_COMPLETED) # Cancel the remaining tasks. for task in pending: @@ -269,22 +274,22 @@ def terminate(): if __name__ == "__main__": parser = ArgumentParser(description="Fabric-Sync Example Application") - parser.add_argument("--app-admin", metavar="PATH", + parser.add_argument("--app-admin", metavar="PATH", type=Path, default=shutil.which("fabric-admin"), help="path to the fabric-admin executable; default=%(default)s") - parser.add_argument("--app-bridge", metavar="PATH", + parser.add_argument("--app-bridge", metavar="PATH", type=Path, default=shutil.which("fabric-bridge-app"), help="path to the fabric-bridge executable; default=%(default)s") parser.add_argument("--app-admin-rpc-port", metavar="PORT", type=int, help="fabric-admin RPC server port") parser.add_argument("--app-bridge-rpc-port", metavar="PORT", type=int, help="fabric-bridge RPC server port") - parser.add_argument("--stdin-pipe", metavar="PATH", + parser.add_argument("--stdin-pipe", metavar="PATH", type=Path, help="read input from a named pipe instead of stdin") - parser.add_argument("--storage-dir", metavar="PATH", + parser.add_argument("--storage-dir", metavar="PATH", type=Path, help=("directory to place storage files in; by default " "volatile storage is used")) - parser.add_argument("--paa-trust-store-path", metavar="PATH", + parser.add_argument("--paa-trust-store-path", metavar="PATH", type=Path, help="path to directory holding PAA certificates") parser.add_argument("--commissioner-name", metavar="NAME", help="commissioner name to use for the admin") @@ -299,9 +304,11 @@ def terminate(): parser.add_argument("--passcode", metavar="NUM", type=int, help="passcode to use for the bridge") args = parser.parse_args() - if args.app_admin is None or not os.path.exists(args.app_admin): + if args.app_admin is None or not args.app_admin.exists(): parser.error("fabric-admin executable not found in PATH. Use '--app-admin' argument to provide it.") - if args.app_bridge is None or not os.path.exists(args.app_bridge): + if args.app_bridge is None or not args.app_bridge.exists(): parser.error("fabric-bridge-app executable not found in PATH. Use '--app-bridge' argument to provide it.") + if args.stdin_pipe and args.stdin_pipe.exists() and not args.stdin_pipe.is_fifo(): + parser.error("given stdin pipe exists and is not a named pipe") with contextlib.suppress(KeyboardInterrupt): asyncio.run(main(args)) diff --git a/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.matter b/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.matter index 0b4cb214b5f3be..b261eba0bb3a4d 100644 --- a/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.matter +++ b/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -703,6 +710,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1690,7 +1698,7 @@ cluster GroupKeyManagement = 63 { } /** Supports the ability for clients to request the commissioning of themselves or other nodes onto a fabric which the cluster server can commission onto. */ -provisional cluster CommissionerControl = 1873 { +cluster CommissionerControl = 1873 { revision 1; bitmap SupportedDeviceCategoryBitmap : bitmap32 { diff --git a/examples/fabric-bridge-app/fabric-bridge-common/include/BridgedDevice.h b/examples/fabric-bridge-app/fabric-bridge-common/include/BridgedDevice.h index 0de35ecbfa32e8..526ecfff2157f2 100644 --- a/examples/fabric-bridge-app/fabric-bridge-common/include/BridgedDevice.h +++ b/examples/fabric-bridge-app/fabric-bridge-common/include/BridgedDevice.h @@ -49,7 +49,7 @@ class BridgedDevice std::optional openerVendorId = std::nullopt; }; - BridgedDevice(chip::NodeId nodeId); + BridgedDevice(chip::ScopedNodeId scopedNodeId); virtual ~BridgedDevice() = default; [[nodiscard]] bool IsReachable() const { return mReachable; } @@ -62,7 +62,7 @@ class BridgedDevice inline void SetEndpointId(chip::EndpointId id) { mEndpointId = id; }; inline chip::EndpointId GetEndpointId() { return mEndpointId; }; - inline chip::NodeId GetNodeId() { return mNodeId; }; + inline chip::ScopedNodeId GetScopedNodeId() { return mScopedNodeId; }; inline void SetParentEndpointId(chip::EndpointId id) { mParentEndpointId = id; }; inline chip::EndpointId GetParentEndpointId() { return mParentEndpointId; }; @@ -80,7 +80,7 @@ class BridgedDevice bool mReachable = false; bool mIsIcd = false; - chip::NodeId mNodeId = 0; + chip::ScopedNodeId mScopedNodeId; chip::EndpointId mEndpointId = 0; chip::EndpointId mParentEndpointId = 0; diff --git a/examples/fabric-bridge-app/fabric-bridge-common/include/BridgedDeviceManager.h b/examples/fabric-bridge-app/fabric-bridge-common/include/BridgedDeviceManager.h index ac28d31edf507c..127898fc5b2fab 100644 --- a/examples/fabric-bridge-app/fabric-bridge-common/include/BridgedDeviceManager.h +++ b/examples/fabric-bridge-app/fabric-bridge-common/include/BridgedDeviceManager.h @@ -82,28 +82,27 @@ class BridgedDeviceManager BridgedDevice * GetDevice(chip::EndpointId endpointId) const; /** - * @brief Gets a device from its NodeId. + * @brief Gets a device from its ScopedNodeId. * * This function iterates through the available devices and returns the device that matches the - * specified NodeId. If no device matches the NodeId, it returns nullptr. + * specified ScopedNodeId. If no device matches the ScopedNodeId, it returns nullptr. * - * @param nodeId The NodeId of the device to be retrieved. + * @param scopedNodeId The ScopedNodeId of the device to be retrieved. * @return BridgedDevice* A pointer to the device if found, nullptr otherwise. */ - BridgedDevice * GetDeviceByNodeId(chip::NodeId nodeId) const; + BridgedDevice * GetDeviceByScopedNodeId(chip::ScopedNodeId scopedNodeId) const; /** - * @brief Removes a device from a dynamic endpoint by its NodeId. + * @brief Removes a device from a dynamic endpoint by its ScopedNodeId. * - * This function attempts to remove a device from a dynamic endpoint by iterating through the - * available endpoints and checking if the device matches the specified NodeId. If the device is - * found, it clears the dynamic endpoint, logs the removal, and returns the index of the removed - * endpoint. If the device is not found, it returns -1. + * This function attempts to remove a device and the associated dynamic endpoint by iterating through + * the available device and checking if the device matches the specified ScopedNodeId. If the device is + * found, it removes the dynamic endpoint. * - * @param nodeId The NodeId of the device to be removed. - * @return int The index of the removed dynamic endpoint if successful, -1 otherwise. + * @param scopedNodeId The ScopedNodeId of the device to be removed. + * @return unsigned of the index of the removed dynamic endpoint if successful, nullopt otherwise. */ - std::optional RemoveDeviceByNodeId(chip::NodeId nodeId); + std::optional RemoveDeviceByScopedNodeId(chip::ScopedNodeId scopedNodeId); /** * Finds the device with the given unique id (if any) diff --git a/examples/fabric-bridge-app/fabric-bridge-common/src/BridgedDevice.cpp b/examples/fabric-bridge-app/fabric-bridge-common/src/BridgedDevice.cpp index 27364976d121f5..7d588112997570 100644 --- a/examples/fabric-bridge-app/fabric-bridge-common/src/BridgedDevice.cpp +++ b/examples/fabric-bridge-app/fabric-bridge-common/src/BridgedDevice.cpp @@ -24,78 +24,31 @@ #include #include -namespace { - -struct ActiveChangeEventWorkData -{ - chip::EndpointId mEndpointId; - uint32_t mPromisedActiveDuration; -}; - -struct ReportAttributeChangedWorkData -{ - chip::EndpointId mEndpointId; - bool mWindowChanged = false; - bool mFabricIndexChanged = false; - bool mVendorChanged = false; -}; - -void ActiveChangeEventWork(intptr_t arg) -{ - ActiveChangeEventWorkData * data = reinterpret_cast(arg); - - chip::app::Clusters::BridgedDeviceBasicInformation::Events::ActiveChanged::Type event{}; - event.promisedActiveDuration = data->mPromisedActiveDuration; - chip::EventNumber eventNumber = 0; - - CHIP_ERROR err = chip::app::LogEvent(event, data->mEndpointId, eventNumber); - if (err != CHIP_NO_ERROR) - { - ChipLogProgress(NotSpecified, "LogEvent for ActiveChanged failed %s", err.AsString()); - } - chip::Platform::Delete(data); -} - -void ReportAttributeChangedWork(intptr_t arg) -{ - ReportAttributeChangedWorkData * data = reinterpret_cast(arg); - - if (data->mWindowChanged) - { - MatterReportingAttributeChangeCallback(data->mEndpointId, chip::app::Clusters::AdministratorCommissioning::Id, - chip::app::Clusters::AdministratorCommissioning::Attributes::WindowStatus::Id); - } - if (data->mFabricIndexChanged) - { - MatterReportingAttributeChangeCallback(data->mEndpointId, chip::app::Clusters::AdministratorCommissioning::Id, - chip::app::Clusters::AdministratorCommissioning::Attributes::AdminFabricIndex::Id); - } - if (data->mVendorChanged) - { - MatterReportingAttributeChangeCallback(data->mEndpointId, chip::app::Clusters::AdministratorCommissioning::Id, - chip::app::Clusters::AdministratorCommissioning::Attributes::AdminVendorId::Id); - } - chip::Platform::Delete(data); -} - -} // namespace - +using namespace chip; using namespace chip::app::Clusters::Actions; -BridgedDevice::BridgedDevice(chip::NodeId nodeId) +BridgedDevice::BridgedDevice(ScopedNodeId scopedNodeId) { - mReachable = false; - mNodeId = nodeId; - mEndpointId = chip::kInvalidEndpointId; + mReachable = false; + mScopedNodeId = scopedNodeId; + mEndpointId = kInvalidEndpointId; } void BridgedDevice::LogActiveChangeEvent(uint32_t promisedActiveDurationMs) { - ActiveChangeEventWorkData * workdata = chip::Platform::New(); - workdata->mEndpointId = mEndpointId; - workdata->mPromisedActiveDuration = promisedActiveDurationMs; - - chip::DeviceLayer::PlatformMgr().ScheduleWork(ActiveChangeEventWork, reinterpret_cast(workdata)); + EndpointId endpointId = mEndpointId; + + DeviceLayer::SystemLayer().ScheduleLambda([endpointId, promisedActiveDurationMs]() { + app::Clusters::BridgedDeviceBasicInformation::Events::ActiveChanged::Type event{}; + event.promisedActiveDuration = promisedActiveDurationMs; + EventNumber eventNumber = 0; + + CHIP_ERROR err = app::LogEvent(event, endpointId, eventNumber); + if (err != CHIP_NO_ERROR) + { + ChipLogProgress(NotSpecified, "LogEvent for ActiveChanged failed %s", err.AsString()); + } + }); } void BridgedDevice::SetReachable(bool reachable) @@ -114,15 +67,29 @@ void BridgedDevice::SetReachable(bool reachable) void BridgedDevice::SetAdminCommissioningAttributes(const AdminCommissioningAttributes & aAdminCommissioningAttributes) { - ReportAttributeChangedWorkData * workdata = chip::Platform::New(); - - workdata->mEndpointId = mEndpointId; - workdata->mWindowChanged = + EndpointId endpointId = mEndpointId; + bool windowChanged = (aAdminCommissioningAttributes.commissioningWindowStatus != mAdminCommissioningAttributes.commissioningWindowStatus); - workdata->mFabricIndexChanged = - (aAdminCommissioningAttributes.openerFabricIndex != mAdminCommissioningAttributes.openerFabricIndex); - workdata->mVendorChanged = (aAdminCommissioningAttributes.openerVendorId != mAdminCommissioningAttributes.openerVendorId); + bool fabricIndexChanged = (aAdminCommissioningAttributes.openerFabricIndex != mAdminCommissioningAttributes.openerFabricIndex); + bool vendorChanged = (aAdminCommissioningAttributes.openerVendorId != mAdminCommissioningAttributes.openerVendorId); mAdminCommissioningAttributes = aAdminCommissioningAttributes; - chip::DeviceLayer::PlatformMgr().ScheduleWork(ReportAttributeChangedWork, reinterpret_cast(workdata)); + + DeviceLayer::SystemLayer().ScheduleLambda([endpointId, windowChanged, fabricIndexChanged, vendorChanged]() { + if (windowChanged) + { + MatterReportingAttributeChangeCallback(endpointId, app::Clusters::AdministratorCommissioning::Id, + app::Clusters::AdministratorCommissioning::Attributes::WindowStatus::Id); + } + if (fabricIndexChanged) + { + MatterReportingAttributeChangeCallback(endpointId, app::Clusters::AdministratorCommissioning::Id, + app::Clusters::AdministratorCommissioning::Attributes::AdminFabricIndex::Id); + } + if (vendorChanged) + { + MatterReportingAttributeChangeCallback(endpointId, app::Clusters::AdministratorCommissioning::Id, + app::Clusters::AdministratorCommissioning::Attributes::AdminVendorId::Id); + } + }); } diff --git a/examples/fabric-bridge-app/fabric-bridge-common/src/BridgedDeviceManager.cpp b/examples/fabric-bridge-app/fabric-bridge-common/src/BridgedDeviceManager.cpp index 7101918f9f5385..0265f912027ca0 100644 --- a/examples/fabric-bridge-app/fabric-bridge-common/src/BridgedDeviceManager.cpp +++ b/examples/fabric-bridge-app/fabric-bridge-common/src/BridgedDeviceManager.cpp @@ -220,8 +220,9 @@ std::optional BridgedDeviceManager::AddDeviceEndpoint(std::unique_ptr< emberAfSetDynamicEndpoint(index, mCurrentEndpointId, ep, dataVersionStorage, deviceTypeList, parentEndpointId); if (err == CHIP_NO_ERROR) { - ChipLogProgress(NotSpecified, "Added device with nodeId=0x" ChipLogFormatX64 " to dynamic endpoint %d (index=%d)", - ChipLogValueX64(dev->GetNodeId()), mCurrentEndpointId, index); + ChipLogProgress(NotSpecified, "Added device with Id=[%d:0x" ChipLogFormatX64 "] to dynamic endpoint %d (index=%d)", + dev->GetScopedNodeId().GetFabricIndex(), ChipLogValueX64(dev->GetScopedNodeId().GetNodeId()), + mCurrentEndpointId, index); mDevices[index] = std::move(dev); return index; } @@ -314,11 +315,11 @@ BridgedDevice * BridgedDeviceManager::GetDeviceByUniqueId(const std::string & id return nullptr; } -BridgedDevice * BridgedDeviceManager::GetDeviceByNodeId(chip::NodeId nodeId) const +BridgedDevice * BridgedDeviceManager::GetDeviceByScopedNodeId(chip::ScopedNodeId scopedNodeId) const { for (uint8_t index = 0; index < CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT; ++index) { - if (mDevices[index] && mDevices[index]->GetNodeId() == nodeId) + if (mDevices[index] && mDevices[index]->GetScopedNodeId() == scopedNodeId) { return mDevices[index].get(); } @@ -326,17 +327,17 @@ BridgedDevice * BridgedDeviceManager::GetDeviceByNodeId(chip::NodeId nodeId) con return nullptr; } -std::optional BridgedDeviceManager::RemoveDeviceByNodeId(chip::NodeId nodeId) +std::optional BridgedDeviceManager::RemoveDeviceByScopedNodeId(chip::ScopedNodeId scopedNodeId) { for (unsigned index = 0; index < CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT; ++index) { - if (mDevices[index] && mDevices[index]->GetNodeId() == nodeId) + if (mDevices[index] && mDevices[index]->GetScopedNodeId() == scopedNodeId) { DeviceLayer::StackLock lock; EndpointId ep = emberAfClearDynamicEndpoint(index); mDevices[index] = nullptr; - ChipLogProgress(NotSpecified, "Removed device with NodeId=0x" ChipLogFormatX64 " from dynamic endpoint %d (index=%d)", - ChipLogValueX64(nodeId), ep, index); + ChipLogProgress(NotSpecified, "Removed device with Id=[%d:0x" ChipLogFormatX64 "] from dynamic endpoint %d (index=%d)", + scopedNodeId.GetFabricIndex(), ChipLogValueX64(scopedNodeId.GetNodeId()), ep, index); return index; } } diff --git a/examples/fabric-bridge-app/linux/RpcClient.cpp b/examples/fabric-bridge-app/linux/RpcClient.cpp index 3ef88e8ed7fec5..732fdf8aa1bf80 100644 --- a/examples/fabric-bridge-app/linux/RpcClient.cpp +++ b/examples/fabric-bridge-app/linux/RpcClient.cpp @@ -119,7 +119,8 @@ CHIP_ERROR StartRpcClient() CHIP_ERROR OpenCommissioningWindow(chip_rpc_DeviceCommissioningWindowInfo device) { - ChipLogProgress(NotSpecified, "OpenCommissioningWindow with Node Id 0x" ChipLogFormatX64, ChipLogValueX64(device.node_id)); + ChipLogProgress(NotSpecified, "OpenCommissioningWindow with Id=[%d:0x" ChipLogFormatX64 "]", device.id.fabric_index, + ChipLogValueX64(device.id.node_id)); // The RPC call is kept alive until it completes. When a response is received, it will be logged by the handler // function and the call will complete. @@ -135,22 +136,12 @@ CHIP_ERROR OpenCommissioningWindow(chip_rpc_DeviceCommissioningWindowInfo device } CHIP_ERROR -OpenCommissioningWindow(chip::Controller::CommissioningWindowPasscodeParams params) +OpenCommissioningWindow(chip::Controller::CommissioningWindowVerifierParams params, chip::FabricIndex fabricIndex) { chip_rpc_DeviceCommissioningWindowInfo device; - device.node_id = params.GetNodeId(); - device.commissioning_timeout = params.GetTimeout().count(); - device.discriminator = params.GetDiscriminator(); - device.iterations = params.GetIteration(); - - return OpenCommissioningWindow(device); -} - -CHIP_ERROR -OpenCommissioningWindow(chip::Controller::CommissioningWindowVerifierParams params) -{ - chip_rpc_DeviceCommissioningWindowInfo device; - device.node_id = params.GetNodeId(); + device.has_id = true; + device.id.node_id = params.GetNodeId(); + device.id.fabric_index = fabricIndex; device.commissioning_timeout = params.GetTimeout().count(); device.discriminator = params.GetDiscriminator(); device.iterations = params.GetIteration(); @@ -193,10 +184,12 @@ CommissionNode(chip::Controller::CommissioningWindowPasscodeParams params, Vendo return WaitForResponse(call); } -CHIP_ERROR KeepActive(chip::NodeId nodeId, uint32_t stayActiveDurationMs, uint32_t timeoutMs) +CHIP_ERROR KeepActive(chip::ScopedNodeId scopedNodeId, uint32_t stayActiveDurationMs, uint32_t timeoutMs) { chip_rpc_KeepActiveParameters params; - params.node_id = nodeId; + params.has_id = true; + params.id.node_id = scopedNodeId.GetNodeId(); + params.id.fabric_index = scopedNodeId.GetFabricIndex(); params.stay_active_duration_ms = stayActiveDurationMs; params.timeout_ms = timeoutMs; diff --git a/examples/fabric-bridge-app/linux/RpcServer.cpp b/examples/fabric-bridge-app/linux/RpcServer.cpp index bc8eed5c3dd9f0..8271cc3c49f041 100644 --- a/examples/fabric-bridge-app/linux/RpcServer.cpp +++ b/examples/fabric-bridge-app/linux/RpcServer.cpp @@ -52,10 +52,12 @@ class FabricBridge final : public chip::rpc::FabricBridge pw::Status FabricBridge::AddSynchronizedDevice(const chip_rpc_SynchronizedDevice & request, pw_protobuf_Empty & response) { - NodeId nodeId = request.node_id; - ChipLogProgress(NotSpecified, "Received AddSynchronizedDevice: " ChipLogFormatX64, ChipLogValueX64(nodeId)); + VerifyOrReturnValue(request.has_id, pw::Status::InvalidArgument()); + ScopedNodeId scopedNodeId(request.id.node_id, request.id.fabric_index); + ChipLogProgress(NotSpecified, "Received AddSynchronizedDevice: Id=[%d:" ChipLogFormatX64 "]", scopedNodeId.GetFabricIndex(), + ChipLogValueX64(scopedNodeId.GetNodeId())); - auto device = std::make_unique(nodeId); + auto device = std::make_unique(scopedNodeId); device->SetReachable(true); BridgedDevice::BridgedAttributes attributes; @@ -116,11 +118,12 @@ pw::Status FabricBridge::AddSynchronizedDevice(const chip_rpc_SynchronizedDevice auto result = BridgeDeviceMgr().AddDeviceEndpoint(std::move(device), 1 /* parentEndpointId */); if (!result.has_value()) { - ChipLogError(NotSpecified, "Failed to add device with nodeId=0x" ChipLogFormatX64, ChipLogValueX64(nodeId)); + ChipLogError(NotSpecified, "Failed to add device with Id=[%d:0x" ChipLogFormatX64 "]", scopedNodeId.GetFabricIndex(), + ChipLogValueX64(scopedNodeId.GetNodeId())); return pw::Status::Unknown(); } - BridgedDevice * addedDevice = BridgeDeviceMgr().GetDeviceByNodeId(nodeId); + BridgedDevice * addedDevice = BridgeDeviceMgr().GetDeviceByScopedNodeId(scopedNodeId); VerifyOrDie(addedDevice); CHIP_ERROR err = EcosystemInformation::EcosystemInformationServer::Instance().AddEcosystemInformationClusterToEndpoint( @@ -132,13 +135,16 @@ pw::Status FabricBridge::AddSynchronizedDevice(const chip_rpc_SynchronizedDevice pw::Status FabricBridge::RemoveSynchronizedDevice(const chip_rpc_SynchronizedDevice & request, pw_protobuf_Empty & response) { - NodeId nodeId = request.node_id; - ChipLogProgress(NotSpecified, "Received RemoveSynchronizedDevice: " ChipLogFormatX64, ChipLogValueX64(nodeId)); + VerifyOrReturnValue(request.has_id, pw::Status::InvalidArgument()); + ScopedNodeId scopedNodeId(request.id.node_id, request.id.fabric_index); + ChipLogProgress(NotSpecified, "Received RemoveSynchronizedDevice: Id=[%d:" ChipLogFormatX64 "]", scopedNodeId.GetFabricIndex(), + ChipLogValueX64(scopedNodeId.GetNodeId())); - auto removed_idx = BridgeDeviceMgr().RemoveDeviceByNodeId(nodeId); + auto removed_idx = BridgeDeviceMgr().RemoveDeviceByScopedNodeId(scopedNodeId); if (!removed_idx.has_value()) { - ChipLogError(NotSpecified, "Failed to remove device with nodeId=0x" ChipLogFormatX64, ChipLogValueX64(nodeId)); + ChipLogError(NotSpecified, "Failed to remove device with Id=[%d:0x" ChipLogFormatX64 "]", scopedNodeId.GetFabricIndex(), + ChipLogValueX64(scopedNodeId.GetNodeId())); return pw::Status::NotFound(); } @@ -147,14 +153,16 @@ pw::Status FabricBridge::RemoveSynchronizedDevice(const chip_rpc_SynchronizedDev pw::Status FabricBridge::ActiveChanged(const chip_rpc_KeepActiveChanged & request, pw_protobuf_Empty & response) { - NodeId nodeId = request.node_id; - ChipLogProgress(NotSpecified, "Received ActiveChanged: " ChipLogFormatX64, ChipLogValueX64(nodeId)); + VerifyOrReturnValue(request.has_id, pw::Status::InvalidArgument()); + ScopedNodeId scopedNodeId(request.id.node_id, request.id.fabric_index); + ChipLogProgress(NotSpecified, "Received ActiveChanged: Id=[%d:" ChipLogFormatX64 "]", scopedNodeId.GetFabricIndex(), + ChipLogValueX64(scopedNodeId.GetNodeId())); - auto * device = BridgeDeviceMgr().GetDeviceByNodeId(nodeId); + auto * device = BridgeDeviceMgr().GetDeviceByScopedNodeId(scopedNodeId); if (device == nullptr) { - ChipLogError(NotSpecified, "Could not find bridged device associated with nodeId=0x" ChipLogFormatX64, - ChipLogValueX64(nodeId)); + ChipLogError(NotSpecified, "Could not find bridged device associated with Id=[%d:0x" ChipLogFormatX64 "]", + scopedNodeId.GetFabricIndex(), ChipLogValueX64(scopedNodeId.GetNodeId())); return pw::Status::NotFound(); } @@ -165,14 +173,16 @@ pw::Status FabricBridge::ActiveChanged(const chip_rpc_KeepActiveChanged & reques pw::Status FabricBridge::AdminCommissioningAttributeChanged(const chip_rpc_AdministratorCommissioningChanged & request, pw_protobuf_Empty & response) { - NodeId nodeId = request.node_id; - ChipLogProgress(NotSpecified, "Received CADMIN attribut change: " ChipLogFormatX64, ChipLogValueX64(nodeId)); + VerifyOrReturnValue(request.has_id, pw::Status::InvalidArgument()); + ScopedNodeId scopedNodeId(request.id.node_id, request.id.fabric_index); + ChipLogProgress(NotSpecified, "Received CADMIN attribute change: Id=[%d:" ChipLogFormatX64 "]", scopedNodeId.GetFabricIndex(), + ChipLogValueX64(scopedNodeId.GetNodeId())); - auto * device = BridgeDeviceMgr().GetDeviceByNodeId(nodeId); + auto * device = BridgeDeviceMgr().GetDeviceByScopedNodeId(scopedNodeId); if (device == nullptr) { - ChipLogError(NotSpecified, "Could not find bridged device associated with nodeId=0x" ChipLogFormatX64, - ChipLogValueX64(nodeId)); + ChipLogError(NotSpecified, "Could not find bridged device associated with Id=[%d:0x" ChipLogFormatX64 "]", + scopedNodeId.GetFabricIndex(), ChipLogValueX64(scopedNodeId.GetNodeId())); return pw::Status::NotFound(); } diff --git a/examples/fabric-bridge-app/linux/include/CommissionerControl.h b/examples/fabric-bridge-app/linux/include/CommissionerControl.h index 61779e41919f3e..1188d9a796a4c5 100644 --- a/examples/fabric-bridge-app/linux/include/CommissionerControl.h +++ b/examples/fabric-bridge-app/linux/include/CommissionerControl.h @@ -30,6 +30,7 @@ class CommissionerControlDelegate : public Delegate { public: CHIP_ERROR HandleCommissioningApprovalRequest(const CommissioningApprovalRequest & request) override; + // TODO(#35627) clientNodeId should move towards ScopedNodeId. CHIP_ERROR ValidateCommissionNodeCommand(NodeId clientNodeId, uint64_t requestId) override; CHIP_ERROR GetCommissioningWindowParams(CommissioningWindowParams & outParams) override; CHIP_ERROR HandleCommissionNode(const CommissioningWindowParams & params) override; diff --git a/examples/fabric-bridge-app/linux/include/RpcClient.h b/examples/fabric-bridge-app/linux/include/RpcClient.h index 2455bc56c8400f..1ede84ff446ecd 100644 --- a/examples/fabric-bridge-app/linux/include/RpcClient.h +++ b/examples/fabric-bridge-app/linux/include/RpcClient.h @@ -19,6 +19,7 @@ #pragma once #include +#include #include /** @@ -37,18 +38,6 @@ void SetRpcRemoteServerPort(uint16_t port); */ CHIP_ERROR StartRpcClient(); -/** - * Opens a commissioning window for a specified node using setup PIN (passcode). - * - * @param params Params for opening the commissioning window using passcode. - * @return CHIP_ERROR An error code indicating the success or failure of the operation. - * - CHIP_NO_ERROR: The RPC command was successfully processed. - * - CHIP_ERROR_BUSY: Another commissioning window is currently in progress. - * - CHIP_ERROR_INTERNAL: An internal error occurred. - */ -CHIP_ERROR -OpenCommissioningWindow(chip::Controller::CommissioningWindowPasscodeParams params); - /** * Opens a commissioning window for a specified node using pre-computed PAKE passcode verifier. * @@ -59,7 +48,7 @@ OpenCommissioningWindow(chip::Controller::CommissioningWindowPasscodeParams para * - CHIP_ERROR_INTERNAL: An internal error occurred. */ CHIP_ERROR -OpenCommissioningWindow(chip::Controller::CommissioningWindowVerifierParams params); +OpenCommissioningWindow(chip::Controller::CommissioningWindowVerifierParams params, chip::FabricIndex fabricIndex); /** * Commission a node using the specified parameters. @@ -80,4 +69,4 @@ OpenCommissioningWindow(chip::Controller::CommissioningWindowVerifierParams para CHIP_ERROR CommissionNode(chip::Controller::CommissioningWindowPasscodeParams params, chip::VendorId vendorId, uint16_t productId); -CHIP_ERROR KeepActive(chip::NodeId nodeId, uint32_t stayActiveDurationMs, uint32_t timeoutMs); +CHIP_ERROR KeepActive(chip::ScopedNodeId scopedNodeId, uint32_t stayActiveDurationMs, uint32_t timeoutMs); diff --git a/examples/fabric-bridge-app/linux/main.cpp b/examples/fabric-bridge-app/linux/main.cpp index d08673ad12a7a6..a101fd3d32a91a 100644 --- a/examples/fabric-bridge-app/linux/main.cpp +++ b/examples/fabric-bridge-app/linux/main.cpp @@ -16,10 +16,6 @@ * limitations under the License. */ -#include -#include -#include - #include #include "BridgedAdministratorCommissioning.h" @@ -55,8 +51,6 @@ using namespace chip::app::Clusters::BridgedDeviceBasicInformation; namespace { -constexpr uint16_t kPollIntervalMs = 100; - #if defined(PW_RPC_FABRIC_BRIDGE_SERVICE) && PW_RPC_FABRIC_BRIDGE_SERVICE constexpr uint16_t kRetryIntervalS = 3; #endif @@ -87,10 +81,10 @@ bool HandleCustomOption(const char * aProgram, ArgParser::OptionSet * aOptions, switch (aIdentifier) { case kOptionFabricAdminServerPortNumber: - gFabricAdminServerPort = atoi(aValue); + gFabricAdminServerPort = static_cast(atoi(aValue)); break; case kOptionLocalServerPortNumber: - gLocalServerPort = atoi(aValue); + gLocalServerPort = static_cast(atoi(aValue)); break; default: ArgParser::PrintArgError("%s: INTERNAL ERROR: Unhandled option: %s\n", aProgram, aName); @@ -103,47 +97,6 @@ bool HandleCustomOption(const char * aProgram, ArgParser::OptionSet * aOptions, ArgParser::OptionSet sProgramCustomOptions = { HandleCustomOption, sProgramCustomOptionDefs, "GENERAL OPTIONS", sProgramCustomOptionHelp }; -bool KeyboardHit() -{ - int bytesWaiting; - ioctl(0, FIONREAD, &bytesWaiting); - return bytesWaiting > 0; -} - -void BridgePollingThread() -{ - while (true) - { - if (KeyboardHit()) - { - int ch = getchar(); - if (ch == 'e') - { - ChipLogProgress(NotSpecified, "Exiting....."); - exit(0); - } -#if defined(PW_RPC_FABRIC_BRIDGE_SERVICE) && PW_RPC_FABRIC_BRIDGE_SERVICE - else if (ch == 'o') - { - CHIP_ERROR err = OpenCommissioningWindow(Controller::CommissioningWindowPasscodeParams() - .SetNodeId(0x1234) - .SetTimeout(300) - .SetDiscriminator(3840) - .SetIteration(1000)); - if (err != CHIP_NO_ERROR) - { - ChipLogError(NotSpecified, "Failed to call OpenCommissioningWindow RPC: %" CHIP_ERROR_FORMAT, err.Format()); - } - } -#endif // defined(PW_RPC_FABRIC_BRIDGE_SERVICE) && PW_RPC_FABRIC_BRIDGE_SERVICE - continue; - } - - // Sleep to avoid tight loop reading commands - usleep(kPollIntervalMs * 1000); - } -} - #if defined(PW_RPC_FABRIC_BRIDGE_SERVICE) && PW_RPC_FABRIC_BRIDGE_SERVICE void AttemptRpcClientConnect(System::Layer * systemLayer, void * appState) { @@ -201,19 +154,20 @@ void AdministratorCommissioningCommandHandler::InvokeCommand(HandlerContext & ha // TODO: issues:#33784, need to make OpenCommissioningWindow synchronous if (device != nullptr && OpenCommissioningWindow(Controller::CommissioningWindowVerifierParams() - .SetNodeId(device->GetNodeId()) + .SetNodeId(device->GetScopedNodeId().GetNodeId()) .SetTimeout(commandData.commissioningTimeout) .SetDiscriminator(commandData.discriminator) .SetIteration(commandData.iterations) .SetSalt(commandData.salt) - .SetVerifier(commandData.PAKEPasscodeVerifier)) == CHIP_NO_ERROR) + .SetVerifier(commandData.PAKEPasscodeVerifier), + device->GetScopedNodeId().GetFabricIndex()) == CHIP_NO_ERROR) { ChipLogProgress(NotSpecified, "Commissioning window is now open"); status = Status::Success; } else { - ChipLogProgress(NotSpecified, "Commissioning window is failed to open"); + ChipLogProgress(NotSpecified, "Commissioning window failed to open"); } #else ChipLogProgress(NotSpecified, "Commissioning window failed to open: PW_RPC_FABRIC_BRIDGE_SERVICE not defined"); @@ -268,7 +222,7 @@ void BridgedDeviceInformationCommandHandler::InvokeCommand(HandlerContext & hand Status status = Status::Failure; #if defined(PW_RPC_FABRIC_BRIDGE_SERVICE) && PW_RPC_FABRIC_BRIDGE_SERVICE - if (KeepActive(device->GetNodeId(), commandData.stayActiveDuration, commandData.timeoutMs) == CHIP_NO_ERROR) + if (KeepActive(device->GetScopedNodeId(), commandData.stayActiveDuration, commandData.timeoutMs) == CHIP_NO_ERROR) { ChipLogProgress(NotSpecified, "KeepActive successfully processed"); status = Status::Success; @@ -305,10 +259,6 @@ void ApplicationInit() AttemptRpcClientConnect(&DeviceLayer::SystemLayer(), nullptr); #endif - // Start a thread for bridge polling - std::thread pollingThread(BridgePollingThread); - pollingThread.detach(); - BridgeDeviceMgr().Init(); VerifyOrDie(gBridgedAdministratorCommissioning.Init() == CHIP_NO_ERROR); diff --git a/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongImExtendableInvokeCommand.kt b/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongImExtendableInvokeCommand.kt index 0b1a2ab7467f5c..be1af1d62c0818 100644 --- a/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongImExtendableInvokeCommand.kt +++ b/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongImExtendableInvokeCommand.kt @@ -75,6 +75,7 @@ class PairOnNetworkLongImExtendableInvokeCommand( ) { setFailure("invoke failure with incorrect status") } + responseCount++ } if (clusterId == CLUSTER_ID_TEST && commandId == TEST_ADD_ARGUMENT_RSP_COMMAND) { @@ -89,8 +90,8 @@ class PairOnNetworkLongImExtendableInvokeCommand( if (status != null) { setFailure("invoke failure with incorrect status") } + responseCount++ } - responseCount++ } override fun onNoResponse(noInvokeResponseData: NoInvokeResponseData) { @@ -126,7 +127,7 @@ class PairOnNetworkLongImExtendableInvokeCommand( val element1: InvokeElement = InvokeElement.newInstance( - /* endpointId= */ 0, + /* endpointId= */ 1, CLUSTER_ID_IDENTIFY, IDENTIFY_COMMAND, tlvWriter1.getEncoded(), diff --git a/examples/laundry-washer-app/nxp/rt/rw61x/BUILD.gn b/examples/laundry-washer-app/nxp/rt/rw61x/BUILD.gn index cb0b7ba0a96439..7f22eca6b2c085 100644 --- a/examples/laundry-washer-app/nxp/rt/rw61x/BUILD.gn +++ b/examples/laundry-washer-app/nxp/rt/rw61x/BUILD.gn @@ -171,7 +171,7 @@ rt_executable("laundry-washer") { "${common_example_dir}/device_callbacks/source/CommonDeviceCallbacks.cpp", "${common_example_dir}/device_manager/source/CHIPDeviceManager.cpp", "${common_example_dir}/icd/source/ICDUtil.cpp", - "${common_example_dir}/matter_button/source/AppMatterButtonEmpty.cpp", + "${common_example_dir}/matter_button/source/ButtonRegistrationEmpty.cpp", ] deps = [ diff --git a/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter b/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter index e9bd6ba5caf036..39546259b0bd19 100644 --- a/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter +++ b/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -1187,6 +1194,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/light-switch-app/ameba/README.md b/examples/light-switch-app/ameba/README.md index d24c9a54906553..a0d02751a830c1 100644 --- a/examples/light-switch-app/ameba/README.md +++ b/examples/light-switch-app/ameba/README.md @@ -26,11 +26,11 @@ The CHIP demo application is supported on - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:76 + $ docker pull ghcr.io/project-chip/chip-build-ameba:81 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:76 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:81 - Setup build environment: diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.matter b/examples/light-switch-app/light-switch-common/light-switch-app.matter index 5da173fe9dc113..07910e283f3a0a 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.matter +++ b/examples/light-switch-app/light-switch-common/light-switch-app.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -952,6 +959,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3215,7 +3223,7 @@ endpoint 2 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 2; + ram attribute featureMap default = 6; ram attribute clusterRevision default = 2; } } diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.zap b/examples/light-switch-app/light-switch-common/light-switch-app.zap index 89f718140f12e3..595b0d8f838a7d 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.zap +++ b/examples/light-switch-app/light-switch-common/light-switch-app.zap @@ -5587,7 +5587,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/light-switch-app/qpg/zap/switch.matter b/examples/light-switch-app/qpg/zap/switch.matter index dd41fdbcad9541..979ae18fa4234a 100644 --- a/examples/light-switch-app/qpg/zap/switch.matter +++ b/examples/light-switch-app/qpg/zap/switch.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -1336,6 +1343,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/light-switch-app/telink/README.md b/examples/light-switch-app/telink/README.md index c60dd6a27c3584..b2c75f1fc28fb9 100755 --- a/examples/light-switch-app/telink/README.md +++ b/examples/light-switch-app/telink/README.md @@ -263,10 +263,10 @@ feature for another Telink example: After build application with enabled OTA feature, use next binary files: -- zephyr.bin - main binary to flash PCB (Use at least 2MB PCB). -- zephyr-ota.bin - binary for OTA Provider +- merged.bin - main binary to flash PCB (Use at least 2MB PCB). +- matter.ota - binary for OTA Provider -All binaries has the same SW version. To test OTA “zephyr-ota.bin” should have +All binaries has the same SW version. To test OTA “matter.ota” should have higher SW version than base SW. Set CONFIG_CHIP_DEVICE_SOFTWARE_VERSION=2 in corresponding “prj.conf” configuration file. @@ -281,7 +281,7 @@ Usage of OTA: - Run the Linux OTA Provider with OTA image. ``` - ./chip-ota-provider-app -f zephyr-ota.bin + ./chip-ota-provider-app -f matter.ota ``` - Provision the Linux OTA Provider using chip-tool diff --git a/examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.matter b/examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.matter index 66acdd254d6214..0979b305ca9e70 100644 --- a/examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.matter +++ b/examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -1006,6 +1013,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/lighting-app/ameba/README.md b/examples/lighting-app/ameba/README.md index 810aa6d1d0af5b..7527d02f725099 100644 --- a/examples/lighting-app/ameba/README.md +++ b/examples/lighting-app/ameba/README.md @@ -23,11 +23,11 @@ The CHIP demo application is supported on - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:76 + $ docker pull ghcr.io/project-chip/chip-build-ameba:81 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:76 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:81 - Setup build environment: diff --git a/examples/lighting-app/bouffalolab/common/AppTask.cpp b/examples/lighting-app/bouffalolab/common/AppTask.cpp index 7e9b4920d03783..5fc74391f05af0 100644 --- a/examples/lighting-app/bouffalolab/common/AppTask.cpp +++ b/examples/lighting-app/bouffalolab/common/AppTask.cpp @@ -46,8 +46,6 @@ #include #include -#include - extern "C" { #include #include diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter index 99280db5e6b764..8c4fa34560a7c6 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -1006,6 +1013,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter index 2d6c439a3ea70d..d528254100181b 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -1006,6 +1013,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter index bc46399ed8d0ce..6d26e8c2f8e4f3 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -1006,6 +1013,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/lighting-app/esp32/main/CMakeLists.txt b/examples/lighting-app/esp32/main/CMakeLists.txt index 8b2a2fdce397cb..d3dc3421cc105f 100644 --- a/examples/lighting-app/esp32/main/CMakeLists.txt +++ b/examples/lighting-app/esp32/main/CMakeLists.txt @@ -51,7 +51,6 @@ set(SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/time-format-localization-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/level-control" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/network-commissioning" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/occupancy-sensor-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/on-off-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/operational-credentials-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ota-requestor" diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index e65b407b9caa6c..f8e6d2e795b4d4 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -1006,6 +1013,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2569,70 +2577,6 @@ cluster ColorControl = 768 { command StepColorTemperature(StepColorTemperatureRequest): DefaultSuccess = 76; } -/** The server cluster provides an interface to occupancy sensing functionality based on one or more sensing modalities, including configuration and provision of notifications of occupancy status. */ -cluster OccupancySensing = 1030 { - revision 5; - - enum OccupancySensorTypeEnum : enum8 { - kPIR = 0; - kUltrasonic = 1; - kPIRAndUltrasonic = 2; - kPhysicalContact = 3; - } - - bitmap Feature : bitmap32 { - kOther = 0x1; - kPassiveInfrared = 0x2; - kUltrasonic = 0x4; - kPhysicalContact = 0x8; - kActiveInfrared = 0x10; - kRadar = 0x20; - kRFSensing = 0x40; - kVision = 0x80; - } - - bitmap OccupancyBitmap : bitmap8 { - kOccupied = 0x1; - } - - bitmap OccupancySensorTypeBitmap : bitmap8 { - kPIR = 0x1; - kUltrasonic = 0x2; - kPhysicalContact = 0x4; - } - - struct HoldTimeLimitsStruct { - int16u holdTimeMin = 0; - int16u holdTimeMax = 1; - int16u holdTimeDefault = 2; - } - - info event OccupancyChanged = 0 { - OccupancyBitmap occupancy = 0; - } - - readonly attribute OccupancyBitmap occupancy = 0; - readonly attribute OccupancySensorTypeEnum occupancySensorType = 1; - readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2; - attribute access(write: manage) optional int16u holdTime = 3; - readonly attribute optional HoldTimeLimitsStruct holdTimeLimits = 4; - attribute access(write: manage) optional int16u PIROccupiedToUnoccupiedDelay = 16; - attribute access(write: manage) optional int16u PIRUnoccupiedToOccupiedDelay = 17; - attribute access(write: manage) optional int8u PIRUnoccupiedToOccupiedThreshold = 18; - attribute access(write: manage) optional int16u ultrasonicOccupiedToUnoccupiedDelay = 32; - attribute access(write: manage) optional int16u ultrasonicUnoccupiedToOccupiedDelay = 33; - attribute access(write: manage) optional int8u ultrasonicUnoccupiedToOccupiedThreshold = 34; - attribute access(write: manage) optional int16u physicalContactOccupiedToUnoccupiedDelay = 48; - attribute access(write: manage) optional int16u physicalContactUnoccupiedToOccupiedDelay = 49; - attribute access(write: manage) optional int8u physicalContactUnoccupiedToOccupiedThreshold = 50; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - endpoint 0 { device type ma_rootdevice = 22, version 1; @@ -3120,14 +3064,6 @@ endpoint 1 { handle command MoveColorTemperature; handle command StepColorTemperature; } - - server cluster OccupancySensing { - ram attribute occupancy; - ram attribute occupancySensorType; - ram attribute occupancySensorTypeBitmap; - callback attribute featureMap; - ram attribute clusterRevision default = 5; - } } diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index b7928f3b96f163..b04b233712c293 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -19,18 +19,18 @@ "package": [ { "pathRelativity": "relativeToZap", - "path": "../../../src/app/zap-templates/zcl/zcl.json", - "type": "zcl-properties", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", "category": "matter", - "version": 1, - "description": "Matter SDK ZCL data" + "version": "chip-v1" }, { "pathRelativity": "relativeToZap", - "path": "../../../src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", + "path": "../../../src/app/zap-templates/zcl/zcl.json", + "type": "zcl-properties", "category": "matter", - "version": "chip-v1" + "version": 1, + "description": "Matter SDK ZCL data" } ], "endpointTypes": [ @@ -5638,96 +5638,6 @@ "reportableChange": 0 } ] - }, - { - "name": "Occupancy Sensing", - "code": 1030, - "mfgCode": null, - "define": "OCCUPANCY_SENSING_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "Occupancy", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "OccupancyBitmap", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "OccupancySensorType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "OccupancySensorTypeEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "OccupancySensorTypeBitmap", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "OccupancySensorTypeBitmap", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "5", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] } ] } diff --git a/examples/lighting-app/nxp/common/include/AppEvent.h b/examples/lighting-app/nxp/common/include/AppEvent.h index b292afaddf8c18..562c0b4df66dcb 100644 --- a/examples/lighting-app/nxp/common/include/AppEvent.h +++ b/examples/lighting-app/nxp/common/include/AppEvent.h @@ -24,4 +24,5 @@ typedef void (*EventHandler)(const AppEvent &); struct AppEvent { EventHandler Handler; + void * extra; }; diff --git a/examples/lighting-app/nxp/k32w0/BUILD.gn b/examples/lighting-app/nxp/k32w0/BUILD.gn index a63a5967c3948b..65a62229a7f9cd 100644 --- a/examples/lighting-app/nxp/k32w0/BUILD.gn +++ b/examples/lighting-app/nxp/k32w0/BUILD.gn @@ -180,12 +180,17 @@ action("binsign") { output_name = "bignsign.log" outputs = [ "${root_build_dir}/${output_name}" ] + args = [ + "--sdk-root", + rebase_path(k32w0_sdk_root), + ] + if (chip_simple_hash_verification == 1) { - args = [ "--simple-hash" ] + args += [ "--simple-hash" ] } if (chip_enable_ota_requestor) { - args = [ "--ota-enabled" ] + args += [ "--ota-enabled" ] } } diff --git a/examples/lighting-app/nxp/k32w1/BUILD.gn b/examples/lighting-app/nxp/k32w1/BUILD.gn index 54030a789763ea..57a1b7921fcaf9 100644 --- a/examples/lighting-app/nxp/k32w1/BUILD.gn +++ b/examples/lighting-app/nxp/k32w1/BUILD.gn @@ -156,6 +156,11 @@ mcxw71_k32w1_executable("light_app") { "${common_example_dir}/clusters/source/ZclCallbacks.cpp", "${common_example_dir}/device_callbacks/source/CommonDeviceCallbacks.cpp", "${common_example_dir}/device_manager/source/CHIPDeviceManager.cpp", + "${common_example_dir}/matter_button/source/ButtonApp.cpp", + "${common_example_dir}/matter_button/source/ButtonBle.cpp", + "${common_example_dir}/matter_button/source/ButtonManager.cpp", + "${common_example_dir}/matter_button/source/ButtonRegistrationAppAndBle.cpp", + "${common_example_dir}/matter_button/source/ButtonWithTimer.cpp", "${common_example_dir}/operational_keystore/source/OperationalKeystoreS200.cpp", "${example_platform_dir}/factory_data/source/AppFactoryDataExample.cpp", ] @@ -180,10 +185,7 @@ mcxw71_k32w1_executable("light_app") { "${example_platform_dir}/button", ] - sources += [ - "${example_platform_dir}/button/ButtonManager.cpp", - "${example_platform_dir}/clusters/Identify.cpp", - ] + sources += [ "${example_platform_dir}/clusters/Identify.cpp" ] if (chip_enable_ota_requestor) { sources += [ "${example_platform_dir}/ota/OtaUtils.cpp" ] diff --git a/examples/lighting-app/nxp/k32w1/README.md b/examples/lighting-app/nxp/k32w1/README.md index c47449bf249490..d61ab1e42431d4 100644 --- a/examples/lighting-app/nxp/k32w1/README.md +++ b/examples/lighting-app/nxp/k32w1/README.md @@ -220,8 +220,8 @@ by running: The console should have already been installed in the virtual environment. From the `chip-console`, a user can send specific commands to the device. -For button commands, please run `rpcs.chip.rpc.Button.Event(index)` based on the -table below: +For button commands, please run `rpcs.chip.rpc.Button.Event(idx=index)` based on +the table below: | index | action | | ----- | --------------------------------------------- | diff --git a/examples/lighting-app/nxp/mcxw71/BUILD.gn b/examples/lighting-app/nxp/mcxw71/BUILD.gn index efd3af6fd5e19a..f7e9c42b6e752c 100644 --- a/examples/lighting-app/nxp/mcxw71/BUILD.gn +++ b/examples/lighting-app/nxp/mcxw71/BUILD.gn @@ -156,6 +156,11 @@ mcxw71_k32w1_executable("light_app") { "${common_example_dir}/clusters/source/ZclCallbacks.cpp", "${common_example_dir}/device_callbacks/source/CommonDeviceCallbacks.cpp", "${common_example_dir}/device_manager/source/CHIPDeviceManager.cpp", + "${common_example_dir}/matter_button/source/ButtonApp.cpp", + "${common_example_dir}/matter_button/source/ButtonBle.cpp", + "${common_example_dir}/matter_button/source/ButtonManager.cpp", + "${common_example_dir}/matter_button/source/ButtonRegistrationAppAndBle.cpp", + "${common_example_dir}/matter_button/source/ButtonWithTimer.cpp", "${common_example_dir}/operational_keystore/source/OperationalKeystoreS200.cpp", "${example_platform_dir}/factory_data/source/AppFactoryDataExample.cpp", ] @@ -183,10 +188,7 @@ mcxw71_k32w1_executable("light_app") { "${example_platform_dir}/button", ] - sources += [ - "${example_platform_dir}/button/ButtonManager.cpp", - "${example_platform_dir}/clusters/Identify.cpp", - ] + sources += [ "${example_platform_dir}/clusters/Identify.cpp" ] if (chip_enable_ota_requestor) { sources += [ "${example_platform_dir}/ota/OtaUtils.cpp" ] diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.matter b/examples/lighting-app/nxp/zap/lighting-on-off.matter index 0bca04dad59429..d76ebd5cd8a50d 100644 --- a/examples/lighting-app/nxp/zap/lighting-on-off.matter +++ b/examples/lighting-app/nxp/zap/lighting-on-off.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -1006,6 +1013,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/lighting-app/qpg/zap/light.matter b/examples/lighting-app/qpg/zap/light.matter index 6509c9202d54b8..fc3de298b9d073 100644 --- a/examples/lighting-app/qpg/zap/light.matter +++ b/examples/lighting-app/qpg/zap/light.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -1006,6 +1013,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter index b81d7d1ee68e71..ac3896a6d9cf03 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -1006,6 +1013,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter index b4aa594acd6f02..61be1cd04594e9 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -1265,6 +1272,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/lighting-app/telink/README.md b/examples/lighting-app/telink/README.md index 0bf52ea12c28fd..1a142507652784 100644 --- a/examples/lighting-app/telink/README.md +++ b/examples/lighting-app/telink/README.md @@ -204,10 +204,10 @@ feature for another Telink example: After build application with enabled OTA feature, use next binary files: -- zephyr.bin - main binary to flash PCB (Use at least 2MB PCB). -- zephyr-ota.bin - binary for OTA Provider +- merged.bin - main binary to flash PCB (Use at least 2MB PCB). +- matter.ota - binary for OTA Provider -All binaries has the same SW version. To test OTA “zephyr-ota.bin” should have +All binaries has the same SW version. To test OTA “matter.ota” should have higher SW version than base SW. Set CONFIG_CHIP_DEVICE_SOFTWARE_VERSION=2 in corresponding “prj.conf” configuration file. @@ -222,7 +222,7 @@ Usage of OTA: - Run the Linux OTA Provider with OTA image. ``` - ./chip-ota-provider-app -f zephyr-ota.bin + ./chip-ota-provider-app -f matter.ota ``` - Provision the Linux OTA Provider using chip-tool diff --git a/examples/lighting-app/telink/src/AppTask.cpp b/examples/lighting-app/telink/src/AppTask.cpp index 63a5cb7d910e0c..9e419150712c3c 100644 --- a/examples/lighting-app/telink/src/AppTask.cpp +++ b/examples/lighting-app/telink/src/AppTask.cpp @@ -252,7 +252,11 @@ void AppTask::PowerOnFactoryResetTimerEvent(struct k_timer * timer) void AppTask::LinkLeds(LedManager & ledManager) { -#if (!CONFIG_PWM) - ledManager.linkLed(LedManager::EAppLed_App0, 0); -#endif // !CONFIG_PWM +#if CONFIG_CHIP_ENABLE_APPLICATION_STATUS_LED + ledManager.linkLed(LedManager::EAppLed_Status, 0); +#endif + +#if !CONFIG_PWM + ledManager.linkLed(LedManager::EAppLed_App0, 1); +#endif /* !CONFIG_PWM */ } diff --git a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter index a5d5f2ba4fb274..e67ae7524be12e 100644 --- a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter +++ b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -758,6 +765,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/lit-icd-app/silabs/build_for_wifi_args.gni b/examples/lit-icd-app/silabs/build_for_wifi_args.gni index 56cd70b217e81e..6ef009e9064d75 100644 --- a/examples/lit-icd-app/silabs/build_for_wifi_args.gni +++ b/examples/lit-icd-app/silabs/build_for_wifi_args.gni @@ -29,7 +29,6 @@ sl_enable_test_event_trigger = true chip_enable_icd_server = true chip_subscription_timeout_resumption = false sl_use_subscription_syncing = true -icd_enforce_sit_slow_poll_limit = true chip_enable_icd_lit = true # ICD Matter Configuration flags diff --git a/examples/lit-icd-app/silabs/openthread.gni b/examples/lit-icd-app/silabs/openthread.gni index b12529c2cab39a..e84e7be8ed1292 100644 --- a/examples/lit-icd-app/silabs/openthread.gni +++ b/examples/lit-icd-app/silabs/openthread.gni @@ -32,7 +32,6 @@ sl_enable_test_event_trigger = true chip_enable_icd_server = true chip_subscription_timeout_resumption = false sl_use_subscription_syncing = true -icd_enforce_sit_slow_poll_limit = true chip_icd_report_on_active_mode = true chip_enable_icd_lit = true diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 45e530bbff9449..94c2fcf3bb04fb 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -1017,6 +1024,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/lock-app/nxp/common/main/include/AppEvent.h b/examples/lock-app/nxp/common/main/include/AppEvent.h index 065078a52e7a72..06522efbee9f70 100644 --- a/examples/lock-app/nxp/common/main/include/AppEvent.h +++ b/examples/lock-app/nxp/common/main/include/AppEvent.h @@ -48,4 +48,5 @@ struct AppEvent }; EventHandler Handler; + void * extra; }; diff --git a/examples/lock-app/nxp/k32w1/BUILD.gn b/examples/lock-app/nxp/k32w1/BUILD.gn index 602398e0d604b4..c10cc05475ffee 100644 --- a/examples/lock-app/nxp/k32w1/BUILD.gn +++ b/examples/lock-app/nxp/k32w1/BUILD.gn @@ -154,6 +154,11 @@ mcxw71_k32w1_executable("lock_app") { sources += [ "${common_example_dir}/app_task/source/AppTaskBase.cpp", "${common_example_dir}/app_task/source/AppTaskFreeRTOS.cpp", + "${common_example_dir}/matter_button/source/ButtonApp.cpp", + "${common_example_dir}/matter_button/source/ButtonBle.cpp", + "${common_example_dir}/matter_button/source/ButtonManager.cpp", + "${common_example_dir}/matter_button/source/ButtonRegistrationAppAndBle.cpp", + "${common_example_dir}/matter_button/source/ButtonWithTimer.cpp", #"${common_example_dir}/clusters/source/ZclCallbacks.cpp", "${common_example_dir}/device_callbacks/source/CommonDeviceCallbacks.cpp", @@ -221,10 +226,7 @@ mcxw71_k32w1_executable("lock_app") { "${example_platform_dir}/button", ] - sources += [ - "${example_platform_dir}/button/ButtonManager.cpp", - "${example_platform_dir}/clusters/Identify.cpp", - ] + sources += [ "${example_platform_dir}/clusters/Identify.cpp" ] if (chip_enable_ota_requestor) { sources += [ "${example_platform_dir}/ota/OtaUtils.cpp" ] diff --git a/examples/lock-app/nxp/k32w1/args.gni b/examples/lock-app/nxp/k32w1/args.gni index e0c41d1e34f870..b7a2d790efb3e2 100644 --- a/examples/lock-app/nxp/k32w1/args.gni +++ b/examples/lock-app/nxp/k32w1/args.gni @@ -30,7 +30,6 @@ chip_with_lwip = false chip_enable_icd_server = true chip_enable_icd_lit = false -icd_enforce_sit_slow_poll_limit = true chip_persist_subscriptions = true chip_subscription_timeout_resumption = true diff --git a/examples/lock-app/nxp/mcxw71/BUILD.gn b/examples/lock-app/nxp/mcxw71/BUILD.gn index 6d105f16ffd163..0c34d3d8083a20 100644 --- a/examples/lock-app/nxp/mcxw71/BUILD.gn +++ b/examples/lock-app/nxp/mcxw71/BUILD.gn @@ -154,6 +154,11 @@ mcxw71_k32w1_executable("lock_app") { sources += [ "${common_example_dir}/app_task/source/AppTaskBase.cpp", "${common_example_dir}/app_task/source/AppTaskFreeRTOS.cpp", + "${common_example_dir}/matter_button/source/ButtonApp.cpp", + "${common_example_dir}/matter_button/source/ButtonBle.cpp", + "${common_example_dir}/matter_button/source/ButtonManager.cpp", + "${common_example_dir}/matter_button/source/ButtonRegistrationAppAndBle.cpp", + "${common_example_dir}/matter_button/source/ButtonWithTimer.cpp", #"${common_example_dir}/clusters/source/ZclCallbacks.cpp", "${common_example_dir}/device_callbacks/source/CommonDeviceCallbacks.cpp", @@ -221,10 +226,7 @@ mcxw71_k32w1_executable("lock_app") { "${example_platform_dir}/button", ] - sources += [ - "${example_platform_dir}/button/ButtonManager.cpp", - "${example_platform_dir}/clusters/Identify.cpp", - ] + sources += [ "${example_platform_dir}/clusters/Identify.cpp" ] if (chip_enable_ota_requestor) { sources += [ "${example_platform_dir}/ota/OtaUtils.cpp" ] diff --git a/examples/lock-app/nxp/mcxw71/args.gni b/examples/lock-app/nxp/mcxw71/args.gni index 761b050b80cbec..1a0940c96aabdb 100644 --- a/examples/lock-app/nxp/mcxw71/args.gni +++ b/examples/lock-app/nxp/mcxw71/args.gni @@ -30,7 +30,6 @@ chip_with_lwip = false chip_enable_icd_server = true chip_enable_icd_lit = false -icd_enforce_sit_slow_poll_limit = true chip_persist_subscriptions = true chip_subscription_timeout_resumption = true diff --git a/examples/lock-app/nxp/zap/lock-app.matter b/examples/lock-app/nxp/zap/lock-app.matter index 91e023d6607a6c..fc3a8917b2a3a0 100644 --- a/examples/lock-app/nxp/zap/lock-app.matter +++ b/examples/lock-app/nxp/zap/lock-app.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -749,6 +756,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/lock-app/qpg/zap/lock.matter b/examples/lock-app/qpg/zap/lock.matter index 1d367e9eaeb42b..53bf1d4f8d8499 100644 --- a/examples/lock-app/qpg/zap/lock.matter +++ b/examples/lock-app/qpg/zap/lock.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -809,6 +816,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/lock-app/silabs/build_for_wifi_args.gni b/examples/lock-app/silabs/build_for_wifi_args.gni index 3947f885b21f4f..cbc84b30bbe627 100644 --- a/examples/lock-app/silabs/build_for_wifi_args.gni +++ b/examples/lock-app/silabs/build_for_wifi_args.gni @@ -19,7 +19,7 @@ chip_enable_openthread = false import("${chip_root}/src/platform/silabs/wifi_args.gni") chip_enable_ota_requestor = true -app_data_model = "${chip_root}/examples/lock-app/lock-common" +app_data_model = "${chip_root}/examples/lock-app/silabs/data_model:silabs-lock" sl_enable_test_event_trigger = true diff --git a/examples/lock-app/silabs/data_model/BUILD.gn b/examples/lock-app/silabs/data_model/BUILD.gn new file mode 100644 index 00000000000000..eb4f3b0047a95b --- /dev/null +++ b/examples/lock-app/silabs/data_model/BUILD.gn @@ -0,0 +1,8 @@ +import("//build_overrides/chip.gni") +import("${chip_root}/src/app/chip_data_model.gni") +import("${chip_root}/src/platform/device.gni") + +chip_data_model("silabs-lock") { + zap_file = "lock-app.zap" + is_server = true +} diff --git a/examples/lock-app/silabs/data_model/lock-app.matter b/examples/lock-app/silabs/data_model/lock-app.matter new file mode 100644 index 00000000000000..bf8c297e1c272f --- /dev/null +++ b/examples/lock-app/silabs/data_model/lock-app.matter @@ -0,0 +1,3310 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + +enum TestGlobalEnum : enum8 { + kSomeValue = 0; + kSomeOtherValue = 1; + kFinalValue = 2; +} + +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + +bitmap TestGlobalBitmap : bitmap32 { + kFirstBit = 0x1; + kSecondBit = 0x2; +} + +struct TestGlobalStruct { + char_string<128> name = 0; + nullable TestGlobalBitmap myBitmap = 1; + optional nullable TestGlobalEnum myEnum = 2; +} + +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + +/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ +cluster Identify = 3 { + revision 4; + + enum EffectIdentifierEnum : enum8 { + kBlink = 0; + kBreathe = 1; + kOkay = 2; + kChannelChange = 11; + kFinishEffect = 254; + kStopEffect = 255; + } + + enum EffectVariantEnum : enum8 { + kDefault = 0; + } + + enum IdentifyTypeEnum : enum8 { + kNone = 0; + kLightOutput = 1; + kVisibleIndicator = 2; + kAudibleBeep = 3; + kDisplay = 4; + kActuator = 5; + } + + attribute int16u identifyTime = 0; + readonly attribute IdentifyTypeEnum identifyType = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct IdentifyRequest { + int16u identifyTime = 0; + } + + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ + command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; +} + +/** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ +cluster Descriptor = 29 { + revision 2; + + bitmap Feature : bitmap32 { + kTagList = 0x1; + } + + struct DeviceTypeStruct { + devtype_id deviceType = 0; + int16u revision = 1; + } + + struct SemanticTagStruct { + nullable vendor_id mfgCode = 0; + enum8 namespaceID = 1; + enum8 tag = 2; + optional nullable char_string label = 3; + } + + readonly attribute DeviceTypeStruct deviceTypeList[] = 0; + readonly attribute cluster_id serverList[] = 1; + readonly attribute cluster_id clientList[] = 2; + readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** The Access Control Cluster exposes a data model view of a + Node's Access Control List (ACL), which codifies the rules used to manage + and enforce Access Control for the Node's endpoints and their associated + cluster instances. */ +cluster AccessControl = 31 { + revision 2; + + enum AccessControlEntryAuthModeEnum : enum8 { + kPASE = 1; + kCASE = 2; + kGroup = 3; + } + + enum AccessControlEntryPrivilegeEnum : enum8 { + kView = 1; + kProxyView = 2; + kOperate = 3; + kManage = 4; + kAdminister = 5; + } + + enum AccessRestrictionTypeEnum : enum8 { + kAttributeAccessForbidden = 0; + kAttributeWriteForbidden = 1; + kCommandForbidden = 2; + kEventForbidden = 3; + } + + enum ChangeTypeEnum : enum8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + bitmap Feature : bitmap32 { + kExtension = 0x1; + kManagedDevice = 0x2; + } + + struct AccessRestrictionStruct { + AccessRestrictionTypeEnum type = 0; + nullable int32u id = 1; + } + + struct CommissioningAccessRestrictionEntryStruct { + endpoint_no endpoint = 0; + cluster_id cluster = 1; + AccessRestrictionStruct restrictions[] = 2; + } + + fabric_scoped struct AccessRestrictionEntryStruct { + fabric_sensitive endpoint_no endpoint = 0; + fabric_sensitive cluster_id cluster = 1; + fabric_sensitive AccessRestrictionStruct restrictions[] = 2; + fabric_idx fabricIndex = 254; + } + + struct AccessControlTargetStruct { + nullable cluster_id cluster = 0; + nullable endpoint_no endpoint = 1; + nullable devtype_id deviceType = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; + nullable fabric_sensitive int64u subjects[] = 3; + nullable fabric_sensitive AccessControlTargetStruct targets[] = 4; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct AccessControlExtensionStruct { + fabric_sensitive octet_string<128> data = 1; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlEntryChanged = 0 { + nullable node_id adminNodeID = 1; + nullable int16u adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlEntryStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlExtensionChanged = 1 { + nullable node_id adminNodeID = 1; + nullable int16u adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlExtensionStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { + int64u token = 0; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; + fabric_idx fabricIndex = 254; + } + + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; + readonly attribute optional CommissioningAccessRestrictionEntryStruct commissioningARL[] = 5; + readonly attribute optional AccessRestrictionEntryStruct arl[] = 6; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ReviewFabricRestrictionsRequest { + CommissioningAccessRestrictionEntryStruct arl[] = 0; + } + + response struct ReviewFabricRestrictionsResponse = 1 { + int64u token = 0; + } + + /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; +} + +/** This cluster provides attributes and events for determining basic information about Nodes, which supports both + Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, + which apply to the whole Node. Also allows setting user device information such as location. */ +cluster BasicInformation = 40 { + revision 3; + + enum ColorEnum : enum8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : enum8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + + struct CapabilityMinimaStruct { + int16u caseSessionsPerFabric = 0; + int16u subscriptionsPerFabric = 1; + } + + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + + critical event StartUp = 0 { + int32u softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + fabric_idx fabricIndex = 0; + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + readonly attribute int16u dataModelRevision = 0; + readonly attribute char_string<32> vendorName = 1; + readonly attribute vendor_id vendorID = 2; + readonly attribute char_string<32> productName = 3; + readonly attribute int16u productID = 4; + attribute access(write: manage) char_string<32> nodeLabel = 5; + attribute access(write: administer) char_string<2> location = 6; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string<64> hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string<64> softwareVersionString = 10; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; + readonly attribute int32u specificationVersion = 21; + readonly attribute int16u maxPathsPerInvoke = 22; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; +} + +/** Provides an interface for providing OTA software updates */ +cluster OtaSoftwareUpdateProvider = 41 { + revision 1; // NOTE: Default/not specifically set + + enum ApplyUpdateActionEnum : enum8 { + kProceed = 0; + kAwaitNextAction = 1; + kDiscontinue = 2; + } + + enum DownloadProtocolEnum : enum8 { + kBDXSynchronous = 0; + kBDXAsynchronous = 1; + kHTTPS = 2; + kVendorSpecific = 3; + } + + enum StatusEnum : enum8 { + kUpdateAvailable = 0; + kBusy = 1; + kNotAvailable = 2; + kDownloadProtocolNotSupported = 3; + } + + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct QueryImageRequest { + vendor_id vendorID = 0; + int16u productID = 1; + int32u softwareVersion = 2; + DownloadProtocolEnum protocolsSupported[] = 3; + optional int16u hardwareVersion = 4; + optional char_string<2> location = 5; + optional boolean requestorCanConsent = 6; + optional octet_string<512> metadataForProvider = 7; + } + + response struct QueryImageResponse = 1 { + StatusEnum status = 0; + optional int32u delayedActionTime = 1; + optional char_string<256> imageURI = 2; + optional int32u softwareVersion = 3; + optional char_string<64> softwareVersionString = 4; + optional octet_string<32> updateToken = 5; + optional boolean userConsentNeeded = 6; + optional octet_string<512> metadataForRequestor = 7; + } + + request struct ApplyUpdateRequestRequest { + octet_string<32> updateToken = 0; + int32u newVersion = 1; + } + + response struct ApplyUpdateResponse = 3 { + ApplyUpdateActionEnum action = 0; + int32u delayedActionTime = 1; + } + + request struct NotifyUpdateAppliedRequest { + octet_string<32> updateToken = 0; + int32u softwareVersion = 1; + } + + /** Determine availability of a new Software Image */ + command QueryImage(QueryImageRequest): QueryImageResponse = 0; + /** Determine next action to take for a downloaded Software Image */ + command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; + /** Notify OTA Provider that an update was applied */ + command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; +} + +/** Provides an interface for downloading and applying OTA software updates */ +cluster OtaSoftwareUpdateRequestor = 42 { + revision 1; // NOTE: Default/not specifically set + + enum AnnouncementReasonEnum : enum8 { + kSimpleAnnouncement = 0; + kUpdateAvailable = 1; + kUrgentUpdateAvailable = 2; + } + + enum ChangeReasonEnum : enum8 { + kUnknown = 0; + kSuccess = 1; + kFailure = 2; + kTimeOut = 3; + kDelayByProvider = 4; + } + + enum UpdateStateEnum : enum8 { + kUnknown = 0; + kIdle = 1; + kQuerying = 2; + kDelayedOnQuery = 3; + kDownloading = 4; + kApplying = 5; + kDelayedOnApply = 6; + kRollingBack = 7; + kDelayedOnUserConsent = 8; + } + + fabric_scoped struct ProviderLocation { + node_id providerNodeID = 1; + endpoint_no endpoint = 2; + fabric_idx fabricIndex = 254; + } + + info event StateTransition = 0 { + UpdateStateEnum previousState = 0; + UpdateStateEnum newState = 1; + ChangeReasonEnum reason = 2; + nullable int32u targetSoftwareVersion = 3; + } + + critical event VersionApplied = 1 { + int32u softwareVersion = 0; + int16u productID = 1; + } + + info event DownloadError = 2 { + int32u softwareVersion = 0; + int64u bytesDownloaded = 1; + nullable int8u progressPercent = 2; + nullable int64s platformCode = 3; + } + + attribute access(write: administer) ProviderLocation defaultOTAProviders[] = 0; + readonly attribute boolean updatePossible = 1; + readonly attribute UpdateStateEnum updateState = 2; + readonly attribute nullable int8u updateStateProgress = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AnnounceOTAProviderRequest { + node_id providerNodeID = 0; + vendor_id vendorID = 1; + AnnouncementReasonEnum announcementReason = 2; + optional octet_string<512> metadataForNode = 3; + endpoint_no endpoint = 4; + } + + /** Announce the presence of an OTA Provider */ + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; +} + +/** Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing preferences for the units in which values are conveyed in communication to a + user. As such, Nodes that visually or audibly convey measurable values to the user need a + mechanism by which they can be configured to use a user’s preferred unit. */ +cluster UnitLocalization = 45 { + revision 1; + + enum TempUnitEnum : enum8 { + kFahrenheit = 0; + kCelsius = 1; + kKelvin = 2; + } + + bitmap Feature : bitmap32 { + kTemperatureUnit = 0x1; + } + + attribute access(write: manage) optional TempUnitEnum temperatureUnit = 0; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ +cluster PowerSource = 47 { + revision 1; // NOTE: Default/not specifically set + + enum BatApprovedChemistryEnum : enum16 { + kUnspecified = 0; + kAlkaline = 1; + kLithiumCarbonFluoride = 2; + kLithiumChromiumOxide = 3; + kLithiumCopperOxide = 4; + kLithiumIronDisulfide = 5; + kLithiumManganeseDioxide = 6; + kLithiumThionylChloride = 7; + kMagnesium = 8; + kMercuryOxide = 9; + kNickelOxyhydride = 10; + kSilverOxide = 11; + kZincAir = 12; + kZincCarbon = 13; + kZincChloride = 14; + kZincManganeseDioxide = 15; + kLeadAcid = 16; + kLithiumCobaltOxide = 17; + kLithiumIon = 18; + kLithiumIonPolymer = 19; + kLithiumIronPhosphate = 20; + kLithiumSulfur = 21; + kLithiumTitanate = 22; + kNickelCadmium = 23; + kNickelHydrogen = 24; + kNickelIron = 25; + kNickelMetalHydride = 26; + kNickelZinc = 27; + kSilverZinc = 28; + kSodiumIon = 29; + kSodiumSulfur = 30; + kZincBromide = 31; + kZincCerium = 32; + } + + enum BatChargeFaultEnum : enum8 { + kUnspecified = 0; + kAmbientTooHot = 1; + kAmbientTooCold = 2; + kBatteryTooHot = 3; + kBatteryTooCold = 4; + kBatteryAbsent = 5; + kBatteryOverVoltage = 6; + kBatteryUnderVoltage = 7; + kChargerOverVoltage = 8; + kChargerUnderVoltage = 9; + kSafetyTimeout = 10; + } + + enum BatChargeLevelEnum : enum8 { + kOK = 0; + kWarning = 1; + kCritical = 2; + } + + enum BatChargeStateEnum : enum8 { + kUnknown = 0; + kIsCharging = 1; + kIsAtFullCharge = 2; + kIsNotCharging = 3; + } + + enum BatCommonDesignationEnum : enum16 { + kUnspecified = 0; + kAAA = 1; + kAA = 2; + kC = 3; + kD = 4; + k4v5 = 5; + k6v0 = 6; + k9v0 = 7; + k12AA = 8; + kAAAA = 9; + kA = 10; + kB = 11; + kF = 12; + kN = 13; + kNo6 = 14; + kSubC = 15; + kA23 = 16; + kA27 = 17; + kBA5800 = 18; + kDuplex = 19; + k4SR44 = 20; + k523 = 21; + k531 = 22; + k15v0 = 23; + k22v5 = 24; + k30v0 = 25; + k45v0 = 26; + k67v5 = 27; + kJ = 28; + kCR123A = 29; + kCR2 = 30; + k2CR5 = 31; + kCRP2 = 32; + kCRV3 = 33; + kSR41 = 34; + kSR43 = 35; + kSR44 = 36; + kSR45 = 37; + kSR48 = 38; + kSR54 = 39; + kSR55 = 40; + kSR57 = 41; + kSR58 = 42; + kSR59 = 43; + kSR60 = 44; + kSR63 = 45; + kSR64 = 46; + kSR65 = 47; + kSR66 = 48; + kSR67 = 49; + kSR68 = 50; + kSR69 = 51; + kSR516 = 52; + kSR731 = 53; + kSR712 = 54; + kLR932 = 55; + kA5 = 56; + kA10 = 57; + kA13 = 58; + kA312 = 59; + kA675 = 60; + kAC41E = 61; + k10180 = 62; + k10280 = 63; + k10440 = 64; + k14250 = 65; + k14430 = 66; + k14500 = 67; + k14650 = 68; + k15270 = 69; + k16340 = 70; + kRCR123A = 71; + k17500 = 72; + k17670 = 73; + k18350 = 74; + k18500 = 75; + k18650 = 76; + k19670 = 77; + k25500 = 78; + k26650 = 79; + k32600 = 80; + } + + enum BatFaultEnum : enum8 { + kUnspecified = 0; + kOverTemp = 1; + kUnderTemp = 2; + } + + enum BatReplaceabilityEnum : enum8 { + kUnspecified = 0; + kNotReplaceable = 1; + kUserReplaceable = 2; + kFactoryReplaceable = 3; + } + + enum PowerSourceStatusEnum : enum8 { + kUnspecified = 0; + kActive = 1; + kStandby = 2; + kUnavailable = 3; + } + + enum WiredCurrentTypeEnum : enum8 { + kAC = 0; + kDC = 1; + } + + enum WiredFaultEnum : enum8 { + kUnspecified = 0; + kOverVoltage = 1; + kUnderVoltage = 2; + } + + bitmap Feature : bitmap32 { + kWired = 0x1; + kBattery = 0x2; + kRechargeable = 0x4; + kReplaceable = 0x8; + } + + struct BatChargeFaultChangeType { + BatChargeFaultEnum current[] = 0; + BatChargeFaultEnum previous[] = 1; + } + + struct BatFaultChangeType { + BatFaultEnum current[] = 0; + BatFaultEnum previous[] = 1; + } + + struct WiredFaultChangeType { + WiredFaultEnum current[] = 0; + WiredFaultEnum previous[] = 1; + } + + info event WiredFaultChange = 0 { + WiredFaultEnum current[] = 0; + WiredFaultEnum previous[] = 1; + } + + info event BatFaultChange = 1 { + BatFaultEnum current[] = 0; + BatFaultEnum previous[] = 1; + } + + info event BatChargeFaultChange = 2 { + BatChargeFaultEnum current[] = 0; + BatChargeFaultEnum previous[] = 1; + } + + readonly attribute PowerSourceStatusEnum status = 0; + readonly attribute int8u order = 1; + readonly attribute char_string<60> description = 2; + readonly attribute optional nullable int32u wiredAssessedInputVoltage = 3; + readonly attribute optional nullable int16u wiredAssessedInputFrequency = 4; + readonly attribute optional WiredCurrentTypeEnum wiredCurrentType = 5; + readonly attribute optional nullable int32u wiredAssessedCurrent = 6; + readonly attribute optional int32u wiredNominalVoltage = 7; + readonly attribute optional int32u wiredMaximumCurrent = 8; + readonly attribute optional boolean wiredPresent = 9; + readonly attribute optional WiredFaultEnum activeWiredFaults[] = 10; + readonly attribute optional nullable int32u batVoltage = 11; + readonly attribute optional nullable int8u batPercentRemaining = 12; + readonly attribute optional nullable int32u batTimeRemaining = 13; + readonly attribute optional BatChargeLevelEnum batChargeLevel = 14; + readonly attribute optional boolean batReplacementNeeded = 15; + readonly attribute optional BatReplaceabilityEnum batReplaceability = 16; + readonly attribute optional boolean batPresent = 17; + readonly attribute optional BatFaultEnum activeBatFaults[] = 18; + readonly attribute optional char_string<60> batReplacementDescription = 19; + readonly attribute optional BatCommonDesignationEnum batCommonDesignation = 20; + readonly attribute optional char_string<20> batANSIDesignation = 21; + readonly attribute optional char_string<20> batIECDesignation = 22; + readonly attribute optional BatApprovedChemistryEnum batApprovedChemistry = 23; + readonly attribute optional int32u batCapacity = 24; + readonly attribute optional int8u batQuantity = 25; + readonly attribute optional BatChargeStateEnum batChargeState = 26; + readonly attribute optional nullable int32u batTimeToFullCharge = 27; + readonly attribute optional boolean batFunctionalWhileCharging = 28; + readonly attribute optional nullable int32u batChargingCurrent = 29; + readonly attribute optional BatChargeFaultEnum activeBatChargeFaults[] = 30; + readonly attribute endpoint_no endpointList[] = 31; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** This cluster is used to manage global aspects of the Commissioning flow. */ +cluster GeneralCommissioning = 48 { + revision 1; // NOTE: Default/not specifically set + + enum CommissioningErrorEnum : enum8 { + kOK = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNoFailSafe = 3; + kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; + } + + enum RegulatoryLocationTypeEnum : enum8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + + struct BasicCommissioningInfo { + int16u failSafeExpiryLengthSeconds = 0; + int16u maxCumulativeFailsafeSeconds = 1; + } + + attribute access(write: administer) int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; + readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; + readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + int16u expiryLengthSeconds = 0; + int64u breadcrumb = 1; + } + + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationTypeEnum newRegulatoryConfig = 0; + char_string<2> countryCode = 1; + int64u breadcrumb = 2; + } + + response struct SetRegulatoryConfigResponse = 3 { + CommissioningErrorEnum errorCode = 0; + char_string debugText = 1; + } + + response struct CommissioningCompleteResponse = 5 { + CommissioningErrorEnum errorCode = 0; + char_string debugText = 1; + } + + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ + command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ + command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; +} + +/** Functionality to configure, enable, disable network credentials and access on a Matter device. */ +cluster NetworkCommissioning = 49 { + revision 1; // NOTE: Default/not specifically set + + enum NetworkCommissioningStatusEnum : enum8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBandEnum : enum8 { + k2G4 = 0; + k3G65 = 1; + k5G = 2; + k6G = 3; + k60G = 4; + k1G = 5; + } + + bitmap Feature : bitmap32 { + kWiFiNetworkInterface = 0x1; + kThreadNetworkInterface = 0x2; + kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; + } + + bitmap ThreadCapabilitiesBitmap : bitmap16 { + kIsBorderRouterCapable = 0x1; + kIsRouterCapable = 0x2; + kIsSleepyEndDeviceCapable = 0x4; + kIsFullThreadDevice = 0x8; + kIsSynchronizedSleepyEndDeviceCapable = 0x10; + } + + bitmap WiFiSecurityBitmap : bitmap8 { + kUnencrypted = 0x1; + kWEP = 0x2; + kWPAPersonal = 0x4; + kWPA2Personal = 0x8; + kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; + } + + struct NetworkInfoStruct { + octet_string<32> networkID = 0; + boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; + } + + struct ThreadInterfaceScanResultStruct { + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; + } + + struct WiFiInterfaceScanResultStruct { + WiFiSecurityBitmap security = 0; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; + WiFiBandEnum wiFiBand = 4; + int8s rssi = 5; + } + + readonly attribute access(read: administer) int8u maxNetworks = 0; + readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; + attribute access(write: administer) boolean interfaceEnabled = 4; + readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; + readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; + readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + provisional readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + provisional readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + provisional readonly attribute optional int16u threadVersion = 10; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ScanNetworksRequest { + optional nullable octet_string<32> ssid = 0; + optional int64u breadcrumb = 1; + } + + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + + request struct AddOrUpdateWiFiNetworkRequest { + octet_string<32> ssid = 0; + octet_string<64> credentials = 1; + optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; + } + + request struct AddOrUpdateThreadNetworkRequest { + octet_string<254> operationalDataset = 0; + optional int64u breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + octet_string<32> networkID = 0; + optional int64u breadcrumb = 1; + } + + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + + request struct ConnectNetworkRequest { + octet_string<32> networkID = 0; + optional int64u breadcrumb = 1; + } + + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + + request struct ReorderNetworkRequest { + octet_string<32> networkID = 0; + int8u networkIndex = 1; + optional int64u breadcrumb = 2; + } + + request struct QueryIdentityRequest { + octet_string<20> keyIdentifier = 0; + optional octet_string<32> possessionNonce = 1; + } + + response struct QueryIdentityResponse = 10 { + octet_string<140> identity = 0; + optional octet_string<64> possessionSignature = 1; + } + + /** Detemine the set of networks the device sees as available. */ + command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ + command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ + command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ + command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ + command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ + command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; +} + +/** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ +cluster DiagnosticLogs = 50 { + revision 1; // NOTE: Default/not specifically set + + enum IntentEnum : enum8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum StatusEnum : enum8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum TransferProtocolEnum : enum8 { + kResponsePayload = 0; + kBDX = 1; + } + + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct RetrieveLogsRequestRequest { + IntentEnum intent = 0; + TransferProtocolEnum requestedProtocol = 1; + optional char_string<32> transferFileDesignator = 2; + } + + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + long_octet_string logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +/** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster GeneralDiagnostics = 51 { + revision 2; + + enum BootReasonEnum : enum8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultEnum : enum8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceTypeEnum : enum8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultEnum : enum8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultEnum : enum8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + bitmap Feature : bitmap32 { + kDataModelTest = 0x1; + } + + struct NetworkInterface { + char_string<32> name = 0; + boolean isOperational = 1; + nullable boolean offPremiseServicesReachableIPv4 = 2; + nullable boolean offPremiseServicesReachableIPv6 = 3; + octet_string<8> hardwareAddress = 4; + octet_string IPv4Addresses[] = 5; + octet_string IPv6Addresses[] = 6; + InterfaceTypeEnum type = 7; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultEnum current[] = 0; + HardwareFaultEnum previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultEnum current[] = 0; + RadioFaultEnum previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultEnum current[] = 0; + NetworkFaultEnum previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonEnum bootReason = 0; + } + + readonly attribute NetworkInterface networkInterfaces[] = 0; + readonly attribute int16u rebootCount = 1; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute boolean testEventTriggersEnabled = 8; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct TestEventTriggerRequest { + octet_string<16> enableKey = 0; + int64u eventTrigger = 1; + } + + response struct TimeSnapshotResponse = 2 { + systime_ms systemTimeMs = 0; + nullable posix_ms posixTimeMs = 1; + } + + request struct PayloadTestRequestRequest { + octet_string<16> enableKey = 0; + int8u value = 1; + int16u count = 2; + } + + response struct PayloadTestResponse = 4 { + octet_string payload = 0; + } + + /** Provide a means for certification tests to trigger some test-plan-specific events */ + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ + command TimeSnapshot(): TimeSnapshotResponse = 1; + /** Request a variable length payload response. */ + command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; +} + +/** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster SoftwareDiagnostics = 52 { + revision 1; // NOTE: Default/not specifically set + + bitmap Feature : bitmap32 { + kWatermarks = 0x1; + } + + struct ThreadMetricsStruct { + int64u id = 0; + optional char_string<8> name = 1; + optional int32u stackFreeCurrent = 2; + optional int32u stackFreeMinimum = 3; + optional int32u stackSize = 4; + } + + info event SoftwareFault = 0 { + int64u id = 0; + optional char_string name = 1; + optional octet_string faultRecording = 2; + } + + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ + command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; +} + +/** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ +cluster ThreadNetworkDiagnostics = 53 { + revision 2; + + enum ConnectionStatusEnum : enum8 { + kConnected = 0; + kNotConnected = 1; + } + + enum NetworkFaultEnum : enum8 { + kUnspecified = 0; + kLinkDown = 1; + kHardwareFailure = 2; + kNetworkJammed = 3; + } + + enum RoutingRoleEnum : enum8 { + kUnspecified = 0; + kUnassigned = 1; + kSleepyEndDevice = 2; + kEndDevice = 3; + kREED = 4; + kRouter = 5; + kLeader = 6; + } + + bitmap Feature : bitmap32 { + kPacketCounts = 0x1; + kErrorCounts = 0x2; + kMLECounts = 0x4; + kMACCounts = 0x8; + } + + struct NeighborTableStruct { + int64u extAddress = 0; + int32u age = 1; + int16u rloc16 = 2; + int32u linkFrameCounter = 3; + int32u mleFrameCounter = 4; + int8u lqi = 5; + nullable int8s averageRssi = 6; + nullable int8s lastRssi = 7; + int8u frameErrorRate = 8; + int8u messageErrorRate = 9; + boolean rxOnWhenIdle = 10; + boolean fullThreadDevice = 11; + boolean fullNetworkData = 12; + boolean isChild = 13; + } + + struct OperationalDatasetComponents { + boolean activeTimestampPresent = 0; + boolean pendingTimestampPresent = 1; + boolean masterKeyPresent = 2; + boolean networkNamePresent = 3; + boolean extendedPanIdPresent = 4; + boolean meshLocalPrefixPresent = 5; + boolean delayPresent = 6; + boolean panIdPresent = 7; + boolean channelPresent = 8; + boolean pskcPresent = 9; + boolean securityPolicyPresent = 10; + boolean channelMaskPresent = 11; + } + + struct RouteTableStruct { + int64u extAddress = 0; + int16u rloc16 = 1; + int8u routerId = 2; + int8u nextHop = 3; + int8u pathCost = 4; + int8u LQIIn = 5; + int8u LQIOut = 6; + int8u age = 7; + boolean allocated = 8; + boolean linkEstablished = 9; + } + + struct SecurityPolicy { + int16u rotationTime = 0; + int16u flags = 1; + } + + info event ConnectionStatus = 0 { + ConnectionStatusEnum connectionStatus = 0; + } + + info event NetworkFaultChange = 1 { + NetworkFaultEnum current[] = 0; + NetworkFaultEnum previous[] = 1; + } + + readonly attribute nullable int16u channel = 0; + readonly attribute nullable RoutingRoleEnum routingRole = 1; + readonly attribute nullable char_string<16> networkName = 2; + readonly attribute nullable int16u panId = 3; + readonly attribute nullable int64u extendedPanId = 4; + readonly attribute nullable octet_string<17> meshLocalPrefix = 5; + readonly attribute optional int64u overrunCount = 6; + readonly attribute NeighborTableStruct neighborTable[] = 7; + readonly attribute RouteTableStruct routeTable[] = 8; + readonly attribute nullable int32u partitionId = 9; + readonly attribute nullable int16u weighting = 10; + readonly attribute nullable int16u dataVersion = 11; + readonly attribute nullable int16u stableDataVersion = 12; + readonly attribute nullable int8u leaderRouterId = 13; + readonly attribute optional int16u detachedRoleCount = 14; + readonly attribute optional int16u childRoleCount = 15; + readonly attribute optional int16u routerRoleCount = 16; + readonly attribute optional int16u leaderRoleCount = 17; + readonly attribute optional int16u attachAttemptCount = 18; + readonly attribute optional int16u partitionIdChangeCount = 19; + readonly attribute optional int16u betterPartitionAttachAttemptCount = 20; + readonly attribute optional int16u parentChangeCount = 21; + readonly attribute optional int32u txTotalCount = 22; + readonly attribute optional int32u txUnicastCount = 23; + readonly attribute optional int32u txBroadcastCount = 24; + readonly attribute optional int32u txAckRequestedCount = 25; + readonly attribute optional int32u txAckedCount = 26; + readonly attribute optional int32u txNoAckRequestedCount = 27; + readonly attribute optional int32u txDataCount = 28; + readonly attribute optional int32u txDataPollCount = 29; + readonly attribute optional int32u txBeaconCount = 30; + readonly attribute optional int32u txBeaconRequestCount = 31; + readonly attribute optional int32u txOtherCount = 32; + readonly attribute optional int32u txRetryCount = 33; + readonly attribute optional int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute optional int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute optional int32u txErrCcaCount = 36; + readonly attribute optional int32u txErrAbortCount = 37; + readonly attribute optional int32u txErrBusyChannelCount = 38; + readonly attribute optional int32u rxTotalCount = 39; + readonly attribute optional int32u rxUnicastCount = 40; + readonly attribute optional int32u rxBroadcastCount = 41; + readonly attribute optional int32u rxDataCount = 42; + readonly attribute optional int32u rxDataPollCount = 43; + readonly attribute optional int32u rxBeaconCount = 44; + readonly attribute optional int32u rxBeaconRequestCount = 45; + readonly attribute optional int32u rxOtherCount = 46; + readonly attribute optional int32u rxAddressFilteredCount = 47; + readonly attribute optional int32u rxDestAddrFilteredCount = 48; + readonly attribute optional int32u rxDuplicatedCount = 49; + readonly attribute optional int32u rxErrNoFrameCount = 50; + readonly attribute optional int32u rxErrUnknownNeighborCount = 51; + readonly attribute optional int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute optional int32u rxErrSecCount = 53; + readonly attribute optional int32u rxErrFcsCount = 54; + readonly attribute optional int32u rxErrOtherCount = 55; + readonly attribute optional nullable int64u activeTimestamp = 56; + readonly attribute optional nullable int64u pendingTimestamp = 57; + readonly attribute optional nullable int32u delay = 58; + readonly attribute nullable SecurityPolicy securityPolicy = 59; + readonly attribute nullable octet_string<4> channelPage0Mask = 60; + readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; + readonly attribute NetworkFaultEnum activeNetworkFaultsList[] = 62; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + /** Reception of this command SHALL reset the OverrunCount attributes to 0 */ + command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; +} + +/** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster WiFiNetworkDiagnostics = 54 { + revision 1; // NOTE: Default/not specifically set + + enum AssociationFailureCauseEnum : enum8 { + kUnknown = 0; + kAssociationFailed = 1; + kAuthenticationFailed = 2; + kSsidNotFound = 3; + } + + enum ConnectionStatusEnum : enum8 { + kConnected = 0; + kNotConnected = 1; + } + + enum SecurityTypeEnum : enum8 { + kUnspecified = 0; + kNone = 1; + kWEP = 2; + kWPA = 3; + kWPA2 = 4; + kWPA3 = 5; + } + + enum WiFiVersionEnum : enum8 { + kA = 0; + kB = 1; + kG = 2; + kN = 3; + kAc = 4; + kAx = 5; + kAh = 6; + } + + bitmap Feature : bitmap32 { + kPacketCounts = 0x1; + kErrorCounts = 0x2; + } + + info event Disconnection = 0 { + int16u reasonCode = 0; + } + + info event AssociationFailure = 1 { + AssociationFailureCauseEnum associationFailureCause = 0; + int16u status = 1; + } + + info event ConnectionStatus = 2 { + ConnectionStatusEnum connectionStatus = 0; + } + + readonly attribute nullable octet_string<6> bssid = 0; + readonly attribute nullable SecurityTypeEnum securityType = 1; + readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; + readonly attribute nullable int16u channelNumber = 3; + readonly attribute nullable int8s rssi = 4; + readonly attribute optional nullable int32u beaconLostCount = 5; + readonly attribute optional nullable int32u beaconRxCount = 6; + readonly attribute optional nullable int32u packetMulticastRxCount = 7; + readonly attribute optional nullable int32u packetMulticastTxCount = 8; + readonly attribute optional nullable int32u packetUnicastRxCount = 9; + readonly attribute optional nullable int32u packetUnicastTxCount = 10; + readonly attribute optional nullable int64u currentMaxRate = 11; + readonly attribute optional nullable int64u overrunCount = 12; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + /** Reception of this command SHALL reset the Breacon and Packet related count attributes to 0 */ + command ResetCounts(): DefaultSuccess = 0; +} + +/** The Ethernet Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster EthernetNetworkDiagnostics = 55 { + revision 1; // NOTE: Default/not specifically set + + enum PHYRateEnum : enum8 { + kRate10M = 0; + kRate100M = 1; + kRate1G = 2; + kRate25G = 3; + kRate5G = 4; + kRate10G = 5; + kRate40G = 6; + kRate100G = 7; + kRate200G = 8; + kRate400G = 9; + } + + bitmap Feature : bitmap32 { + kPacketCounts = 0x1; + kErrorCounts = 0x2; + } + + readonly attribute optional nullable PHYRateEnum PHYRate = 0; + readonly attribute optional nullable boolean fullDuplex = 1; + readonly attribute optional int64u packetRxCount = 2; + readonly attribute optional int64u packetTxCount = 3; + readonly attribute optional int64u txErrCount = 4; + readonly attribute optional int64u collisionCount = 5; + readonly attribute optional int64u overrunCount = 6; + readonly attribute optional nullable boolean carrierDetect = 7; + readonly attribute optional int64u timeSinceReset = 8; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + /** Reception of this command SHALL reset the attributes: PacketRxCount, PacketTxCount, TxErrCount, CollisionCount, OverrunCount to 0 */ + command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; +} + +/** Commands to trigger a Node to allow a new Administrator to commission it. */ +cluster AdministratorCommissioning = 60 { + revision 1; // NOTE: Default/not specifically set + + enum CommissioningWindowStatusEnum : enum8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : enum8 { + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; + } + + bitmap Feature : bitmap32 { + kBasic = 0x1; + } + + readonly attribute CommissioningWindowStatusEnum windowStatus = 0; + readonly attribute nullable fabric_idx adminFabricIndex = 1; + readonly attribute nullable vendor_id adminVendorId = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct OpenCommissioningWindowRequest { + int16u commissioningTimeout = 0; + octet_string PAKEPasscodeVerifier = 1; + int16u discriminator = 2; + int32u iterations = 3; + octet_string<32> salt = 4; + } + + request struct OpenBasicCommissioningWindowRequest { + int16u commissioningTimeout = 0; + } + + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ + timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ + timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ + timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; +} + +/** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ +cluster OperationalCredentials = 62 { + revision 1; // NOTE: Default/not specifically set + + enum CertificateChainTypeEnum : enum8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : enum8 { + kOK = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInvalidAdminSubject = 6; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + fabric_scoped struct FabricDescriptorStruct { + octet_string<65> rootPublicKey = 1; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; + char_string<32> label = 5; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct NOCStruct { + fabric_sensitive octet_string noc = 1; + nullable fabric_sensitive octet_string icac = 2; + fabric_idx fabricIndex = 254; + } + + readonly attribute access(read: administer) NOCStruct NOCs[] = 0; + readonly attribute FabricDescriptorStruct fabrics[] = 1; + readonly attribute int8u supportedFabrics = 2; + readonly attribute int8u commissionedFabrics = 3; + readonly attribute octet_string trustedRootCertificates[] = 4; + readonly attribute int8u currentFabricIndex = 5; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AttestationRequestRequest { + octet_string<32> attestationNonce = 0; + } + + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + + request struct CertificateChainRequestRequest { + CertificateChainTypeEnum certificateType = 0; + } + + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + + request struct CSRRequestRequest { + octet_string<32> CSRNonce = 0; + optional boolean isForUpdateNOC = 1; + } + + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + + request struct AddNOCRequest { + octet_string<400> NOCValue = 0; + optional octet_string<400> ICACValue = 1; + octet_string<16> IPKValue = 2; + int64u caseAdminSubject = 3; + vendor_id adminVendorId = 4; + } + + request struct UpdateNOCRequest { + octet_string NOCValue = 0; + optional octet_string ICACValue = 1; + } + + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + + request struct UpdateFabricLabelRequest { + char_string<32> label = 0; + } + + request struct RemoveFabricRequest { + fabric_idx fabricIndex = 0; + } + + request struct AddTrustedRootCertificateRequest { + octet_string rootCACertificate = 0; + } + + /** Sender is requesting attestation information from the receiver. */ + command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ + command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ + command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ + command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ + fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ + fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ + command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ + command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; +} + +/** The Group Key Management Cluster is the mechanism by which group keys are managed. */ +cluster GroupKeyManagement = 63 { + revision 1; // NOTE: Default/not specifically set + + enum GroupKeySecurityPolicyEnum : enum8 { + kTrustFirst = 0; + kCacheAndSync = 1; + } + + bitmap Feature : bitmap32 { + kCacheAndSync = 0x1; + } + + fabric_scoped struct GroupInfoMapStruct { + group_id groupId = 1; + endpoint_no endpoints[] = 2; + optional char_string<16> groupName = 3; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct GroupKeyMapStruct { + group_id groupId = 1; + int16u groupKeySetID = 2; + fabric_idx fabricIndex = 254; + } + + struct GroupKeySetStruct { + int16u groupKeySetID = 0; + GroupKeySecurityPolicyEnum groupKeySecurityPolicy = 1; + nullable octet_string<16> epochKey0 = 2; + nullable epoch_us epochStartTime0 = 3; + nullable octet_string<16> epochKey1 = 4; + nullable epoch_us epochStartTime1 = 5; + nullable octet_string<16> epochKey2 = 6; + nullable epoch_us epochStartTime2 = 7; + } + + attribute access(write: manage) GroupKeyMapStruct groupKeyMap[] = 0; + readonly attribute GroupInfoMapStruct groupTable[] = 1; + readonly attribute int16u maxGroupsPerFabric = 2; + readonly attribute int16u maxGroupKeysPerFabric = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct KeySetWriteRequest { + GroupKeySetStruct groupKeySet = 0; + } + + request struct KeySetReadRequest { + int16u groupKeySetID = 0; + } + + response struct KeySetReadResponse = 2 { + GroupKeySetStruct groupKeySet = 0; + } + + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + + response struct KeySetReadAllIndicesResponse = 5 { + int16u groupKeySetIDs[] = 0; + } + + /** Write a new set of keys for the given key set id. */ + fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ + fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ + fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; +} + +/** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only +labels. */ +cluster FixedLabel = 64 { + revision 1; // NOTE: Default/not specifically set + + struct LabelStruct { + char_string<16> label = 0; + char_string<16> value = 1; + } + + readonly attribute LabelStruct labelList[] = 0; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ +cluster UserLabel = 65 { + revision 1; // NOTE: Default/not specifically set + + struct LabelStruct { + char_string<16> label = 0; + char_string<16> value = 1; + } + + attribute access(write: manage) LabelStruct labelList[] = 0; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** Allows servers to ensure that listed clients are notified when a server is available for communication. */ +cluster IcdManagement = 70 { + revision 3; + + enum ClientTypeEnum : enum8 { + kPermanent = 0; + kEphemeral = 1; + } + + enum OperatingModeEnum : enum8 { + kSIT = 0; + kLIT = 1; + } + + bitmap Feature : bitmap32 { + kCheckInProtocolSupport = 0x1; + kUserActiveModeTrigger = 0x2; + kLongIdleTimeSupport = 0x4; + kDynamicSitLitSupport = 0x8; + } + + bitmap UserActiveModeTriggerBitmap : bitmap32 { + kPowerCycle = 0x1; + kSettingsMenu = 0x2; + kCustomInstruction = 0x4; + kDeviceManual = 0x8; + kActuateSensor = 0x10; + kActuateSensorSeconds = 0x20; + kActuateSensorTimes = 0x40; + kActuateSensorLightsBlink = 0x80; + kResetButton = 0x100; + kResetButtonLightsBlink = 0x200; + kResetButtonSeconds = 0x400; + kResetButtonTimes = 0x800; + kSetupButton = 0x1000; + kSetupButtonSeconds = 0x2000; + kSetupButtonLightsBlink = 0x4000; + kSetupButtonTimes = 0x8000; + kAppDefinedButton = 0x10000; + } + + fabric_scoped struct MonitoringRegistrationStruct { + fabric_sensitive node_id checkInNodeID = 1; + fabric_sensitive int64u monitoredSubject = 2; + fabric_sensitive ClientTypeEnum clientType = 4; + fabric_idx fabricIndex = 254; + } + + readonly attribute int32u idleModeDuration = 0; + readonly attribute int32u activeModeDuration = 1; + readonly attribute int16u activeModeThreshold = 2; + readonly attribute access(read: administer) optional MonitoringRegistrationStruct registeredClients[] = 3; + readonly attribute access(read: administer) optional int32u ICDCounter = 4; + readonly attribute optional int16u clientsSupportedPerFabric = 5; + provisional readonly attribute optional UserActiveModeTriggerBitmap userActiveModeTriggerHint = 6; + provisional readonly attribute optional char_string<128> userActiveModeTriggerInstruction = 7; + provisional readonly attribute optional OperatingModeEnum operatingMode = 8; + provisional readonly attribute optional int32u maximumCheckInBackOff = 9; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct RegisterClientRequest { + node_id checkInNodeID = 0; + int64u monitoredSubject = 1; + octet_string<16> key = 2; + optional octet_string<16> verificationKey = 3; + ClientTypeEnum clientType = 4; + } + + response struct RegisterClientResponse = 1 { + int32u ICDCounter = 0; + } + + request struct UnregisterClientRequest { + node_id checkInNodeID = 0; + optional octet_string<16> verificationKey = 1; + } + + request struct StayActiveRequestRequest { + int32u stayActiveDuration = 0; + } + + response struct StayActiveResponse = 4 { + int32u promisedActiveDuration = 0; + } + + /** Register a client to the end device */ + fabric command access(invoke: manage) RegisterClient(RegisterClientRequest): RegisterClientResponse = 0; + /** Unregister a client from an end device */ + fabric command access(invoke: manage) UnregisterClient(UnregisterClientRequest): DefaultSuccess = 2; + /** Request the end device to stay in Active Mode for an additional ActiveModeThreshold */ + command access(invoke: manage) StayActiveRequest(StayActiveRequestRequest): StayActiveResponse = 3; +} + +/** An interface to a generic way to secure a door */ +cluster DoorLock = 257 { + revision 7; + + enum AlarmCodeEnum : enum8 { + kLockJammed = 0; + kLockFactoryReset = 1; + kLockRadioPowerCycled = 3; + kWrongCodeEntryLimit = 4; + kFrontEsceutcheonRemoved = 5; + kDoorForcedOpen = 6; + kDoorAjar = 7; + kForcedUser = 8; + } + + enum CredentialRuleEnum : enum8 { + kSingle = 0; + kDual = 1; + kTri = 2; + } + + enum CredentialTypeEnum : enum8 { + kProgrammingPIN = 0; + kPIN = 1; + kRFID = 2; + kFingerprint = 3; + kFingerVein = 4; + kFace = 5; + kAliroCredentialIssuerKey = 6; + kAliroEvictableEndpointKey = 7; + kAliroNonEvictableEndpointKey = 8; + } + + enum DataOperationTypeEnum : enum8 { + kAdd = 0; + kClear = 1; + kModify = 2; + } + + enum DlLockState : enum8 { + kNotFullyLocked = 0; + kLocked = 1; + kUnlocked = 2; + kUnlatched = 3; + } + + enum DlLockType : enum8 { + kDeadBolt = 0; + kMagnetic = 1; + kOther = 2; + kMortise = 3; + kRim = 4; + kLatchBolt = 5; + kCylindricalLock = 6; + kTubularLock = 7; + kInterconnectedLock = 8; + kDeadLatch = 9; + kDoorFurniture = 10; + kEurocylinder = 11; + } + + enum DlStatus : enum8 { + kSuccess = 0; + kFailure = 1; + kDuplicate = 2; + kOccupied = 3; + kInvalidField = 133; + kResourceExhausted = 137; + kNotFound = 139; + } + + enum DoorLockOperationEventCode : enum8 { + kUnknownOrMfgSpecific = 0; + kLock = 1; + kUnlock = 2; + kLockInvalidPinOrId = 3; + kLockInvalidSchedule = 4; + kUnlockInvalidPinOrId = 5; + kUnlockInvalidSchedule = 6; + kOneTouchLock = 7; + kKeyLock = 8; + kKeyUnlock = 9; + kAutoLock = 10; + kScheduleLock = 11; + kScheduleUnlock = 12; + kManualLock = 13; + kManualUnlock = 14; + } + + enum DoorLockProgrammingEventCode : enum8 { + kUnknownOrMfgSpecific = 0; + kMasterCodeChanged = 1; + kPinAdded = 2; + kPinDeleted = 3; + kPinChanged = 4; + kIdAdded = 5; + kIdDeleted = 6; + } + + enum DoorLockSetPinOrIdStatus : enum8 { + kSuccess = 0; + kGeneralFailure = 1; + kMemoryFull = 2; + kDuplicateCodeError = 3; + } + + enum DoorLockUserStatus : enum8 { + kAvailable = 0; + kOccupiedEnabled = 1; + kOccupiedDisabled = 3; + kNotSupported = 255; + } + + enum DoorLockUserType : enum8 { + kUnrestricted = 0; + kYearDayScheduleUser = 1; + kWeekDayScheduleUser = 2; + kMasterUser = 3; + kNonAccessUser = 4; + kNotSupported = 255; + } + + enum DoorStateEnum : enum8 { + kDoorOpen = 0; + kDoorClosed = 1; + kDoorJammed = 2; + kDoorForcedOpen = 3; + kDoorUnspecifiedError = 4; + kDoorAjar = 5; + } + + enum LockDataTypeEnum : enum8 { + kUnspecified = 0; + kProgrammingCode = 1; + kUserIndex = 2; + kWeekDaySchedule = 3; + kYearDaySchedule = 4; + kHolidaySchedule = 5; + kPIN = 6; + kRFID = 7; + kFingerprint = 8; + kFingerVein = 9; + kFace = 10; + kAliroCredentialIssuerKey = 11; + kAliroEvictableEndpointKey = 12; + kAliroNonEvictableEndpointKey = 13; + } + + enum LockOperationTypeEnum : enum8 { + kLock = 0; + kUnlock = 1; + kNonAccessUserEvent = 2; + kForcedUserEvent = 3; + kUnlatch = 4; + } + + enum OperatingModeEnum : enum8 { + kNormal = 0; + kVacation = 1; + kPrivacy = 2; + kNoRemoteLockUnlock = 3; + kPassage = 4; + } + + enum OperationErrorEnum : enum8 { + kUnspecified = 0; + kInvalidCredential = 1; + kDisabledUserDenied = 2; + kRestricted = 3; + kInsufficientBattery = 4; + } + + enum OperationSourceEnum : enum8 { + kUnspecified = 0; + kManual = 1; + kProprietaryRemote = 2; + kKeypad = 3; + kAuto = 4; + kButton = 5; + kSchedule = 6; + kRemote = 7; + kRFID = 8; + kBiometric = 9; + kAliro = 10; + } + + enum UserStatusEnum : enum8 { + kAvailable = 0; + kOccupiedEnabled = 1; + kOccupiedDisabled = 3; + } + + enum UserTypeEnum : enum8 { + kUnrestrictedUser = 0; + kYearDayScheduleUser = 1; + kWeekDayScheduleUser = 2; + kProgrammingUser = 3; + kNonAccessUser = 4; + kForcedUser = 5; + kDisposableUser = 6; + kExpiringUser = 7; + kScheduleRestrictedUser = 8; + kRemoteOnlyUser = 9; + } + + bitmap DaysMaskMap : bitmap8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + } + + bitmap DlCredentialRuleMask : bitmap8 { + kSingle = 0x1; + kDual = 0x2; + kTri = 0x4; + } + + bitmap DlCredentialRulesSupport : bitmap8 { + kSingle = 0x1; + kDual = 0x2; + kTri = 0x4; + } + + bitmap DlDefaultConfigurationRegister : bitmap16 { + kEnableLocalProgrammingEnabled = 0x1; + kKeypadInterfaceDefaultAccessEnabled = 0x2; + kRemoteInterfaceDefaultAccessIsEnabled = 0x4; + kSoundEnabled = 0x20; + kAutoRelockTimeSet = 0x40; + kLEDSettingsSet = 0x80; + } + + bitmap DlKeypadOperationEventMask : bitmap16 { + kUnknown = 0x1; + kLock = 0x2; + kUnlock = 0x4; + kLockInvalidPIN = 0x8; + kLockInvalidSchedule = 0x10; + kUnlockInvalidCode = 0x20; + kUnlockInvalidSchedule = 0x40; + kNonAccessUserOpEvent = 0x80; + } + + bitmap DlKeypadProgrammingEventMask : bitmap16 { + kUnknown = 0x1; + kProgrammingPINChanged = 0x2; + kPINAdded = 0x4; + kPINCleared = 0x8; + kPINChanged = 0x10; + } + + bitmap DlLocalProgrammingFeatures : bitmap8 { + kAddUsersCredentialsSchedulesLocally = 0x1; + kModifyUsersCredentialsSchedulesLocally = 0x2; + kClearUsersCredentialsSchedulesLocally = 0x4; + kAdjustLockSettingsLocally = 0x8; + } + + bitmap DlManualOperationEventMask : bitmap16 { + kUnknown = 0x1; + kThumbturnLock = 0x2; + kThumbturnUnlock = 0x4; + kOneTouchLock = 0x8; + kKeyLock = 0x10; + kKeyUnlock = 0x20; + kAutoLock = 0x40; + kScheduleLock = 0x80; + kScheduleUnlock = 0x100; + kManualLock = 0x200; + kManualUnlock = 0x400; + } + + bitmap DlRFIDOperationEventMask : bitmap16 { + kUnknown = 0x1; + kLock = 0x2; + kUnlock = 0x4; + kLockInvalidRFID = 0x8; + kLockInvalidSchedule = 0x10; + kUnlockInvalidRFID = 0x20; + kUnlockInvalidSchedule = 0x40; + } + + bitmap DlRFIDProgrammingEventMask : bitmap16 { + kUnknown = 0x1; + kRFIDCodeAdded = 0x20; + kRFIDCodeCleared = 0x40; + } + + bitmap DlRemoteOperationEventMask : bitmap16 { + kUnknown = 0x1; + kLock = 0x2; + kUnlock = 0x4; + kLockInvalidCode = 0x8; + kLockInvalidSchedule = 0x10; + kUnlockInvalidCode = 0x20; + kUnlockInvalidSchedule = 0x40; + } + + bitmap DlRemoteProgrammingEventMask : bitmap16 { + kUnknown = 0x1; + kProgrammingPINChanged = 0x2; + kPINAdded = 0x4; + kPINCleared = 0x8; + kPINChanged = 0x10; + kRFIDCodeAdded = 0x20; + kRFIDCodeCleared = 0x40; + } + + bitmap DlSupportedOperatingModes : bitmap16 { + kNormal = 0x1; + kVacation = 0x2; + kPrivacy = 0x4; + kNoRemoteLockUnlock = 0x8; + kPassage = 0x10; + } + + bitmap DoorLockDayOfWeek : bitmap8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + } + + bitmap Feature : bitmap32 { + kPINCredential = 0x1; + kRFIDCredential = 0x2; + kFingerCredentials = 0x4; + kLogging = 0x8; + kWeekDayAccessSchedules = 0x10; + kDoorPositionSensor = 0x20; + kFaceCredentials = 0x40; + kCredentialsOverTheAirAccess = 0x80; + kUser = 0x100; + kNotification = 0x200; + kYearDayAccessSchedules = 0x400; + kHolidaySchedules = 0x800; + kUnbolt = 0x1000; + kAliroProvisioning = 0x2000; + kAliroBLEUWB = 0x4000; + } + + struct CredentialStruct { + CredentialTypeEnum credentialType = 0; + int16u credentialIndex = 1; + } + + critical event DoorLockAlarm = 0 { + AlarmCodeEnum alarmCode = 0; + } + + critical event DoorStateChange = 1 { + DoorStateEnum doorState = 0; + } + + critical event LockOperation = 2 { + LockOperationTypeEnum lockOperationType = 0; + OperationSourceEnum operationSource = 1; + nullable int16u userIndex = 2; + nullable fabric_idx fabricIndex = 3; + nullable node_id sourceNode = 4; + optional nullable CredentialStruct credentials[] = 5; + } + + critical event LockOperationError = 3 { + LockOperationTypeEnum lockOperationType = 0; + OperationSourceEnum operationSource = 1; + OperationErrorEnum operationError = 2; + nullable int16u userIndex = 3; + nullable fabric_idx fabricIndex = 4; + nullable node_id sourceNode = 5; + optional nullable CredentialStruct credentials[] = 6; + } + + info event LockUserChange = 4 { + LockDataTypeEnum lockDataType = 0; + DataOperationTypeEnum dataOperationType = 1; + OperationSourceEnum operationSource = 2; + nullable int16u userIndex = 3; + nullable fabric_idx fabricIndex = 4; + nullable node_id sourceNode = 5; + nullable int16u dataIndex = 6; + } + + readonly attribute nullable DlLockState lockState = 0; + readonly attribute DlLockType lockType = 1; + readonly attribute boolean actuatorEnabled = 2; + readonly attribute optional nullable DoorStateEnum doorState = 3; + attribute access(write: manage) optional int32u doorOpenEvents = 4; + attribute access(write: manage) optional int32u doorClosedEvents = 5; + attribute access(write: manage) optional int16u openPeriod = 6; + readonly attribute optional int16u numberOfTotalUsersSupported = 17; + readonly attribute optional int16u numberOfPINUsersSupported = 18; + readonly attribute optional int16u numberOfRFIDUsersSupported = 19; + readonly attribute optional int8u numberOfWeekDaySchedulesSupportedPerUser = 20; + readonly attribute optional int8u numberOfYearDaySchedulesSupportedPerUser = 21; + readonly attribute optional int8u numberOfHolidaySchedulesSupported = 22; + readonly attribute optional int8u maxPINCodeLength = 23; + readonly attribute optional int8u minPINCodeLength = 24; + readonly attribute optional int8u maxRFIDCodeLength = 25; + readonly attribute optional int8u minRFIDCodeLength = 26; + readonly attribute optional DlCredentialRuleMask credentialRulesSupport = 27; + readonly attribute optional int8u numberOfCredentialsSupportedPerUser = 28; + attribute access(write: manage) optional char_string<3> language = 33; + attribute access(write: manage) optional int8u LEDSettings = 34; + attribute access(write: manage) optional int32u autoRelockTime = 35; + attribute access(write: manage) optional int8u soundVolume = 36; + attribute access(write: manage) OperatingModeEnum operatingMode = 37; + readonly attribute DlSupportedOperatingModes supportedOperatingModes = 38; + readonly attribute optional DlDefaultConfigurationRegister defaultConfigurationRegister = 39; + attribute access(write: administer) optional boolean enableLocalProgramming = 40; + attribute access(write: manage) optional boolean enableOneTouchLocking = 41; + attribute access(write: manage) optional boolean enableInsideStatusLED = 42; + attribute access(write: manage) optional boolean enablePrivacyModeButton = 43; + attribute access(write: administer) optional DlLocalProgrammingFeatures localProgrammingFeatures = 44; + attribute access(write: administer) optional int8u wrongCodeEntryLimit = 48; + attribute access(write: administer) optional int8u userCodeTemporaryDisableTime = 49; + attribute access(write: administer) optional boolean sendPINOverTheAir = 50; + attribute access(write: administer) optional boolean requirePINforRemoteOperation = 51; + attribute access(write: administer) optional int16u expiringUserTimeout = 53; + provisional readonly attribute access(read: administer) optional nullable octet_string<65> aliroReaderVerificationKey = 128; + provisional readonly attribute access(read: administer) optional nullable octet_string<16> aliroReaderGroupIdentifier = 129; + provisional readonly attribute access(read: administer) optional octet_string<16> aliroReaderGroupSubIdentifier = 130; + provisional readonly attribute access(read: administer) optional octet_string aliroExpeditedTransactionSupportedProtocolVersions[] = 131; + provisional readonly attribute access(read: administer) optional nullable octet_string<16> aliroGroupResolvingKey = 132; + provisional readonly attribute access(read: administer) optional octet_string aliroSupportedBLEUWBProtocolVersions[] = 133; + provisional readonly attribute access(read: administer) optional int8u aliroBLEAdvertisingVersion = 134; + provisional readonly attribute optional int16u numberOfAliroCredentialIssuerKeysSupported = 135; + provisional readonly attribute optional int16u numberOfAliroEndpointKeysSupported = 136; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct LockDoorRequest { + optional octet_string PINCode = 0; + } + + request struct UnlockDoorRequest { + optional octet_string PINCode = 0; + } + + request struct UnlockWithTimeoutRequest { + int16u timeout = 0; + optional octet_string PINCode = 1; + } + + request struct SetWeekDayScheduleRequest { + int8u weekDayIndex = 0; + int16u userIndex = 1; + DaysMaskMap daysMask = 2; + int8u startHour = 3; + int8u startMinute = 4; + int8u endHour = 5; + int8u endMinute = 6; + } + + request struct GetWeekDayScheduleRequest { + int8u weekDayIndex = 0; + int16u userIndex = 1; + } + + response struct GetWeekDayScheduleResponse = 12 { + int8u weekDayIndex = 0; + int16u userIndex = 1; + DlStatus status = 2; + optional DaysMaskMap daysMask = 3; + optional int8u startHour = 4; + optional int8u startMinute = 5; + optional int8u endHour = 6; + optional int8u endMinute = 7; + } + + request struct ClearWeekDayScheduleRequest { + int8u weekDayIndex = 0; + int16u userIndex = 1; + } + + request struct SetYearDayScheduleRequest { + int8u yearDayIndex = 0; + int16u userIndex = 1; + epoch_s localStartTime = 2; + epoch_s localEndTime = 3; + } + + request struct GetYearDayScheduleRequest { + int8u yearDayIndex = 0; + int16u userIndex = 1; + } + + response struct GetYearDayScheduleResponse = 15 { + int8u yearDayIndex = 0; + int16u userIndex = 1; + DlStatus status = 2; + optional epoch_s localStartTime = 3; + optional epoch_s localEndTime = 4; + } + + request struct ClearYearDayScheduleRequest { + int8u yearDayIndex = 0; + int16u userIndex = 1; + } + + request struct SetHolidayScheduleRequest { + int8u holidayIndex = 0; + epoch_s localStartTime = 1; + epoch_s localEndTime = 2; + OperatingModeEnum operatingMode = 3; + } + + request struct GetHolidayScheduleRequest { + int8u holidayIndex = 0; + } + + response struct GetHolidayScheduleResponse = 18 { + int8u holidayIndex = 0; + DlStatus status = 1; + optional epoch_s localStartTime = 2; + optional epoch_s localEndTime = 3; + optional OperatingModeEnum operatingMode = 4; + } + + request struct ClearHolidayScheduleRequest { + int8u holidayIndex = 0; + } + + request struct SetUserRequest { + DataOperationTypeEnum operationType = 0; + int16u userIndex = 1; + nullable char_string userName = 2; + nullable int32u userUniqueID = 3; + nullable UserStatusEnum userStatus = 4; + nullable UserTypeEnum userType = 5; + nullable CredentialRuleEnum credentialRule = 6; + } + + request struct GetUserRequest { + int16u userIndex = 0; + } + + response struct GetUserResponse = 28 { + int16u userIndex = 0; + nullable char_string userName = 1; + nullable int32u userUniqueID = 2; + nullable UserStatusEnum userStatus = 3; + nullable UserTypeEnum userType = 4; + nullable CredentialRuleEnum credentialRule = 5; + nullable CredentialStruct credentials[] = 6; + nullable fabric_idx creatorFabricIndex = 7; + nullable fabric_idx lastModifiedFabricIndex = 8; + nullable int16u nextUserIndex = 9; + } + + request struct ClearUserRequest { + int16u userIndex = 0; + } + + request struct SetCredentialRequest { + DataOperationTypeEnum operationType = 0; + CredentialStruct credential = 1; + long_octet_string credentialData = 2; + nullable int16u userIndex = 3; + nullable UserStatusEnum userStatus = 4; + nullable UserTypeEnum userType = 5; + } + + response struct SetCredentialResponse = 35 { + DlStatus status = 0; + nullable int16u userIndex = 1; + nullable int16u nextCredentialIndex = 2; + } + + request struct GetCredentialStatusRequest { + CredentialStruct credential = 0; + } + + response struct GetCredentialStatusResponse = 37 { + boolean credentialExists = 0; + nullable int16u userIndex = 1; + nullable fabric_idx creatorFabricIndex = 2; + nullable fabric_idx lastModifiedFabricIndex = 3; + nullable int16u nextCredentialIndex = 4; + optional nullable octet_string credentialData = 5; + } + + request struct ClearCredentialRequest { + nullable CredentialStruct credential = 0; + } + + request struct UnboltDoorRequest { + optional octet_string PINCode = 0; + } + + request struct SetAliroReaderConfigRequest { + octet_string<32> signingKey = 0; + octet_string<65> verificationKey = 1; + octet_string<16> groupIdentifier = 2; + optional octet_string<16> groupResolvingKey = 3; + } + + /** This command causes the lock device to lock the door. */ + timed command LockDoor(LockDoorRequest): DefaultSuccess = 0; + /** This command causes the lock device to unlock the door. */ + timed command UnlockDoor(UnlockDoorRequest): DefaultSuccess = 1; + /** This command causes the lock device to unlock the door with a timeout parameter. */ + timed command UnlockWithTimeout(UnlockWithTimeoutRequest): DefaultSuccess = 3; + /** Set a weekly repeating schedule for a specified user. */ + command access(invoke: administer) SetWeekDaySchedule(SetWeekDayScheduleRequest): DefaultSuccess = 11; + /** Retrieve the specific weekly schedule for the specific user. */ + command access(invoke: administer) GetWeekDaySchedule(GetWeekDayScheduleRequest): GetWeekDayScheduleResponse = 12; + /** Clear the specific weekly schedule or all weekly schedules for the specific user. */ + command access(invoke: administer) ClearWeekDaySchedule(ClearWeekDayScheduleRequest): DefaultSuccess = 13; + /** Set a time-specific schedule ID for a specified user. */ + command access(invoke: administer) SetYearDaySchedule(SetYearDayScheduleRequest): DefaultSuccess = 14; + /** Returns the year day schedule data for the specified schedule and user indexes. */ + command access(invoke: administer) GetYearDaySchedule(GetYearDayScheduleRequest): GetYearDayScheduleResponse = 15; + /** Clears the specific year day schedule or all year day schedules for the specific user. */ + command access(invoke: administer) ClearYearDaySchedule(ClearYearDayScheduleRequest): DefaultSuccess = 16; + /** Set the holiday Schedule by specifying local start time and local end time with respect to any Lock Operating Mode. */ + command access(invoke: administer) SetHolidaySchedule(SetHolidayScheduleRequest): DefaultSuccess = 17; + /** Get the holiday schedule for the specified index. */ + command access(invoke: administer) GetHolidaySchedule(GetHolidayScheduleRequest): GetHolidayScheduleResponse = 18; + /** Clears the holiday schedule or all holiday schedules. */ + command access(invoke: administer) ClearHolidaySchedule(ClearHolidayScheduleRequest): DefaultSuccess = 19; + /** Set User into the lock. */ + timed command access(invoke: administer) SetUser(SetUserRequest): DefaultSuccess = 26; + /** Retrieve User. */ + command access(invoke: administer) GetUser(GetUserRequest): GetUserResponse = 27; + /** Clears a User or all Users. */ + timed command access(invoke: administer) ClearUser(ClearUserRequest): DefaultSuccess = 29; + /** Set a credential (e.g. PIN, RFID, Fingerprint, etc.) into the lock for a new user, existing user, or ProgrammingUser. */ + timed command access(invoke: administer) SetCredential(SetCredentialRequest): SetCredentialResponse = 34; + /** Retrieve the status of a particular credential (e.g. PIN, RFID, Fingerprint, etc.) by index. */ + command access(invoke: administer) GetCredentialStatus(GetCredentialStatusRequest): GetCredentialStatusResponse = 36; + /** Clear one, one type, or all credentials except ProgrammingPIN credential. */ + timed command access(invoke: administer) ClearCredential(ClearCredentialRequest): DefaultSuccess = 38; + /** This command causes the lock device to unlock the door without pulling the latch. */ + timed command UnboltDoor(UnboltDoorRequest): DefaultSuccess = 39; + /** This command communicates an Aliro Reader configuration to the lock. */ + timed command access(invoke: administer) SetAliroReaderConfig(SetAliroReaderConfigRequest): DefaultSuccess = 40; + /** This command clears an existing Aliro Reader configuration for the lock. */ + timed command access(invoke: administer) ClearAliroReaderConfig(): DefaultSuccess = 41; +} + +endpoint 0 { + device type ma_rootdevice = 22, version 1; + device type ma_powersource = 17, version 1; + + binding cluster OtaSoftwareUpdateProvider; + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + } + + server cluster AccessControl { + emits event AccessControlEntryChanged; + emits event AccessControlExtensionChanged; + callback attribute acl; + callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 1; + callback attribute clusterRevision; + } + + server cluster BasicInformation { + emits event StartUp; + emits event ShutDown; + emits event Leave; + callback attribute dataModelRevision; + callback attribute vendorName; + callback attribute vendorID; + callback attribute productName; + callback attribute productID; + persist attribute nodeLabel; + callback attribute location; + callback attribute hardwareVersion; + callback attribute hardwareVersionString; + callback attribute softwareVersion; + callback attribute softwareVersionString; + callback attribute manufacturingDate; + callback attribute partNumber; + callback attribute productURL; + callback attribute productLabel; + callback attribute serialNumber; + persist attribute localConfigDisabled default = 0; + callback attribute uniqueID; + callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster OtaSoftwareUpdateRequestor { + emits event StateTransition; + emits event VersionApplied; + emits event DownloadError; + callback attribute defaultOTAProviders; + ram attribute updatePossible default = 1; + ram attribute updateState default = 0; + ram attribute updateStateProgress default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command AnnounceOTAProvider; + } + + server cluster UnitLocalization { + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster PowerSource { + emits event WiredFaultChange; + ram attribute status default = 1; + ram attribute order default = 0; + ram attribute description default = "USB"; + ram attribute wiredCurrentType default = 0; + ram attribute wiredAssessedCurrent; + callback attribute endpointList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 1; + ram attribute clusterRevision default = 2; + } + + server cluster GeneralCommissioning { + ram attribute breadcrumb default = 0x0000000000000000; + callback attribute basicCommissioningInfo; + callback attribute regulatoryConfig; + callback attribute locationCapability; + callback attribute supportsConcurrentConnection; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command ArmFailSafe; + handle command ArmFailSafeResponse; + handle command SetRegulatoryConfig; + handle command SetRegulatoryConfigResponse; + handle command CommissioningComplete; + handle command CommissioningCompleteResponse; + } + + server cluster NetworkCommissioning { + ram attribute maxNetworks; + callback attribute networks; + ram attribute scanMaxTimeSeconds; + ram attribute connectMaxTimeSeconds; + ram attribute interfaceEnabled; + ram attribute lastNetworkingStatus; + ram attribute lastNetworkID; + ram attribute lastConnectErrorValue; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 2; + ram attribute clusterRevision default = 1; + + handle command ScanNetworks; + handle command ScanNetworksResponse; + handle command AddOrUpdateWiFiNetwork; + handle command AddOrUpdateThreadNetwork; + handle command RemoveNetwork; + handle command NetworkConfigResponse; + handle command ConnectNetwork; + handle command ConnectNetworkResponse; + handle command ReorderNetwork; + } + + server cluster DiagnosticLogs { + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command RetrieveLogsRequest; + handle command RetrieveLogsResponse; + } + + server cluster GeneralDiagnostics { + emits event HardwareFaultChange; + emits event RadioFaultChange; + emits event NetworkFaultChange; + emits event BootReason; + callback attribute networkInterfaces; + callback attribute rebootCount; + callback attribute upTime; + callback attribute totalOperationalHours; + callback attribute bootReason; + callback attribute activeHardwareFaults; + callback attribute activeRadioFaults; + callback attribute activeNetworkFaults; + callback attribute testEventTriggersEnabled default = false; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + + handle command TestEventTrigger; + handle command TimeSnapshot; + handle command TimeSnapshotResponse; + } + + server cluster SoftwareDiagnostics { + callback attribute threadMetrics; + callback attribute currentHeapFree; + callback attribute currentHeapUsed; + callback attribute currentHeapHighWatermark; + callback attribute featureMap; + ram attribute clusterRevision default = 1; + + handle command ResetWatermarks; + } + + server cluster ThreadNetworkDiagnostics { + callback attribute channel; + callback attribute routingRole; + callback attribute networkName; + callback attribute panId; + callback attribute extendedPanId; + callback attribute meshLocalPrefix; + callback attribute overrunCount; + callback attribute neighborTable; + callback attribute routeTable; + callback attribute partitionId; + callback attribute weighting; + callback attribute dataVersion; + callback attribute stableDataVersion; + callback attribute leaderRouterId; + callback attribute detachedRoleCount; + callback attribute childRoleCount; + callback attribute routerRoleCount; + callback attribute leaderRoleCount; + callback attribute attachAttemptCount; + callback attribute partitionIdChangeCount; + callback attribute betterPartitionAttachAttemptCount; + callback attribute parentChangeCount; + callback attribute txTotalCount; + callback attribute txUnicastCount; + callback attribute txBroadcastCount; + callback attribute txAckRequestedCount; + callback attribute txAckedCount; + callback attribute txNoAckRequestedCount; + callback attribute txDataCount; + callback attribute txDataPollCount; + callback attribute txBeaconCount; + callback attribute txBeaconRequestCount; + callback attribute txOtherCount; + callback attribute txRetryCount; + callback attribute txDirectMaxRetryExpiryCount; + callback attribute txIndirectMaxRetryExpiryCount; + callback attribute txErrCcaCount; + callback attribute txErrAbortCount; + callback attribute txErrBusyChannelCount; + callback attribute rxTotalCount; + callback attribute rxUnicastCount; + callback attribute rxBroadcastCount; + callback attribute rxDataCount; + callback attribute rxDataPollCount; + callback attribute rxBeaconCount; + callback attribute rxBeaconRequestCount; + callback attribute rxOtherCount; + callback attribute rxAddressFilteredCount; + callback attribute rxDestAddrFilteredCount; + callback attribute rxDuplicatedCount; + callback attribute rxErrNoFrameCount; + callback attribute rxErrUnknownNeighborCount; + callback attribute rxErrInvalidSrcAddrCount; + callback attribute rxErrSecCount; + callback attribute rxErrFcsCount; + callback attribute rxErrOtherCount; + callback attribute activeTimestamp; + callback attribute pendingTimestamp; + callback attribute delay; + callback attribute securityPolicy; + callback attribute channelPage0Mask; + callback attribute operationalDatasetComponents; + callback attribute activeNetworkFaultsList; + ram attribute featureMap default = 0x000F; + ram attribute clusterRevision default = 2; + + handle command ResetCounts; + } + + server cluster WiFiNetworkDiagnostics { + emits event Disconnection; + emits event AssociationFailure; + emits event ConnectionStatus; + callback attribute bssid; + callback attribute securityType; + callback attribute wiFiVersion; + callback attribute channelNumber; + callback attribute rssi; + callback attribute beaconLostCount; + callback attribute beaconRxCount; + callback attribute packetMulticastRxCount; + callback attribute packetMulticastTxCount; + callback attribute packetUnicastRxCount; + callback attribute packetUnicastTxCount; + callback attribute currentMaxRate; + callback attribute overrunCount; + ram attribute featureMap default = 3; + ram attribute clusterRevision default = 1; + + handle command ResetCounts; + } + + server cluster EthernetNetworkDiagnostics { + callback attribute PHYRate; + callback attribute fullDuplex; + callback attribute packetRxCount; + callback attribute packetTxCount; + callback attribute txErrCount; + callback attribute collisionCount; + callback attribute overrunCount; + callback attribute carrierDetect; + callback attribute timeSinceReset; + ram attribute featureMap default = 3; + ram attribute clusterRevision default = 1; + + handle command ResetCounts; + } + + server cluster AdministratorCommissioning { + callback attribute windowStatus; + callback attribute adminFabricIndex; + callback attribute adminVendorId; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command OpenCommissioningWindow; + handle command RevokeCommissioning; + } + + server cluster OperationalCredentials { + callback attribute NOCs; + callback attribute fabrics; + callback attribute supportedFabrics; + callback attribute commissionedFabrics; + callback attribute trustedRootCertificates; + callback attribute currentFabricIndex; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command AttestationRequest; + handle command AttestationResponse; + handle command CertificateChainRequest; + handle command CertificateChainResponse; + handle command CSRRequest; + handle command CSRResponse; + handle command AddNOC; + handle command UpdateNOC; + handle command NOCResponse; + handle command UpdateFabricLabel; + handle command RemoveFabric; + handle command AddTrustedRootCertificate; + } + + server cluster GroupKeyManagement { + callback attribute groupKeyMap; + callback attribute groupTable; + callback attribute maxGroupsPerFabric; + callback attribute maxGroupKeysPerFabric; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + + handle command KeySetWrite; + handle command KeySetRead; + handle command KeySetReadResponse; + handle command KeySetRemove; + handle command KeySetReadAllIndices; + handle command KeySetReadAllIndicesResponse; + } + + server cluster FixedLabel { + callback attribute labelList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster UserLabel { + callback attribute labelList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster IcdManagement { + callback attribute idleModeDuration; + callback attribute activeModeDuration; + callback attribute activeModeThreshold; + ram attribute featureMap default = 0x0000; + ram attribute clusterRevision default = 3; + } +} +endpoint 1 { + device type ma_powersource = 17, version 1; + device type ma_doorlock = 10, version 1; + + + server cluster Identify { + ram attribute identifyTime default = 0x0000; + ram attribute identifyType default = 0x0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 4; + + handle command Identify; + handle command TriggerEffect; + } + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + } + + server cluster PowerSource { + ram attribute status default = 1; + ram attribute order default = 1; + ram attribute description default = "Battery"; + ram attribute batChargeLevel; + ram attribute batReplacementNeeded; + ram attribute batReplaceability; + ram attribute batReplacementDescription; + ram attribute batQuantity default = 1; + callback attribute endpointList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0x0A; + ram attribute clusterRevision default = 2; + } + + server cluster DoorLock { + emits event DoorLockAlarm; + emits event DoorStateChange; + emits event LockOperation; + emits event LockOperationError; + emits event LockUserChange; + persist attribute lockState default = 1; + ram attribute lockType; + ram attribute actuatorEnabled; + ram attribute doorState; + ram attribute numberOfTotalUsersSupported default = 10; + ram attribute numberOfPINUsersSupported default = 10; + ram attribute numberOfRFIDUsersSupported default = 10; + ram attribute numberOfWeekDaySchedulesSupportedPerUser default = 10; + ram attribute numberOfYearDaySchedulesSupportedPerUser default = 10; + ram attribute numberOfHolidaySchedulesSupported default = 10; + ram attribute maxPINCodeLength default = 8; + ram attribute minPINCodeLength default = 6; + ram attribute maxRFIDCodeLength default = 20; + ram attribute minRFIDCodeLength default = 10; + ram attribute credentialRulesSupport default = 1; + ram attribute numberOfCredentialsSupportedPerUser default = 5; + ram attribute language default = "en"; + ram attribute autoRelockTime default = 60; + ram attribute soundVolume default = 0x00; + ram attribute operatingMode default = 0x00; + ram attribute supportedOperatingModes default = 0xFFF6; + ram attribute enableOneTouchLocking default = 0x00; + ram attribute enablePrivacyModeButton default = 0x00; + ram attribute wrongCodeEntryLimit default = 3; + ram attribute userCodeTemporaryDisableTime default = 10; + ram attribute requirePINforRemoteOperation default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0x7DB3; + ram attribute clusterRevision default = 7; + + handle command LockDoor; + handle command UnlockDoor; + handle command UnlockWithTimeout; + handle command SetWeekDaySchedule; + handle command GetWeekDaySchedule; + handle command GetWeekDayScheduleResponse; + handle command ClearWeekDaySchedule; + handle command SetYearDaySchedule; + handle command GetYearDaySchedule; + handle command GetYearDayScheduleResponse; + handle command ClearYearDaySchedule; + handle command SetHolidaySchedule; + handle command GetHolidaySchedule; + handle command GetHolidayScheduleResponse; + handle command ClearHolidaySchedule; + handle command SetUser; + handle command GetUser; + handle command GetUserResponse; + handle command ClearUser; + handle command SetCredential; + handle command SetCredentialResponse; + handle command GetCredentialStatus; + handle command GetCredentialStatusResponse; + handle command ClearCredential; + handle command UnboltDoor; + } +} + + diff --git a/examples/lock-app/silabs/data_model/lock-app.zap b/examples/lock-app/silabs/data_model/lock-app.zap new file mode 100644 index 00000000000000..a10a27ee9ad9a4 --- /dev/null +++ b/examples/lock-app/silabs/data_model/lock-app.zap @@ -0,0 +1,6273 @@ +{ + "fileFormat": 2, + "featureLevel": 103, + "creator": "zap", + "keyValuePairs": [ + { + "key": "commandDiscovery", + "value": "1" + }, + { + "key": "defaultResponsePolicy", + "value": "always" + }, + { + "key": "manufacturerCodes", + "value": "0x1002" + } + ], + "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../../src/app/zap-templates/zcl/zcl.json", + "type": "zcl-properties", + "category": "matter", + "version": 1, + "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "category": "matter", + "version": "chip-v1" + } + ], + "endpointTypes": [ + { + "id": 1, + "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 17, + "profileId": 259, + "label": "MA-powersource", + "name": "MA-powersource" + }, + "deviceTypes": [ + { + "code": 17, + "profileId": 259, + "label": "MA-powersource", + "name": "MA-powersource" + }, + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1, + 1 + ], + "deviceIdentifiers": [ + 17, + 22 + ], + "deviceTypeName": "MA-powersource", + "deviceTypeCode": 17, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ACL", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Extension", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "AccessControlEntryChanged", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AccessControlExtensionChanged", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Basic Information", + "code": 40, + "mfgCode": null, + "define": "BASIC_INFORMATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DataModelRevision", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorName", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorID", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductName", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductID", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NodeLabel", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Location", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersion", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersionString", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersion", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersionString", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ManufacturingDate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartNumber", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductURL", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "long_char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductLabel", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SerialNumber", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LocalConfigDisabled", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UniqueID", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxPathsPerInvoke", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "StartUp", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "ShutDown", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "Leave", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "OTA Software Update Provider", + "code": 41, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "QueryImage", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "QueryImageResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ApplyUpdateRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ApplyUpdateResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NotifyUpdateApplied", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + } + ] + }, + { + "name": "OTA Software Update Requestor", + "code": 42, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AnnounceOTAProvider", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "DefaultOTAProviders", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UpdatePossible", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpdateState", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "UpdateStateEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpdateStateProgress", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "StateTransition", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "VersionApplied", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "DownloadError", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Power Source", + "code": 47, + "mfgCode": null, + "define": "POWER_SOURCE_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Status", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "PowerSourceStatusEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Order", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Description", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "USB", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WiredCurrentType", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "WiredCurrentTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WiredAssessedCurrent", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EndpointList", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "WiredFaultChange", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ArmFailSafe", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ArmFailSafeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfig", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfigResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CommissioningComplete", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CommissioningCompleteResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "Breadcrumb", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BasicCommissioningInfo", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "BasicCommissioningInfo", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RegulatoryConfig", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocationCapability", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ScanNetworks", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ScanNetworksResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddOrUpdateWiFiNetwork", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddOrUpdateThreadNetwork", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveNetwork", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NetworkConfigResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ConnectNetwork", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ConnectNetworkResponse", + "code": 7, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ReorderNetwork", + "code": 8, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "MaxNetworks", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Networks", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ScanMaxTimeSeconds", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ConnectMaxTimeSeconds", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InterfaceEnabled", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkingStatus", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "NetworkCommissioningStatusEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkID", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastConnectErrorValue", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Diagnostic Logs", + "code": 50, + "mfgCode": null, + "define": "DIAGNOSTIC_LOGS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "RetrieveLogsRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RetrieveLogsResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "TestEventTrigger", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TimeSnapshot", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TimeSnapshotResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NetworkInterfaces", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RebootCount", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TotalOperationalHours", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BootReason", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "BootReasonEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveHardwareFaults", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveRadioFaults", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaults", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TestEventTriggersEnabled", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "false", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "HardwareFaultChange", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "RadioFaultChange", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "NetworkFaultChange", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "BootReason", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Software Diagnostics", + "code": 52, + "mfgCode": null, + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ResetWatermarks", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "ThreadMetrics", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapFree", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapUsed", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapHighWatermark", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "Channel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RoutingRole", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "RoutingRoleEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NetworkName", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PanId", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ExtendedPanId", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MeshLocalPrefix", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NeighborTable", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RouteTable", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartitionId", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Weighting", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DataVersion", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "StableDataVersion", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LeaderRouterId", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DetachedRoleCount", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChildRoleCount", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RouterRoleCount", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LeaderRoleCount", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "AttachAttemptCount", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartitionIdChangeCount", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BetterPartitionAttachAttemptCount", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ParentChangeCount", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxTotalCount", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxUnicastCount", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBroadcastCount", + "code": 24, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxAckRequestedCount", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxAckedCount", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxNoAckRequestedCount", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDataCount", + "code": 28, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDataPollCount", + "code": 29, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBeaconCount", + "code": 30, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBeaconRequestCount", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxOtherCount", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxRetryCount", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDirectMaxRetryExpiryCount", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxIndirectMaxRetryExpiryCount", + "code": 35, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrCcaCount", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrAbortCount", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrBusyChannelCount", + "code": 38, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxTotalCount", + "code": 39, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxUnicastCount", + "code": 40, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBroadcastCount", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDataCount", + "code": 42, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDataPollCount", + "code": 43, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBeaconCount", + "code": 44, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBeaconRequestCount", + "code": 45, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxOtherCount", + "code": 46, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxAddressFilteredCount", + "code": 47, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDestAddrFilteredCount", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDuplicatedCount", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrNoFrameCount", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrUnknownNeighborCount", + "code": 51, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrInvalidSrcAddrCount", + "code": 52, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrSecCount", + "code": 53, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrFcsCount", + "code": 54, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrOtherCount", + "code": 55, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveTimestamp", + "code": 56, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PendingTimestamp", + "code": 57, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Delay", + "code": 58, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SecurityPolicy", + "code": 59, + "mfgCode": null, + "side": "server", + "type": "SecurityPolicy", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChannelPage0Mask", + "code": 60, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OperationalDatasetComponents", + "code": 61, + "mfgCode": null, + "side": "server", + "type": "OperationalDatasetComponents", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaultsList", + "code": 62, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x000F", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Wi-Fi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "BSSID", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SecurityType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "SecurityTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "WiFiVersion", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "WiFiVersionEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChannelNumber", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RSSI", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BeaconLostCount", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BeaconRxCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastRxCount", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastTxCount", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastRxCount", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastTxCount", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMaxRate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "Disconnection", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AssociationFailure", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "ConnectionStatus", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Ethernet Network Diagnostics", + "code": 55, + "mfgCode": null, + "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "PHYRate", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "PHYRateEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FullDuplex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketRxCount", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PacketTxCount", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrCount", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CollisionCount", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CarrierDetect", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TimeSinceReset", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "OpenCommissioningWindow", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RevokeCommissioning", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "WindowStatus", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "CommissioningWindowStatusEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminFabricIndex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "fabric_idx", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminVendorId", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AttestationRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AttestationResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CertificateChainRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CertificateChainResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CSRRequest", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CSRResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddNOC", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "UpdateNOC", + "code": 7, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NOCResponse", + "code": 8, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "UpdateFabricLabel", + "code": 9, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveFabric", + "code": 10, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddTrustedRootCertificate", + "code": 11, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Fabrics", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SupportedFabrics", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CommissionedFabrics", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TrustedRootCertificates", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentFabricIndex", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "KeySetWrite", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetRead", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "KeySetRemove", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadAllIndices", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadAllIndicesResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "GroupKeyMap", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GroupTable", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupsPerFabric", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupKeysPerFabric", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Fixed Label", + "code": 64, + "mfgCode": null, + "define": "FIXED_LABEL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "LabelList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "User Label", + "code": 65, + "mfgCode": null, + "define": "USER_LABEL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "LabelList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "ICD Management", + "code": 70, + "mfgCode": null, + "define": "ICD_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "IdleModeDuration", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveModeDuration", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveModeThreshold", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + }, + { + "id": 2, + "name": "MA-doorlock", + "deviceTypeRef": { + "code": 10, + "profileId": 259, + "label": "MA-doorlock", + "name": "MA-doorlock" + }, + "deviceTypes": [ + { + "code": 10, + "profileId": 259, + "label": "MA-doorlock", + "name": "MA-doorlock" + }, + { + "code": 17, + "profileId": 259, + "label": "MA-powersource", + "name": "MA-powersource" + } + ], + "deviceVersions": [ + 1, + 1 + ], + "deviceIdentifiers": [ + 10, + 17 + ], + "deviceTypeName": "MA-doorlock", + "deviceTypeCode": 10, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TriggerEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "IdentifyType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "IdentifyTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Power Source", + "code": 47, + "mfgCode": null, + "define": "POWER_SOURCE_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Status", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "PowerSourceStatusEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Order", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Description", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "Battery", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatChargeLevel", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "BatChargeLevelEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatReplacementNeeded", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatReplaceability", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "BatReplaceabilityEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatReplacementDescription", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatQuantity", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EndpointList", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0A", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Door Lock", + "code": 257, + "mfgCode": null, + "define": "DOOR_LOCK_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "LockDoor", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "UnlockDoor", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "UnlockWithTimeout", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetWeekDaySchedule", + "code": 11, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetWeekDaySchedule", + "code": 12, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetWeekDayScheduleResponse", + "code": 12, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ClearWeekDaySchedule", + "code": 13, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetYearDaySchedule", + "code": 14, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetYearDaySchedule", + "code": 15, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetYearDayScheduleResponse", + "code": 15, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ClearYearDaySchedule", + "code": 16, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetHolidaySchedule", + "code": 17, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetHolidaySchedule", + "code": 18, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetHolidayScheduleResponse", + "code": 18, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ClearHolidaySchedule", + "code": 19, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetUser", + "code": 26, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetUser", + "code": 27, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetUserResponse", + "code": 28, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ClearUser", + "code": 29, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetCredential", + "code": 34, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetCredentialResponse", + "code": 35, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "GetCredentialStatus", + "code": 36, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetCredentialStatusResponse", + "code": 37, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ClearCredential", + "code": 38, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "UnboltDoor", + "code": 39, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "LockState", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "DlLockState", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LockType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "DlLockType", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActuatorEnabled", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DoorState", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "DoorStateEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NumberOfTotalUsersSupported", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "10", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfPINUsersSupported", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "10", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfRFIDUsersSupported", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "10", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfWeekDaySchedulesSupportedPerUser", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "10", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfYearDaySchedulesSupportedPerUser", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "10", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfHolidaySchedulesSupported", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "10", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxPINCodeLength", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "8", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinPINCodeLength", + "code": 24, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "6", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxRFIDCodeLength", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "20", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinRFIDCodeLength", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "10", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CredentialRulesSupport", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "DlCredentialRuleMask", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfCredentialsSupportedPerUser", + "code": 28, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Language", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "en", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "AutoRelockTime", + "code": 35, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "60", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoundVolume", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OperatingMode", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "OperatingModeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SupportedOperatingModes", + "code": 38, + "mfgCode": null, + "side": "server", + "type": "DlSupportedOperatingModes", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFFF6", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnableOneTouchLocking", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "EnablePrivacyModeButton", + "code": 43, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "WrongCodeEntryLimit", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UserCodeTemporaryDisableTime", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "10", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RequirePINforRemoteOperation", + "code": 51, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x7DB3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "7", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "DoorLockAlarm", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "DoorStateChange", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "LockOperation", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "LockOperationError", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "LockUserChange", + "code": 4, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + } + ] + } + ], + "endpoints": [ + { + "endpointTypeName": "MA-rootdevice", + "endpointTypeIndex": 0, + "profileId": 259, + "endpointId": 0, + "networkId": 0, + "parentEndpointIdentifier": null + }, + { + "endpointTypeName": "MA-doorlock", + "endpointTypeIndex": 1, + "profileId": 259, + "endpointId": 1, + "networkId": 0, + "parentEndpointIdentifier": null + } + ] +} \ No newline at end of file diff --git a/examples/lock-app/silabs/openthread.gni b/examples/lock-app/silabs/openthread.gni index 3423049a9a8f79..46359c13e89276 100644 --- a/examples/lock-app/silabs/openthread.gni +++ b/examples/lock-app/silabs/openthread.gni @@ -18,7 +18,7 @@ import("${chip_root}/src/platform/silabs/efr32/args.gni") silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") -app_data_model = "${chip_root}/examples/lock-app/lock-common" +app_data_model = "${chip_root}/examples/lock-app/silabs/data_model:silabs-lock" chip_enable_ota_requestor = true chip_enable_openthread = true diff --git a/examples/lock-app/telink/README.md b/examples/lock-app/telink/README.md index 8e0d605fd85dc6..9f6e8671ccbb3b 100755 --- a/examples/lock-app/telink/README.md +++ b/examples/lock-app/telink/README.md @@ -145,10 +145,10 @@ feature for another Telink example: After build application with enabled OTA feature, use next binary files: -- zephyr.bin - main binary to flash PCB (Use at least 2MB PCB). -- zephyr-ota.bin - binary for OTA Provider +- merged.bin - main binary to flash PCB (Use at least 2MB PCB). +- matter.ota - binary for OTA Provider -All binaries has the same SW version. To test OTA “zephyr-ota.bin” should have +All binaries has the same SW version. To test OTA “matter.ota” should have higher SW version than base SW. Set CONFIG_CHIP_DEVICE_SOFTWARE_VERSION=2 in corresponding “prj.conf” configuration file. @@ -163,7 +163,7 @@ Usage of OTA: - Run the Linux OTA Provider with OTA image. ``` - ./chip-ota-provider-app -f zephyr-ota.bin + ./chip-ota-provider-app -f matter.ota ``` - Provision the Linux OTA Provider using chip-tool diff --git a/examples/log-source-app/log-source-common/log-source-app.matter b/examples/log-source-app/log-source-common/log-source-app.matter index 18f096a55eddfb..e5f6ee100785f0 100644 --- a/examples/log-source-app/log-source-common/log-source-app.matter +++ b/examples/log-source-app/log-source-common/log-source-app.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -398,6 +405,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter b/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter index b4c1f0365b4ee7..f22729df8880f1 100644 --- a/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter +++ b/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -622,6 +629,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/network-manager-app/network-manager-common/network-manager-app.matter b/examples/network-manager-app/network-manager-common/network-manager-app.matter index 1ed4ed6159a260..5d53e157329f58 100644 --- a/examples/network-manager-app/network-manager-common/network-manager-app.matter +++ b/examples/network-manager-app/network-manager-common/network-manager-app.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -528,6 +535,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter index c3678e0f93cdd4..7538f304f356d4 100644 --- a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter +++ b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -729,6 +736,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/ota-requestor-app/ameba/README.md b/examples/ota-requestor-app/ameba/README.md index b3efb9db0a5b9d..1af661767dfd77 100644 --- a/examples/ota-requestor-app/ameba/README.md +++ b/examples/ota-requestor-app/ameba/README.md @@ -6,11 +6,11 @@ A prototype application that demonstrates OTA Requestor capabilities. - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:76 + $ docker pull ghcr.io/project-chip/chip-build-ameba:81 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:76 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:81 - Setup build environment: diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter index 8206447e3683d0..b7514cf573c870 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -881,6 +888,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/ota-requestor-app/telink/README.md b/examples/ota-requestor-app/telink/README.md index d8590c6a0cc4d7..0c359b3af5ac01 100755 --- a/examples/ota-requestor-app/telink/README.md +++ b/examples/ota-requestor-app/telink/README.md @@ -134,10 +134,10 @@ feature for another Telink example: After build application with enabled OTA feature, use next binary files: -- zephyr.bin - main binary to flash PCB (Use at least 2MB PCB). -- zephyr-ota.bin - binary for OTA Provider +- merged.bin - main binary to flash PCB (Use at least 2MB PCB). +- matter.ota - binary for OTA Provider -All binaries has the same SW version. To test OTA “zephyr-ota.bin” should have +All binaries has the same SW version. To test OTA “matter.ota” should have higher SW version than base SW. Set CONFIG_CHIP_DEVICE_SOFTWARE_VERSION=2 in corresponding “prj.conf” configuration file. @@ -152,7 +152,7 @@ Usage of OTA: - Run the Linux OTA Provider with OTA image. ``` - ./chip-ota-provider-app -f zephyr-ota.bin + ./chip-ota-provider-app -f matter.ota ``` - Provision the Linux OTA Provider using chip-tool diff --git a/examples/pigweed-app/ameba/README.md b/examples/pigweed-app/ameba/README.md index acf8c4810bda8a..647809108e65ac 100644 --- a/examples/pigweed-app/ameba/README.md +++ b/examples/pigweed-app/ameba/README.md @@ -31,11 +31,11 @@ following features are available: - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:76 + $ docker pull ghcr.io/project-chip/chip-build-ameba:81 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:76 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:81 - Setup build environment: diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 6fcce30fe6b2a0..30f9ca883b0a9a 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -1665,6 +1672,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1756,6 +1764,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -7952,9 +7961,9 @@ cluster ContentLauncher = 1290 { bitmap Feature : bitmap32 { kContentSearch = 0x1; kURLPlayback = 0x2; - kAdvancedSeek = 0x3; - kTextTracks = 0x4; - kAudioTracks = 0x5; + kAdvancedSeek = 0x4; + kTextTracks = 0x8; + kAudioTracks = 0x10; } bitmap SupportedProtocolsBitmap : bitmap32 { @@ -8105,9 +8114,9 @@ cluster ContentLauncher = 1290 { bitmap Feature : bitmap32 { kContentSearch = 0x1; kURLPlayback = 0x2; - kAdvancedSeek = 0x3; - kTextTracks = 0x4; - kAudioTracks = 0x5; + kAdvancedSeek = 0x4; + kTextTracks = 0x8; + kAudioTracks = 0x10; } bitmap SupportedProtocolsBitmap : bitmap32 { diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index b2be5a5715779c..d8ced986c7b0ce 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -212,6 +212,13 @@ enum TestGlobalEnum : enum8 { kFinalValue = 2; } +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + bitmap TestGlobalBitmap : bitmap32 { kFirstBit = 0x1; kSecondBit = 0x2; @@ -1622,6 +1629,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1713,6 +1721,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -7865,9 +7874,9 @@ cluster ContentLauncher = 1290 { bitmap Feature : bitmap32 { kContentSearch = 0x1; kURLPlayback = 0x2; - kAdvancedSeek = 0x3; - kTextTracks = 0x4; - kAudioTracks = 0x5; + kAdvancedSeek = 0x4; + kTextTracks = 0x8; + kAudioTracks = 0x10; } bitmap SupportedProtocolsBitmap : bitmap32 { @@ -8018,9 +8027,9 @@ cluster ContentLauncher = 1290 { bitmap Feature : bitmap32 { kContentSearch = 0x1; kURLPlayback = 0x2; - kAdvancedSeek = 0x3; - kTextTracks = 0x4; - kAudioTracks = 0x5; + kAdvancedSeek = 0x4; + kTextTracks = 0x8; + kAudioTracks = 0x10; } bitmap SupportedProtocolsBitmap : bitmap32 { diff --git a/examples/placeholder/linux/static-supported-modes-manager.cpp b/examples/placeholder/linux/static-supported-modes-manager.cpp index 94345600cf53fd..59bccf11faa481 100644 --- a/examples/placeholder/linux/static-supported-modes-manager.cpp +++ b/examples/placeholder/linux/static-supported-modes-manager.cpp @@ -1,7 +1,6 @@ #include #include -using namespace std; using namespace chip; using namespace chip::app::Clusters; using namespace chip::app::Clusters::ModeSelect; diff --git a/examples/placeholder/linux/static-supported-temperature-levels.cpp b/examples/placeholder/linux/static-supported-temperature-levels.cpp index de8933fdf649ea..4b65317e8cc58f 100644 --- a/examples/placeholder/linux/static-supported-temperature-levels.cpp +++ b/examples/placeholder/linux/static-supported-temperature-levels.cpp @@ -19,7 +19,6 @@ #include #include -using namespace std; using namespace chip; using namespace chip::app::Clusters; using namespace chip::app::Clusters::TemperatureControl; diff --git a/examples/platform/linux/AppMain.cpp b/examples/platform/linux/AppMain.cpp index 074f078af003b4..a2e341efbe7a0f 100644 --- a/examples/platform/linux/AppMain.cpp +++ b/examples/platform/linux/AppMain.cpp @@ -679,16 +679,16 @@ void ChipLinuxAppMainLoop(AppMainLoopImplementation * impl) ApplicationShutdown(); -#if CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE - ShutdownCommissioner(); -#endif // CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE - #if defined(ENABLE_CHIP_SHELL) shellThread.join(); #endif Server::GetInstance().Shutdown(); +#if CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE + ShutdownCommissioner(); +#endif // CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE + #if ENABLE_TRACING tracing_setup.StopTracing(); #endif diff --git a/examples/platform/nxp/common/app_task/source/AppTaskFreeRTOS.cpp b/examples/platform/nxp/common/app_task/source/AppTaskFreeRTOS.cpp index 5b8e3eab70be40..ec394b4ac40fc4 100644 --- a/examples/platform/nxp/common/app_task/source/AppTaskFreeRTOS.cpp +++ b/examples/platform/nxp/common/app_task/source/AppTaskFreeRTOS.cpp @@ -21,7 +21,7 @@ #include #include -#include "AppMatterButton.h" +#include "ButtonRegistration.h" #include "CHIPDeviceManager.h" #include @@ -98,10 +98,10 @@ CHIP_ERROR chip::NXP::App::AppTaskFreeRTOS::AppMatter_Register() #endif /* Register Matter buttons */ - err = AppMatterButton_registerButtons(); + err = chip::NXP::App::RegisterButtons(); if (err != CHIP_NO_ERROR) { - ChipLogError(DeviceLayer, "Error during AppMatterButton_registerButtons"); + ChipLogError(DeviceLayer, "Error during button registration"); return err; } return err; diff --git a/examples/platform/nxp/common/matter_button/include/Button.h b/examples/platform/nxp/common/matter_button/include/Button.h new file mode 100644 index 00000000000000..7485cf9bd88f76 --- /dev/null +++ b/examples/platform/nxp/common/matter_button/include/Button.h @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include "fsl_component_button.h" + +#include + +namespace chip::NXP::App { + +/** + * @brief This class is an abstraction over an SDK button. + * + */ +class Button +{ +public: + using Callback = button_status_t (*)(void * handle, button_callback_message_t * message, void * param); + + virtual ~Button() = default; + + virtual CHIP_ERROR Init() = 0; + virtual void HandleShortPress() = 0; + virtual void HandleLongPress() = 0; + virtual void HandleDoubleClick() = 0; + + /** + * @brief This is an SDK handle for a button. + * + * It should be set in the Init method, based on a newly defined + * handle or an already defined handle owned by the SDK. + */ + button_handle_t handle = nullptr; +}; + +} // namespace chip::NXP::App diff --git a/examples/platform/nxp/common/matter_button/include/ButtonApp.h b/examples/platform/nxp/common/matter_button/include/ButtonApp.h new file mode 100644 index 00000000000000..3ace28f30a4094 --- /dev/null +++ b/examples/platform/nxp/common/matter_button/include/ButtonApp.h @@ -0,0 +1,44 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include "Button.h" + +namespace chip::NXP::App { +/** + * @brief This class implements a custom app button behavior. + * + * | Action | Effect | + * | ------------ | --------------------------------- | + * | Short press | Switch a cluster attribute state | + * | Long press | Schedule a soft reset taking into | + * | | account Matter shutdown mechanism | + * | Double click | Do nothing | + * + */ +class ButtonApp : public Button +{ +public: + virtual CHIP_ERROR Init() override; + virtual void HandleShortPress() override; + virtual void HandleLongPress() override; + virtual void HandleDoubleClick() override; +}; + +} // namespace chip::NXP::App diff --git a/examples/platform/nxp/common/matter_button/include/ButtonBle.h b/examples/platform/nxp/common/matter_button/include/ButtonBle.h new file mode 100644 index 00000000000000..75b35f25d355f1 --- /dev/null +++ b/examples/platform/nxp/common/matter_button/include/ButtonBle.h @@ -0,0 +1,48 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include "ButtonWithTimer.h" + +namespace chip::NXP::App { + +/** + * @brief This class implements a customized default button behavior. + * + * | Action | Effect | + * | ------------ | -------------------------------------------------- | + * | Short press | If a factory reset is scheduled, cancel it. | + * | | Else if the device is commissioned and a factory | + * | | reset is not scheduled, switch to ICD active mode. | + * | | Otherwise, switch commissioning state. | + * | Long press | Schedule a factory reset | + * | Double click | Toggle SIT mode request through DSLS mechanism | + * + */ +class ButtonBle : public ButtonWithTimer +{ +public: + virtual CHIP_ERROR Init() override; + virtual void HandleShortPress() override; + virtual void HandleLongPress() override; + virtual void HandleDoubleClick() override; + virtual void HandleTimerExpire() override; +}; + +} // namespace chip::NXP::App diff --git a/examples/platform/nxp/common/matter_button/include/ButtonDefault.h b/examples/platform/nxp/common/matter_button/include/ButtonDefault.h new file mode 100644 index 00000000000000..4241f0465acf25 --- /dev/null +++ b/examples/platform/nxp/common/matter_button/include/ButtonDefault.h @@ -0,0 +1,43 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include "Button.h" + +namespace chip::NXP::App { +/** + * @brief This class implements a default button behavior. + * + * | Action | Effect | + * | ------------ | -------------------------- | + * | Short press | Switch commissioning state | + * | Long press | Schedule a factory reset | + * | Double click | Do nothing | + * + */ +class ButtonDefault : public Button +{ +public: + virtual CHIP_ERROR Init() override; + virtual void HandleShortPress() override; + virtual void HandleLongPress() override; + virtual void HandleDoubleClick() override; +}; + +} // namespace chip::NXP::App diff --git a/examples/platform/nxp/common/matter_button/include/ButtonManager.h b/examples/platform/nxp/common/matter_button/include/ButtonManager.h new file mode 100644 index 00000000000000..44ad191e2eef12 --- /dev/null +++ b/examples/platform/nxp/common/matter_button/include/ButtonManager.h @@ -0,0 +1,58 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include "Button.h" + +#include + +namespace chip::NXP::App { + +/** + * @brief This class describes a manager over Button operations. + * + */ +class ButtonManager +{ +public: + static ButtonManager sInstance; + + CHIP_ERROR Init(); + + /** + * @brief API for registering a Button object. + * + */ + CHIP_ERROR RegisterButton(Button & button); + + /** + * @brief Generic callback for all registered buttons. + * + * Event handling is delegated to Button objects. + * + */ + static button_status_t HandleCallbacks(void * buttonHandle, button_callback_message_t * message, void * callbackParam); +}; + +inline ButtonManager & ButtonMgr() +{ + return ButtonManager::sInstance; +} + +} // namespace chip::NXP::App diff --git a/examples/platform/nxp/common/matter_button/include/AppMatterButton.h b/examples/platform/nxp/common/matter_button/include/ButtonRegistration.h similarity index 60% rename from examples/platform/nxp/common/matter_button/include/AppMatterButton.h rename to examples/platform/nxp/common/matter_button/include/ButtonRegistration.h index dd00a5c80d719f..c47eeba7acbddc 100644 --- a/examples/platform/nxp/common/matter_button/include/AppMatterButton.h +++ b/examples/platform/nxp/common/matter_button/include/ButtonRegistration.h @@ -1,7 +1,6 @@ /* * - * Copyright (c) 2022 Project CHIP Authors - * Copyright 2023-2024 NXP + * Copyright (c) 2024 Project CHIP Authors * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,29 +16,17 @@ * limitations under the License. */ -#ifndef _MATTER_BUTTON_H_ -#define _MATTER_BUTTON_H_ +#pragma once #include -#ifdef __cplusplus -extern "C" { -#endif +namespace chip::NXP::App { -namespace chip { -namespace NXP { -namespace App { /** - * API allowing to register matter buttons + * @brief API used by app task to register buttons. + * + * The default implementation will register a single ButtonDefault instance. */ -CHIP_ERROR AppMatterButton_registerButtons(void); - -} // namespace App -} // namespace NXP -} // namespace chip - -#ifdef __cplusplus -} -#endif +CHIP_ERROR RegisterButtons(); -#endif /* _MATTER_BUTTON_H_ */ +} // namespace chip::NXP::App diff --git a/examples/platform/nxp/common/matter_button/include/ButtonWithTimer.h b/examples/platform/nxp/common/matter_button/include/ButtonWithTimer.h new file mode 100644 index 00000000000000..6620bae9ec0288 --- /dev/null +++ b/examples/platform/nxp/common/matter_button/include/ButtonWithTimer.h @@ -0,0 +1,50 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include "Button.h" +#include "FreeRTOS.h" +#include "timers.h" + +namespace chip::NXP::App { +/** + * @brief This class implements a default button with timer behavior. + * + * This class provides an API for starting/cancelling the timer. It can + * be used by derived classes to define their own timer handler behavior. + */ +class ButtonWithTimer : public Button +{ +public: + ButtonWithTimer(); + + virtual CHIP_ERROR Init() override; + virtual void HandleShortPress() override; + virtual void HandleLongPress() override; + virtual void HandleDoubleClick() override; + + virtual void HandleTimerExpire(); + + void CancelTimer(); + void StartTimer(uint32_t aTimeoutInMs); + + TimerHandle_t timer; +}; + +} // namespace chip::NXP::App diff --git a/examples/platform/nxp/common/matter_button/source/AppMatterButton.cpp b/examples/platform/nxp/common/matter_button/source/AppMatterButton.cpp deleted file mode 100644 index be5adc975c2f79..00000000000000 --- a/examples/platform/nxp/common/matter_button/source/AppMatterButton.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "AppMatterButton.h" -#include "AppTaskBase.h" -#include "board_comp.h" -#include "fsl_component_timer_manager.h" -#include "fwk_platform.h" -#include - -static BUTTON_HANDLE_DEFINE(sdkButtonHandle); - -static button_status_t AppMatterButton_ButtonCallback(void * buttonHandle, button_callback_message_t * message, - void * callbackParam) -{ - switch (message->event) - { - case kBUTTON_EventShortPress: - case kBUTTON_EventOneClick: - chip::NXP::App::GetAppTask().SwitchCommissioningStateHandler(); - break; - case kBUTTON_EventLongPress: - chip::NXP::App::GetAppTask().FactoryResetHandler(); - break; - default: - break; - } - return kStatus_BUTTON_Success; -} - -CHIP_ERROR chip::NXP::App::AppMatterButton_registerButtons(void) -{ - button_config_t buttonConfig; - button_status_t bStatus; - CHIP_ERROR err = CHIP_NO_ERROR; - - do - { - /* Init the Platform Timer Manager */ - if (PLATFORM_InitTimerManager() != 0) - { - err = CHIP_ERROR_UNEXPECTED_EVENT; - ChipLogError(DeviceLayer, "tmr init error"); - break; - } - - /* Init board buttons */ - bStatus = BOARD_InitButton((button_handle_t) sdkButtonHandle); - if (bStatus != kStatus_BUTTON_Success) - { - err = CHIP_ERROR_UNEXPECTED_EVENT; - ChipLogError(DeviceLayer, "button init error"); - break; - } - bStatus = BUTTON_InstallCallback((button_handle_t) sdkButtonHandle, AppMatterButton_ButtonCallback, NULL); - - if (bStatus != kStatus_BUTTON_Success) - { - err = CHIP_ERROR_UNEXPECTED_EVENT; - ChipLogError(DeviceLayer, "button init error"); - break; - } - } while (0); - - return err; -} diff --git a/examples/platform/nxp/common/matter_button/source/ButtonApp.cpp b/examples/platform/nxp/common/matter_button/source/ButtonApp.cpp new file mode 100644 index 00000000000000..3b03b413ec2a93 --- /dev/null +++ b/examples/platform/nxp/common/matter_button/source/ButtonApp.cpp @@ -0,0 +1,57 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ButtonApp.h" +#include "AppTaskBase.h" + +extern "C" { +#include "app.h" +#include "board_comp.h" +} + +CHIP_ERROR chip::NXP::App::ButtonApp::Init() +{ + // Button is initialized in otSysInit, when APP_InitServices is called. + // Overwrite the handle to reference the SDK handle. + handle = &g_buttonHandle[1]; + + return CHIP_NO_ERROR; +} + +void chip::NXP::App::ButtonApp::HandleShortPress() +{ + chip::DeviceLayer::PlatformMgr().ScheduleWork( + [](intptr_t arg) { + auto status = chip::NXP::App::GetAppTask().ProcessSetStateClusterHandler(); + if (status != CHIP_NO_ERROR) + { + ChipLogProgress(DeviceLayer, "Error when updating cluster attribute"); + } + }, + (intptr_t) nullptr); +} + +void chip::NXP::App::ButtonApp::HandleLongPress() +{ + chip::DeviceLayer::PlatformMgrImpl().CleanReset(); +} + +void chip::NXP::App::ButtonApp::HandleDoubleClick() +{ + /* Currently not mapped to any action */ +} diff --git a/examples/platform/nxp/common/matter_button/source/ButtonBle.cpp b/examples/platform/nxp/common/matter_button/source/ButtonBle.cpp new file mode 100644 index 00000000000000..447b0b04529825 --- /dev/null +++ b/examples/platform/nxp/common/matter_button/source/ButtonBle.cpp @@ -0,0 +1,142 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ButtonBle.h" +#include "AppTaskBase.h" +#include "BLEApplicationManager.h" +#include "UserInterfaceFeedback.h" + +extern "C" { +#include "app.h" +#include "board_comp.h" +} + +#include + +/** + * @brief Timeout (ms) for factory data reset action. + * + * During this timeout, the factory reset action can be cancelled by pressing a button. + */ +#ifndef BLE_BUTTON_FACTORY_RESET_TIMEOUT_MS +#define BLE_BUTTON_FACTORY_RESET_TIMEOUT_MS 6000 +#endif + +static void BleHandleLongPress(const AppEvent & event) +{ + auto & button = *static_cast(event.extra); + + if (xTimerIsTimerActive(button.timer)) + { + button.CancelTimer(); +#if CONFIG_ENABLE_FEEDBACK + FeedbackMgr().RestoreState(); +#endif + ChipLogProgress(DeviceLayer, "Factory Reset was cancelled!"); + } + else + { + uint32_t resetTimeout = BLE_BUTTON_FACTORY_RESET_TIMEOUT_MS; + ChipLogProgress(DeviceLayer, "Factory Reset Triggered. Push the RESET button within %lu ms to cancel!", resetTimeout); + +#if CONFIG_ENABLE_FEEDBACK + FeedbackMgr().DisplayOnAction(UserInterfaceFeedback::Action::kFactoryReset); +#endif + button.StartTimer(resetTimeout); + } +} + +static void BleHandleShortPress(const AppEvent & event) +{ + auto & button = *static_cast(event.extra); + if (xTimerIsTimerActive(button.timer)) + { + // If a factory reset is scheduled, pressing the BLE button will cancel it. + BleHandleLongPress(event); + return; + } + +#if CHIP_CONFIG_ENABLE_ICD_LIT + if (chip::DeviceLayer::ConfigurationMgr().IsFullyProvisioned()) + { + // If the device is commissioned and a factory reset is not scheduled, switch to active mode. + chip::DeviceLayer::PlatformMgr().ScheduleWork( + [](intptr_t arg) { chip::app::ICDNotifier::GetInstance().NotifyNetworkActivityNotification(); }, 0); + return; + } +#endif + + chip::NXP::App::GetAppTask().SwitchCommissioningStateHandler(); + chip::NXP::App::BleAppMgr().EnableMultipleConnectionsHandler(); +} + +CHIP_ERROR chip::NXP::App::ButtonBle::Init() +{ + // Button is initialized in otSysInit, when APP_InitServices is called. + // Overwrite the handle to reference the SDK handle. + handle = &g_buttonHandle[0]; + + return CHIP_NO_ERROR; +} + +void chip::NXP::App::ButtonBle::HandleShortPress() +{ + AppEvent event; + event.Handler = BleHandleShortPress; + event.extra = this; + chip::NXP::App::GetAppTask().PostEvent(event); +} + +void chip::NXP::App::ButtonBle::HandleLongPress() +{ + AppEvent event; + event.Handler = BleHandleLongPress; + event.extra = this; + chip::NXP::App::GetAppTask().PostEvent(event); +} + +void chip::NXP::App::ButtonBle::HandleDoubleClick() +{ +#if (CHIP_CONFIG_ENABLE_ICD_LIT && CHIP_CONFIG_ENABLE_ICD_DSLS) + static bool sitModeRequested = false; + + if (chip::DeviceLayer::ConfigurationMgr().IsFullyProvisioned()) + { + if (!sitModeRequested) + { + chip::DeviceLayer::PlatformMgr().ScheduleWork( + [](intptr_t arg) { chip::app::ICDNotifier::GetInstance().NotifySITModeRequestNotification(); }, 0); + sitModeRequested = true; + } + else + { + chip::DeviceLayer::PlatformMgr().ScheduleWork( + [](intptr_t arg) { chip::app::ICDNotifier::GetInstance().NotifySITModeRequestWithdrawal(); }, 0); + sitModeRequested = false; + } + } +#endif +} + +void chip::NXP::App::ButtonBle::HandleTimerExpire() +{ + ChipLogProgress(DeviceLayer, "Device will factory reset..."); + + // Actually trigger Factory Reset + chip::Server::GetInstance().ScheduleFactoryReset(); +} diff --git a/examples/platform/nxp/common/matter_button/source/ButtonDefault.cpp b/examples/platform/nxp/common/matter_button/source/ButtonDefault.cpp new file mode 100644 index 00000000000000..526bcd3e8bd5a3 --- /dev/null +++ b/examples/platform/nxp/common/matter_button/source/ButtonDefault.cpp @@ -0,0 +1,48 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ButtonDefault.h" +#include "AppTaskBase.h" +#include "board_comp.h" + +BUTTON_HANDLE_DEFINE(sHandle); + +CHIP_ERROR chip::NXP::App::ButtonDefault::Init() +{ + handle = sHandle; + + auto status = BOARD_InitButton(handle); + VerifyOrReturnError(status == kStatus_BUTTON_Success, CHIP_ERROR_UNEXPECTED_EVENT); + + return CHIP_NO_ERROR; +} + +void chip::NXP::App::ButtonDefault::HandleShortPress() +{ + chip::NXP::App::GetAppTask().SwitchCommissioningStateHandler(); +} + +void chip::NXP::App::ButtonDefault::HandleLongPress() +{ + chip::NXP::App::GetAppTask().FactoryResetHandler(); +} + +void chip::NXP::App::ButtonDefault::HandleDoubleClick() +{ + /* Currently not mapped to any action */ +} diff --git a/examples/platform/nxp/common/matter_button/source/ButtonManager.cpp b/examples/platform/nxp/common/matter_button/source/ButtonManager.cpp new file mode 100644 index 00000000000000..046337397a3c3c --- /dev/null +++ b/examples/platform/nxp/common/matter_button/source/ButtonManager.cpp @@ -0,0 +1,67 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ButtonManager.h" +#include "fwk_platform.h" + +#include +#include + +chip::NXP::App::ButtonManager chip::NXP::App::ButtonManager::sInstance; + +CHIP_ERROR chip::NXP::App::ButtonManager::Init() +{ + VerifyOrReturnError(PLATFORM_InitTimerManager() >= 0, CHIP_ERROR_UNEXPECTED_EVENT); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR chip::NXP::App::ButtonManager::RegisterButton(Button & button) +{ + ReturnErrorOnFailure(button.Init()); + VerifyOrReturnError(button.handle != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + + auto status = BUTTON_InstallCallback(button.handle, ButtonManager::HandleCallbacks, &button); + VerifyOrReturnError(status == kStatus_BUTTON_Success, CHIP_ERROR_UNEXPECTED_EVENT); + + return CHIP_NO_ERROR; +} + +button_status_t chip::NXP::App::ButtonManager::HandleCallbacks(void * buttonHandle, button_callback_message_t * message, + void * callbackParam) +{ + auto * button = static_cast