From 1581979d7bc32014e5e4e8823c38eb65173466f9 Mon Sep 17 00:00:00 2001 From: Jean-Francois Penven <67962328+jepenven-silabs@users.noreply.github.com> Date: Fri, 19 May 2023 14:32:36 -0400 Subject: [PATCH] [Silabs] Delete duplicated examples (#26685) * Delete lighting-app duplication * Delete Light-switch duplication * Delete lock-app duplication --- examples/light-switch-app/silabs/SiWx917/.gn | 27 - .../light-switch-app/silabs/SiWx917/BUILD.gn | 160 - .../light-switch-app/silabs/SiWx917/README.md | 222 - .../light-switch-app/silabs/SiWx917/args.gni | 22 - .../silabs/SiWx917/build_overrides | 1 - .../silabs/SiWx917/include/AppConfig.h | 32 - .../silabs/SiWx917/include/AppEvent.h | 55 - .../silabs/SiWx917/include/AppTask.h | 127 - .../SiWx917/include/CHIPProjectConfig.h | 104 - .../silabs/SiWx917/include/DeviceConfig.h | 40 - .../silabs/SiWx917/src/AppTask.cpp | 277 - .../silabs/SiWx917/src/ZclCallbacks.cpp | 72 - .../SiWx917/third_party/connectedhomeip | 1 - examples/lighting-app/silabs/SiWx917/.gn | 28 - examples/lighting-app/silabs/SiWx917/BUILD.gn | 160 - .../lighting-app/silabs/SiWx917/README.md | 191 - .../silabs/SiWx917/build_overrides | 1 - .../silabs/SiWx917/data_model/BUILD.gn | 24 - .../data_model/lighting-wifi-app.matter | 1920 ---- .../SiWx917/data_model/lighting-wifi-app.zap | 8199 ----------------- .../silabs/SiWx917/include/AppConfig.h | 32 - .../silabs/SiWx917/include/AppEvent.h | 55 - .../silabs/SiWx917/include/AppTask.h | 134 - .../SiWx917/include/CHIPProjectConfig.h | 104 - .../silabs/SiWx917/include/DeviceConfig.h | 40 - .../silabs/SiWx917/include/LightingManager.h | 90 - .../silabs/SiWx917/src/AppTask.cpp | 313 - .../silabs/SiWx917/src/LightingManager.cpp | 322 - .../silabs/SiWx917/src/ZclCallbacks.cpp | 91 - .../SiWx917/third_party/connectedhomeip | 1 - examples/lock-app/silabs/SiWx917/.gn | 27 - examples/lock-app/silabs/SiWx917/BUILD.gn | 160 - examples/lock-app/silabs/SiWx917/README.md | 223 - examples/lock-app/silabs/SiWx917/args.gni | 22 - .../lock-app/silabs/SiWx917/build_overrides | 1 - .../silabs/SiWx917/include/AppConfig.h | 32 - .../silabs/SiWx917/include/AppEvent.h | 55 - .../lock-app/silabs/SiWx917/include/AppTask.h | 148 - .../SiWx917/include/CHIPProjectConfig.h | 103 - .../silabs/SiWx917/include/DeviceConfig.h | 40 - .../SiWx917/include/EventHandlerLibShell.h | 40 - .../silabs/SiWx917/include/LockManager.h | 222 - .../lock-app/silabs/SiWx917/src/AppTask.cpp | 429 - .../SiWx917/src/EventHandlerLibShell.cpp | 211 - .../silabs/SiWx917/src/LockManager.cpp | 719 -- .../silabs/SiWx917/src/ZclCallbacks.cpp | 157 - .../SiWx917/third_party/connectedhomeip | 1 - .../lock-app/silabs/SiWx917/with_pw_rpc.gni | 33 - 48 files changed, 15468 deletions(-) delete mode 100644 examples/light-switch-app/silabs/SiWx917/.gn delete mode 100644 examples/light-switch-app/silabs/SiWx917/BUILD.gn delete mode 100644 examples/light-switch-app/silabs/SiWx917/README.md delete mode 100644 examples/light-switch-app/silabs/SiWx917/args.gni delete mode 120000 examples/light-switch-app/silabs/SiWx917/build_overrides delete mode 100644 examples/light-switch-app/silabs/SiWx917/include/AppConfig.h delete mode 100644 examples/light-switch-app/silabs/SiWx917/include/AppEvent.h delete mode 100644 examples/light-switch-app/silabs/SiWx917/include/AppTask.h delete mode 100644 examples/light-switch-app/silabs/SiWx917/include/CHIPProjectConfig.h delete mode 100644 examples/light-switch-app/silabs/SiWx917/include/DeviceConfig.h delete mode 100644 examples/light-switch-app/silabs/SiWx917/src/AppTask.cpp delete mode 100644 examples/light-switch-app/silabs/SiWx917/src/ZclCallbacks.cpp delete mode 120000 examples/light-switch-app/silabs/SiWx917/third_party/connectedhomeip delete mode 100644 examples/lighting-app/silabs/SiWx917/.gn delete mode 100644 examples/lighting-app/silabs/SiWx917/BUILD.gn delete mode 100644 examples/lighting-app/silabs/SiWx917/README.md delete mode 120000 examples/lighting-app/silabs/SiWx917/build_overrides delete mode 100644 examples/lighting-app/silabs/SiWx917/data_model/BUILD.gn delete mode 100644 examples/lighting-app/silabs/SiWx917/data_model/lighting-wifi-app.matter delete mode 100644 examples/lighting-app/silabs/SiWx917/data_model/lighting-wifi-app.zap delete mode 100644 examples/lighting-app/silabs/SiWx917/include/AppConfig.h delete mode 100644 examples/lighting-app/silabs/SiWx917/include/AppEvent.h delete mode 100644 examples/lighting-app/silabs/SiWx917/include/AppTask.h delete mode 100644 examples/lighting-app/silabs/SiWx917/include/CHIPProjectConfig.h delete mode 100644 examples/lighting-app/silabs/SiWx917/include/DeviceConfig.h delete mode 100644 examples/lighting-app/silabs/SiWx917/include/LightingManager.h delete mode 100644 examples/lighting-app/silabs/SiWx917/src/AppTask.cpp delete mode 100644 examples/lighting-app/silabs/SiWx917/src/LightingManager.cpp delete mode 100644 examples/lighting-app/silabs/SiWx917/src/ZclCallbacks.cpp delete mode 120000 examples/lighting-app/silabs/SiWx917/third_party/connectedhomeip delete mode 100644 examples/lock-app/silabs/SiWx917/.gn delete mode 100644 examples/lock-app/silabs/SiWx917/BUILD.gn delete mode 100644 examples/lock-app/silabs/SiWx917/README.md delete mode 100644 examples/lock-app/silabs/SiWx917/args.gni delete mode 120000 examples/lock-app/silabs/SiWx917/build_overrides delete mode 100644 examples/lock-app/silabs/SiWx917/include/AppConfig.h delete mode 100644 examples/lock-app/silabs/SiWx917/include/AppEvent.h delete mode 100644 examples/lock-app/silabs/SiWx917/include/AppTask.h delete mode 100644 examples/lock-app/silabs/SiWx917/include/CHIPProjectConfig.h delete mode 100644 examples/lock-app/silabs/SiWx917/include/DeviceConfig.h delete mode 100644 examples/lock-app/silabs/SiWx917/include/EventHandlerLibShell.h delete mode 100644 examples/lock-app/silabs/SiWx917/include/LockManager.h delete mode 100644 examples/lock-app/silabs/SiWx917/src/AppTask.cpp delete mode 100644 examples/lock-app/silabs/SiWx917/src/EventHandlerLibShell.cpp delete mode 100644 examples/lock-app/silabs/SiWx917/src/LockManager.cpp delete mode 100644 examples/lock-app/silabs/SiWx917/src/ZclCallbacks.cpp delete mode 120000 examples/lock-app/silabs/SiWx917/third_party/connectedhomeip delete mode 100644 examples/lock-app/silabs/SiWx917/with_pw_rpc.gni diff --git a/examples/light-switch-app/silabs/SiWx917/.gn b/examples/light-switch-app/silabs/SiWx917/.gn deleted file mode 100644 index 0adefc6ff99c6a..00000000000000 --- a/examples/light-switch-app/silabs/SiWx917/.gn +++ /dev/null @@ -1,27 +0,0 @@ -# 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" - import("//args.gni") -} diff --git a/examples/light-switch-app/silabs/SiWx917/BUILD.gn b/examples/light-switch-app/silabs/SiWx917/BUILD.gn deleted file mode 100644 index 62ddb969e9b594..00000000000000 --- a/examples/light-switch-app/silabs/SiWx917/BUILD.gn +++ /dev/null @@ -1,160 +0,0 @@ -# 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}/SiWx917_sdk.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") - -if (chip_enable_pw_rpc) { - import("//build_overrides/pigweed.gni") - import("$dir_pw_build/target_types.gni") -} - -assert(current_os == "freertos") - -efr32_project_dir = "${chip_root}/examples/light-switch-app/silabs/SiWx917" -examples_plat_dir = "${chip_root}/examples/platform/silabs/SiWx917" -examples_common_plat_dir = "${chip_root}/examples/platform/silabs" - -import("${examples_plat_dir}/args.gni") - -declare_args() { - # Dump memory usage at link time. - chip_print_memory_usage = false -} - -siwx917_sdk("sdk") { - sources = [ - "${efr32_project_dir}/include/CHIPProjectConfig.h", - "${examples_plat_dir}/FreeRTOSConfig.h", - ] - - include_dirs = [ - "${chip_root}/examples/light-switch-app/silabs/common", - "${chip_root}/src/platform/silabs/SiWx917", - "${efr32_project_dir}/include", - "${examples_plat_dir}", - "${chip_root}/src/lib", - "${examples_common_plat_dir}", - ] - - if (chip_enable_pw_rpc) { - defines += [ - "HAL_VCOM_ENABLE=1", - "PW_RPC_ENABLED", - ] - } -} - -silabs_executable("light_switch_app") { - output_name = "chip-siwx917-light-switch-example.out" - include_dirs = [ "include" ] - defines = [] - - sources = [ - "${chip_root}/examples/light-switch-app/silabs/common/BindingHandler.cpp", - "${chip_root}/examples/light-switch-app/silabs/common/LightSwitchMgr.cpp", - "${examples_common_plat_dir}/main.cpp", - "src/AppTask.cpp", - "src/ZclCallbacks.cpp", - ] - - deps = [ - ":sdk", - "${examples_plat_dir}:siwx917-common", - app_data_model, - ] - - if (chip_build_libshell) { - sources += [ - "${chip_root}/examples/light-switch-app/silabs/common/ShellCommands.cpp", - ] - } - - 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: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", - "${examples_plat_dir}/pw_sys_io:pw_sys_io_siwx917", - ] - - deps += pw_build_LINK_DEPS - - include_dirs += [ - "${chip_root}/examples/common", - "${chip_root}/examples/common/pigweed/efr32", - ] - } - - ldscript = "${examples_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("siwx917") { - deps = [ ":light_switch_app" ] -} - -group("default") { - deps = [ ":siwx917" ] -} diff --git a/examples/light-switch-app/silabs/SiWx917/README.md b/examples/light-switch-app/silabs/SiWx917/README.md deleted file mode 100644 index a785640f5ec47f..00000000000000 --- a/examples/light-switch-app/silabs/SiWx917/README.md +++ /dev/null @@ -1,222 +0,0 @@ -# Matter SiWx917 Light Switch Example - -An example showing the use of CHIP on the -[Silicon Labs SiWx917](https://www.silabs.com/wireless/wi-fi/siwx917-wireless-socs) -SoC device. - -
- -- [Matter SiWx917 Light Switch Example](#matter-siwx917-light-switch-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 PC(Linux):](#on-pclinux) - - [Memory settings](#memory-settings) - - [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 [SiWx917](https://www.silabs.com/wireless/wi-fi/siwx917-wireless-socs) light -switch example provides a baseline demonstration of an on-off light switch -device, built using Matter, the Silicon Labs Gecko SDK, and the Silicon Labs -WiseMCU SDK. It can be controlled by a Chip controller over a Wi-Fi network. - -The [SiWx917](https://www.silabs.com/wireless/wi-fi/siwx917-wireless-socs) -device can be commissioned over Bluetooth Low Energy where the device and the -Chip controller will exchange security information with the rendezvous -procedure. Wi-Fi Network credentials are then provided to the -[SiWx917](https://www.silabs.com/wireless/wi-fi/siwx917-wireless-socs) device -which will then join the Wi-Fi 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 -rendezvous procedure. - -The light switch 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: - [GNU Arm Embedded Toolchain 9-2019-q4-major](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/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 - -* Build the example application: - - cd ~/connectedhomeip - ./scripts/examples/gn_efr32_example.sh ./examples/light-switch-app/silabs/SiWx917/ ./out/light-switch-app BRD4325B - -- To delete generated executable, libraries and object files use: - - $ cd ~/connectedhomeip - $ rm -rf ./out/ - - - -## Flashing the Application - -- Flashing requires the - [SiWx917](https://www.silabs.com/wireless/wi-fi/siwx917-wireless-socs) SoC - device to be configured in the Ozone Debugger. - -- Once it's configured, it can be run with the Ozone Debugger by loading the - .out file. - - > For detailed instructions, please refer to - > [Running the Matter Demo on SiWx917 SoC](https://github.com/SiliconLabs/matter/blob/latest/docs/silabs/wifi/RUN_DEMO_SiWx917_SoC.md) - > in the Silicon Labs Matter Github Repo - -## Viewing Logging Output - -The example application's logging output can be viewed in the Ozone Debugger. - -## Running the Complete Example - -- For this example to work, it is necessary to have a second - [SiWx917](https://www.silabs.com/wireless/wi-fi/siwx917-wireless-socs) - device running the - [lighting app example](https://github.com/project-chip/connectedhomeip/blob/master/examples/lighting-app/silabs/SiWx917/README.md) - commissioned on the same Wi-Fi network. - -* You can provision and control the Chip device using the - [chip-tool](https://github.com/project-chip/connectedhomeip/blob/master/examples/chip-tool/README.md) - standalone - - Here is an example with the chip-tool for unicast commands only: - - - > $SSID and $PSK are the SSID and passcode of your Wi-Fi Access Point. - - ``` - chip-tool pairing ble-wifi 1122 $SSID $PSK 20202021 3840 - - chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [], "targets": null }{"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": [1], "targets": null }]' 0 - - chip-tool binding write binding '[{"fabricIndex": 1, "node": , "endpoint": 1, "cluster":6}]' 1 1 - ``` - - Here is an example with the chip-tool for groups commands only: - - ``` - chip-tool pairing ble-wifi 1122 $SSID $PSK 20202021 3840 - - chip-tool tests TestGroupDemoConfig --nodeId 1 - - chip-tool tests TestGroupDemoConfig --nodeId - - chip-tool binding write binding '[{"fabricIndex": 1, "group": 257}]' 1 1 - ``` - - To run the example with unicast and groups commands, run the group - configuration commands and replace the last one with binding this command - - ``` - chip-tool binding write binding '[{"fabricIndex": 1, "group": 257},{"fabricIndex": 1, "node": , "endpoint": 1, "cluster":6} ]' 1 1 - ``` - - To acquire the chip-tool node id, read the acl table right after - commissioning - - ``` - ./connectedhomeip/out/chip-tool/chip-tool accesscontrol read acl 0 - ``` - -### Notes - -- Depending on your network settings your router might not provide native IPv6 - addresses to your devices (Router / PC). If this is the case, you need to - add a static IPv6 addresses on both devices and then an IPv6 route to the - border router on your PC - -#### 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 - -## 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 -Wi-Fi stack. 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 -an Mbedtls failure during the BLE rendezvous 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/silabs/SiWx917/MemMonitoring.cpp` to add your own -memory tracking code inside the `trackAlloc` and `trackFree` function - -## 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_efr32_example.sh ./examples/light-switch-app/silabs/SiWx917 ./out/light-switch-app BRD4325B "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false" - -### Debug build / release build - -is_debug - - $ ./scripts/examples/gn_efr32_example.sh ./examples/light-switch-app/silabs/SiWx917 ./out/light-switch-app BRD4325B "is_debug=false" - -### Disabling LCD - -show_qr_code - - $ ./scripts/examples/gn_efr32_example.sh ./examples/light-switch-app/silabs/SiWx917 ./out/light-switch-app BRD4325B "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_efr32_example.sh ./examples/light-switch-app/silabs/SiWx917 ./out/light-switch-app BRD4325B kvs_max_entries=50 diff --git a/examples/light-switch-app/silabs/SiWx917/args.gni b/examples/light-switch-app/silabs/SiWx917/args.gni deleted file mode 100644 index 89e0768ff5eb6a..00000000000000 --- a/examples/light-switch-app/silabs/SiWx917/args.gni +++ /dev/null @@ -1,22 +0,0 @@ -# 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/args.gni") - -silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") - -app_data_model = "${chip_root}/examples/light-switch-app/light-switch-common" -chip_enable_ota_requestor = true diff --git a/examples/light-switch-app/silabs/SiWx917/build_overrides b/examples/light-switch-app/silabs/SiWx917/build_overrides deleted file mode 120000 index 995884e6163eb5..00000000000000 --- a/examples/light-switch-app/silabs/SiWx917/build_overrides +++ /dev/null @@ -1 +0,0 @@ -../../../build_overrides \ No newline at end of file diff --git a/examples/light-switch-app/silabs/SiWx917/include/AppConfig.h b/examples/light-switch-app/silabs/SiWx917/include/AppConfig.h deleted file mode 100644 index 0b6308b9f1eb61..00000000000000 --- a/examples/light-switch-app/silabs/SiWx917/include/AppConfig.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 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" - -// ---- Lighting Example App Config ---- - -#define APP_TASK_NAME "Lit" - -#define BLE_DEV_NAME "SiLabs-Light-Switch" - -// Time it takes in ms for the simulated actuator to move from one -// state to another. -#define ACTUATOR_MOVEMENT_PERIOS_MS 10 diff --git a/examples/light-switch-app/silabs/SiWx917/include/AppEvent.h b/examples/light-switch-app/silabs/SiWx917/include/AppEvent.h deleted file mode 100644 index 7a19b719edad25..00000000000000 --- a/examples/light-switch-app/silabs/SiWx917/include/AppEvent.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2018 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 - -struct AppEvent; -typedef void (*EventHandler)(AppEvent *); - -struct AppEvent -{ - enum AppEventTypes - { - kEventType_Button = 0, - kEventType_Timer, - kEventType_Light, - kEventType_Install, - }; - - uint16_t Type; - - union - { - struct - { - uint8_t Action; - } ButtonEvent; - struct - { - void * Context; - } TimerEvent; - struct - { - uint8_t Action; - int32_t Actor; - } LightEvent; - }; - - EventHandler Handler; -}; diff --git a/examples/light-switch-app/silabs/SiWx917/include/AppTask.h b/examples/light-switch-app/silabs/SiWx917/include/AppTask.h deleted file mode 100644 index cd4ea4d557e74a..00000000000000 --- a/examples/light-switch-app/silabs/SiWx917/include/AppTask.h +++ /dev/null @@ -1,127 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 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 - -#include "AppEvent.h" -#include "BaseApplication.h" -#include "FreeRTOS.h" -#include "timers.h" // provides FreeRTOS timer support -#include -#include -#include -#include - -/********************************************************** - * Defines - *********************************************************/ -// Button specific defines for SiWx917 -#define SL_SIMPLE_BUTTON_PRESSED 1U -#define SL_SIMPLE_BUTTON_RELEASED 0U - -#define SIWx917_BTN0 0 -#define SIWx917_BTN1 1 - -// 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 Event handler when a button is pressed - * Function posts an event for button processing - * - * @param button - btn0 or btn1 - * @param btnAction button action - SL_SIMPLE_BUTTON_PRESSED, - * SL_SIMPLE_BUTTON_RELEASED or SL_SIMPLE_BUTTON_DISABLED - */ - void ButtonEventHandler(uint8_t button, uint8_t btnAction); - - /** - * @brief Callback called by the identify-server when an identify command is received - * - * @param identify identify structure the command applies on - */ - static void OnIdentifyStart(Identify * identify); - - /** - * @brief Callback called by the identify-server when an identify command is stopped or finished - * - * @param identify identify structure the command applies on - */ - static void OnIdentifyStop(Identify * identify); - -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); - - /** - * @brief PB1 Button event processing function - * Function triggers a switch action sent to the CHIP task - * - * @param aEvent button event being processed - */ - static void SwitchActionEventHandler(AppEvent * aEvent); -}; diff --git a/examples/light-switch-app/silabs/SiWx917/include/CHIPProjectConfig.h b/examples/light-switch-app/silabs/SiWx917/include/CHIPProjectConfig.h deleted file mode 100644 index 3141defe9c5133..00000000000000 --- a/examples/light-switch-app/silabs/SiWx917/include/CHIPProjectConfig.h +++ /dev/null @@ -1,104 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 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 - * - * 0x8005: example lighting app - */ -#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x8004 - -/** - * CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE - * - * Enable support for Chip-over-BLE (CHIPoBLE). - */ -#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 1 - -/** - * 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) - -#define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1 diff --git a/examples/light-switch-app/silabs/SiWx917/include/DeviceConfig.h b/examples/light-switch-app/silabs/SiWx917/include/DeviceConfig.h deleted file mode 100644 index 350fbb4a904351..00000000000000 --- a/examples/light-switch-app/silabs/SiWx917/include/DeviceConfig.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 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 - -#ifdef SIWX917_USE_COMISSIONABLE_DATA - -uint32_t discriminatorValue = 3840; -uint64_t passcode = 20202021; -uint32_t spake2Interation = 1000; -char spake2Salt[] = "U1BBS0UyUCBLZXkgU2FsdA=="; -char spake2Verifier[] = "uWFwqugDNGiEck/po7KHwwMwwqZgN10XuyBajPGuyzUEV/iree4lOrao5GuwnlQ65CJzbeUB49s31EH+NEkg0JVI5MGCQGMMT/" - "SRPFNRODm3wH/MBiehuFc6FJ/NH6Rmzw=="; -char genSpake2Path[] = ""; -uint32_t productId = 32773; -uint32_t vendorId = 65521; -char productName[] = "silabs_product"; -char vendorName[] = "silabs_vendor"; -char hwVersionString[] = "1.0"; -uint32_t rotatingId; -uint32_t commissionableFlow = 1; -uint8_t rendezvousFlag = 2; - -#endif \ No newline at end of file diff --git a/examples/light-switch-app/silabs/SiWx917/src/AppTask.cpp b/examples/light-switch-app/silabs/SiWx917/src/AppTask.cpp deleted file mode 100644 index d76dc9de2526e4..00000000000000 --- a/examples/light-switch-app/silabs/SiWx917/src/AppTask.cpp +++ /dev/null @@ -1,277 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 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. - */ - -/********************************************************** - * Includes - *********************************************************/ - -#include "AppTask.h" -#include "AppConfig.h" -#include "AppEvent.h" -#include "BindingHandler.h" - -#include "LEDWidget.h" - -#include "LightSwitchMgr.h" - -#ifdef DISPLAY_ENABLED -#include "lcd.h" -#ifdef QR_CODE_ENABLED -#include "qrcodegen.h" -#endif // QR_CODE_ENABLED -#endif // DISPLAY_ENABLED - -#if defined(ENABLE_CHIP_SHELL) -#include "ShellCommands.h" -#endif // defined(ENABLE_CHIP_SHELL) - -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include - -/********************************************************** - * Defines and Constants - *********************************************************/ - -#define SYSTEM_STATE_LED &sl_led_led0 - -namespace { - -constexpr chip::EndpointId kLightSwitchEndpoint = 1; -constexpr chip::EndpointId kGenericSwitchEndpoint = 2; - -} // namespace - -using namespace chip; -using namespace ::chip::DeviceLayer; -using namespace ::chip::DeviceLayer::Silabs; - -namespace { - -/********************************************************** - * Variable declarations - *********************************************************/ - -EmberAfIdentifyEffectIdentifier sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; - -/********************************************************** - * Identify Callbacks - *********************************************************/ - -namespace { -void OnTriggerIdentifyEffectCompleted(chip::System::Layer * systemLayer, void * appState) -{ - ChipLogProgress(Zcl, "Trigger Identify Complete"); - sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; - -#if CHIP_DEVICE_CONFIG_ENABLE_SED == 1 - AppTask::GetAppTask().StopStatusLEDTimer(); -#endif -} -} // namespace - -void OnTriggerIdentifyEffect(Identify * identify) -{ - ChipLogProgress(Zcl, "Trigger Identify Effect"); - sIdentifyEffect = identify->mCurrentEffectIdentifier; - - if (identify->mCurrentEffectIdentifier == EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE) - { - ChipLogProgress(Zcl, "IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE - Not supported, use effect varriant %d", - identify->mEffectVariant); - sIdentifyEffect = static_cast(identify->mEffectVariant); - } - -#if CHIP_DEVICE_CONFIG_ENABLE_SED == 1 - AppTask::GetAppTask().StartStatusLEDTimer(); -#endif - - switch (sIdentifyEffect) - { - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: - (void) chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(5), OnTriggerIdentifyEffectCompleted, - identify); - break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_FINISH_EFFECT: - (void) chip::DeviceLayer::SystemLayer().CancelTimer(OnTriggerIdentifyEffectCompleted, identify); - (void) chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(1), OnTriggerIdentifyEffectCompleted, - identify); - break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT: - (void) chip::DeviceLayer::SystemLayer().CancelTimer(OnTriggerIdentifyEffectCompleted, identify); - sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; - break; - default: - ChipLogProgress(Zcl, "No identifier effect"); - } -} - -Identify gIdentify = { - chip::EndpointId{ 1 }, - AppTask::GetAppTask().OnIdentifyStart, - AppTask::GetAppTask().OnIdentifyStop, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, - OnTriggerIdentifyEffect, -}; - -} // namespace - -using namespace chip::TLV; -using namespace ::chip::DeviceLayer; - -/********************************************************** - * 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 *) "Light Switch"); -#endif - - err = BaseApplication::Init(&gIdentify); - if (err != CHIP_NO_ERROR) - { - SILABS_LOG("BaseApplication::Init() failed"); - appError(err); - } - - err = LightSwitchMgr::GetInstance().Init(kLightSwitchEndpoint, kGenericSwitchEndpoint); - if (err != CHIP_NO_ERROR) - { - SILABS_LOG("LightSwitchMgr Init failed!"); - appError(err); - } - -#if defined(ENABLE_CHIP_SHELL) - LightSwtichCommands::RegisterSwitchCommands(); -#endif // defined(ENABLE_CHIP_SHELL) - - return err; -} - -CHIP_ERROR AppTask::StartAppTask() -{ - return BaseApplication::StartAppTask(AppTaskMain); -} - -void AppTask::AppTaskMain(void * pvParameter) -{ - AppEvent event; - QueueHandle_t sAppEventQueue = *(static_cast(pvParameter)); - - CHIP_ERROR err = sAppTask.Init(); - if (err != CHIP_NO_ERROR) - { - SILABS_LOG("AppTask.Init() failed"); - appError(err); - } - -#if !(defined(CHIP_DEVICE_CONFIG_ENABLE_SED) && CHIP_DEVICE_CONFIG_ENABLE_SED) - sAppTask.StartStatusLEDTimer(); -#endif - - SILABS_LOG("App Task started"); - while (true) - { - BaseType_t eventReceived = xQueueReceive(sAppEventQueue, &event, portMAX_DELAY); - while (eventReceived == pdTRUE) - { - sAppTask.DispatchEvent(&event); - eventReceived = xQueueReceive(sAppEventQueue, &event, 0); - } - } -} - -void AppTask::OnIdentifyStart(Identify * identify) -{ - ChipLogProgress(Zcl, "onIdentifyStart"); - -#if CHIP_DEVICE_CONFIG_ENABLE_SED == 1 - sAppTask.StartStatusLEDTimer(); -#endif -} - -void AppTask::OnIdentifyStop(Identify * identify) -{ - ChipLogProgress(Zcl, "onIdentifyStop"); - -#if CHIP_DEVICE_CONFIG_ENABLE_SED == 1 - sAppTask.StopStatusLEDTimer(); -#endif -} - -void AppTask::SwitchActionEventHandler(AppEvent * aEvent) -{ - VerifyOrReturn(aEvent->Type == AppEvent::kEventType_Button); - - static bool mCurrentButtonState = false; - - if (aEvent->ButtonEvent.Action == static_cast(SilabsPlatform::ButtonAction::ButtonPressed)) - { - mCurrentButtonState = !mCurrentButtonState; - LightSwitchMgr::LightSwitchAction action = - mCurrentButtonState ? LightSwitchMgr::LightSwitchAction::On : LightSwitchMgr::LightSwitchAction::Off; - - LightSwitchMgr::GetInstance().TriggerLightSwitchAction(action); - LightSwitchMgr::GetInstance().GenericSwitchOnInitialPress(); - -#ifdef DISPLAY_ENABLED - sAppTask.GetLCD().WriteDemoUI(mCurrentButtonState); -#endif - } - else if (aEvent->ButtonEvent.Action == static_cast(SilabsPlatform::ButtonAction::ButtonReleased)) - { - LightSwitchMgr::GetInstance().GenericSwitchOnShortRelease(); - } -} - -void AppTask::ButtonEventHandler(uint8_t button, uint8_t btnAction) -{ - AppEvent button_event = {}; - button_event.Type = AppEvent::kEventType_Button; - button_event.ButtonEvent.Action = btnAction; - if (button == SIWx917_BTN1) - { - button_event.Handler = SwitchActionEventHandler; - sAppTask.PostEvent(&button_event); - } - else if (button == SIWx917_BTN0 && btnAction == static_cast(SilabsPlatform::ButtonAction::ButtonPressed)) - { - button_event.Handler = BaseApplication::ButtonHandler; - sAppTask.PostEvent(&button_event); - } -} diff --git a/examples/light-switch-app/silabs/SiWx917/src/ZclCallbacks.cpp b/examples/light-switch-app/silabs/SiWx917/src/ZclCallbacks.cpp deleted file mode 100644 index 52542ca88fb390..00000000000000 --- a/examples/light-switch-app/silabs/SiWx917/src/ZclCallbacks.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/* - * - * 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. - */ - -/** - * @file - * This file implements the handler for data model messages. - */ - -#include "AppConfig.h" - -#include -#include -#include -#include - -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; - AttributeId attributeId = attributePath.mAttributeId; - ChipLogProgress(Zcl, "Cluster callback: " ChipLogFormatMEI, ChipLogValueMEI(clusterId)); - - if (clusterId == OnOffSwitchConfiguration::Id) - { - ChipLogProgress(Zcl, "OnOff Switch Configuration attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", - ChipLogValueMEI(attributeId), type, *value, size); - - // WIP Apply attribute change to Light - } - else if (clusterId == Identify::Id) - { - ChipLogProgress(Zcl, "Identify attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", - ChipLogValueMEI(attributeId), type, *value, size); - } -} - -/** @brief OnOff Cluster Init - * - * This function is called when a specific cluster is initialized. It gives the - * application an opportunity to take care of cluster initialization procedures. - * It is called exactly once for each endpoint where cluster is present. - * - * @param endpoint Ver.: always - * - * TODO Issue #3841 - * emberAfOnOffClusterInitCallback happens before the stack initialize the cluster - * attributes to the default value. - * The logic here expects something similar to the deprecated Plugins callback - * emberAfPluginOnOffClusterServerPostInitCallback. - * - */ -void emberAfOnOffClusterInitCallback(EndpointId endpoint) -{ - // TODO: implement any additional Cluster Server init actions -} diff --git a/examples/light-switch-app/silabs/SiWx917/third_party/connectedhomeip b/examples/light-switch-app/silabs/SiWx917/third_party/connectedhomeip deleted file mode 120000 index 59307833b4fee9..00000000000000 --- a/examples/light-switch-app/silabs/SiWx917/third_party/connectedhomeip +++ /dev/null @@ -1 +0,0 @@ -../../../../.. \ No newline at end of file diff --git a/examples/lighting-app/silabs/SiWx917/.gn b/examples/lighting-app/silabs/SiWx917/.gn deleted file mode 100644 index 3d48789e30ab3d..00000000000000 --- a/examples/lighting-app/silabs/SiWx917/.gn +++ /dev/null @@ -1,28 +0,0 @@ -# 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" - - import("//args.gni") -} diff --git a/examples/lighting-app/silabs/SiWx917/BUILD.gn b/examples/lighting-app/silabs/SiWx917/BUILD.gn deleted file mode 100644 index b0bcf56032f81a..00000000000000 --- a/examples/lighting-app/silabs/SiWx917/BUILD.gn +++ /dev/null @@ -1,160 +0,0 @@ -# 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("${chip_root}/third_party/silabs/SiWx917_sdk.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") - -if (chip_enable_pw_rpc) { - import("//build_overrides/pigweed.gni") - import("$dir_pw_build/target_types.gni") -} - -assert(current_os == "freertos") - -efr32_project_dir = "${chip_root}/examples/lighting-app/silabs/SiWx917" -examples_plat_dir = "${chip_root}/examples/platform/silabs/SiWx917" -examples_common_plat_dir = "${chip_root}/examples/platform/silabs" - -import("${examples_plat_dir}/args.gni") -declare_args() { - # Dump memory usage at link time. - chip_print_memory_usage = false -} - -siwx917_sdk("sdk") { - sources = [ - "${efr32_project_dir}/include/CHIPProjectConfig.h", - "${examples_plat_dir}/FreeRTOSConfig.h", - ] - - include_dirs = [ - "${chip_root}/src/platform/silabs/SiWx917", - "${efr32_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", - ] - } -} - -silabs_executable("lighting_app") { - output_name = "chip-siwx917-lighting-example.out" - include_dirs = [ "include" ] - defines = [] - - sources = [ - "${examples_common_plat_dir}/main.cpp", - "src/AppTask.cpp", - "src/LightingManager.cpp", - "src/ZclCallbacks.cpp", - ] - - deps = [ - ":sdk", - "${examples_plat_dir}:siwx917-common", - app_data_model, - ] - - 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", - "PW_RPC_OTCLI_SERVICE=1", - "PW_RPC_THREAD_SERVICE=1", - "PW_RPC_TRACING_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:rpc_channel_output", - "$dir_pw_stream:sys_io_stream", - "$dir_pw_trace", - "$dir_pw_trace_tokenized", - "$dir_pw_trace_tokenized:trace_rpc_service", - "${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", - "${chip_root}/examples/common/pigweed:ot_cli_service.nanopb_rpc", - "${chip_root}/examples/common/pigweed:thread_service.nanopb_rpc", - "${examples_plat_dir}/pw_sys_io:pw_sys_io_siwx917", - ] - - deps += pw_build_LINK_DEPS - - include_dirs += [ - "${chip_root}/examples/common", - "${chip_root}/examples/common/pigweed/efr32", - ] - } - - ldscript = "${examples_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("siwx917") { - deps = [ ":lighting_app" ] -} - -group("default") { - deps = [ ":siwx917" ] -} diff --git a/examples/lighting-app/silabs/SiWx917/README.md b/examples/lighting-app/silabs/SiWx917/README.md deleted file mode 100644 index a8d588271aae84..00000000000000 --- a/examples/lighting-app/silabs/SiWx917/README.md +++ /dev/null @@ -1,191 +0,0 @@ -# Matter SiWx917 Lighting Example - -An example showing the use of CHIP on the Silicon Labs SiWx917. - -
- -- [Matter SiWx917 Lighting Example](#matter-siwx917-lighting-example) - - [Introduction](#introduction) - - [Building](#building) - - [Flashing the Application](#flashing-the-application) - - [Viewing Logging Output](#viewing-logging-output) - - [Running the Complete Example](#running-the-complete-example) - - [Notes](#notes) - - [Memory settings](#memory-settings) - - [Group Communication (Multicast)](#group-communication-multicast) - - [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 SiWx917 lighting example provides a baseline demonstration of a Light -control device, built using Matter, the Silicon Labs Gecko SDK, and the Silicon -Labs WiseMCU SDK. It can be controlled by a Chip controller over a Wi-Fi -network. - -The SiWx917 device can be commissioned over Bluetooth Low Energy where the -device and the Chip controller will exchange security information with the -rendezvous procedure. Wi-Fi Network credentials are then provided to the SiWx917 -device which will then join the Wi-Fi 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 -rendezvous procedure. - -The lighting 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: - [GNU Arm Embedded Toolchain 9-2019-q4-major](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/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 - -* Build the example application: - - cd ~/connectedhomeip - ./scripts/examples/gn_efr32_example.sh examples/lighting-app/silabs/SiWx917/ out/lighting-app BRD4325B - -- To delete generated executable, libraries and object files use: - - $ cd ~/connectedhomeip - $ rm -rf ./out/ - - - -## Flashing the Application - -- Flashing requires the SiWx917 SoC device to be configured in the Ozone - Debugger. -- Once it's configured, it can be run with the Ozone Debugger by loading the - .out file. - - > For detailed instructions, please refer to - > [Running the Matter Demo on SiWx917 SoC](https://github.com/SiliconLabs/matter/blob/latest/docs/silabs/wifi/RUN_DEMO_SiWx917_SoC.md) - > in the Silicon Labs Matter Github Repo - - - -## Viewing Logging Output - -The example application's logging output can be viewed in the Ozone Debugger. - - - -## Running the Complete Example - -- You can provision and control the Chip device using the chip-tool standalone - - [chip-tool](https://github.com/project-chip/connectedhomeip/blob/master/examples/chip-tool/README.md) - - Here is an example with the chip-tool: - - - > $SSID and $PSK are the SSID and passcode of your Wi-Fi Access Point. - - ``` - chip-tool pairing ble-wifi 1122 $SSID $PSK 20202021 3840 - - chip-tool onoff on 1 1 - ``` - -### Notes - -- Depending on your network settings your router might not provide native IPv6 - addresses to your devices (Router / PC). If this is the case, you need to - add a static IPv6 addresses on both devices and then an IPv6 route to your - router on your PC - - - 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` - -## 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 -Wi-Fi stack. 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/silabs/SiWx917/MemMonitoring.cpp` to add your own -memory tracking code inside the `trackAlloc` and `trackFree` function - -## Group Communication (Multicast) - -With this lighting example you can also use group communication to send Lighting -commands to multiples devices at once. Please refer to the -[chip-tool documentation](../../../chip-tool/README.md) _Configuring the server -side for Group Commands_ and _Using the Client to Send Group (Multicast) Matter -Commands_ - -## 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 to be -passed to the build scripts. - -### Disabling logging - -`chip_progress_logging, chip_detail_logging, chip_automation_logging` - - $ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/silabs/SiWx917 ./out/lighting-app BRD4325B "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false" - -### Debug build / release build - -`is_debug` - - $ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/silabs/SiWx917 ./out/lighting-app BRD4325B "is_debug=false" - -### Disabling LCD - -`show_qr_code` - - $ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/silabs/SiWx917 ./out/lighting-app BRD4325B "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_efr32_example.sh ./examples/lighting-app/silabs/SiWx917 ./out/lighting-app BRD4325B kvs_max_entries=50 diff --git a/examples/lighting-app/silabs/SiWx917/build_overrides b/examples/lighting-app/silabs/SiWx917/build_overrides deleted file mode 120000 index 995884e6163eb5..00000000000000 --- a/examples/lighting-app/silabs/SiWx917/build_overrides +++ /dev/null @@ -1 +0,0 @@ -../../../build_overrides \ No newline at end of file diff --git a/examples/lighting-app/silabs/SiWx917/data_model/BUILD.gn b/examples/lighting-app/silabs/SiWx917/data_model/BUILD.gn deleted file mode 100644 index f6dae30253e64b..00000000000000 --- a/examples/lighting-app/silabs/SiWx917/data_model/BUILD.gn +++ /dev/null @@ -1,24 +0,0 @@ -# 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}/src/app/chip_data_model.gni") -import("${chip_root}/src/platform/device.gni") - -chip_data_model("silabs-lighting") { - zap_file = "lighting-wifi-app.zap" - - zap_pregenerated_dir = "${chip_root}/zzz_generated/lighting-app/zap-generated" - is_server = true -} diff --git a/examples/lighting-app/silabs/SiWx917/data_model/lighting-wifi-app.matter b/examples/lighting-app/silabs/SiWx917/data_model/lighting-wifi-app.matter deleted file mode 100644 index 5678a95a50c440..00000000000000 --- a/examples/lighting-app/silabs/SiWx917/data_model/lighting-wifi-app.matter +++ /dev/null @@ -1,1920 +0,0 @@ -// This IDL was generated automatically by ZAP. -// It is for view/code review purposes only. - -struct ApplicationStruct { - int16u catalogVendorID = 0; - char_string applicationID = 1; -} - -struct LabelStruct { - char_string<16> label = 0; - char_string<16> value = 1; -} - -/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { - kBlink = 0; - kBreathe = 1; - kOkay = 2; - kChannelChange = 11; - kFinishEffect = 254; - kStopEffect = 255; - } - - enum IdentifyEffectVariant : ENUM8 { - kDefault = 0; - } - - enum IdentifyIdentifyType : ENUM8 { - kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; - kAudibleBeep = 3; - kDisplay = 4; - kActuator = 5; - } - - attribute int16u identifyTime = 0; - readonly attribute enum8 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 { - IdentifyEffectIdentifier effectIdentifier = 0; - IdentifyEffectVariant effectVariant = 1; - } - - command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; - command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; -} - -/** Attributes and commands for group configuration and manipulation. */ -server cluster Groups = 4 { - bitmap Feature : BITMAP32 { - kGroupNames = 0x1; - } - - readonly attribute bitmap8 nameSupport = 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; - - request struct AddGroupRequest { - group_id groupID = 0; - CHAR_STRING groupName = 1; - } - - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - CHAR_STRING groupName = 1; - } - - response struct AddGroupResponse = 0 { - ENUM8 status = 0; - group_id groupID = 1; - } - - response struct ViewGroupResponse = 1 { - ENUM8 status = 0; - group_id groupID = 1; - CHAR_STRING groupName = 2; - } - - response struct GetGroupMembershipResponse = 2 { - nullable INT8U capacity = 0; - group_id groupList[] = 1; - } - - response struct RemoveGroupResponse = 3 { - ENUM8 status = 0; - group_id groupID = 1; - } - - fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; - fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; - fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; - fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; -} - -/** Attributes and commands for switching devices between 'On' and 'Off' states. */ -server cluster OnOff = 6 { - enum OnOffDelayedAllOffEffectVariant : ENUM8 { - kFadeToOffIn0p8Seconds = 0; - kNoFade = 1; - k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; - } - - enum OnOffDyingLightEffectVariant : ENUM8 { - k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; - } - - enum OnOffEffectIdentifier : ENUM8 { - kDelayedAllOff = 0; - kDyingLight = 1; - } - - enum OnOffStartUpOnOff : ENUM8 { - kOff = 0; - kOn = 1; - kTogglePreviousOnOff = 2; - } - - bitmap Feature : BITMAP32 { - kLighting = 0x1; - } - - bitmap OnOffControl : BITMAP8 { - kAcceptOnlyWhenOn = 0x1; - } - - readonly attribute boolean onOff = 0; - readonly attribute boolean globalSceneControl = 16384; - attribute int16u onTime = 16385; - attribute int16u offWaitTime = 16386; - attribute access(write: manage) nullable OnOffStartUpOnOff 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 { - OnOffEffectIdentifier effectIdentifier = 0; - int8u effectVariant = 1; - } - - request struct OnWithTimedOffRequest { - OnOffControl onOffControl = 0; - int16u onTime = 1; - int16u offWaitTime = 2; - } - - command Off(): DefaultSuccess = 0; - command On(): DefaultSuccess = 1; - command Toggle(): DefaultSuccess = 2; - command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; - command OnWithRecallGlobalScene(): DefaultSuccess = 65; - command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; -} - -/** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ -server cluster LevelControl = 8 { - enum MoveMode : ENUM8 { - kUp = 0; - kDown = 1; - } - - enum StepMode : ENUM8 { - kUp = 0; - kDown = 1; - } - - bitmap Feature : BITMAP32 { - kOnOff = 0x1; - kLighting = 0x2; - kFrequency = 0x4; - } - - bitmap LevelControlOptions : BITMAP8 { - kExecuteIfOff = 0x1; - kCoupleColorTempToLevel = 0x2; - } - - readonly attribute nullable int8u currentLevel = 0; - readonly attribute int16u remainingTime = 1; - readonly attribute int8u minLevel = 2; - readonly attribute int8u maxLevel = 3; - readonly attribute int16u currentFrequency = 4; - readonly attribute int16u minFrequency = 5; - readonly attribute int16u maxFrequency = 6; - attribute LevelControlOptions options = 15; - attribute int16u onOffTransitionTime = 16; - attribute nullable int8u onLevel = 17; - attribute nullable int16u onTransitionTime = 18; - attribute nullable int16u offTransitionTime = 19; - attribute nullable int8u defaultMoveRate = 20; - attribute access(write: manage) nullable int8u startUpCurrentLevel = 16384; - 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 MoveToLevelRequest { - INT8U level = 0; - nullable INT16U transitionTime = 1; - LevelControlOptions optionsMask = 2; - LevelControlOptions optionsOverride = 3; - } - - request struct MoveRequest { - MoveMode moveMode = 0; - nullable INT8U rate = 1; - LevelControlOptions optionsMask = 2; - LevelControlOptions optionsOverride = 3; - } - - request struct StepRequest { - StepMode stepMode = 0; - INT8U stepSize = 1; - nullable INT16U transitionTime = 2; - LevelControlOptions optionsMask = 3; - LevelControlOptions optionsOverride = 4; - } - - request struct StopRequest { - LevelControlOptions optionsMask = 0; - LevelControlOptions optionsOverride = 1; - } - - request struct MoveToLevelWithOnOffRequest { - INT8U level = 0; - nullable INT16U transitionTime = 1; - LevelControlOptions optionsMask = 2; - LevelControlOptions optionsOverride = 3; - } - - request struct MoveWithOnOffRequest { - MoveMode moveMode = 0; - nullable INT8U rate = 1; - LevelControlOptions optionsMask = 2; - LevelControlOptions optionsOverride = 3; - } - - request struct StepWithOnOffRequest { - StepMode stepMode = 0; - INT8U stepSize = 1; - nullable INT16U transitionTime = 2; - LevelControlOptions optionsMask = 3; - LevelControlOptions optionsOverride = 4; - } - - request struct StopWithOnOffRequest { - LevelControlOptions optionsMask = 0; - LevelControlOptions optionsOverride = 1; - } - - command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; - command Move(MoveRequest): DefaultSuccess = 1; - command Step(StepRequest): DefaultSuccess = 2; - command Stop(StopRequest): DefaultSuccess = 3; - command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; - command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; - command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; - command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; -} - -/** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { - struct DeviceTypeStruct { - devtype_id deviceType = 0; - int16u revision = 1; - } - - 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 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. */ -server cluster AccessControl = 31 { - enum AccessControlEntryAuthModeEnum : ENUM8 { - kPase = 1; - kCase = 2; - kGroup = 3; - } - - enum AccessControlEntryPrivilegeEnum : ENUM8 { - kView = 1; - kProxyView = 2; - kOperate = 3; - kManage = 4; - kAdminister = 5; - } - - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - struct Target { - 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 Target 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; - } - - attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; - readonly attribute int16u subjectsPerAccessControlEntry = 2; - readonly attribute int16u targetsPerAccessControlEntry = 3; - readonly attribute int16u accessControlEntriesPerFabric = 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; -} - -/** 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. */ -server cluster BasicInformation = 40 { - 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 char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; - readonly attribute CapabilityMinimaStruct capabilityMinima = 19; - 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; -} - -/** Provides an interface for providing OTA software updates */ -client cluster OtaSoftwareUpdateProvider = 41 { - enum OTAApplyUpdateAction : ENUM8 { - kProceed = 0; - kAwaitNextAction = 1; - kDiscontinue = 2; - } - - enum OTADownloadProtocol : ENUM8 { - kBDXSynchronous = 0; - kBDXAsynchronous = 1; - kHttps = 2; - kVendorSpecific = 3; - } - - enum OTAQueryStatus : 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; - OTADownloadProtocol 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 { - OTAQueryStatus 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 { - OTAApplyUpdateAction 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 */ -server cluster OtaSoftwareUpdateRequestor = 42 { - enum OTAAnnouncementReason : ENUM8 { - kSimpleAnnouncement = 0; - kUpdateAvailable = 1; - kUrgentUpdateAvailable = 2; - } - - enum OTAChangeReasonEnum : ENUM8 { - kUnknown = 0; - kSuccess = 1; - kFailure = 2; - kTimeOut = 3; - kDelayByProvider = 4; - } - - enum OTAUpdateStateEnum : 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 { - OTAUpdateStateEnum previousState = 0; - OTAUpdateStateEnum newState = 1; - OTAChangeReasonEnum 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 ProviderLocation defaultOTAProviders[] = 0; - readonly attribute boolean updatePossible = 1; - readonly attribute OTAUpdateStateEnum 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; - OTAAnnouncementReason announcementReason = 2; - optional OCTET_STRING<512> metadataForNode = 3; - endpoint_no endpoint = 4; - } - - 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 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 */ -server cluster LocalizationConfiguration = 43 { - attribute 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 how dates and times are conveyed. As such, Nodes that visually - or audibly convey time information need a mechanism by which they can be configured to use a - user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { - enum CalendarTypeEnum : ENUM8 { - kBuddhist = 0; - kChinese = 1; - kCoptic = 2; - kEthiopian = 3; - kGregorian = 4; - kHebrew = 5; - kIndian = 6; - kIslamic = 7; - kJapanese = 8; - kKorean = 9; - kPersian = 10; - kTaiwanese = 11; - } - - enum HourFormatEnum : ENUM8 { - k12hr = 0; - k24hr = 1; - } - - attribute HourFormatEnum hourFormat = 0; - attribute CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 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; -} - -/** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { - enum CommissioningError : ENUM8 { - kOk = 0; - kValueOutsideRange = 1; - kInvalidAuthentication = 2; - kNoFailSafe = 3; - kBusyWithOtherAdmin = 4; - } - - enum RegulatoryLocationType : ENUM8 { - kIndoor = 0; - kOutdoor = 1; - kIndoorOutdoor = 2; - } - - struct BasicCommissioningInfo { - int16u failSafeExpiryLengthSeconds = 0; - int16u maxCumulativeFailsafeSeconds = 1; - } - - attribute access(write: administer) int64u breadcrumb = 0; - readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; - readonly attribute RegulatoryLocationType regulatoryConfig = 2; - readonly attribute RegulatoryLocationType locationCapability = 3; - readonly attribute boolean supportsConcurrentConnection = 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; - - request struct ArmFailSafeRequest { - INT16U expiryLengthSeconds = 0; - INT64U breadcrumb = 1; - } - - request struct SetRegulatoryConfigRequest { - RegulatoryLocationType newRegulatoryConfig = 0; - CHAR_STRING countryCode = 1; - INT64U breadcrumb = 2; - } - - response struct ArmFailSafeResponse = 1 { - CommissioningError errorCode = 0; - CHAR_STRING debugText = 1; - } - - response struct SetRegulatoryConfigResponse = 3 { - CommissioningError errorCode = 0; - CHAR_STRING debugText = 1; - } - - response struct CommissioningCompleteResponse = 5 { - CommissioningError errorCode = 0; - CHAR_STRING debugText = 1; - } - - command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; - command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; -} - -/** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { - enum NetworkCommissioningStatus : 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 WiFiBand : ENUM8 { - k2g4 = 0; - k3g65 = 1; - k5g = 2; - k6g = 3; - k60g = 4; - } - - bitmap Feature : BITMAP32 { - kWiFiNetworkInterface = 0x1; - kThreadNetworkInterface = 0x2; - kEthernetNetworkInterface = 0x4; - } - - bitmap WiFiSecurity : BITMAP8 { - kUnencrypted = 0x1; - kWep = 0x2; - kWpaPersonal = 0x4; - kWpa2Personal = 0x8; - kWpa3Personal = 0x10; - } - - struct NetworkInfo { - octet_string<32> networkID = 0; - boolean connected = 1; - } - - struct ThreadInterfaceScanResult { - 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 WiFiInterfaceScanResult { - WiFiSecurity security = 0; - octet_string<32> ssid = 1; - octet_string<6> bssid = 2; - int16u channel = 3; - WiFiBand wiFiBand = 4; - int8s rssi = 5; - } - - readonly attribute access(read: administer) int8u maxNetworks = 0; - readonly attribute access(read: administer) NetworkInfo networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; - attribute access(write: administer) boolean interfaceEnabled = 4; - readonly attribute access(read: administer) nullable NetworkCommissioningStatus lastNetworkingStatus = 5; - readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; - readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; - 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; - } - - request struct AddOrUpdateWiFiNetworkRequest { - OCTET_STRING<32> ssid = 0; - OCTET_STRING<64> credentials = 1; - optional INT64U breadcrumb = 2; - } - - request struct AddOrUpdateThreadNetworkRequest { - OCTET_STRING<254> operationalDataset = 0; - optional INT64U breadcrumb = 1; - } - - request struct RemoveNetworkRequest { - OCTET_STRING<32> networkID = 0; - optional INT64U breadcrumb = 1; - } - - request struct ConnectNetworkRequest { - OCTET_STRING<32> networkID = 0; - optional INT64U breadcrumb = 1; - } - - request struct ReorderNetworkRequest { - OCTET_STRING<32> networkID = 0; - INT8U networkIndex = 1; - optional INT64U breadcrumb = 2; - } - - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatus networkingStatus = 0; - optional CHAR_STRING debugText = 1; - optional WiFiInterfaceScanResult wiFiScanResults[] = 2; - optional ThreadInterfaceScanResult threadScanResults[] = 3; - } - - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatus networkingStatus = 0; - optional CHAR_STRING<512> debugText = 1; - optional INT8U networkIndex = 2; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatus networkingStatus = 0; - optional CHAR_STRING debugText = 1; - nullable INT32S errorValue = 2; - } - - command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; - command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; - command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; - command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; - command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; - command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; -} - -/** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { - 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; - } - - 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. */ -server cluster GeneralDiagnostics = 51 { - 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; - } - - 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 int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute 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; - } - - command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; -} - -/** 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. */ -server cluster SoftwareDiagnostics = 52 { - 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 ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute 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; - - command ResetWatermarks(): 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. */ -server cluster WiFiNetworkDiagnostics = 54 { - 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; - } - - bitmap Feature : BITMAP32 { - kPacketCounts = 0x1; - kErrorCounts = 0x2; - } - - info event Disconnection = 0 { - INT16U reasonCode = 0; - } - - info event AssociationFailure = 1 { - AssociationFailureCauseEnum associationFailure = 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 nullable int32u beaconLostCount = 5; - readonly attribute nullable int32u beaconRxCount = 6; - readonly attribute nullable int32u packetMulticastRxCount = 7; - readonly attribute nullable int32u packetMulticastTxCount = 8; - readonly attribute nullable int32u packetUnicastRxCount = 9; - readonly attribute nullable int32u packetUnicastTxCount = 10; - readonly attribute nullable int64u currentMaxRate = 11; - readonly attribute 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; - - command ResetCounts(): DefaultSuccess = 0; -} - -/** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { - enum CommissioningWindowStatusEnum : ENUM8 { - kWindowNotOpen = 0; - kEnhancedWindowOpen = 1; - kBasicWindowOpen = 2; - } - - enum StatusCode : ENUM8 { - kBusy = 2; - kPAKEParameterError = 3; - kWindowNotOpen = 4; - } - - readonly attribute CommissioningWindowStatusEnum windowStatus = 0; - readonly attribute nullable fabric_idx adminFabricIndex = 1; - readonly attribute nullable int16u 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 salt = 4; - } - - request struct OpenBasicCommissioningWindowRequest { - INT16U commissioningTimeout = 0; - } - - timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; - timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; - 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. */ -server cluster OperationalCredentials = 62 { - 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 attestationNonce = 0; - } - - request struct CertificateChainRequestRequest { - CertificateChainTypeEnum certificateType = 0; - } - - request struct CSRRequestRequest { - OCTET_STRING CSRNonce = 0; - optional boolean isForUpdateNOC = 1; - } - - request struct AddNOCRequest { - OCTET_STRING NOCValue = 0; - optional OCTET_STRING ICACValue = 1; - OCTET_STRING IPKValue = 2; - Int64u caseAdminSubject = 3; - VENDOR_ID adminVendorId = 4; - } - - request struct UpdateNOCRequest { - OCTET_STRING NOCValue = 0; - optional OCTET_STRING ICACValue = 1; - } - - request struct UpdateFabricLabelRequest { - CHAR_STRING<32> label = 0; - } - - request struct RemoveFabricRequest { - fabric_idx fabricIndex = 0; - } - - request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCACertificate = 0; - } - - response struct AttestationResponse = 1 { - OCTET_STRING attestationElements = 0; - OCTET_STRING attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - OCTET_STRING certificate = 0; - } - - response struct CSRResponse = 5 { - OCTET_STRING NOCSRElements = 0; - OCTET_STRING attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional CHAR_STRING debugText = 2; - } - - command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; - command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; - command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; - command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; - fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; - command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; - command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; -} - -/** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { - enum GroupKeySecurityPolicyEnum : ENUM8 { - kTrustFirst = 0; - kCacheAndSync = 1; - } - - 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; - } - - request struct KeySetRemoveRequest { - INT16U groupKeySetID = 0; - } - - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - - response struct KeySetReadResponse = 2 { - GroupKeySetStruct groupKeySet = 0; - } - - response struct KeySetReadAllIndicesResponse = 5 { - INT16U groupKeySetIDs[] = 0; - } - - fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; - fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; - fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; -} - -/** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only -labels. */ -server cluster FixedLabel = 64 { - 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. */ -server cluster UserLabel = 65 { - 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; -} - -/** Attributes and commands for controlling the color properties of a color-capable light. */ -server cluster ColorControl = 768 { - enum ColorLoopAction : ENUM8 { - kDeactivate = 0; - kActivateFromColorLoopStartEnhancedHue = 1; - kActivateFromEnhancedCurrentHue = 2; - } - - enum ColorLoopDirection : ENUM8 { - kDecrementHue = 0; - kIncrementHue = 1; - } - - enum ColorMode : ENUM8 { - kCurrentHueAndCurrentSaturation = 0; - kCurrentXAndCurrentY = 1; - kColorTemperature = 2; - } - - enum HueDirection : ENUM8 { - kShortestDistance = 0; - kLongestDistance = 1; - kUp = 2; - kDown = 3; - } - - enum HueMoveMode : ENUM8 { - kStop = 0; - kUp = 1; - kDown = 3; - } - - enum HueStepMode : ENUM8 { - kUp = 1; - kDown = 3; - } - - enum SaturationMoveMode : ENUM8 { - kStop = 0; - kUp = 1; - kDown = 3; - } - - enum SaturationStepMode : ENUM8 { - kUp = 1; - kDown = 3; - } - - bitmap ColorCapabilities : BITMAP16 { - kHueSaturationSupported = 0x1; - kEnhancedHueSupported = 0x2; - kColorLoopSupported = 0x4; - kXYAttributesSupported = 0x8; - kColorTemperatureSupported = 0x10; - } - - bitmap ColorLoopUpdateFlags : BITMAP8 { - kUpdateAction = 0x1; - kUpdateDirection = 0x2; - kUpdateTime = 0x4; - kUpdateStartHue = 0x8; - } - - bitmap Feature : BITMAP32 { - kHueAndSaturation = 0x1; - kEnhancedHue = 0x2; - kColorLoop = 0x4; - kXy = 0x8; - kColorTemperature = 0x10; - } - - readonly attribute int8u currentHue = 0; - readonly attribute int8u currentSaturation = 1; - readonly attribute int16u remainingTime = 2; - readonly attribute int16u currentX = 3; - readonly attribute int16u currentY = 4; - readonly attribute int16u colorTemperatureMireds = 7; - readonly attribute enum8 colorMode = 8; - attribute bitmap8 options = 15; - readonly attribute nullable int8u numberOfPrimaries = 16; - readonly attribute int16u enhancedCurrentHue = 16384; - readonly attribute enum8 enhancedColorMode = 16385; - readonly attribute int8u colorLoopActive = 16386; - readonly attribute int8u colorLoopDirection = 16387; - readonly attribute int16u colorLoopTime = 16388; - readonly attribute int16u colorLoopStartEnhancedHue = 16389; - readonly attribute int16u colorLoopStoredEnhancedHue = 16390; - readonly attribute bitmap16 colorCapabilities = 16394; - readonly attribute int16u colorTempPhysicalMinMireds = 16395; - readonly attribute int16u colorTempPhysicalMaxMireds = 16396; - readonly attribute int16u coupleColorTempToLevelMinMireds = 16397; - attribute access(write: manage) nullable int16u startUpColorTemperatureMireds = 16400; - 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 MoveToHueRequest { - INT8U hue = 0; - HueDirection direction = 1; - INT16U transitionTime = 2; - BITMAP8 optionsMask = 3; - BITMAP8 optionsOverride = 4; - } - - request struct MoveHueRequest { - HueMoveMode moveMode = 0; - INT8U rate = 1; - BITMAP8 optionsMask = 2; - BITMAP8 optionsOverride = 3; - } - - request struct StepHueRequest { - HueStepMode stepMode = 0; - INT8U stepSize = 1; - INT8U transitionTime = 2; - BITMAP8 optionsMask = 3; - BITMAP8 optionsOverride = 4; - } - - request struct MoveToSaturationRequest { - INT8U saturation = 0; - INT16U transitionTime = 1; - BITMAP8 optionsMask = 2; - BITMAP8 optionsOverride = 3; - } - - request struct MoveSaturationRequest { - SaturationMoveMode moveMode = 0; - INT8U rate = 1; - BITMAP8 optionsMask = 2; - BITMAP8 optionsOverride = 3; - } - - request struct StepSaturationRequest { - SaturationStepMode stepMode = 0; - INT8U stepSize = 1; - INT8U transitionTime = 2; - BITMAP8 optionsMask = 3; - BITMAP8 optionsOverride = 4; - } - - request struct MoveToHueAndSaturationRequest { - INT8U hue = 0; - INT8U saturation = 1; - INT16U transitionTime = 2; - BITMAP8 optionsMask = 3; - BITMAP8 optionsOverride = 4; - } - - request struct MoveToColorRequest { - INT16U colorX = 0; - INT16U colorY = 1; - INT16U transitionTime = 2; - BITMAP8 optionsMask = 3; - BITMAP8 optionsOverride = 4; - } - - request struct MoveColorRequest { - INT16S rateX = 0; - INT16S rateY = 1; - BITMAP8 optionsMask = 2; - BITMAP8 optionsOverride = 3; - } - - request struct StepColorRequest { - INT16S stepX = 0; - INT16S stepY = 1; - INT16U transitionTime = 2; - BITMAP8 optionsMask = 3; - BITMAP8 optionsOverride = 4; - } - - request struct MoveToColorTemperatureRequest { - INT16U colorTemperatureMireds = 0; - INT16U transitionTime = 1; - BITMAP8 optionsMask = 2; - BITMAP8 optionsOverride = 3; - } - - request struct EnhancedMoveToHueRequest { - INT16U enhancedHue = 0; - HueDirection direction = 1; - INT16U transitionTime = 2; - BITMAP8 optionsMask = 3; - BITMAP8 optionsOverride = 4; - } - - request struct EnhancedMoveHueRequest { - HueMoveMode moveMode = 0; - INT16U rate = 1; - BITMAP8 optionsMask = 2; - BITMAP8 optionsOverride = 3; - } - - request struct EnhancedStepHueRequest { - HueStepMode stepMode = 0; - INT16U stepSize = 1; - INT16U transitionTime = 2; - BITMAP8 optionsMask = 3; - BITMAP8 optionsOverride = 4; - } - - request struct EnhancedMoveToHueAndSaturationRequest { - INT16U enhancedHue = 0; - INT8U saturation = 1; - INT16U transitionTime = 2; - BITMAP8 optionsMask = 3; - BITMAP8 optionsOverride = 4; - } - - request struct ColorLoopSetRequest { - ColorLoopUpdateFlags updateFlags = 0; - ColorLoopAction action = 1; - ColorLoopDirection direction = 2; - INT16U time = 3; - INT16U startHue = 4; - BITMAP8 optionsMask = 5; - BITMAP8 optionsOverride = 6; - } - - request struct StopMoveStepRequest { - BITMAP8 optionsMask = 0; - BITMAP8 optionsOverride = 1; - } - - request struct MoveColorTemperatureRequest { - HueMoveMode moveMode = 0; - INT16U rate = 1; - INT16U colorTemperatureMinimumMireds = 2; - INT16U colorTemperatureMaximumMireds = 3; - BITMAP8 optionsMask = 4; - BITMAP8 optionsOverride = 5; - } - - request struct StepColorTemperatureRequest { - HueStepMode stepMode = 0; - INT16U stepSize = 1; - INT16U transitionTime = 2; - INT16U colorTemperatureMinimumMireds = 3; - INT16U colorTemperatureMaximumMireds = 4; - BITMAP8 optionsMask = 5; - BITMAP8 optionsOverride = 6; - } - - command MoveToHue(MoveToHueRequest): DefaultSuccess = 0; - command MoveHue(MoveHueRequest): DefaultSuccess = 1; - command StepHue(StepHueRequest): DefaultSuccess = 2; - command MoveToSaturation(MoveToSaturationRequest): DefaultSuccess = 3; - command MoveSaturation(MoveSaturationRequest): DefaultSuccess = 4; - command StepSaturation(StepSaturationRequest): DefaultSuccess = 5; - command MoveToHueAndSaturation(MoveToHueAndSaturationRequest): DefaultSuccess = 6; - command MoveToColor(MoveToColorRequest): DefaultSuccess = 7; - command MoveColor(MoveColorRequest): DefaultSuccess = 8; - command StepColor(StepColorRequest): DefaultSuccess = 9; - command MoveToColorTemperature(MoveToColorTemperatureRequest): DefaultSuccess = 10; - command EnhancedMoveToHue(EnhancedMoveToHueRequest): DefaultSuccess = 64; - command EnhancedMoveHue(EnhancedMoveHueRequest): DefaultSuccess = 65; - command EnhancedStepHue(EnhancedStepHueRequest): DefaultSuccess = 66; - command EnhancedMoveToHueAndSaturation(EnhancedMoveToHueAndSaturationRequest): DefaultSuccess = 67; - command ColorLoopSet(ColorLoopSetRequest): DefaultSuccess = 68; - command StopMoveStep(StopMoveStepRequest): DefaultSuccess = 71; - command MoveColorTemperature(MoveColorTemperatureRequest): DefaultSuccess = 75; - command StepColorTemperature(StepColorTemperatureRequest): DefaultSuccess = 76; -} - -endpoint 0 { - device type rootdevice = 22, version 1; - binding cluster OtaSoftwareUpdateProvider; - - server cluster Descriptor { - callback attribute deviceTypeList; - callback attribute serverList; - callback attribute clientList; - callback attribute partsList; - ram attribute featureMap default = 0; - callback attribute clusterRevision default = 1; - } - - server cluster AccessControl { - callback attribute acl; - callback attribute extension; - callback attribute subjectsPerAccessControlEntry default = 4; - callback attribute targetsPerAccessControlEntry default = 3; - callback attribute accessControlEntriesPerFabric default = 4; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster BasicInformation { - callback attribute dataModelRevision default = 10; - callback attribute vendorName; - callback attribute vendorID; - callback attribute productName; - callback attribute productID; - persist attribute nodeLabel; - callback attribute location default = "XX"; - callback attribute hardwareVersion default = 0; - callback attribute hardwareVersionString; - callback attribute softwareVersion default = 0; - callback attribute softwareVersionString; - callback attribute manufacturingDate default = "20210614123456ZZ"; - callback attribute partNumber; - callback attribute productURL; - callback attribute productLabel; - callback attribute serialNumber; - persist attribute localConfigDisabled default = 0; - callback attribute uniqueID; - callback attribute capabilityMinima; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster OtaSoftwareUpdateRequestor { - callback attribute defaultOTAProviders default = 0; - 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; - } - - server cluster LocalizationConfiguration { - persist attribute activeLocale default = "en-US"; - callback attribute supportedLocales; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster TimeFormatLocalization { - persist attribute hourFormat default = 0; - persist attribute activeCalendarType default = 0; - callback attribute supportedCalendarTypes; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster GeneralCommissioning { - ram attribute breadcrumb default = 0x0000000000000000; - callback attribute basicCommissioningInfo; - callback attribute regulatoryConfig default = 0; - callback attribute locationCapability default = 0; - callback attribute supportsConcurrentConnection default = 1; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - 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; - ram attribute featureMap default = 2; - ram attribute clusterRevision default = 1; - } - - server cluster DiagnosticLogs { - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster GeneralDiagnostics { - callback attribute networkInterfaces; - callback attribute rebootCount default = 0x0000; - callback attribute upTime default = 0x0000000000000000; - callback attribute totalOperationalHours default = 0x00000000; - callback attribute bootReason; - callback attribute activeHardwareFaults; - callback attribute activeRadioFaults; - callback attribute activeNetworkFaults; - callback attribute testEventTriggersEnabled default = false; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster SoftwareDiagnostics { - callback attribute threadMetrics; - callback attribute currentHeapFree default = 0x0000000000000000; - callback attribute currentHeapUsed default = 0x0000000000000000; - callback attribute currentHeapHighWatermark default = 0x0000000000000000; - ram attribute featureMap default = 1; - ram attribute clusterRevision default = 1; - } - - server cluster WiFiNetworkDiagnostics { - callback attribute bssid; - callback attribute securityType; - callback attribute wiFiVersion; - callback attribute channelNumber default = 0x0000; - callback attribute rssi default = 0x00; - callback attribute beaconLostCount default = 0x00000000; - callback attribute beaconRxCount default = 0x00000000; - callback attribute packetMulticastRxCount default = 0x00000000; - callback attribute packetMulticastTxCount default = 0x00000000; - callback attribute packetUnicastRxCount default = 0x00000000; - callback attribute packetUnicastTxCount default = 0x00000000; - callback attribute currentMaxRate default = 0x0000000000000000; - callback attribute overrunCount default = 0x0000000000000000; - ram attribute featureMap default = 3; - ram attribute clusterRevision default = 1; - } - - server cluster AdministratorCommissioning { - callback attribute windowStatus default = 0; - callback attribute adminFabricIndex default = 1; - callback attribute adminVendorId default = 0; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster OperationalCredentials { - callback attribute NOCs; - callback attribute fabrics; - callback attribute supportedFabrics; - callback attribute commissionedFabrics; - callback attribute trustedRootCertificates; - callback attribute currentFabricIndex; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster GroupKeyManagement { - callback attribute groupKeyMap; - callback attribute groupTable; - callback attribute maxGroupsPerFabric; - callback attribute maxGroupKeysPerFabric; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - 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; - } -} -endpoint 1 { - device type dimmablelight = 257, version 1; - - server cluster Identify { - ram attribute identifyTime default = 0x0000; - ram attribute identifyType default = 0x0; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 4; - } - - server cluster Groups { - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 4; - } - - server cluster OnOff { - persist attribute onOff default = 0x00; - ram attribute globalSceneControl default = 0x01; - ram attribute onTime default = 0x0000; - ram attribute offWaitTime default = 0x0000; - persist attribute startUpOnOff default = 0xFF; - ram attribute featureMap default = 1; - ram attribute clusterRevision default = 4; - } - - server cluster LevelControl { - persist attribute currentLevel default = 0x01; - ram attribute remainingTime default = 0x0000; - ram attribute minLevel default = 0x01; - ram attribute maxLevel default = 0xFE; - ram attribute currentFrequency default = 0x0000; - ram attribute minFrequency default = 0x0000; - ram attribute maxFrequency default = 0x0000; - ram attribute options default = 0x00; - ram attribute onOffTransitionTime default = 0x0000; - ram attribute onLevel default = 0xFF; - ram attribute onTransitionTime; - ram attribute offTransitionTime; - ram attribute defaultMoveRate default = 50; - persist attribute startUpCurrentLevel default = 255; - ram attribute featureMap default = 3; - ram attribute clusterRevision default = 5; - } - - server cluster Descriptor { - callback attribute deviceTypeList; - callback attribute serverList; - callback attribute clientList; - callback attribute partsList; - ram attribute featureMap default = 0; - callback attribute clusterRevision default = 1; - } - - server cluster ColorControl { - ram attribute currentHue default = 0x00; - ram 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; - ram attribute options default = 0x00; - ram attribute numberOfPrimaries; - 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; - ram attribute colorLoopStartEnhancedHue default = 0x2300; - ram attribute colorLoopStoredEnhancedHue default = 0x0000; - ram attribute colorCapabilities default = 0x1F; - ram attribute colorTempPhysicalMinMireds default = 0x0000; - ram attribute colorTempPhysicalMaxMireds default = 0xFEFF; - ram attribute coupleColorTempToLevelMinMireds; - ram attribute startUpColorTemperatureMireds; - ram attribute featureMap default = 0x1F; - ram attribute clusterRevision default = 5; - } -} - - diff --git a/examples/lighting-app/silabs/SiWx917/data_model/lighting-wifi-app.zap b/examples/lighting-app/silabs/SiWx917/data_model/lighting-wifi-app.zap deleted file mode 100644 index a7b2737e97f4f6..00000000000000 --- a/examples/lighting-app/silabs/SiWx917/data_model/lighting-wifi-app.zap +++ /dev/null @@ -1,8199 +0,0 @@ -{ - "featureLevel": 96, - "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", - "version": "chip-v1" - } - ], - "endpointTypes": [ - { - "name": "MA-rootdevice", - "deviceTypeName": "MA-rootdevice", - "deviceTypeCode": 22, - "deviceTypeProfileId": 259, - "clusters": [ - { - "name": "Identify", - "code": 3, - "mfgCode": null, - "define": "IDENTIFY_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "Identify", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Identify", - "code": 3, - "mfgCode": null, - "define": "IDENTIFY_CLUSTER", - "side": "server", - "enabled": 0, - "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": "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": "Groups", - "code": 4, - "mfgCode": null, - "define": "GROUPS_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "AddGroup", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "ViewGroup", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "GetGroupMembership", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "RemoveGroup", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "RemoveAllGroups", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "AddGroupIfIdentifying", - "code": 5, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Groups", - "code": 4, - "mfgCode": null, - "define": "GROUPS_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [ - { - "name": "AddGroupResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "ViewGroupResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "GetGroupMembershipResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "RemoveGroupResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "NameSupport", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "bitmap8", - "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": "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": "Scenes", - "code": 5, - "mfgCode": null, - "define": "SCENES_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "AddScene", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "ViewScene", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "RemoveScene", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "RemoveAllScenes", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "StoreScene", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "RecallScene", - "code": 5, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "GetSceneMembership", - "code": 6, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Scenes", - "code": 5, - "mfgCode": null, - "define": "SCENES_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [ - { - "name": "AddSceneResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "ViewSceneResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "RemoveSceneResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "RemoveAllScenesResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "StoreSceneResponse", - "code": 4, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "GetSceneMembershipResponse", - "code": 6, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "SceneCount", - "code": 0, - "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": "CurrentScene", - "code": 1, - "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": "CurrentGroup", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "group_id", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SceneValid", - "code": 3, - "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": "NameSupport", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "bitmap8", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "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": "On/Off", - "code": 6, - "mfgCode": null, - "define": "ON_OFF_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "Off", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "On", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "Toggle", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "On/Off", - "code": 6, - "mfgCode": null, - "define": "ON_OFF_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "OnOff", - "code": 0, - "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": "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": "On/off Switch Configuration", - "code": 7, - "mfgCode": null, - "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "On/off Switch Configuration", - "code": 7, - "mfgCode": null, - "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "switch type", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "enum8", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "switch actions", - "code": 16, - "mfgCode": null, - "side": "server", - "type": "enum8", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "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": "Level Control", - "code": 8, - "mfgCode": null, - "define": "LEVEL_CONTROL_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "MoveToLevel", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "Move", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "Step", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "Stop", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "MoveToLevelWithOnOff", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "MoveWithOnOff", - "code": 5, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "StepWithOnOff", - "code": 6, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "StopWithOnOff", - "code": 7, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "5", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Level Control", - "code": 8, - "mfgCode": null, - "define": "LEVEL_CONTROL_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "CurrentLevel", - "code": 0, - "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": "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": "Descriptor", - "code": 29, - "mfgCode": null, - "define": "DESCRIPTOR_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "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": "", - "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": "", - "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": "", - "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": "", - "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": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Access Control", - "code": 31, - "mfgCode": null, - "define": "ACCESS_CONTROL_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "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": "", - "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": "", - "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": "4", - "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": "3", - "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": "4", - "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": "", - "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": "Basic Information", - "code": 40, - "mfgCode": null, - "define": "BASIC_INFORMATION_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "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": "10", - "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": "", - "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": "", - "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": "", - "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": "", - "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": "XX", - "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": "0", - "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": "", - "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": "0", - "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": "", - "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": "20210614123456ZZ", - "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": "", - "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": "", - "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": "", - "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": "", - "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": 0, - "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": "", - "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": "", - "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": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "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", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "ApplyUpdateRequest", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "NotifyUpdateApplied", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "OTA Software Update Provider", - "code": 41, - "mfgCode": null, - "define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [ - { - "name": "QueryImageResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "ApplyUpdateResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 0, - "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": "OTA Software Update Requestor", - "code": 42, - "mfgCode": null, - "define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "AnnounceOTAProvider", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "OTA Software Update Requestor", - "code": 42, - "mfgCode": null, - "define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "DefaultOTAProviders", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "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": "OTAUpdateStateEnum", - "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": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "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": "Localization Configuration", - "code": 43, - "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", - "side": "client", - "enabled": 0 - }, - { - "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": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "en-US", - "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": "", - "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": "Time Format Localization", - "code": 44, - "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", - "side": "client", - "enabled": 0 - }, - { - "name": "Time Format Localization", - "code": 44, - "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "HourFormat", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "HourFormatEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ActiveCalendarType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "CalendarTypeEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedCalendarTypes", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "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": "client", - "enabled": 0 - }, - { - "name": "Unit Localization", - "code": 45, - "mfgCode": null, - "define": "UNIT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "TemperatureUnit", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "TempUnitEnum", - "included": 0, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "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": "General Commissioning", - "code": 48, - "mfgCode": null, - "define": "GENERAL_COMMISSIONING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ArmFailSafe", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "SetRegulatoryConfig", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "CommissioningComplete", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "General Commissioning", - "code": 48, - "mfgCode": null, - "define": "GENERAL_COMMISSIONING_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "ArmFailSafeResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "SetRegulatoryConfigResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "CommissioningCompleteResponse", - "code": 5, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 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": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RegulatoryConfig", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "RegulatoryLocationType", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LocationCapability", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "RegulatoryLocationType", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "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": "1", - "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": "client", - "enabled": 0, - "commands": [ - { - "name": "ScanNetworks", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "AddOrUpdateWiFiNetwork", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "AddOrUpdateThreadNetwork", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "RemoveNetwork", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "ConnectNetwork", - "code": 6, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "ReorderNetwork", - "code": 8, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "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": "ScanNetworksResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "NetworkConfigResponse", - "code": 5, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "ConnectNetworkResponse", - "code": 7, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 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": "", - "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": "NetworkCommissioningStatus", - "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": "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", - "incoming": 1, - "outgoing": 0 - } - ], - "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": "client", - "enabled": 0, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "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", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "NetworkInterfaces", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "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": "0x0000", - "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": "0x0000000000000000", - "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": "0x00000000", - "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": "", - "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": "", - "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": "", - "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": "", - "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": "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": "Software Diagnostics", - "code": 52, - "mfgCode": null, - "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ResetWatermarks", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Software Diagnostics", - "code": 52, - "mfgCode": null, - "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "ThreadMetrics", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "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": "0x0000000000000000", - "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": "0x0000000000000000", - "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": "0x0000000000000000", - "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": "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": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Thread Network Diagnostics", - "code": 53, - "mfgCode": null, - "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ResetCounts", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "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": 0, - "attributes": [ - { - "name": "Channel", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RoutingRole", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "RoutingRole", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "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": "0", - "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": "0x0000", - "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": "0x0000000000000000", - "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": "", - "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": "0x0000000000000000", - "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": "", - "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": "", - "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": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "Weighting", - "code": 10, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "DataVersion", - "code": 11, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "StableDataVersion", - "code": 12, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "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": "", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000", - "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": "0x0000000000000000", - "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": "0x0000000000000000", - "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": "0x0000", - "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": "", - "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": "0x0000", - "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": "", - "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": "", - "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": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "WiFi Network Diagnostics", - "code": 54, - "mfgCode": null, - "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ResetCounts", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "WiFi Network Diagnostics", - "code": 54, - "mfgCode": null, - "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "BSSID", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "octet_string", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "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": "", - "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": "", - "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": "0x0000", - "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": "0x00", - "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": "0x00000000", - "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": "0x00000000", - "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": "0x00000000", - "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": "0x00000000", - "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": "0x00000000", - "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": "0x00000000", - "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": "0x0000000000000000", - "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": "0x0000000000000000", - "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": "Ethernet Network Diagnostics", - "code": 55, - "mfgCode": null, - "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ResetCounts", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Ethernet Network Diagnostics", - "code": 55, - "mfgCode": null, - "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "PHYRate", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "PHYRateEnum", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "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": "0x00", - "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": "0x0000000000000000", - "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": "0x0000000000000000", - "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": "0x0000000000000000", - "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": "0x0000000000000000", - "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": "0x0000000000000000", - "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": "0x00", - "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": "0x0000000000000000", - "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": "Switch", - "code": 59, - "mfgCode": null, - "define": "SWITCH_CLUSTER", - "side": "client", - "enabled": 0 - }, - { - "name": "Switch", - "code": 59, - "mfgCode": null, - "define": "SWITCH_CLUSTER", - "side": "server", - "enabled": 0, - "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": "Administrator Commissioning", - "code": 60, - "mfgCode": null, - "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "OpenCommissioningWindow", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "OpenBasicCommissioningWindow", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "RevokeCommissioning", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "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, - "attributes": [ - { - "name": "WindowStatus", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "CommissioningWindowStatusEnum", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "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": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AdminVendorId", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "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 - } - ] - }, - { - "name": "Operational Credentials", - "code": 62, - "mfgCode": null, - "define": "OPERATIONAL_CREDENTIALS_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "AttestationRequest", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "CertificateChainRequest", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "CSRRequest", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "AddNOC", - "code": 6, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "UpdateNOC", - "code": 7, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "UpdateFabricLabel", - "code": 9, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "RemoveFabric", - "code": 10, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "AddTrustedRootCertificate", - "code": 11, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "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": "AttestationResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "CertificateChainResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "CSRResponse", - "code": 5, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "NOCResponse", - "code": 8, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "NOCs", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "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": "", - "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": "", - "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": "", - "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": "", - "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": "", - "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": "client", - "enabled": 0, - "commands": [ - { - "name": "KeySetWrite", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "KeySetRead", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "KeySetRemove", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "KeySetReadAllIndices", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ] - }, - { - "name": "Group Key Management", - "code": 63, - "mfgCode": null, - "define": "GROUP_KEY_MANAGEMENT_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "KeySetReadResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "KeySetReadAllIndicesResponse", - "code": 5, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "GroupKeyMap", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "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": "", - "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": "", - "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": "", - "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": "Fixed Label", - "code": 64, - "mfgCode": null, - "define": "FIXED_LABEL_CLUSTER", - "side": "client", - "enabled": 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": "", - "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": "client", - "enabled": 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": "", - "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": "MA-dimmablelight", - "deviceTypeName": "MA-dimmablelight", - "deviceTypeCode": 257, - "deviceTypeProfileId": 259, - "clusters": [ - { - "name": "Identify", - "code": 3, - "mfgCode": null, - "define": "IDENTIFY_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "Identify", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "TriggerEffect", - "code": 64, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Identify", - "code": 3, - "mfgCode": null, - "define": "IDENTIFY_CLUSTER", - "side": "server", - "enabled": 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": "enum8", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0", - "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": "Groups", - "code": 4, - "mfgCode": null, - "define": "GROUPS_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "AddGroup", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "ViewGroup", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "GetGroupMembership", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "RemoveGroup", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "RemoveAllGroups", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "AddGroupIfIdentifying", - "code": 5, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Groups", - "code": 4, - "mfgCode": null, - "define": "GROUPS_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "AddGroupResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "ViewGroupResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "GetGroupMembershipResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "RemoveGroupResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "NameSupport", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "bitmap8", - "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": "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": "Scenes", - "code": 5, - "mfgCode": null, - "define": "SCENES_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "AddScene", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "ViewScene", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "RemoveScene", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "RemoveAllScenes", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "StoreScene", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "RecallScene", - "code": 5, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "GetSceneMembership", - "code": 6, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "EnhancedAddScene", - "code": 64, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "EnhancedViewScene", - "code": 65, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "CopyScene", - "code": 66, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Scenes", - "code": 5, - "mfgCode": null, - "define": "SCENES_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [ - { - "name": "AddSceneResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "ViewSceneResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "RemoveSceneResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "RemoveAllScenesResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "StoreSceneResponse", - "code": 4, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "GetSceneMembershipResponse", - "code": 6, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "SceneCount", - "code": 0, - "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": "CurrentScene", - "code": 1, - "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": "CurrentGroup", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "group_id", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SceneValid", - "code": 3, - "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": "NameSupport", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "bitmap8", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "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": "On/Off", - "code": 6, - "mfgCode": null, - "define": "ON_OFF_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "Off", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "On", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "Toggle", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "OffWithEffect", - "code": 64, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "OnWithRecallGlobalScene", - "code": 65, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "OnWithTimedOff", - "code": 66, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "On/Off", - "code": 6, - "mfgCode": null, - "define": "ON_OFF_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "OnOff", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "GlobalSceneControl", - "code": 16384, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x01", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "OnTime", - "code": 16385, - "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": "OffWaitTime", - "code": 16386, - "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": "StartUpOnOff", - "code": 16387, - "mfgCode": null, - "side": "server", - "type": "OnOffStartUpOnOff", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xFF", - "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": "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": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Level Control", - "code": 8, - "mfgCode": null, - "define": "LEVEL_CONTROL_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "MoveToLevel", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "Move", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "Step", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "Stop", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "MoveToLevelWithOnOff", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "MoveWithOnOff", - "code": 5, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "StepWithOnOff", - "code": 6, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "StopWithOnOff", - "code": 7, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "5", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Level Control", - "code": 8, - "mfgCode": null, - "define": "LEVEL_CONTROL_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "CurrentLevel", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x01", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RemainingTime", - "code": 1, - "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": "MinLevel", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x01", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "MaxLevel", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xFE", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "CurrentFrequency", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "MinFrequency", - "code": 5, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "MaxFrequency", - "code": 6, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Options", - "code": 15, - "mfgCode": null, - "side": "server", - "type": "LevelControlOptions", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "OnOffTransitionTime", - "code": 16, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "OnLevel", - "code": 17, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xFF", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "OnTransitionTime", - "code": 18, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "OffTransitionTime", - "code": 19, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "DefaultMoveRate", - "code": 20, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "50", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "StartUpCurrentLevel", - "code": 16384, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "255", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "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": "5", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Descriptor", - "code": 29, - "mfgCode": null, - "define": "DESCRIPTOR_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "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": "", - "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": "", - "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": "", - "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": "", - "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": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Basic Information", - "code": 40, - "mfgCode": null, - "define": "BASIC_INFORMATION_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Basic Information", - "code": 40, - "mfgCode": null, - "define": "BASIC_INFORMATION_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "DataModelRevision", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "10", - "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": "", - "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": "", - "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": "", - "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": "", - "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": "XX", - "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": "0", - "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": "", - "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": "0", - "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": "", - "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": "20210614123456ZZ", - "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": "", - "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": "", - "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": "", - "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": "", - "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": "", - "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": "", - "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": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Color Control", - "code": 768, - "mfgCode": null, - "define": "COLOR_CONTROL_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "MoveToHue", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "MoveHue", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "StepHue", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "MoveToSaturation", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "MoveSaturation", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "StepSaturation", - "code": 5, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "MoveToHueAndSaturation", - "code": 6, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "MoveToColor", - "code": 7, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "MoveColor", - "code": 8, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "StepColor", - "code": 9, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "MoveToColorTemperature", - "code": 10, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "EnhancedMoveToHue", - "code": 64, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "EnhancedMoveHue", - "code": 65, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "EnhancedStepHue", - "code": 66, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "EnhancedMoveToHueAndSaturation", - "code": 67, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "ColorLoopSet", - "code": 68, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "StopMoveStep", - "code": 71, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "MoveColorTemperature", - "code": 75, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "StepColorTemperature", - "code": 76, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "5", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Color Control", - "code": 768, - "mfgCode": null, - "define": "COLOR_CONTROL_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "CurrentHue", - "code": 0, - "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": "CurrentSaturation", - "code": 1, - "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": "RemainingTime", - "code": 2, - "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": "CurrentX", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x616B", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "CurrentY", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x607D", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "DriftCompensation", - "code": 5, - "mfgCode": null, - "side": "server", - "type": "enum8", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "CompensationText", - "code": 6, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ColorTemperatureMireds", - "code": 7, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00FA", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ColorMode", - "code": 8, - "mfgCode": null, - "side": "server", - "type": "enum8", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x01", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "Options", - "code": 15, - "mfgCode": null, - "side": "server", - "type": "bitmap8", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "NumberOfPrimaries", - "code": 16, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "Primary1X", - "code": 17, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Primary1Y", - "code": 18, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Primary1Intensity", - "code": 19, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Primary2X", - "code": 21, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Primary2Y", - "code": 22, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Primary2Intensity", - "code": 23, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Primary3X", - "code": 25, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Primary3Y", - "code": 26, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Primary3Intensity", - "code": 27, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Primary4X", - "code": 32, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Primary4Y", - "code": 33, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Primary4Intensity", - "code": 34, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Primary5X", - "code": 36, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Primary5Y", - "code": 37, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Primary5Intensity", - "code": 38, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Primary6X", - "code": 40, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Primary6Y", - "code": 41, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Primary6Intensity", - "code": 42, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "WhitePointX", - "code": 48, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "WhitePointY", - "code": 49, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ColorPointRX", - "code": 50, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ColorPointRY", - "code": 51, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ColorPointRIntensity", - "code": 52, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ColorPointGX", - "code": 54, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ColorPointGY", - "code": 55, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ColorPointGIntensity", - "code": 56, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ColorPointBX", - "code": 58, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ColorPointBY", - "code": 59, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ColorPointBIntensity", - "code": 60, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EnhancedCurrentHue", - "code": 16384, - "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": "EnhancedColorMode", - "code": 16385, - "mfgCode": null, - "side": "server", - "type": "enum8", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x01", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ColorLoopActive", - "code": 16386, - "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": "ColorLoopDirection", - "code": 16387, - "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": "ColorLoopTime", - "code": 16388, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0019", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ColorLoopStartEnhancedHue", - "code": 16389, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x2300", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ColorLoopStoredEnhancedHue", - "code": 16390, - "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": "ColorCapabilities", - "code": 16394, - "mfgCode": null, - "side": "server", - "type": "bitmap16", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x1F", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ColorTempPhysicalMinMireds", - "code": 16395, - "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": "ColorTempPhysicalMaxMireds", - "code": 16396, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xFEFF", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "CoupleColorTempToLevelMinMireds", - "code": 16397, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "StartUpColorTemperatureMireds", - "code": 16400, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "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": "0x1F", - "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": "Occupancy Sensing", - "code": 1030, - "mfgCode": null, - "define": "OCCUPANCY_SENSING_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Occupancy Sensing", - "code": 1030, - "mfgCode": null, - "define": "OCCUPANCY_SENSING_CLUSTER", - "side": "server", - "enabled": 0, - "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": "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": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - } - ] - } - ], - "endpoints": [ - { - "endpointTypeName": "MA-rootdevice", - "endpointTypeIndex": 0, - "profileId": 259, - "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 - }, - { - "endpointTypeName": "MA-dimmablelight", - "endpointTypeIndex": 1, - "profileId": 259, - "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 257 - } - ], - "log": [] -} \ No newline at end of file diff --git a/examples/lighting-app/silabs/SiWx917/include/AppConfig.h b/examples/lighting-app/silabs/SiWx917/include/AppConfig.h deleted file mode 100644 index 5352f6742a8e76..00000000000000 --- a/examples/lighting-app/silabs/SiWx917/include/AppConfig.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 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" - -// ---- Lighting Example App Config ---- - -#define APP_TASK_NAME "Lit" - -#define BLE_DEV_NAME "SiLabs-Light" - -// Time it takes in ms for the simulated actuator to move from one -// state to another. -#define ACTUATOR_MOVEMENT_PERIOS_MS 10 diff --git a/examples/lighting-app/silabs/SiWx917/include/AppEvent.h b/examples/lighting-app/silabs/SiWx917/include/AppEvent.h deleted file mode 100644 index 7a19b719edad25..00000000000000 --- a/examples/lighting-app/silabs/SiWx917/include/AppEvent.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2018 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 - -struct AppEvent; -typedef void (*EventHandler)(AppEvent *); - -struct AppEvent -{ - enum AppEventTypes - { - kEventType_Button = 0, - kEventType_Timer, - kEventType_Light, - kEventType_Install, - }; - - uint16_t Type; - - union - { - struct - { - uint8_t Action; - } ButtonEvent; - struct - { - void * Context; - } TimerEvent; - struct - { - uint8_t Action; - int32_t Actor; - } LightEvent; - }; - - EventHandler Handler; -}; diff --git a/examples/lighting-app/silabs/SiWx917/include/AppTask.h b/examples/lighting-app/silabs/SiWx917/include/AppTask.h deleted file mode 100644 index b77a033773b53b..00000000000000 --- a/examples/lighting-app/silabs/SiWx917/include/AppTask.h +++ /dev/null @@ -1,134 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 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 - -#include "AppEvent.h" -#include "BaseApplication.h" -#include "FreeRTOS.h" -#include "LightingManager.h" -#include "timers.h" // provides FreeRTOS timer support -#include -#include -#include -#include - -/********************************************************** - * Defines - *********************************************************/ -// Button specific defines for SiWx917 -#define SL_SIMPLE_BUTTON_PRESSED 1 -#define SIWx917_BTN0 0 -#define SIWx917_BTN1 1 - -// 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 Event handler when a button is pressed - * Function posts an event for button processing - * - * @param button - btn0 or btn1 - * @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); - - /** - * @brief Callback called by the identify-server when an identify command is received - * - * @param identify identify structure the command applies on - */ - static void OnIdentifyStart(Identify * identify); - - /** - * @brief Callback called by the identify-server when an identify command is stopped or finished - * - * @param identify identify structure the command applies on - */ - static void OnIdentifyStop(Identify * identify); - - void PostLightActionRequest(int32_t aActor, LightingManager::Action_t aAction); - -private: - static AppTask sAppTask; - - static void ActionInitiated(LightingManager::Action_t aAction, int32_t aActor); - static void ActionCompleted(LightingManager::Action_t aAction); - static void LightActionEventHandler(AppEvent * aEvent); - - static void UpdateClusterState(intptr_t context); - - /** - * @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); - - /** - * @brief PB1 Button event processing function - * Function triggers a switch action sent to the CHIP task - * - * @param aEvent button event being processed - */ - static void SwitchActionEventHandler(AppEvent * aEvent); -}; diff --git a/examples/lighting-app/silabs/SiWx917/include/CHIPProjectConfig.h b/examples/lighting-app/silabs/SiWx917/include/CHIPProjectConfig.h deleted file mode 100644 index 00df921596102a..00000000000000 --- a/examples/lighting-app/silabs/SiWx917/include/CHIPProjectConfig.h +++ /dev/null @@ -1,104 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 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 - * - * 0x8005: example lighting app - */ -#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x8005 - -/** - * CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE - * - * Enable support for Chip-over-BLE (CHIPoBLE). - */ -#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 1 - -/** - * 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) - -#define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1 diff --git a/examples/lighting-app/silabs/SiWx917/include/DeviceConfig.h b/examples/lighting-app/silabs/SiWx917/include/DeviceConfig.h deleted file mode 100644 index 350fbb4a904351..00000000000000 --- a/examples/lighting-app/silabs/SiWx917/include/DeviceConfig.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 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 - -#ifdef SIWX917_USE_COMISSIONABLE_DATA - -uint32_t discriminatorValue = 3840; -uint64_t passcode = 20202021; -uint32_t spake2Interation = 1000; -char spake2Salt[] = "U1BBS0UyUCBLZXkgU2FsdA=="; -char spake2Verifier[] = "uWFwqugDNGiEck/po7KHwwMwwqZgN10XuyBajPGuyzUEV/iree4lOrao5GuwnlQ65CJzbeUB49s31EH+NEkg0JVI5MGCQGMMT/" - "SRPFNRODm3wH/MBiehuFc6FJ/NH6Rmzw=="; -char genSpake2Path[] = ""; -uint32_t productId = 32773; -uint32_t vendorId = 65521; -char productName[] = "silabs_product"; -char vendorName[] = "silabs_vendor"; -char hwVersionString[] = "1.0"; -uint32_t rotatingId; -uint32_t commissionableFlow = 1; -uint8_t rendezvousFlag = 2; - -#endif \ No newline at end of file diff --git a/examples/lighting-app/silabs/SiWx917/include/LightingManager.h b/examples/lighting-app/silabs/SiWx917/include/LightingManager.h deleted file mode 100644 index 6d286faa30ef96..00000000000000 --- a/examples/lighting-app/silabs/SiWx917/include/LightingManager.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * - * Copyright (c) 2019 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 -#include - -#include "AppEvent.h" - -#include "FreeRTOS.h" -#include "timers.h" // provides FreeRTOS timer support -#include - -#include - -class LightingManager -{ -public: - enum Action_t - { - ON_ACTION = 0, - OFF_ACTION, - - INVALID_ACTION - } Action; - - enum State_t - { - kState_OffInitiated = 0, - kState_OffCompleted, - kState_OnInitiated, - kState_OnCompleted, - } State; - - CHIP_ERROR Init(); - bool IsLightOn(); - void EnableAutoTurnOff(bool aOn); - void SetAutoTurnOffDuration(uint32_t aDurationInSecs); - bool IsActionInProgress(); - bool InitiateAction(int32_t aActor, Action_t aAction); - - typedef void (*Callback_fn_initiated)(Action_t, int32_t aActor); - typedef void (*Callback_fn_completed)(Action_t); - void SetCallbacks(Callback_fn_initiated aActionInitiated_CB, Callback_fn_completed aActionCompleted_CB); - - static void OnTriggerOffWithEffect(OnOffEffect * effect); - -private: - friend LightingManager & LightMgr(void); - State_t mState; - - Callback_fn_initiated mActionInitiated_CB; - Callback_fn_completed mActionCompleted_CB; - - bool mAutoTurnOff; - uint32_t mAutoTurnOffDuration; - bool mAutoTurnOffTimerArmed; - bool mOffEffectArmed; - - void CancelTimer(void); - void StartTimer(uint32_t aTimeoutMs); - - static void TimerEventHandler(TimerHandle_t xTimer); - static void AutoTurnOffTimerEventHandler(AppEvent * aEvent); - static void ActuatorMovementTimerEventHandler(AppEvent * aEvent); - static void OffEffectTimerEventHandler(AppEvent * aEvent); - - static LightingManager sLight; -}; - -inline LightingManager & LightMgr(void) -{ - return LightingManager::sLight; -} diff --git a/examples/lighting-app/silabs/SiWx917/src/AppTask.cpp b/examples/lighting-app/silabs/SiWx917/src/AppTask.cpp deleted file mode 100644 index d57caba69674f0..00000000000000 --- a/examples/lighting-app/silabs/SiWx917/src/AppTask.cpp +++ /dev/null @@ -1,313 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 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. - */ - -#include "AppTask.h" -#include "AppConfig.h" -#include "AppEvent.h" - -#include -#include -#include -#include -#include - -#include - -#include -#include - -#include - -#include - -#include - -#include "LEDWidget.h" -#define APP_ACTION_LED 1 - -using namespace chip; -using namespace ::chip::DeviceLayer; -using namespace ::chip::DeviceLayer::Silabs; - -namespace { - -LEDWidget sLightLED; - -EmberAfIdentifyEffectIdentifier sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; - -/********************************************************** - * Identify Callbacks - *********************************************************/ - -namespace { -void OnTriggerIdentifyEffectCompleted(chip::System::Layer * systemLayer, void * appState) -{ - ChipLogProgress(Zcl, "Trigger Identify Complete"); - sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; - -#if CHIP_DEVICE_CONFIG_ENABLE_SED == 1 - AppTask::GetAppTask().StopStatusLEDTimer(); -#endif -} -} // namespace - -void OnTriggerIdentifyEffect(Identify * identify) -{ - sIdentifyEffect = identify->mCurrentEffectIdentifier; - - if (identify->mCurrentEffectIdentifier == EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE) - { - ChipLogProgress(Zcl, "IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE - Not supported, use effect varriant %d", - identify->mEffectVariant); - sIdentifyEffect = static_cast(identify->mEffectVariant); - } - -#if CHIP_DEVICE_CONFIG_ENABLE_SED == 1 - AppTask::GetAppTask().StartStatusLEDTimer(); -#endif - - switch (sIdentifyEffect) - { - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: - (void) chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(5), OnTriggerIdentifyEffectCompleted, - identify); - break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_FINISH_EFFECT: - (void) chip::DeviceLayer::SystemLayer().CancelTimer(OnTriggerIdentifyEffectCompleted, identify); - (void) chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(1), OnTriggerIdentifyEffectCompleted, - identify); - break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT: - (void) chip::DeviceLayer::SystemLayer().CancelTimer(OnTriggerIdentifyEffectCompleted, identify); - sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; - break; - default: - ChipLogProgress(Zcl, "No identifier effect"); - } -} - -Identify gIdentify = { - chip::EndpointId{ 1 }, - AppTask::GetAppTask().OnIdentifyStart, - AppTask::GetAppTask().OnIdentifyStop, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, - OnTriggerIdentifyEffect, -}; - -} // namespace - -using namespace chip::TLV; -using namespace ::chip::DeviceLayer; - -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 *) "Lighting-App"); -#endif - - err = BaseApplication::Init(&gIdentify); - if (err != CHIP_NO_ERROR) - { - SILABS_LOG("BaseApplication::Init() failed"); - appError(err); - } - - err = LightMgr().Init(); - if (err != CHIP_NO_ERROR) - { - SILABS_LOG("LightMgr::Init() failed"); - appError(err); - } - - LightMgr().SetCallbacks(ActionInitiated, ActionCompleted); - - sLightLED.Init(APP_ACTION_LED); - sLightLED.Set(LightMgr().IsLightOn()); - - return err; -} - -CHIP_ERROR AppTask::StartAppTask() -{ - return BaseApplication::StartAppTask(AppTaskMain); -} - -void AppTask::AppTaskMain(void * pvParameter) -{ - AppEvent event; - QueueHandle_t sAppEventQueue = *(static_cast(pvParameter)); - - CHIP_ERROR err = sAppTask.Init(); - if (err != CHIP_NO_ERROR) - { - SILABS_LOG("AppTask.Init() failed"); - appError(err); - } - -#if !(defined(CHIP_DEVICE_CONFIG_ENABLE_SED) && CHIP_DEVICE_CONFIG_ENABLE_SED) - sAppTask.StartStatusLEDTimer(); -#endif - - SILABS_LOG("App Task started"); - - while (true) - { - BaseType_t eventReceived = xQueueReceive(sAppEventQueue, &event, pdMS_TO_TICKS(10)); - while (eventReceived == pdTRUE) - { - sAppTask.DispatchEvent(&event); - eventReceived = xQueueReceive(sAppEventQueue, &event, 0); - } - } -} - -void AppTask::OnIdentifyStart(Identify * identify) -{ - ChipLogProgress(Zcl, "onIdentifyStart"); - -#if CHIP_DEVICE_CONFIG_ENABLE_SED == 1 - sAppTask.StartStatusLEDTimer(); -#endif -} - -void AppTask::OnIdentifyStop(Identify * identify) -{ - ChipLogProgress(Zcl, "onIdentifyStop"); - -#if CHIP_DEVICE_CONFIG_ENABLE_SED == 1 - sAppTask.StopStatusLEDTimer(); -#endif -} - -void AppTask::LightActionEventHandler(AppEvent * aEvent) -{ - bool initiated = false; - LightingManager::Action_t action; - int32_t actor; - CHIP_ERROR err = CHIP_NO_ERROR; - - if (aEvent->Type == AppEvent::kEventType_Light) - { - action = static_cast(aEvent->LightEvent.Action); - actor = aEvent->LightEvent.Actor; - } - else if (aEvent->Type == AppEvent::kEventType_Button) - { - action = (LightMgr().IsLightOn()) ? LightingManager::OFF_ACTION : LightingManager::ON_ACTION; - actor = AppEvent::kEventType_Button; - } - else - { - err = APP_ERROR_UNHANDLED_EVENT; - } - - if (err == CHIP_NO_ERROR) - { - initiated = LightMgr().InitiateAction(actor, action); - - if (!initiated) - { - SILABS_LOG("Action is already in progress or active."); - } - } -} - -void AppTask::ButtonEventHandler(uint8_t button, uint8_t btnAction) -{ - AppEvent button_event = {}; - button_event.Type = AppEvent::kEventType_Button; - button_event.ButtonEvent.Action = btnAction; - if (button == SIWx917_BTN1 && btnAction == static_cast(SilabsPlatform::ButtonAction::ButtonPressed)) - { - button_event.Handler = LightActionEventHandler; - sAppTask.PostEvent(&button_event); - } - else if (button == SIWx917_BTN0 && btnAction == static_cast(SilabsPlatform::ButtonAction::ButtonPressed)) - { - button_event.Handler = BaseApplication::ButtonHandler; - sAppTask.PostEvent(&button_event); - } -} - -void AppTask::ActionInitiated(LightingManager::Action_t aAction, int32_t aActor) -{ - // Action initiated, update the light led - bool lightOn = aAction == LightingManager::ON_ACTION; - SILABS_LOG("Turning light %s", (lightOn) ? "On" : "Off"); - sLightLED.Set(lightOn); - -#ifdef DISPLAY_ENABLED - sAppTask.GetLCD().WriteDemoUI(lightOn); -#endif - - if (aActor == AppEvent::kEventType_Button) - { - sAppTask.mSyncClusterToButtonAction = true; - } -} - -void AppTask::ActionCompleted(LightingManager::Action_t aAction) -{ - // action has been completed bon the light - if (aAction == LightingManager::ON_ACTION) - { - SILABS_LOG("Light ON") - } - else if (aAction == LightingManager::OFF_ACTION) - { - SILABS_LOG("Light OFF") - } - - if (sAppTask.mSyncClusterToButtonAction) - { - chip::DeviceLayer::PlatformMgr().ScheduleWork(UpdateClusterState, reinterpret_cast(nullptr)); - sAppTask.mSyncClusterToButtonAction = false; - } -} - -void AppTask::PostLightActionRequest(int32_t aActor, LightingManager::Action_t aAction) -{ - AppEvent event; - event.Type = AppEvent::kEventType_Light; - event.LightEvent.Actor = aActor; - event.LightEvent.Action = aAction; - event.Handler = LightActionEventHandler; - PostEvent(&event); -} - -void AppTask::UpdateClusterState(intptr_t context) -{ - uint8_t newValue = LightMgr().IsLightOn(); - - // write the new on/off value - EmberAfStatus status = OnOffServer::Instance().setOnOffValue(1, newValue, false); - - if (status != EMBER_ZCL_STATUS_SUCCESS) - { - SILABS_LOG("ERR: updating on/off %x", status); - } -} diff --git a/examples/lighting-app/silabs/SiWx917/src/LightingManager.cpp b/examples/lighting-app/silabs/SiWx917/src/LightingManager.cpp deleted file mode 100644 index 2c5807f4ea693e..00000000000000 --- a/examples/lighting-app/silabs/SiWx917/src/LightingManager.cpp +++ /dev/null @@ -1,322 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 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. - */ - -#include "LightingManager.h" - -#include "AppConfig.h" -#include "AppTask.h" -#include - -#include - -using namespace chip; -using namespace ::chip::app::Clusters::OnOff; -using namespace ::chip::DeviceLayer; - -LightingManager LightingManager::sLight; - -TimerHandle_t sLightTimer; - -namespace { - -/********************************************************** - * OffWithEffect Callbacks - *********************************************************/ - -OnOffEffect gEffect = { - chip::EndpointId{ 1 }, - LightMgr().OnTriggerOffWithEffect, - OnOffEffectIdentifier::kDelayedAllOff, - to_underlying(OnOffDelayedAllOffEffectVariant::kFadeToOffIn0p8Seconds), -}; - -} // namespace - -CHIP_ERROR LightingManager::Init() -{ - // Create FreeRTOS sw timer for light timer. - sLightTimer = xTimerCreate("lightTmr", // Just a text name, not used by the RTOS kernel - pdMS_TO_TICKS(1), // == default timer period - false, // no timer reload (==one-shot) - (void *) this, // init timer id = light obj context - TimerEventHandler // timer callback handler - ); - - if (sLightTimer == NULL) - { - SILABS_LOG("sLightTimer timer create failed"); - return APP_ERROR_CREATE_TIMER_FAILED; - } - - bool currentLedState; - // read current on/off value on endpoint one. - chip::DeviceLayer::PlatformMgr().LockChipStack(); - OnOffServer::Instance().getOnOffValue(1, ¤tLedState); - chip::DeviceLayer::PlatformMgr().UnlockChipStack(); - - mState = currentLedState ? kState_OnCompleted : kState_OffCompleted; - mAutoTurnOffTimerArmed = false; - mAutoTurnOff = false; - mAutoTurnOffDuration = 0; - mOffEffectArmed = false; - - return CHIP_NO_ERROR; -} - -void LightingManager::SetCallbacks(Callback_fn_initiated aActionInitiated_CB, Callback_fn_completed aActionCompleted_CB) -{ - mActionInitiated_CB = aActionInitiated_CB; - mActionCompleted_CB = aActionCompleted_CB; -} - -bool LightingManager::IsActionInProgress() -{ - return (mState == kState_OffInitiated || mState == kState_OnInitiated); -} - -bool LightingManager::IsLightOn() -{ - return (mState == kState_OnCompleted); -} - -void LightingManager::EnableAutoTurnOff(bool aOn) -{ - mAutoTurnOff = aOn; -} - -void LightingManager::SetAutoTurnOffDuration(uint32_t aDurationInSecs) -{ - mAutoTurnOffDuration = aDurationInSecs; -} - -bool LightingManager::InitiateAction(int32_t aActor, Action_t aAction) -{ - bool action_initiated = false; - State_t new_state; - - // Initiate Turn On/Off Action only when the previous one is complete. - if (((mState == kState_OffCompleted) || mOffEffectArmed) && aAction == ON_ACTION) - { - action_initiated = true; - - new_state = kState_OnInitiated; - } - else if (mState == kState_OnCompleted && aAction == OFF_ACTION && mOffEffectArmed == false) - { - action_initiated = true; - - new_state = kState_OffInitiated; - } - - if (action_initiated) - { - if (mAutoTurnOffTimerArmed && new_state == kState_OffInitiated) - { - // If auto turn off timer has been armed and someone initiates turning off, - // cancel the timer and continue as normal. - mAutoTurnOffTimerArmed = false; - - CancelTimer(); - } - - if (mOffEffectArmed && new_state == kState_OnInitiated) - { - CancelTimer(); - mOffEffectArmed = false; - } - - StartTimer(ACTUATOR_MOVEMENT_PERIOS_MS); - - // Since the timer started successfully, update the state and trigger callback - mState = new_state; - - if (mActionInitiated_CB) - { - mActionInitiated_CB(aAction, aActor); - } - } - - return action_initiated; -} - -void LightingManager::StartTimer(uint32_t aTimeoutMs) -{ - if (xTimerIsTimerActive(sLightTimer)) - { - SILABS_LOG("app timer already started!"); - CancelTimer(); - } - - // timer is not active, change its period to required value (== restart). - // FreeRTOS- Block for a maximum of 100 ms if the change period command - // cannot immediately be sent to the timer command queue. - if (xTimerChangePeriod(sLightTimer, pdMS_TO_TICKS(aTimeoutMs), pdMS_TO_TICKS(100)) != pdPASS) - { - SILABS_LOG("sLightTimer timer start() failed"); - appError(APP_ERROR_START_TIMER_FAILED); - } -} - -void LightingManager::CancelTimer(void) -{ - if (xTimerStop(sLightTimer, pdMS_TO_TICKS(0)) == pdFAIL) - { - SILABS_LOG("sLightTimer stop() failed"); - appError(APP_ERROR_STOP_TIMER_FAILED); - } -} - -void LightingManager::TimerEventHandler(TimerHandle_t xTimer) -{ - // Get light obj context from timer id. - LightingManager * light = static_cast(pvTimerGetTimerID(xTimer)); - - // The timer event handler will be called in the context of the timer task - // once sLightTimer expires. Post an event to apptask queue with the actual handler - // so that the event can be handled in the context of the apptask. - AppEvent event; - event.Type = AppEvent::kEventType_Timer; - event.TimerEvent.Context = light; - if (light->mAutoTurnOffTimerArmed) - { - event.Handler = AutoTurnOffTimerEventHandler; - } - else if (light->mOffEffectArmed) - { - event.Handler = OffEffectTimerEventHandler; - } - else - { - event.Handler = ActuatorMovementTimerEventHandler; - } - AppTask::GetAppTask().PostEvent(&event); -} - -void LightingManager::AutoTurnOffTimerEventHandler(AppEvent * aEvent) -{ - LightingManager * light = static_cast(aEvent->TimerEvent.Context); - int32_t actor = AppEvent::kEventType_Timer; - - // Make sure auto turn off timer is still armed. - if (!light->mAutoTurnOffTimerArmed) - { - return; - } - - light->mAutoTurnOffTimerArmed = false; - - SILABS_LOG("Auto Turn Off has been triggered!"); - - light->InitiateAction(actor, OFF_ACTION); -} - -void LightingManager::OffEffectTimerEventHandler(AppEvent * aEvent) -{ - LightingManager * light = static_cast(aEvent->TimerEvent.Context); - int32_t actor = AppEvent::kEventType_Timer; - - // Make sure auto turn off timer is still armed. - if (!light->mOffEffectArmed) - { - return; - } - - light->mOffEffectArmed = false; - - SILABS_LOG("OffEffect completed"); - - light->InitiateAction(actor, OFF_ACTION); -} - -void LightingManager::ActuatorMovementTimerEventHandler(AppEvent * aEvent) -{ - Action_t actionCompleted = INVALID_ACTION; - - LightingManager * light = static_cast(aEvent->TimerEvent.Context); - - if (light->mState == kState_OffInitiated) - { - light->mState = kState_OffCompleted; - actionCompleted = OFF_ACTION; - } - else if (light->mState == kState_OnInitiated) - { - light->mState = kState_OnCompleted; - actionCompleted = ON_ACTION; - } - - if (actionCompleted != INVALID_ACTION) - { - if (light->mActionCompleted_CB) - { - light->mActionCompleted_CB(actionCompleted); - } - - if (light->mAutoTurnOff && actionCompleted == ON_ACTION) - { - // Start the timer for auto turn off - light->StartTimer(light->mAutoTurnOffDuration * 1000); - - light->mAutoTurnOffTimerArmed = true; - - SILABS_LOG("Auto Turn off enabled. Will be triggered in %u seconds", light->mAutoTurnOffDuration); - } - } -} - -void LightingManager::OnTriggerOffWithEffect(OnOffEffect * effect) -{ - auto effectId = effect->mEffectIdentifier; - auto effectVariant = effect->mEffectVariant; - uint32_t offEffectDuration = 0; - - // Temporary print outs and delay to test OffEffect behaviour - // Until dimming is supported for dev boards. - if (effectId == OnOffEffectIdentifier::kDelayedAllOff) - { - auto typedEffectVariant = static_cast(effectVariant); - if (typedEffectVariant == OnOffDelayedAllOffEffectVariant::kFadeToOffIn0p8Seconds) - { - offEffectDuration = 800; - ChipLogProgress(Zcl, "OnOffDelayedAllOffEffectVariant::kFadeToOffIn0p8Seconds"); - } - else if (typedEffectVariant == OnOffDelayedAllOffEffectVariant::kNoFade) - { - offEffectDuration = 800; - ChipLogProgress(Zcl, "OnOffDelayedAllOffEffectVariant::kNoFade"); - } - else if (typedEffectVariant == OnOffDelayedAllOffEffectVariant::k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds) - { - offEffectDuration = 12800; - ChipLogProgress(Zcl, "OnOffDelayedAllOffEffectVariant::k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds"); - } - } - else if (effectId == OnOffEffectIdentifier::kDyingLight) - { - auto typedEffectVariant = static_cast(effectVariant); - if (typedEffectVariant == OnOffDyingLightEffectVariant::k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second) - { - offEffectDuration = 1500; - ChipLogProgress(Zcl, "OnOffDyingLightEffectVariant::k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second"); - } - } - - LightMgr().mOffEffectArmed = true; - LightMgr().StartTimer(offEffectDuration); -} diff --git a/examples/lighting-app/silabs/SiWx917/src/ZclCallbacks.cpp b/examples/lighting-app/silabs/SiWx917/src/ZclCallbacks.cpp deleted file mode 100644 index cfbcbc8a191411..00000000000000 --- a/examples/lighting-app/silabs/SiWx917/src/ZclCallbacks.cpp +++ /dev/null @@ -1,91 +0,0 @@ -/* - * - * 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. - */ - -/** - * @file - * This file implements the handler for data model messages. - */ - -#include "AppConfig.h" -#include "LightingManager.h" - -#include -#include -#include -#include - -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; - AttributeId attributeId = attributePath.mAttributeId; - ChipLogProgress(Zcl, "Cluster callback: " ChipLogFormatMEI, ChipLogValueMEI(clusterId)); - - if (clusterId == OnOff::Id && attributeId == OnOff::Attributes::OnOff::Id) - { - LightMgr().InitiateAction(AppEvent::kEventType_Light, *value ? LightingManager::ON_ACTION : LightingManager::OFF_ACTION); - } - else if (clusterId == LevelControl::Id) - { - ChipLogProgress(Zcl, "Level Control attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", - ChipLogValueMEI(attributeId), type, *value, size); - - // WIP Apply attribute change to Light - } - else if (clusterId == ColorControl::Id) - { - ChipLogProgress(Zcl, "Color Control attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", - ChipLogValueMEI(attributeId), type, *value, size); - - // WIP Apply attribute change to Light - } - else if (clusterId == OnOffSwitchConfiguration::Id) - { - ChipLogProgress(Zcl, "OnOff Switch Configuration attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", - ChipLogValueMEI(attributeId), type, *value, size); - - // WIP Apply attribute change to Light - } - else if (clusterId == Identify::Id) - { - ChipLogProgress(Zcl, "Identify attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", - ChipLogValueMEI(attributeId), type, *value, size); - } -} - -/** @brief OnOff Cluster Init - * - * This function is called when a specific cluster is initialized. It gives the - * application an opportunity to take care of cluster initialization procedures. - * It is called exactly once for each endpoint where cluster is present. - * - * @param endpoint Ver.: always - * - * TODO Issue #3841 - * emberAfOnOffClusterInitCallback happens before the stack initialize the cluster - * attributes to the default value. - * The logic here expects something similar to the deprecated Plugins callback - * emberAfPluginOnOffClusterServerPostInitCallback. - * - */ -void emberAfOnOffClusterInitCallback(EndpointId endpoint) -{ - // TODO: implement any additional Cluster Server init actions -} diff --git a/examples/lighting-app/silabs/SiWx917/third_party/connectedhomeip b/examples/lighting-app/silabs/SiWx917/third_party/connectedhomeip deleted file mode 120000 index 59307833b4fee9..00000000000000 --- a/examples/lighting-app/silabs/SiWx917/third_party/connectedhomeip +++ /dev/null @@ -1 +0,0 @@ -../../../../.. \ No newline at end of file diff --git a/examples/lock-app/silabs/SiWx917/.gn b/examples/lock-app/silabs/SiWx917/.gn deleted file mode 100644 index 0adefc6ff99c6a..00000000000000 --- a/examples/lock-app/silabs/SiWx917/.gn +++ /dev/null @@ -1,27 +0,0 @@ -# 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" - import("//args.gni") -} diff --git a/examples/lock-app/silabs/SiWx917/BUILD.gn b/examples/lock-app/silabs/SiWx917/BUILD.gn deleted file mode 100644 index 8c531d0ee62608..00000000000000 --- a/examples/lock-app/silabs/SiWx917/BUILD.gn +++ /dev/null @@ -1,160 +0,0 @@ -# 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}/SiWx917_sdk.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") - -if (chip_enable_pw_rpc) { - import("//build_overrides/pigweed.gni") - import("$dir_pw_build/target_types.gni") -} - -assert(current_os == "freertos") - -efr32_project_dir = "${chip_root}/examples/lock-app/silabs/SiWx917" -examples_plat_dir = "${chip_root}/examples/platform/silabs/SiWx917" -examples_common_plat_dir = "${chip_root}/examples/platform/silabs" -import("${examples_plat_dir}/args.gni") - -declare_args() { - # Dump memory usage at link time. - chip_print_memory_usage = false -} - -siwx917_sdk("sdk") { - sources = [ - "${efr32_project_dir}/include/CHIPProjectConfig.h", - "${examples_plat_dir}/FreeRTOSConfig.h", - ] - - include_dirs = [ - "${chip_root}/src/platform/silabs/SiWx917", - "${efr32_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", - ] - } -} - -silabs_executable("lock_app") { - output_name = "chip-siwx917-lock-example.out" - include_dirs = [ "include" ] - defines = [] - - sources = [ - "${examples_common_plat_dir}/main.cpp", - "src/AppTask.cpp", - "src/LockManager.cpp", - "src/ZclCallbacks.cpp", - ] - - if (chip_build_libshell) { - sources += [ "src/EventHandlerLibShell.cpp" ] - } - - deps = [ - ":sdk", - "${examples_plat_dir}:siwx917-common", - app_data_model, - ] - - 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_LOCKING_SERVICE=1", - "PW_RPC_OTCLI_SERVICE=1", - "PW_RPC_THREAD_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: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:locking_service.nanopb_rpc", - "${chip_root}/examples/common/pigweed:ot_cli_service.nanopb_rpc", - "${chip_root}/examples/common/pigweed:thread_service.nanopb_rpc", - "${examples_plat_dir}/pw_sys_io:pw_sys_io_siwx917", - ] - - deps += pw_build_LINK_DEPS - - include_dirs += [ - "${chip_root}/examples/common", - "${chip_root}/examples/common/pigweed/efr32", - ] - } - - ldscript = "${examples_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("siwx917") { - deps = [ ":lock_app" ] -} - -group("default") { - deps = [ ":siwx917" ] -} diff --git a/examples/lock-app/silabs/SiWx917/README.md b/examples/lock-app/silabs/SiWx917/README.md deleted file mode 100644 index 9f4c9f6a42005f..00000000000000 --- a/examples/lock-app/silabs/SiWx917/README.md +++ /dev/null @@ -1,223 +0,0 @@ -# Matter SiWx917 Lock Example - -An example showing the use of CHIP on the Silicon Labs SiWx917 SoC device. - -
- -- [Matter SiWx917 Lock Example](#matter-siwx917-lock-example) - - [Introduction](#introduction) - - [Building](#building) - - [Flashing the Application](#flashing-the-application) - - [Viewing Logging Output](#viewing-logging-output) - - [Running the Complete Example](#running-the-complete-example) - - [Notes](#notes) - - [Memory settings](#memory-settings) - - [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 SiWx917 Lock example provides a baseline demonstration of a door lock -control device, built using Matter, the Silicon Labs Gecko SDK, and the Silicon -Labs WiseMCU SDK. It can be controlled by a Chip controller over a Wi-Fi -network. - -The SiWx917 device can be commissioned over Bluetooth Low Energy where the -device and the Chip controller will exchange security information with the -Rendez-vous procedure. Wi-Fi Network SSID and passcode are then provided to the -SiWx917 device which will then join the Wi-Fi 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 -rendezvous procedure. - -The lock 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: - [GNU Arm Embedded Toolchain 9-2019-q4-major](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/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 - -* Build the example application: - - ``` - cd ~/connectedhomeip - ./scripts/examples/gn_efr32_example.sh ./examples/lock-app/silabs/SiWx917/ ./out/lock_app BRD4325B - ``` - -- To delete generated executable, libraries and object files use: - - ``` - $ cd ~/connectedhomeip - $ rm -rf ./out/ - ``` - - - -## Flashing the Application - -- Flashing requires the SiWx917 SoC device to be configured in the Ozone - Debugger. -- Once it's configured, it can be run with the Ozone Debugger by loading the - .out file. - - > For detailed instructions, please refer to - > [Running the Matter Demo on SiWx917 SoC](https://github.com/SiliconLabs/matter/blob/latest/docs/silabs/wifi/RUN_DEMO_SiWx917_SoC.md) - > in the Silicon Labs Matter Github Repo - -## Viewing Logging Output - -The example application's logging output can be viewed in the Ozone Debugger. - -## Running the Complete Example - -- You can provision and control the Chip device using the chip-tool standalone - - [chip-tool](https://github.com/project-chip/connectedhomeip/blob/master/examples/chip-tool/README.md) - -Here are some chip-tool examples: - - Pairing with chip-tool: - ``` - chip-tool pairing ble-wifi 1122 $SSID $PSK 20202021 3840 - ``` - - > $SSID and $PSK are the SSID and passcode of your Wi-Fi Access Point. - - Set a user: - ``` - ./out/chip-tool doorlock set-user OperationType UserIndex UserName UserUniqueId UserStatus UserType CredentialRule node-id/group-id - ./out/chip-tool doorlock set-user 0 1 "mike" 5 1 0 0 1 1 --timedInteractionTimeoutMs 1000 - ``` - - Set a credential: - ``` - ./out/chip-tool doorlock set-credential OperationType Credential CredentialData UserIndex UserStatus UserType node-id/group-id - ./out/chip-tool doorlock set-credential 0 '{ "credentialType": 1, "credentialIndex": 1 }' "123456" 1 null null 1 1 --timedInteractionTimeoutMs 1000 - ``` - - Changing a credential: - ``` - ./out/chip-tool doorlock set-credential OperationType Credential CredentialData UserIndex UserStatus UserType node-id/group-id - ./out/chip-tool doorlock set-credential 2 '{ "credentialType": 1, "credentialIndex": 1 }' "123457" 1 null null 1 1 --timedInteractionTimeoutMs 1000 - ``` - - Get a user: - ``` - ./out/chip-tool doorlock get-user UserIndex node-id/group-id - ./out/chip-tool doorlock get-user 1 1 1 - ``` - - Unlock door: - ``` - ./out/chip-tool doorlock unlock-door node-id/group-id - ./out/chip-tool doorlock unlock-door 1 1 - ``` - - Lock door: - ``` - ./out/chip-tool doorlock lock-door node-id/group-id - ./out/chip-tool doorlock lock-door 1 1 - ``` - -### Notes - -- Depending on your network settings your router might not provide native IPv6 - addresses to your devices (Router / PC). If this is the case, you need to - add a static IPv6 addresses on both devices and then an IPv6 route to the - router on your PC - -#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 - -## 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 -Wi-Fi stack. 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 -an Mbedtls failure during the BLE rendezvous 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/silabs/SiWx917/MemMonitoring.cpp` to add your own -memory tracking code inside the `trackAlloc` and `trackFree` function - -## 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_efr32_example.sh ./examples/lock-app/silabs/SiWx917 ./out/lock-app BRD4325B "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false" - ``` - -### Debug build / release build - -`is_debug` - - ``` - $ ./scripts/examples/gn_efr32_example.sh ./examples/lock-app/silabs/SiWx917 ./out/lock-app BRD4325B "is_debug=false" - ``` - -### Disabling LCD - -`show_qr_code` - - ``` - $ ./scripts/examples/gn_efr32_example.sh ./examples/lock-app/silabs/SiWx917 ./out/lock-app BRD4325B "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_efr32_example.sh ./examples/lock-app/silabs/SiWx917 ./out/lock-app BRD4325B kvs_max_entries=50 - ``` diff --git a/examples/lock-app/silabs/SiWx917/args.gni b/examples/lock-app/silabs/SiWx917/args.gni deleted file mode 100644 index e4bfe4d5dc7811..00000000000000 --- a/examples/lock-app/silabs/SiWx917/args.gni +++ /dev/null @@ -1,22 +0,0 @@ -# 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/args.gni") - -silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") - -app_data_model = "${chip_root}/examples/lock-app/lock-common" -chip_enable_ota_requestor = true diff --git a/examples/lock-app/silabs/SiWx917/build_overrides b/examples/lock-app/silabs/SiWx917/build_overrides deleted file mode 120000 index 995884e6163eb5..00000000000000 --- a/examples/lock-app/silabs/SiWx917/build_overrides +++ /dev/null @@ -1 +0,0 @@ -../../../build_overrides \ No newline at end of file diff --git a/examples/lock-app/silabs/SiWx917/include/AppConfig.h b/examples/lock-app/silabs/SiWx917/include/AppConfig.h deleted file mode 100644 index 62cff5df0aa336..00000000000000 --- a/examples/lock-app/silabs/SiWx917/include/AppConfig.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 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" - -// ---- Door lock Example App Config ---- - -#define APP_TASK_NAME "Lock" - -#define BLE_DEV_NAME "SiLabs-Door-Lock" - -// Time it takes in ms for the simulated actuator to move from one -// state to another. -#define ACTUATOR_MOVEMENT_PERIOS_MS 10 diff --git a/examples/lock-app/silabs/SiWx917/include/AppEvent.h b/examples/lock-app/silabs/SiWx917/include/AppEvent.h deleted file mode 100644 index 7724687d3ef96c..00000000000000 --- a/examples/lock-app/silabs/SiWx917/include/AppEvent.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2018 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 - -struct AppEvent; -typedef void (*EventHandler)(AppEvent *); - -struct AppEvent -{ - enum AppEventTypes - { - kEventType_Button = 0, - kEventType_Timer, - kEventType_Lock, - kEventType_Install, - }; - - uint16_t Type; - - union - { - struct - { - uint8_t Action; - } ButtonEvent; - struct - { - void * Context; - } TimerEvent; - struct - { - uint8_t Action; - int32_t Actor; - } LockEvent; - }; - - EventHandler Handler; -}; diff --git a/examples/lock-app/silabs/SiWx917/include/AppTask.h b/examples/lock-app/silabs/SiWx917/include/AppTask.h deleted file mode 100644 index 9ad4a2cd134773..00000000000000 --- a/examples/lock-app/silabs/SiWx917/include/AppTask.h +++ /dev/null @@ -1,148 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 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 - -#include "AppEvent.h" -#include "BaseApplication.h" -#include "FreeRTOS.h" -#include "LockManager.h" -#include "timers.h" // provides FreeRTOS timer support -#include -#include -#include -#include - -/********************************************************** - * Defines - *********************************************************/ -// Button specific defines for SiWx917 -#define SL_SIMPLE_BUTTON_PRESSED 1 -#define SIWx917_BTN0 0 -#define SIWx917_BTN1 1 - -// 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) -#define APP_ERROR_ALLOCATION_FAILED CHIP_APPLICATION_ERROR(0x07) -#if defined(ENABLE_CHIP_SHELL) -#define APP_ERROR_TOO_MANY_SHELL_ARGUMENTS CHIP_APPLICATION_ERROR(0x08) -#endif // ENABLE_CHIP_SHELL - -/********************************************************** - * 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(); - - void ActionRequest(int32_t aActor, LockManager::Action_t aAction); - static void ActionInitiated(LockManager::Action_t aAction, int32_t aActor); - static void ActionCompleted(LockManager::Action_t aAction); - - /** - * @brief Event handler when a button is pressed - * Function posts an event for button processing - * - * @param buttonHandle APP_LIGHT_SWITCH or APP_FUNCTION_BUTTON - * @param btnAction button action - SL_SIMPLE_BUTTON_PRESSED, - * SL_SIMPLE_BUTTON_RELEASED or SL_SIMPLE_BUTTON_DISABLED - */ - void ButtonEventHandler(uint8_t button, uint8_t btnAction); - - /** - * @brief Callback called by the identify-server when an identify command is received - * - * @param identify identify structure the command applies on - */ - static void OnIdentifyStart(Identify * identify); - - /** - * @brief Callback called by the identify-server when an identify command is stopped or finished - * - * @param identify identify structure the command applies on - */ - static void OnIdentifyStop(Identify * identify); - -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); - - /** - * @brief PB1 Button event processing function - * Function triggers a switch action sent to the CHIP task - * - * @param aEvent button event being processed - */ - static void SwitchActionEventHandler(AppEvent * aEvent); - - /** - * @brief Update Cluster State - * - * @param context current context - */ - static void UpdateClusterState(intptr_t context); - - /** - * @brief Handle lock update event - * - * @param aEvent event received - */ - static void LockActionEventHandler(AppEvent * aEvent); -}; diff --git a/examples/lock-app/silabs/SiWx917/include/CHIPProjectConfig.h b/examples/lock-app/silabs/SiWx917/include/CHIPProjectConfig.h deleted file mode 100644 index 1cfb6e7b0ac82c..00000000000000 --- a/examples/lock-app/silabs/SiWx917/include/CHIPProjectConfig.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 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 -#define CHIP_CONFIG_REQUIRE_AUTH 1 - -/** - * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID - * - * 0xFFF1: Test vendor - */ -#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 0xFFF1 - -/** - * CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID - * - * 0x8006: example lock app - */ -#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x8006 - -/** - * CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE - * - * Enable support for Chip-over-BLE (CHIPoBLE). - */ -#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 1 - -/** - * 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/lock-app/silabs/SiWx917/include/DeviceConfig.h b/examples/lock-app/silabs/SiWx917/include/DeviceConfig.h deleted file mode 100644 index 350fbb4a904351..00000000000000 --- a/examples/lock-app/silabs/SiWx917/include/DeviceConfig.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 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 - -#ifdef SIWX917_USE_COMISSIONABLE_DATA - -uint32_t discriminatorValue = 3840; -uint64_t passcode = 20202021; -uint32_t spake2Interation = 1000; -char spake2Salt[] = "U1BBS0UyUCBLZXkgU2FsdA=="; -char spake2Verifier[] = "uWFwqugDNGiEck/po7KHwwMwwqZgN10XuyBajPGuyzUEV/iree4lOrao5GuwnlQ65CJzbeUB49s31EH+NEkg0JVI5MGCQGMMT/" - "SRPFNRODm3wH/MBiehuFc6FJ/NH6Rmzw=="; -char genSpake2Path[] = ""; -uint32_t productId = 32773; -uint32_t vendorId = 65521; -char productName[] = "silabs_product"; -char vendorName[] = "silabs_vendor"; -char hwVersionString[] = "1.0"; -uint32_t rotatingId; -uint32_t commissionableFlow = 1; -uint8_t rendezvousFlag = 2; - -#endif \ No newline at end of file diff --git a/examples/lock-app/silabs/SiWx917/include/EventHandlerLibShell.h b/examples/lock-app/silabs/SiWx917/include/EventHandlerLibShell.h deleted file mode 100644 index e915e472750da4..00000000000000 --- a/examples/lock-app/silabs/SiWx917/include/EventHandlerLibShell.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * - * 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. - */ -#pragma once - -#include - -class EventData -{ -public: - chip::EventId eventId; -}; - -class AlarmEventData : public EventData -{ -public: - AlarmCodeEnum alarmCode; -}; - -class DoorStateEventData : public EventData -{ -public: - DoorStateEnum doorState; -}; - -CHIP_ERROR RegisterLockEvents(); -void EventWorkerFunction(intptr_t context); diff --git a/examples/lock-app/silabs/SiWx917/include/LockManager.h b/examples/lock-app/silabs/SiWx917/include/LockManager.h deleted file mode 100644 index c149ffdd34b727..00000000000000 --- a/examples/lock-app/silabs/SiWx917/include/LockManager.h +++ /dev/null @@ -1,222 +0,0 @@ -/* - * - * Copyright (c) 2019 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 - -#include -#include - -#include "AppEvent.h" - -#include "FreeRTOS.h" -#include "timers.h" // provides FreeRTOS timer support - -#include - -struct WeekDaysScheduleInfo -{ - DlScheduleStatus status; - EmberAfPluginDoorLockWeekDaySchedule schedule; -}; - -struct YearDayScheduleInfo -{ - DlScheduleStatus status; - EmberAfPluginDoorLockYearDaySchedule schedule; -}; - -struct HolidayScheduleInfo -{ - DlScheduleStatus status; - EmberAfPluginDoorLockHolidaySchedule schedule; -}; - -namespace SI917DoorLock { -namespace ResourceRanges { -// Used to size arrays -static constexpr uint16_t kMaxUsers = 10; -static constexpr uint8_t kMaxCredentialsPerUser = 10; -static constexpr uint8_t kMaxWeekdaySchedulesPerUser = 10; -static constexpr uint8_t kMaxYeardaySchedulesPerUser = 10; -static constexpr uint8_t kMaxHolidaySchedules = 10; -static constexpr uint8_t kMaxCredentialSize = 20; -static constexpr uint8_t kNumCredentialTypes = 6; - -static constexpr uint8_t kMaxCredentials = kMaxUsers * kMaxCredentialsPerUser; - -} // namespace ResourceRanges - -namespace LockInitParams { - -struct LockParam -{ - // Read from zap attributes - uint16_t numberOfUsers = 0; - uint8_t numberOfCredentialsPerUser = 0; - uint8_t numberOfWeekdaySchedulesPerUser = 0; - uint8_t numberOfYeardaySchedulesPerUser = 0; - uint8_t numberOfHolidaySchedules = 0; -}; - -class ParamBuilder -{ -public: - ParamBuilder & SetNumberOfUsers(uint16_t numberOfUsers) - { - lockParam_.numberOfUsers = numberOfUsers; - return *this; - } - ParamBuilder & SetNumberOfCredentialsPerUser(uint8_t numberOfCredentialsPerUser) - { - lockParam_.numberOfCredentialsPerUser = numberOfCredentialsPerUser; - return *this; - } - ParamBuilder & SetNumberOfWeekdaySchedulesPerUser(uint8_t numberOfWeekdaySchedulesPerUser) - { - lockParam_.numberOfWeekdaySchedulesPerUser = numberOfWeekdaySchedulesPerUser; - return *this; - } - ParamBuilder & SetNumberOfYeardaySchedulesPerUser(uint8_t numberOfYeardaySchedulesPerUser) - { - lockParam_.numberOfYeardaySchedulesPerUser = numberOfYeardaySchedulesPerUser; - return *this; - } - ParamBuilder & SetNumberOfHolidaySchedules(uint8_t numberOfHolidaySchedules) - { - lockParam_.numberOfHolidaySchedules = numberOfHolidaySchedules; - return *this; - } - LockParam GetLockParam() { return lockParam_; } - -private: - LockParam lockParam_; -}; - -} // namespace LockInitParams -} // namespace SI917DoorLock - -using namespace ::chip; -using namespace SI917DoorLock::ResourceRanges; - -class LockManager -{ -public: - enum Action_t - { - LOCK_ACTION = 0, - UNLOCK_ACTION, - - INVALID_ACTION - } Action; - - enum State_t - { - kState_LockInitiated = 0, - kState_LockCompleted, - kState_UnlockInitiated, - kState_UnlockCompleted, - } State; - - CHIP_ERROR Init(chip::app::DataModel::Nullable state, - SI917DoorLock::LockInitParams::LockParam lockParam); - bool NextState(); - bool IsActionInProgress(); - bool InitiateAction(int32_t aActor, Action_t aAction); - - typedef void (*Callback_fn_initiated)(Action_t, int32_t aActor); - typedef void (*Callback_fn_completed)(Action_t); - void SetCallbacks(Callback_fn_initiated aActionInitiated_CB, Callback_fn_completed aActionCompleted_CB); - - bool Lock(chip::EndpointId endpointId, const Optional & pin, OperationErrorEnum & err); - bool Unlock(chip::EndpointId endpointId, const Optional & pin, OperationErrorEnum & err); - - bool GetUser(chip::EndpointId endpointId, uint16_t userIndex, EmberAfPluginDoorLockUserInfo & user); - bool SetUser(chip::EndpointId endpointId, uint16_t userIndex, chip::FabricIndex creator, chip::FabricIndex modifier, - const chip::CharSpan & userName, uint32_t uniqueId, UserStatusEnum userStatus, UserTypeEnum usertype, - CredentialRuleEnum credentialRule, const CredentialStruct * credentials, size_t totalCredentials); - - bool GetCredential(chip::EndpointId endpointId, uint16_t credentialIndex, CredentialTypeEnum credentialType, - EmberAfPluginDoorLockCredentialInfo & credential); - - bool SetCredential(chip::EndpointId endpointId, uint16_t credentialIndex, chip::FabricIndex creator, chip::FabricIndex modifier, - DlCredentialStatus credentialStatus, CredentialTypeEnum credentialType, - const chip::ByteSpan & credentialData); - - DlStatus GetWeekdaySchedule(chip::EndpointId endpointId, uint8_t weekdayIndex, uint16_t userIndex, - EmberAfPluginDoorLockWeekDaySchedule & schedule); - - DlStatus SetWeekdaySchedule(chip::EndpointId endpointId, uint8_t weekdayIndex, uint16_t userIndex, DlScheduleStatus status, - DaysMaskMap daysMask, uint8_t startHour, uint8_t startMinute, uint8_t endHour, uint8_t endMinute); - - DlStatus GetYeardaySchedule(chip::EndpointId endpointId, uint8_t yearDayIndex, uint16_t userIndex, - EmberAfPluginDoorLockYearDaySchedule & schedule); - - DlStatus SetYeardaySchedule(chip::EndpointId endpointId, uint8_t yearDayIndex, uint16_t userIndex, DlScheduleStatus status, - uint32_t localStartTime, uint32_t localEndTime); - - DlStatus GetHolidaySchedule(chip::EndpointId endpointId, uint8_t holidayIndex, EmberAfPluginDoorLockHolidaySchedule & schedule); - - DlStatus SetHolidaySchedule(chip::EndpointId endpointId, uint8_t holidayIndex, DlScheduleStatus status, uint32_t localStartTime, - uint32_t localEndTime, OperatingModeEnum operatingMode); - - bool IsValidUserIndex(uint16_t userIndex); - bool IsValidCredentialIndex(uint16_t credentialIndex, CredentialTypeEnum type); - bool IsValidCredentialType(CredentialTypeEnum type); - bool IsValidWeekdayScheduleIndex(uint8_t scheduleIndex); - bool IsValidYeardayScheduleIndex(uint8_t scheduleIndex); - bool IsValidHolidayScheduleIndex(uint8_t scheduleIndex); - - bool setLockState(chip::EndpointId endpointId, DlLockState lockState, const Optional & pin, - OperationErrorEnum & err); - const char * lockStateToString(DlLockState lockState) const; - - bool ReadConfigValues(); - -private: - friend LockManager & LockMgr(); - State_t mState; - - Callback_fn_initiated mActionInitiated_CB; - Callback_fn_completed mActionCompleted_CB; - - void CancelTimer(void); - void StartTimer(uint32_t aTimeoutMs); - - static void TimerEventHandler(TimerHandle_t xTimer); - static void AutoLockTimerEventHandler(AppEvent * aEvent); - static void ActuatorMovementTimerEventHandler(AppEvent * aEvent); - - EmberAfPluginDoorLockUserInfo mLockUsers[kMaxUsers]; - EmberAfPluginDoorLockCredentialInfo mLockCredentials[kNumCredentialTypes][kMaxCredentials]; - WeekDaysScheduleInfo mWeekdaySchedule[kMaxUsers][kMaxWeekdaySchedulesPerUser]; - YearDayScheduleInfo mYeardaySchedule[kMaxUsers][kMaxYeardaySchedulesPerUser]; - HolidayScheduleInfo mHolidaySchedule[kMaxHolidaySchedules]; - - char mUserNames[ArraySize(mLockUsers)][DOOR_LOCK_MAX_USER_NAME_SIZE]; - uint8_t mCredentialData[kNumCredentialTypes][kMaxCredentials][kMaxCredentialSize]; - CredentialStruct mCredentials[kMaxUsers][kMaxCredentials]; - - static LockManager sLock; - SI917DoorLock::LockInitParams::LockParam LockParams; -}; - -inline LockManager & LockMgr() -{ - return LockManager::sLock; -} diff --git a/examples/lock-app/silabs/SiWx917/src/AppTask.cpp b/examples/lock-app/silabs/SiWx917/src/AppTask.cpp deleted file mode 100644 index 006d81ef66d0b0..00000000000000 --- a/examples/lock-app/silabs/SiWx917/src/AppTask.cpp +++ /dev/null @@ -1,429 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 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. - */ - -#include "AppTask.h" -#include "AppConfig.h" -#include "AppEvent.h" -#if defined(ENABLE_CHIP_SHELL) -#include "EventHandlerLibShell.h" -#endif // ENABLE_CHIP_SHELL - -#include "LEDWidget.h" - -#ifdef DISPLAY_ENABLED -#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 - -#define LOCK_STATE_LED 1 - -using chip::app::Clusters::DoorLock::DlLockState; -using chip::app::Clusters::DoorLock::OperationErrorEnum; -using chip::app::Clusters::DoorLock::OperationSourceEnum; - -using namespace chip; -using namespace ::chip::DeviceLayer; -using namespace ::chip::DeviceLayer::Silabs; -using namespace ::chip::DeviceLayer::Internal; -using namespace SI917DoorLock::LockInitParams; - -namespace { -LEDWidget sLockLED; - -EmberAfIdentifyEffectIdentifier sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; -} // namespace -/********************************************************** - * Identify Callbacks - *********************************************************/ - -namespace { -void OnTriggerIdentifyEffectCompleted(chip::System::Layer * systemLayer, void * appState) -{ - ChipLogProgress(Zcl, "Trigger Identify Complete"); - sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; - -#if CHIP_DEVICE_CONFIG_ENABLE_SED == 1 - AppTask::GetAppTask().StopStatusLEDTimer(); -#endif -} - -void OnTriggerIdentifyEffect(Identify * identify) -{ - sIdentifyEffect = identify->mCurrentEffectIdentifier; - - if (identify->mCurrentEffectIdentifier == EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE) - { - ChipLogProgress(Zcl, "IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE - Not supported, use effect varriant %d", - identify->mEffectVariant); - sIdentifyEffect = static_cast(identify->mEffectVariant); - } - -#if CHIP_DEVICE_CONFIG_ENABLE_SED == 1 - AppTask::GetAppTask().StartStatusLEDTimer(); -#endif - - switch (sIdentifyEffect) - { - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: - (void) chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(5), OnTriggerIdentifyEffectCompleted, - identify); - break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_FINISH_EFFECT: - (void) chip::DeviceLayer::SystemLayer().CancelTimer(OnTriggerIdentifyEffectCompleted, identify); - (void) chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(1), OnTriggerIdentifyEffectCompleted, - identify); - break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT: - (void) chip::DeviceLayer::SystemLayer().CancelTimer(OnTriggerIdentifyEffectCompleted, identify); - sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; - break; - default: - ChipLogProgress(Zcl, "No identifier effect"); - } -} - -Identify gIdentify = { - chip::EndpointId{ 1 }, - AppTask::GetAppTask().OnIdentifyStart, - AppTask::GetAppTask().OnIdentifyStop, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, - OnTriggerIdentifyEffect, -}; - -} // namespace - -using namespace chip::TLV; -using namespace ::chip::DeviceLayer; - -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 *) "Lock-App", true); -#endif - - err = BaseApplication::Init(&gIdentify); - if (err != CHIP_NO_ERROR) - { - SILABS_LOG("BaseApplication::Init() failed"); - appError(err); - } - -#if defined(ENABLE_CHIP_SHELL) - err = RegisterLockEvents(); - if (err != CHIP_NO_ERROR) - { - SILABS_LOG("RegisterLockEvents() failed"); - appError(err); - } -#endif // ENABLE_CHIP_SHELL - - // Initial lock state - chip::app::DataModel::Nullable state; - chip::EndpointId endpointId{ 1 }; - chip::DeviceLayer::PlatformMgr().LockChipStack(); - chip::app::Clusters::DoorLock::Attributes::LockState::Get(endpointId, state); - - uint8_t numberOfCredentialsPerUser = 0; - if (!DoorLockServer::Instance().GetNumberOfCredentialsSupportedPerUser(endpointId, numberOfCredentialsPerUser)) - { - ChipLogError(Zcl, - "Unable to get number of credentials supported per user when initializing lock endpoint, defaulting to 5 " - "[endpointId=%d]", - endpointId); - numberOfCredentialsPerUser = 5; - } - - uint16_t numberOfUsers = 0; - if (!DoorLockServer::Instance().GetNumberOfUserSupported(endpointId, numberOfUsers)) - { - ChipLogError(Zcl, - "Unable to get number of supported users when initializing lock endpoint, defaulting to 10 [endpointId=%d]", - endpointId); - numberOfUsers = 10; - } - - uint8_t numberOfWeekdaySchedulesPerUser = 0; - if (!DoorLockServer::Instance().GetNumberOfWeekDaySchedulesPerUserSupported(endpointId, numberOfWeekdaySchedulesPerUser)) - { - ChipLogError( - Zcl, - "Unable to get number of supported weekday schedules when initializing lock endpoint, defaulting to 10 [endpointId=%d]", - endpointId); - numberOfWeekdaySchedulesPerUser = 10; - } - - uint8_t numberOfYeardaySchedulesPerUser = 0; - if (!DoorLockServer::Instance().GetNumberOfYearDaySchedulesPerUserSupported(endpointId, numberOfYeardaySchedulesPerUser)) - { - ChipLogError( - Zcl, - "Unable to get number of supported yearday schedules when initializing lock endpoint, defaulting to 10 [endpointId=%d]", - endpointId); - numberOfYeardaySchedulesPerUser = 10; - } - - uint8_t numberOfHolidaySchedules = 0; - if (!DoorLockServer::Instance().GetNumberOfHolidaySchedulesSupported(endpointId, numberOfHolidaySchedules)) - { - ChipLogError( - Zcl, - "Unable to get number of supported holiday schedules when initializing lock endpoint, defaulting to 10 [endpointId=%d]", - endpointId); - numberOfHolidaySchedules = 10; - } - - chip::DeviceLayer::PlatformMgr().UnlockChipStack(); - - err = LockMgr().Init(state, - ParamBuilder() - .SetNumberOfUsers(numberOfUsers) - .SetNumberOfCredentialsPerUser(numberOfCredentialsPerUser) - .SetNumberOfWeekdaySchedulesPerUser(numberOfWeekdaySchedulesPerUser) - .SetNumberOfYeardaySchedulesPerUser(numberOfYeardaySchedulesPerUser) - .SetNumberOfHolidaySchedules(numberOfHolidaySchedules) - .GetLockParam()); - - if (err != CHIP_NO_ERROR) - { - SILABS_LOG("LockMgr().Init() failed"); - appError(err); - } - - LockMgr().SetCallbacks(ActionInitiated, ActionCompleted); - - sLockLED.Init(LOCK_STATE_LED); - sLockLED.Set(state.Value() == DlLockState::kUnlocked); - - chip::DeviceLayer::PlatformMgr().ScheduleWork(UpdateClusterState, reinterpret_cast(nullptr)); - - ConfigurationMgr().LogDeviceConfig(); - - return err; -} - -CHIP_ERROR AppTask::StartAppTask() -{ - return BaseApplication::StartAppTask(AppTaskMain); -} - -void AppTask::AppTaskMain(void * pvParameter) -{ - AppEvent event; - QueueHandle_t sAppEventQueue = *(static_cast(pvParameter)); - - CHIP_ERROR err = sAppTask.Init(); - if (err != CHIP_NO_ERROR) - { - SILABS_LOG("AppTask.Init() failed"); - appError(err); - } - -#if !(defined(CHIP_DEVICE_CONFIG_ENABLE_SED) && CHIP_DEVICE_CONFIG_ENABLE_SED) - sAppTask.StartStatusLEDTimer(); -#endif - - SILABS_LOG("App Task started"); - - // Users and credentials should be checked once from nvm flash on boot - LockMgr().ReadConfigValues(); - - while (true) - { - BaseType_t eventReceived = xQueueReceive(sAppEventQueue, &event, portMAX_DELAY); - while (eventReceived == pdTRUE) - { - sAppTask.DispatchEvent(&event); - eventReceived = xQueueReceive(sAppEventQueue, &event, 0); - } - } -} - -void AppTask::OnIdentifyStart(Identify * identify) -{ - ChipLogProgress(Zcl, "onIdentifyStart"); - -#if CHIP_DEVICE_CONFIG_ENABLE_SED == 1 - sAppTask.StartStatusLEDTimer(); -#endif -} - -void AppTask::OnIdentifyStop(Identify * identify) -{ - ChipLogProgress(Zcl, "onIdentifyStop"); - -#if CHIP_DEVICE_CONFIG_ENABLE_SED == 1 - sAppTask.StopStatusLEDTimer(); -#endif -} - -void AppTask::LockActionEventHandler(AppEvent * aEvent) -{ - bool initiated = false; - LockManager::Action_t action; - int32_t actor; - CHIP_ERROR err = CHIP_NO_ERROR; - - if (aEvent->Type == AppEvent::kEventType_Lock) - { - action = static_cast(aEvent->LockEvent.Action); - actor = aEvent->LockEvent.Actor; - } - else if (aEvent->Type == AppEvent::kEventType_Button) - { - if (LockMgr().NextState() == true) - { - action = LockManager::LOCK_ACTION; - } - else - { - action = LockManager::UNLOCK_ACTION; - } - actor = AppEvent::kEventType_Button; - } - else - { - err = APP_ERROR_UNHANDLED_EVENT; - } - - if (err == CHIP_NO_ERROR) - { - initiated = LockMgr().InitiateAction(actor, action); - - if (!initiated) - { - SILABS_LOG("Action is already in progress or active."); - } - } -} - -void AppTask::ButtonEventHandler(uint8_t button, uint8_t btnAction) -{ - - AppEvent button_event = {}; - button_event.Type = AppEvent::kEventType_Button; - button_event.ButtonEvent.Action = btnAction; - - if (button == SIWx917_BTN1 && btnAction == static_cast(SilabsPlatform::ButtonAction::ButtonPressed)) - { - button_event.Handler = LockActionEventHandler; - sAppTask.PostEvent(&button_event); - } - else if (button == SIWx917_BTN0 && btnAction == static_cast(SilabsPlatform::ButtonAction::ButtonPressed)) - { - button_event.Handler = BaseApplication::ButtonHandler; - sAppTask.PostEvent(&button_event); - } -} - -void AppTask::ActionInitiated(LockManager::Action_t aAction, int32_t aActor) -{ - if (aAction == LockManager::UNLOCK_ACTION || aAction == LockManager::LOCK_ACTION) - { - bool locked = (aAction == LockManager::LOCK_ACTION); - SILABS_LOG("%s Action has been initiated", (locked) ? "Lock" : "Unlock"); - sLockLED.Set(!locked); - -#ifdef DISPLAY_ENABLED - sAppTask.GetLCD().WriteDemoUI(locked); -#endif // DISPLAY_ENABLED - } - - if (aActor == AppEvent::kEventType_Button) - { - sAppTask.mSyncClusterToButtonAction = true; - } -} - -void AppTask::ActionCompleted(LockManager::Action_t aAction) -{ - // if the action has been completed by the lock, update the lock trait. - // Turn off the lock LED if in a LOCKED state OR - // Turn on the lock LED if in an UNLOCKED state. - if (aAction == LockManager::LOCK_ACTION) - { - SILABS_LOG("Lock Action has been completed") - } - else if (aAction == LockManager::UNLOCK_ACTION) - { - SILABS_LOG("Unlock Action has been completed") - } - - if (sAppTask.mSyncClusterToButtonAction) - { - chip::DeviceLayer::PlatformMgr().ScheduleWork(UpdateClusterState, reinterpret_cast(nullptr)); - sAppTask.mSyncClusterToButtonAction = false; - } -} - -void AppTask::ActionRequest(int32_t aActor, LockManager::Action_t aAction) -{ - AppEvent event; - event.Type = AppEvent::kEventType_Lock; - event.LockEvent.Actor = aActor; - event.LockEvent.Action = aAction; - event.Handler = LockActionEventHandler; - PostEvent(&event); -} - -void AppTask::UpdateClusterState(intptr_t context) -{ - bool unlocked = LockMgr().NextState(); - DlLockState newState = unlocked ? DlLockState::kUnlocked : DlLockState::kLocked; - - OperationSourceEnum source = OperationSourceEnum::kUnspecified; - - // write the new lock value - EmberAfStatus status = - DoorLockServer::Instance().SetLockState(1, newState, source) ? EMBER_ZCL_STATUS_SUCCESS : EMBER_ZCL_STATUS_FAILURE; - - if (status != EMBER_ZCL_STATUS_SUCCESS) - { - SILABS_LOG("ERR: updating lock state %x", status); - } -} diff --git a/examples/lock-app/silabs/SiWx917/src/EventHandlerLibShell.cpp b/examples/lock-app/silabs/SiWx917/src/EventHandlerLibShell.cpp deleted file mode 100644 index ef79290bd1961f..00000000000000 --- a/examples/lock-app/silabs/SiWx917/src/EventHandlerLibShell.cpp +++ /dev/null @@ -1,211 +0,0 @@ -/* - * - * 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. - */ - -#include "EventHandlerLibShell.h" -#include "AppTask.h" -#include "lib/shell/Engine.h" -#include "lib/shell/commands/Help.h" - -#include "app/server/Server.h" -#include "platform/CHIPDeviceLayer.h" -#include - -constexpr uint8_t lockEndpoint = 1; - -using namespace chip; -using namespace chip::app; -using namespace Clusters::DoorLock; -using Shell::Engine; -using Shell::shell_command_t; -using Shell::streamer_get; -using Shell::streamer_printf; - -Engine sShellDoorlockSubCommands; -Engine sShellDoorlockEventSubCommands; -Engine sShellDoorlockEventAlarmSubCommands; -Engine sShellDoorlockEventDoorStateSubCommands; - -/******************************************************** - * Doorlock shell functions - *********************************************************/ - -CHIP_ERROR DoorlockHelpHandler(int argc, char ** argv) -{ - sShellDoorlockSubCommands.ForEachCommand(Shell::PrintCommandHelp, nullptr); - return CHIP_NO_ERROR; -} - -CHIP_ERROR DoorlockCommandHandler(int argc, char ** argv) -{ - if (argc == 0) - { - return DoorlockHelpHandler(argc, argv); - } - - return sShellDoorlockSubCommands.ExecCommand(argc, argv); -} - -/******************************************************** - * Event shell functions - *********************************************************/ - -CHIP_ERROR EventHelpHandler(int argc, char ** argv) -{ - sShellDoorlockEventSubCommands.ForEachCommand(Shell::PrintCommandHelp, nullptr); - return CHIP_NO_ERROR; -} - -CHIP_ERROR EventDoorlockCommandHandler(int argc, char ** argv) -{ - if (argc == 0) - { - return EventHelpHandler(argc, argv); - } - - return sShellDoorlockEventSubCommands.ExecCommand(argc, argv); -} - -/******************************************************** - * Alarm shell functions - *********************************************************/ - -CHIP_ERROR AlarmHelpHandler(int argc, char ** argv) -{ - sShellDoorlockEventAlarmSubCommands.ForEachCommand(Shell::PrintCommandHelp, nullptr); - return CHIP_NO_ERROR; -} - -CHIP_ERROR AlarmEventHandler(int argc, char ** argv) -{ - - if (argc == 0) - { - return AlarmHelpHandler(argc, argv); - } - if (argc >= 2) - { - ChipLogError(Zcl, "Too many arguments provided to function %s, line %d", __func__, __LINE__); - return APP_ERROR_TOO_MANY_SHELL_ARGUMENTS; - } - - AlarmEventData * data = Platform::New(); - data->eventId = Events::DoorLockAlarm::Id; - data->alarmCode = static_cast(atoi(argv[0])); - - DeviceLayer::PlatformMgr().ScheduleWork(EventWorkerFunction, reinterpret_cast(data)); - - return CHIP_NO_ERROR; -} - -/******************************************************** - * Door state shell functions - *********************************************************/ - -CHIP_ERROR DoorStateHelpHandler(int argc, char ** argv) -{ - sShellDoorlockEventDoorStateSubCommands.ForEachCommand(Shell::PrintCommandHelp, nullptr); - return CHIP_NO_ERROR; -} - -CHIP_ERROR DoorStateEventHandler(int argc, char ** argv) -{ - - if (argc == 0) - { - return DoorStateHelpHandler(argc, argv); - } - if (argc >= 2) - { - ChipLogError(Zcl, "Too many arguments provided to function %s, line %d", __func__, __LINE__); - return APP_ERROR_TOO_MANY_SHELL_ARGUMENTS; - } - - DoorStateEventData * data = Platform::New(); - data->eventId = Events::DoorStateChange::Id; - data->doorState = static_cast(atoi(argv[0])); - - DeviceLayer::PlatformMgr().ScheduleWork(EventWorkerFunction, reinterpret_cast(data)); - - return CHIP_NO_ERROR; -} - -/** - * @brief configures lock matter shell - * - */ - -CHIP_ERROR RegisterLockEvents() -{ - static const shell_command_t sDoorlockSubCommands[] = { { &DoorlockHelpHandler, "help", "Usage: doorlock " }, - { &EventDoorlockCommandHandler, "event", - " Usage: doorlock event " } }; - - static const shell_command_t sDoorlockEventSubCommands[] = { - { &EventHelpHandler, "help", "Usage : doorlock event " }, - { &AlarmEventHandler, "lock-alarm", "Sends lock alarm event to lock app" }, - { &DoorStateEventHandler, "door-state-change", "Sends door state change event to lock app" } - }; - - static const shell_command_t sDoorlockEventAlarmSubCommands[] = { { &AlarmHelpHandler, "help", - "Usage : doorlock event lock-alarm AlarmCode" } }; - - static const shell_command_t sDoorlockEventDoorStateSubCommands[] = { - { &DoorStateHelpHandler, "help", "Usage : doorlock event door-state-change DoorState" } - }; - - static const shell_command_t sDoorLockCommand = { &DoorlockCommandHandler, "doorlock", - "doorlock commands. Usage: doorlock " }; - - sShellDoorlockEventAlarmSubCommands.RegisterCommands(sDoorlockEventAlarmSubCommands, ArraySize(sDoorlockEventAlarmSubCommands)); - - sShellDoorlockEventDoorStateSubCommands.RegisterCommands(sDoorlockEventDoorStateSubCommands, - ArraySize(sDoorlockEventDoorStateSubCommands)); - - sShellDoorlockEventSubCommands.RegisterCommands(sDoorlockEventSubCommands, ArraySize(sDoorlockEventSubCommands)); - sShellDoorlockSubCommands.RegisterCommands(sDoorlockSubCommands, ArraySize(sDoorlockSubCommands)); - - Engine::Root().RegisterCommands(&sDoorLockCommand, 1); - - return CHIP_NO_ERROR; -} - -void EventWorkerFunction(intptr_t context) -{ - VerifyOrReturn(context != 0, ChipLogError(NotSpecified, "EventWorkerFunction - Invalid work data")); - - EventData * data = reinterpret_cast(context); - - switch (data->eventId) - { - case Events::DoorLockAlarm::Id: { - AlarmEventData * alarmData = reinterpret_cast(context); - DoorLockServer::Instance().SendLockAlarmEvent(lockEndpoint, alarmData->alarmCode); - break; - } - - case Events::DoorStateChange::Id: { - DoorStateEventData * doorStateData = reinterpret_cast(context); - DoorLockServer::Instance().SetDoorState(lockEndpoint, doorStateData->doorState); - break; - } - - default: { - ChipLogError(Zcl, "Invalid Event Id %s, line %d", __func__, __LINE__); - break; - } - } -} diff --git a/examples/lock-app/silabs/SiWx917/src/LockManager.cpp b/examples/lock-app/silabs/SiWx917/src/LockManager.cpp deleted file mode 100644 index c1a5b2ae627067..00000000000000 --- a/examples/lock-app/silabs/SiWx917/src/LockManager.cpp +++ /dev/null @@ -1,719 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 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. - */ - -#include "LockManager.h" - -#include "AppConfig.h" -#include "AppTask.h" -#include -#include -#include -#include - -LockManager LockManager::sLock; - -TimerHandle_t sLockTimer; - -using namespace ::chip::DeviceLayer::Internal; -using namespace SI917DoorLock::LockInitParams; - -CHIP_ERROR LockManager::Init(chip::app::DataModel::Nullable state, LockParam lockParam) -{ - - LockParams = lockParam; - - if (LockParams.numberOfUsers > kMaxUsers) - { - SILABS_LOG("Max number of users is greater than %d, the maximum amount of users currently supported on this platform", - kMaxUsers); - return APP_ERROR_ALLOCATION_FAILED; - } - - if (LockParams.numberOfCredentialsPerUser > kMaxCredentialsPerUser) - { - SILABS_LOG("Max number of credentials per user is greater than %d, the maximum amount of users currently supported on this " - "platform", - kMaxCredentialsPerUser); - return APP_ERROR_ALLOCATION_FAILED; - } - - if (LockParams.numberOfWeekdaySchedulesPerUser > kMaxWeekdaySchedulesPerUser) - { - SILABS_LOG( - "Max number of schedules is greater than %d, the maximum amount of schedules currently supported on this platform", - kMaxWeekdaySchedulesPerUser); - return APP_ERROR_ALLOCATION_FAILED; - } - - if (LockParams.numberOfYeardaySchedulesPerUser > kMaxYeardaySchedulesPerUser) - { - SILABS_LOG( - "Max number of schedules is greater than %d, the maximum amount of schedules currently supported on this platform", - kMaxYeardaySchedulesPerUser); - return APP_ERROR_ALLOCATION_FAILED; - } - - if (LockParams.numberOfHolidaySchedules > kMaxHolidaySchedules) - { - SILABS_LOG( - "Max number of schedules is greater than %d, the maximum amount of schedules currently supported on this platform", - kMaxHolidaySchedules); - return APP_ERROR_ALLOCATION_FAILED; - } - - // Create FreeRTOS sw timer for lock timer. - sLockTimer = xTimerCreate("lockTmr", // Just a text name, not used by the RTOS kernel - pdMS_TO_TICKS(1), // == default timer period - false, // no timer reload (==one-shot) - (void *) this, // init timer id = lock obj context - TimerEventHandler // timer callback handler - ); - - if (sLockTimer == NULL) - { - SILABS_LOG("sLockTimer timer create failed"); - return APP_ERROR_CREATE_TIMER_FAILED; - } - - if (state.Value() == DlLockState::kUnlocked) - mState = kState_UnlockCompleted; - else - mState = kState_LockCompleted; - - return CHIP_NO_ERROR; -} - -bool LockManager::IsValidUserIndex(uint16_t userIndex) -{ - return (userIndex < kMaxUsers); -} - -bool LockManager::IsValidCredentialIndex(uint16_t credentialIndex, CredentialTypeEnum type) -{ - if (CredentialTypeEnum::kProgrammingPIN == type) - { - return (0 == credentialIndex); // 0 is required index for Programming PIN - } - return (credentialIndex < kMaxCredentialsPerUser); -} - -bool LockManager::IsValidCredentialType(CredentialTypeEnum type) -{ - return (to_underlying(type) < kNumCredentialTypes); -} - -bool LockManager::IsValidWeekdayScheduleIndex(uint8_t scheduleIndex) -{ - return (scheduleIndex < kMaxWeekdaySchedulesPerUser); -} - -bool LockManager::IsValidYeardayScheduleIndex(uint8_t scheduleIndex) -{ - return (scheduleIndex < kMaxYeardaySchedulesPerUser); -} - -bool LockManager::IsValidHolidayScheduleIndex(uint8_t scheduleIndex) -{ - return (scheduleIndex < kMaxHolidaySchedules); -} - -bool LockManager::ReadConfigValues() -{ - size_t outLen; - SilabsConfig::ReadConfigValueBin(SilabsConfig::kConfigKey_LockUser, reinterpret_cast(&mLockUsers), - sizeof(EmberAfPluginDoorLockUserInfo) * ArraySize(mLockUsers), outLen); - - SilabsConfig::ReadConfigValueBin(SilabsConfig::kConfigKey_Credential, reinterpret_cast(&mLockCredentials), - sizeof(EmberAfPluginDoorLockCredentialInfo) * kMaxCredentials * kNumCredentialTypes, outLen); - - SilabsConfig::ReadConfigValueBin(SilabsConfig::kConfigKey_LockUserName, reinterpret_cast(mUserNames), - sizeof(mUserNames), outLen); - - SilabsConfig::ReadConfigValueBin(SilabsConfig::kConfigKey_CredentialData, reinterpret_cast(mCredentialData), - sizeof(mCredentialData), outLen); - - SilabsConfig::ReadConfigValueBin(SilabsConfig::kConfigKey_UserCredentials, reinterpret_cast(mCredentials), - sizeof(CredentialStruct) * LockParams.numberOfUsers * LockParams.numberOfCredentialsPerUser, - outLen); - - SilabsConfig::ReadConfigValueBin(SilabsConfig::kConfigKey_WeekDaySchedules, reinterpret_cast(mWeekdaySchedule), - sizeof(EmberAfPluginDoorLockWeekDaySchedule) * LockParams.numberOfWeekdaySchedulesPerUser * - LockParams.numberOfUsers, - outLen); - - SilabsConfig::ReadConfigValueBin(SilabsConfig::kConfigKey_YearDaySchedules, reinterpret_cast(mYeardaySchedule), - sizeof(EmberAfPluginDoorLockYearDaySchedule) * LockParams.numberOfYeardaySchedulesPerUser * - LockParams.numberOfUsers, - outLen); - - SilabsConfig::ReadConfigValueBin(SilabsConfig::kConfigKey_HolidaySchedules, reinterpret_cast(&(mHolidaySchedule)), - sizeof(EmberAfPluginDoorLockHolidaySchedule) * LockParams.numberOfHolidaySchedules, outLen); - - return true; -} - -void LockManager::SetCallbacks(Callback_fn_initiated aActionInitiated_CB, Callback_fn_completed aActionCompleted_CB) -{ - mActionInitiated_CB = aActionInitiated_CB; - mActionCompleted_CB = aActionCompleted_CB; -} - -bool LockManager::IsActionInProgress() -{ - return (mState == kState_LockInitiated || mState == kState_UnlockInitiated); -} - -bool LockManager::NextState() -{ - return (mState == kState_UnlockCompleted); -} - -bool LockManager::InitiateAction(int32_t aActor, Action_t aAction) -{ - bool action_initiated = false; - State_t new_state; - - // Initiate Turn Lock/Unlock Action only when the previous one is complete. - if (mState == kState_LockCompleted && aAction == UNLOCK_ACTION) - { - action_initiated = true; - - new_state = kState_UnlockInitiated; - } - else if (mState == kState_UnlockCompleted && aAction == LOCK_ACTION) - { - action_initiated = true; - - new_state = kState_LockInitiated; - } - - if (action_initiated) - { - - StartTimer(ACTUATOR_MOVEMENT_PERIOS_MS); - - // Since the timer started successfully, update the state and trigger callback - mState = new_state; - - if (mActionInitiated_CB) - { - mActionInitiated_CB(aAction, aActor); - } - } - - return action_initiated; -} - -void LockManager::StartTimer(uint32_t aTimeoutMs) -{ - if (xTimerIsTimerActive(sLockTimer)) - { - SILABS_LOG("app timer already started!"); - CancelTimer(); - } - - // timer is not active, change its period to required value (== restart). - // FreeRTOS- Block for a maximum of 100 ms if the change period command - // cannot immediately be sent to the timer command queue. - if (xTimerChangePeriod(sLockTimer, pdMS_TO_TICKS(aTimeoutMs), pdMS_TO_TICKS(100)) != pdPASS) - { - SILABS_LOG("sLockTimer timer start() failed"); - appError(APP_ERROR_START_TIMER_FAILED); - } -} - -void LockManager::CancelTimer(void) -{ - if (xTimerStop(sLockTimer, pdMS_TO_TICKS(0)) == pdFAIL) - { - SILABS_LOG("sLockTimer stop() failed"); - appError(APP_ERROR_STOP_TIMER_FAILED); - } -} - -void LockManager::TimerEventHandler(TimerHandle_t xTimer) -{ - // Get lock obj context from timer id. - LockManager * lock = static_cast(pvTimerGetTimerID(xTimer)); - - // The timer event handler will be called in the context of the timer task - // once sLockTimer expires. Post an event to apptask queue with the actual handler - // so that the event can be handled in the context of the apptask. - AppEvent event; - event.Type = AppEvent::kEventType_Timer; - event.TimerEvent.Context = lock; - event.Handler = ActuatorMovementTimerEventHandler; - AppTask::GetAppTask().PostEvent(&event); -} - -void LockManager::ActuatorMovementTimerEventHandler(AppEvent * aEvent) -{ - Action_t actionCompleted = INVALID_ACTION; - - LockManager * lock = static_cast(aEvent->TimerEvent.Context); - - if (lock->mState == kState_LockInitiated) - { - lock->mState = kState_LockCompleted; - actionCompleted = LOCK_ACTION; - } - else if (lock->mState == kState_UnlockInitiated) - { - lock->mState = kState_UnlockCompleted; - actionCompleted = UNLOCK_ACTION; - } - - if (actionCompleted != INVALID_ACTION) - { - if (lock->mActionCompleted_CB) - { - lock->mActionCompleted_CB(actionCompleted); - } - } -} - -bool LockManager::Lock(chip::EndpointId endpointId, const Optional & pin, OperationErrorEnum & err) -{ - return setLockState(endpointId, DlLockState::kLocked, pin, err); -} - -bool LockManager::Unlock(chip::EndpointId endpointId, const Optional & pin, OperationErrorEnum & err) -{ - return setLockState(endpointId, DlLockState::kUnlocked, pin, err); -} - -bool LockManager::GetUser(chip::EndpointId endpointId, uint16_t userIndex, EmberAfPluginDoorLockUserInfo & user) -{ - VerifyOrReturnValue(userIndex > 0, false); // indices are one-indexed - - userIndex--; - - VerifyOrReturnValue(IsValidUserIndex(userIndex), false); - - ChipLogProgress(Zcl, "Door Lock App: LockManager::GetUser [endpoint=%d,userIndex=%hu]", endpointId, userIndex); - - const auto & userInDb = mLockUsers[userIndex]; - - user.userStatus = userInDb.userStatus; - if (UserStatusEnum::kAvailable == user.userStatus) - { - ChipLogDetail(Zcl, "Found unoccupied user [endpoint=%d]", endpointId); - return true; - } - - user.userName = chip::CharSpan(userInDb.userName.data(), userInDb.userName.size()); - user.credentials = chip::Span(mCredentials[userIndex], userInDb.credentials.size()); - user.userUniqueId = userInDb.userUniqueId; - user.userType = userInDb.userType; - user.credentialRule = userInDb.credentialRule; - // So far there's no way to actually create the credential outside Matter, so here we always set the creation/modification - // source to Matter - user.creationSource = DlAssetSource::kMatterIM; - user.createdBy = userInDb.createdBy; - user.modificationSource = DlAssetSource::kMatterIM; - user.lastModifiedBy = userInDb.lastModifiedBy; - - ChipLogDetail(Zcl, - "Found occupied user " - "[endpoint=%d,name=\"%.*s\",credentialsCount=%u,uniqueId=%lx,type=%u,credentialRule=%u," - "createdBy=%d,lastModifiedBy=%d]", - endpointId, static_cast(user.userName.size()), user.userName.data(), user.credentials.size(), - user.userUniqueId, to_underlying(user.userType), to_underlying(user.credentialRule), user.createdBy, - user.lastModifiedBy); - - return true; -} - -bool LockManager::SetUser(chip::EndpointId endpointId, uint16_t userIndex, chip::FabricIndex creator, chip::FabricIndex modifier, - const chip::CharSpan & userName, uint32_t uniqueId, UserStatusEnum userStatus, UserTypeEnum usertype, - CredentialRuleEnum credentialRule, const CredentialStruct * credentials, size_t totalCredentials) -{ - ChipLogProgress(Zcl, - "Door Lock App: LockManager::SetUser " - "[endpoint=%d,userIndex=%d,creator=%d,modifier=%d,userName=%s,uniqueId=%ld " - "userStatus=%u,userType=%u,credentialRule=%u,credentials=%p,totalCredentials=%u]", - endpointId, userIndex, creator, modifier, userName.data(), uniqueId, to_underlying(userStatus), - to_underlying(usertype), to_underlying(credentialRule), credentials, totalCredentials); - - VerifyOrReturnValue(userIndex > 0, false); // indices are one-indexed - - userIndex--; - - VerifyOrReturnValue(IsValidUserIndex(userIndex), false); - - auto & userInStorage = mLockUsers[userIndex]; - - if (userName.size() > DOOR_LOCK_MAX_USER_NAME_SIZE) - { - ChipLogError(Zcl, "Cannot set user - user name is too long [endpoint=%d,index=%d]", endpointId, userIndex); - return false; - } - - if (totalCredentials > LockParams.numberOfCredentialsPerUser) - { - ChipLogError(Zcl, "Cannot set user - total number of credentials is too big [endpoint=%d,index=%d,totalCredentials=%u]", - endpointId, userIndex, totalCredentials); - return false; - } - - chip::Platform::CopyString(mUserNames[userIndex], userName); - userInStorage.userName = chip::CharSpan(mUserNames[userIndex], userName.size()); - userInStorage.userUniqueId = uniqueId; - userInStorage.userStatus = userStatus; - userInStorage.userType = usertype; - userInStorage.credentialRule = credentialRule; - userInStorage.lastModifiedBy = modifier; - userInStorage.createdBy = creator; - - for (size_t i = 0; i < totalCredentials; ++i) - { - mCredentials[userIndex][i] = credentials[i]; - } - - userInStorage.credentials = chip::Span(mCredentials[userIndex], totalCredentials); - - // Save user information in NVM flash - SilabsConfig::WriteConfigValueBin(SilabsConfig::kConfigKey_LockUser, reinterpret_cast(&mLockUsers), - sizeof(EmberAfPluginDoorLockUserInfo) * LockParams.numberOfUsers); - - SilabsConfig::WriteConfigValueBin(SilabsConfig::kConfigKey_UserCredentials, reinterpret_cast(mCredentials), - sizeof(CredentialStruct) * LockParams.numberOfUsers * LockParams.numberOfCredentialsPerUser); - - SilabsConfig::WriteConfigValueBin(SilabsConfig::kConfigKey_LockUserName, reinterpret_cast(mUserNames), - sizeof(mUserNames)); - - ChipLogProgress(Zcl, "Successfully set the user [mEndpointId=%d,index=%d]", endpointId, userIndex); - - return true; -} - -bool LockManager::GetCredential(chip::EndpointId endpointId, uint16_t credentialIndex, CredentialTypeEnum credentialType, - EmberAfPluginDoorLockCredentialInfo & credential) -{ - - VerifyOrReturnValue(IsValidCredentialType(credentialType), false); - - if (CredentialTypeEnum::kProgrammingPIN == credentialType) - { - VerifyOrReturnValue(IsValidCredentialIndex(credentialIndex, credentialType), - false); // programming pin index is only index allowed to contain 0 - } - else - { - VerifyOrReturnValue(IsValidCredentialIndex(--credentialIndex, credentialType), false); // otherwise, indices are one-indexed - } - - ChipLogProgress(Zcl, "Lock App: LockManager::GetCredential [credentialType=%u], credentialIndex=%d", - to_underlying(credentialType), credentialIndex); - - const auto & credentialInStorage = mLockCredentials[to_underlying(credentialType)][credentialIndex]; - - credential.status = credentialInStorage.status; - ChipLogDetail(Zcl, "CredentialStatus: %d, CredentialIndex: %d ", (int) credential.status, credentialIndex); - - if (DlCredentialStatus::kAvailable == credential.status) - { - ChipLogDetail(Zcl, "Found unoccupied credential "); - return true; - } - credential.credentialType = credentialInStorage.credentialType; - credential.credentialData = credentialInStorage.credentialData; - credential.createdBy = credentialInStorage.createdBy; - credential.lastModifiedBy = credentialInStorage.lastModifiedBy; - // So far there's no way to actually create the credential outside Matter, so here we always set the creation/modification - // source to Matter - credential.creationSource = DlAssetSource::kMatterIM; - credential.modificationSource = DlAssetSource::kMatterIM; - - ChipLogDetail(Zcl, "Found occupied credential [type=%u,dataSize=%u]", to_underlying(credential.credentialType), - credential.credentialData.size()); - - return true; -} - -bool LockManager::SetCredential(chip::EndpointId endpointId, uint16_t credentialIndex, chip::FabricIndex creator, - chip::FabricIndex modifier, DlCredentialStatus credentialStatus, CredentialTypeEnum credentialType, - const chip::ByteSpan & credentialData) -{ - - VerifyOrReturnValue(IsValidCredentialType(credentialType), false); - - if (CredentialTypeEnum::kProgrammingPIN == credentialType) - { - VerifyOrReturnValue(IsValidCredentialIndex(credentialIndex, credentialType), - false); // programming pin index is only index allowed to contain 0 - } - else - { - VerifyOrReturnValue(IsValidCredentialIndex(--credentialIndex, credentialType), false); // otherwise, indices are one-indexed - } - - ChipLogProgress(Zcl, - "Door Lock App: LockManager::SetCredential " - "[credentialStatus=%u,credentialType=%u,credentialDataSize=%u,creator=%d,modifier=%d]", - to_underlying(credentialStatus), to_underlying(credentialType), credentialData.size(), creator, modifier); - - auto & credentialInStorage = mLockCredentials[to_underlying(credentialType)][credentialIndex]; - - credentialInStorage.status = credentialStatus; - credentialInStorage.credentialType = credentialType; - credentialInStorage.createdBy = creator; - credentialInStorage.lastModifiedBy = modifier; - - memcpy(mCredentialData[to_underlying(credentialType)][credentialIndex], credentialData.data(), credentialData.size()); - credentialInStorage.credentialData = - chip::ByteSpan{ mCredentialData[to_underlying(credentialType)][credentialIndex], credentialData.size() }; - - // Save credential information in NVM flash - SilabsConfig::WriteConfigValueBin(SilabsConfig::kConfigKey_Credential, reinterpret_cast(&mLockCredentials), - sizeof(EmberAfPluginDoorLockCredentialInfo) * kMaxCredentials * kNumCredentialTypes); - - SilabsConfig::WriteConfigValueBin(SilabsConfig::kConfigKey_CredentialData, reinterpret_cast(&mCredentialData), - sizeof(mCredentialData)); - - ChipLogProgress(Zcl, "Successfully set the credential [credentialType=%u]", to_underlying(credentialType)); - - return true; -} - -DlStatus LockManager::GetWeekdaySchedule(chip::EndpointId endpointId, uint8_t weekdayIndex, uint16_t userIndex, - EmberAfPluginDoorLockWeekDaySchedule & schedule) -{ - - VerifyOrReturnValue(weekdayIndex > 0, DlStatus::kFailure); // indices are one-indexed - VerifyOrReturnValue(userIndex > 0, DlStatus::kFailure); // indices are one-indexed - - weekdayIndex--; - userIndex--; - - VerifyOrReturnValue(IsValidWeekdayScheduleIndex(weekdayIndex), DlStatus::kFailure); - VerifyOrReturnValue(IsValidUserIndex(userIndex), DlStatus::kFailure); - - const auto & scheduleInStorage = mWeekdaySchedule[userIndex][weekdayIndex]; - if (DlScheduleStatus::kAvailable == scheduleInStorage.status) - { - return DlStatus::kNotFound; - } - - schedule = scheduleInStorage.schedule; - - return DlStatus::kSuccess; -} - -DlStatus LockManager::SetWeekdaySchedule(chip::EndpointId endpointId, uint8_t weekdayIndex, uint16_t userIndex, - DlScheduleStatus status, DaysMaskMap daysMask, uint8_t startHour, uint8_t startMinute, - uint8_t endHour, uint8_t endMinute) -{ - - VerifyOrReturnValue(weekdayIndex > 0, DlStatus::kFailure); // indices are one-indexed - VerifyOrReturnValue(userIndex > 0, DlStatus::kFailure); // indices are one-indexed - - weekdayIndex--; - userIndex--; - - VerifyOrReturnValue(IsValidWeekdayScheduleIndex(weekdayIndex), DlStatus::kFailure); - VerifyOrReturnValue(IsValidUserIndex(userIndex), DlStatus::kFailure); - - auto & scheduleInStorage = mWeekdaySchedule[userIndex][weekdayIndex]; - - scheduleInStorage.schedule.daysMask = daysMask; - scheduleInStorage.schedule.startHour = startHour; - scheduleInStorage.schedule.startMinute = startMinute; - scheduleInStorage.schedule.endHour = endHour; - scheduleInStorage.schedule.endMinute = endMinute; - scheduleInStorage.status = status; - - // Save schedule information in NVM flash - SilabsConfig::WriteConfigValueBin( - SilabsConfig::kConfigKey_WeekDaySchedules, reinterpret_cast(mWeekdaySchedule), - sizeof(EmberAfPluginDoorLockWeekDaySchedule) * LockParams.numberOfWeekdaySchedulesPerUser * LockParams.numberOfUsers); - - return DlStatus::kSuccess; -} - -DlStatus LockManager::GetYeardaySchedule(chip::EndpointId endpointId, uint8_t yearDayIndex, uint16_t userIndex, - EmberAfPluginDoorLockYearDaySchedule & schedule) -{ - VerifyOrReturnValue(yearDayIndex > 0, DlStatus::kFailure); // indices are one-indexed - VerifyOrReturnValue(userIndex > 0, DlStatus::kFailure); // indices are one-indexed - - yearDayIndex--; - userIndex--; - - VerifyOrReturnValue(IsValidYeardayScheduleIndex(yearDayIndex), DlStatus::kFailure); - VerifyOrReturnValue(IsValidUserIndex(userIndex), DlStatus::kFailure); - - const auto & scheduleInStorage = mYeardaySchedule[userIndex][yearDayIndex]; - if (DlScheduleStatus::kAvailable == scheduleInStorage.status) - { - return DlStatus::kNotFound; - } - - schedule = scheduleInStorage.schedule; - - return DlStatus::kSuccess; -} - -DlStatus LockManager::SetYeardaySchedule(chip::EndpointId endpointId, uint8_t yearDayIndex, uint16_t userIndex, - DlScheduleStatus status, uint32_t localStartTime, uint32_t localEndTime) -{ - VerifyOrReturnValue(yearDayIndex > 0, DlStatus::kFailure); // indices are one-indexed - VerifyOrReturnValue(userIndex > 0, DlStatus::kFailure); // indices are one-indexed - - yearDayIndex--; - userIndex--; - - VerifyOrReturnValue(IsValidYeardayScheduleIndex(yearDayIndex), DlStatus::kFailure); - VerifyOrReturnValue(IsValidUserIndex(userIndex), DlStatus::kFailure); - - auto & scheduleInStorage = mYeardaySchedule[userIndex][yearDayIndex]; - - scheduleInStorage.schedule.localStartTime = localStartTime; - scheduleInStorage.schedule.localEndTime = localEndTime; - scheduleInStorage.status = status; - - // Save schedule information in NVM flash - SilabsConfig::WriteConfigValueBin( - SilabsConfig::kConfigKey_YearDaySchedules, reinterpret_cast(mYeardaySchedule), - sizeof(EmberAfPluginDoorLockYearDaySchedule) * LockParams.numberOfYeardaySchedulesPerUser * LockParams.numberOfUsers); - - return DlStatus::kSuccess; -} - -DlStatus LockManager::GetHolidaySchedule(chip::EndpointId endpointId, uint8_t holidayIndex, - EmberAfPluginDoorLockHolidaySchedule & schedule) -{ - VerifyOrReturnValue(holidayIndex > 0, DlStatus::kFailure); // indices are one-indexed - - holidayIndex--; - - VerifyOrReturnValue(IsValidHolidayScheduleIndex(holidayIndex), DlStatus::kFailure); - - const auto & scheduleInStorage = mHolidaySchedule[holidayIndex]; - if (DlScheduleStatus::kAvailable == scheduleInStorage.status) - { - return DlStatus::kNotFound; - } - - schedule = scheduleInStorage.schedule; - - return DlStatus::kSuccess; -} - -DlStatus LockManager::SetHolidaySchedule(chip::EndpointId endpointId, uint8_t holidayIndex, DlScheduleStatus status, - uint32_t localStartTime, uint32_t localEndTime, OperatingModeEnum operatingMode) -{ - VerifyOrReturnValue(holidayIndex > 0, DlStatus::kFailure); // indices are one-indexed - - holidayIndex--; - - VerifyOrReturnValue(IsValidHolidayScheduleIndex(holidayIndex), DlStatus::kFailure); - - auto & scheduleInStorage = mHolidaySchedule[holidayIndex]; - - scheduleInStorage.schedule.localStartTime = localStartTime; - scheduleInStorage.schedule.localEndTime = localEndTime; - scheduleInStorage.schedule.operatingMode = operatingMode; - scheduleInStorage.status = status; - - // Save schedule information in NVM flash - SilabsConfig::WriteConfigValueBin(SilabsConfig::kConfigKey_HolidaySchedules, - reinterpret_cast(&(mHolidaySchedule)), - sizeof(EmberAfPluginDoorLockHolidaySchedule) * LockParams.numberOfHolidaySchedules); - - return DlStatus::kSuccess; -} - -const char * LockManager::lockStateToString(DlLockState lockState) const -{ - switch (lockState) - { - case DlLockState::kNotFullyLocked: - return "Not Fully Locked"; - case DlLockState::kLocked: - return "Locked"; - case DlLockState::kUnlocked: - return "Unlocked"; - case DlLockState::kUnlatched: - return "Unlatched"; - case DlLockState::kUnknownEnumValue: - break; - } - - return "Unknown"; -} - -bool LockManager::setLockState(chip::EndpointId endpointId, DlLockState lockState, const Optional & pin, - OperationErrorEnum & err) -{ - - // Assume pin is required until told otherwise - bool requirePin = true; - chip::app::Clusters::DoorLock::Attributes::RequirePINforRemoteOperation::Get(endpointId, &requirePin); - - // If a pin code is not given - if (!pin.HasValue()) - { - ChipLogDetail(Zcl, "Door Lock App: PIN code is not specified [endpointId=%d]", endpointId); - - // If a pin code is not required - if (!requirePin) - { - ChipLogDetail(Zcl, "Door Lock App: setting door lock state to \"%s\" [endpointId=%d]", lockStateToString(lockState), - endpointId); - - DoorLockServer::Instance().SetLockState(endpointId, lockState); - - return true; - } - - ChipLogError(Zcl, "Door Lock App: PIN code is not specified, but it is required [endpointId=%d]", endpointId); - - return false; - } - - // Check the PIN code - for (const auto & currentCredential : mLockCredentials[to_underlying(CredentialTypeEnum::kPin)]) - { - - if (currentCredential.status == DlCredentialStatus::kAvailable) - { - continue; - } - - if (currentCredential.credentialData.data_equal(pin.Value())) - { - ChipLogDetail(Zcl, - "Lock App: specified PIN code was found in the database, setting lock state to \"%s\" [endpointId=%d]", - lockStateToString(lockState), endpointId); - - DoorLockServer::Instance().SetLockState(endpointId, lockState); - - return true; - } - } - - ChipLogDetail(Zcl, - "Door Lock App: specified PIN code was not found in the database, ignoring command to set lock state to \"%s\" " - "[endpointId=%d]", - lockStateToString(lockState), endpointId); - - err = OperationErrorEnum::kInvalidCredential; - return false; -} diff --git a/examples/lock-app/silabs/SiWx917/src/ZclCallbacks.cpp b/examples/lock-app/silabs/SiWx917/src/ZclCallbacks.cpp deleted file mode 100644 index 778637e250a5a5..00000000000000 --- a/examples/lock-app/silabs/SiWx917/src/ZclCallbacks.cpp +++ /dev/null @@ -1,157 +0,0 @@ -/* - * - * 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. - */ - -/** - * @file - * This file implements the handler for data model messages. - */ - -#include "AppConfig.h" -#include "LockManager.h" -#include - -#include -#include -#include -#include - -using namespace ::chip::app::Clusters; -using namespace ::chip::DeviceLayer::Internal; - -void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, - uint8_t * value) -{ - ClusterId clusterId = attributePath.mClusterId; - AttributeId attributeId = attributePath.mAttributeId; - ChipLogProgress(Zcl, "Cluster callback: " ChipLogFormatMEI, ChipLogValueMEI(clusterId)); - - if (clusterId == DoorLock::Id && attributeId == DoorLock::Attributes::LockState::Id) - { - DoorLock::DlLockState lockState = *(reinterpret_cast(value)); - ChipLogProgress(Zcl, "Door lock cluster: " ChipLogFormatMEI " state %d", ChipLogValueMEI(clusterId), - to_underlying(lockState)); - } -} - -/** @brief DoorLock Cluster Init - * - * This function is called when a specific cluster is initialized. It gives the - * application an opportunity to take care of cluster initialization procedures. - * It is called exactly once for each endpoint where cluster is present. - * - * @param endpoint Ver.: always - * - */ -void emberAfDoorLockClusterInitCallback(EndpointId endpoint) {} - -bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const Optional & pinCode, - OperationErrorEnum & err) -{ - ChipLogProgress(Zcl, "Door Lock App: Lock Command endpoint=%d", endpointId); - bool status = LockMgr().Lock(endpointId, pinCode, err); - if (status == true) - { - LockMgr().InitiateAction(AppEvent::kEventType_Lock, LockManager::LOCK_ACTION); - } - return status; -} - -bool emberAfPluginDoorLockOnDoorUnlockCommand(chip::EndpointId endpointId, const Optional & pinCode, - OperationErrorEnum & err) -{ - ChipLogProgress(Zcl, "Door Lock App: Unlock Command endpoint=%d", endpointId); - bool status = LockMgr().Unlock(endpointId, pinCode, err); - if (status == true) - { - LockMgr().InitiateAction(AppEvent::kEventType_Lock, LockManager::UNLOCK_ACTION); - } - - return status; -} - -bool emberAfPluginDoorLockGetCredential(chip::EndpointId endpointId, uint16_t credentialIndex, CredentialTypeEnum credentialType, - EmberAfPluginDoorLockCredentialInfo & credential) -{ - return LockMgr().GetCredential(endpointId, credentialIndex, credentialType, credential); -} - -bool emberAfPluginDoorLockSetCredential(chip::EndpointId endpointId, uint16_t credentialIndex, chip::FabricIndex creator, - chip::FabricIndex modifier, DlCredentialStatus credentialStatus, - CredentialTypeEnum credentialType, const chip::ByteSpan & credentialData) -{ - return LockMgr().SetCredential(endpointId, credentialIndex, creator, modifier, credentialStatus, credentialType, - credentialData); -} - -bool emberAfPluginDoorLockGetUser(chip::EndpointId endpointId, uint16_t userIndex, EmberAfPluginDoorLockUserInfo & user) -{ - return LockMgr().GetUser(endpointId, userIndex, user); -} - -bool emberAfPluginDoorLockSetUser(chip::EndpointId endpointId, uint16_t userIndex, chip::FabricIndex creator, - chip::FabricIndex modifier, const chip::CharSpan & userName, uint32_t uniqueId, - UserStatusEnum userStatus, UserTypeEnum usertype, CredentialRuleEnum credentialRule, - const CredentialStruct * credentials, size_t totalCredentials) -{ - - return LockMgr().SetUser(endpointId, userIndex, creator, modifier, userName, uniqueId, userStatus, usertype, credentialRule, - credentials, totalCredentials); -} - -DlStatus emberAfPluginDoorLockGetSchedule(chip::EndpointId endpointId, uint8_t weekdayIndex, uint16_t userIndex, - EmberAfPluginDoorLockWeekDaySchedule & schedule) -{ - return LockMgr().GetWeekdaySchedule(endpointId, weekdayIndex, userIndex, schedule); -} - -DlStatus emberAfPluginDoorLockGetSchedule(chip::EndpointId endpointId, uint8_t yearDayIndex, uint16_t userIndex, - EmberAfPluginDoorLockYearDaySchedule & schedule) -{ - return LockMgr().GetYeardaySchedule(endpointId, yearDayIndex, userIndex, schedule); -} - -DlStatus emberAfPluginDoorLockGetSchedule(chip::EndpointId endpointId, uint8_t holidayIndex, - EmberAfPluginDoorLockHolidaySchedule & holidaySchedule) -{ - return LockMgr().GetHolidaySchedule(endpointId, holidayIndex, holidaySchedule); -} - -DlStatus emberAfPluginDoorLockSetSchedule(chip::EndpointId endpointId, uint8_t weekdayIndex, uint16_t userIndex, - DlScheduleStatus status, DaysMaskMap daysMask, uint8_t startHour, uint8_t startMinute, - uint8_t endHour, uint8_t endMinute) -{ - return LockMgr().SetWeekdaySchedule(endpointId, weekdayIndex, userIndex, status, daysMask, startHour, startMinute, endHour, - endMinute); -} - -DlStatus emberAfPluginDoorLockSetSchedule(chip::EndpointId endpointId, uint8_t yearDayIndex, uint16_t userIndex, - DlScheduleStatus status, uint32_t localStartTime, uint32_t localEndTime) -{ - return LockMgr().SetYeardaySchedule(endpointId, yearDayIndex, userIndex, status, localStartTime, localEndTime); -} - -DlStatus emberAfPluginDoorLockSetSchedule(chip::EndpointId endpointId, uint8_t holidayIndex, DlScheduleStatus status, - uint32_t localStartTime, uint32_t localEndTime, OperatingModeEnum operatingMode) -{ - return LockMgr().SetHolidaySchedule(endpointId, holidayIndex, status, localStartTime, localEndTime, operatingMode); -} - -void emberAfPluginDoorLockOnAutoRelock(chip::EndpointId endpointId) -{ - // Apply the relock state in the application control - LockMgr().InitiateAction(AppEvent::kEventType_Lock, LockManager::LOCK_ACTION); -} diff --git a/examples/lock-app/silabs/SiWx917/third_party/connectedhomeip b/examples/lock-app/silabs/SiWx917/third_party/connectedhomeip deleted file mode 120000 index 59307833b4fee9..00000000000000 --- a/examples/lock-app/silabs/SiWx917/third_party/connectedhomeip +++ /dev/null @@ -1 +0,0 @@ -../../../../.. \ No newline at end of file diff --git a/examples/lock-app/silabs/SiWx917/with_pw_rpc.gni b/examples/lock-app/silabs/SiWx917/with_pw_rpc.gni deleted file mode 100644 index 8a4c77792c4616..00000000000000 --- a/examples/lock-app/silabs/SiWx917/with_pw_rpc.gni +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (c) 2021 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. - -# add this gni as import in your build args to use pigweed in the example -# 'import("//with_pw_rpc.gni")' - -import("//build_overrides/chip.gni") -import("${chip_root}/config/efr32/lib/pw_rpc/pw_rpc.gni") -import("${chip_root}/examples/platform/silabs/Siwx917/args.gni") - -silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") - -app_data_model = "${chip_root}/examples/lock-app/lock-common" -chip_enable_pw_rpc = true -chip_enable_openthread = true -chip_openthread_ftd = true - -cpp_standard = "gnu++17" - -# To fit in flash -chip_detail_logging = false -show_qr_code = false