├── .devcontainer └── devcontainer.json ├── .gitignore ├── .gitmodules ├── README.md ├── components ├── README.md ├── button │ ├── CMakeLists.txt │ ├── Kconfig │ ├── button_driver.c │ └── button_driver.h ├── light │ ├── CMakeLists.txt │ ├── Kconfig │ ├── led │ │ ├── led_driver.c │ │ └── led_driver.h │ ├── light_driver.c │ ├── light_driver.h │ ├── utils │ │ ├── color_format.c │ │ └── color_format.h │ └── ws2812 │ │ ├── ws2812_driver.c │ │ └── ws2812_driver.h ├── low_code │ ├── CMakeLists.txt │ ├── low_code.cpp │ └── low_code.h ├── low_code_transport │ ├── CMakeLists.txt │ ├── low_code_transport.cpp │ └── low_code_transport.h ├── lp_rmt │ ├── CMakeLists.txt │ ├── lp_rmt.c │ └── lp_rmt.h ├── lp_sw_timer │ ├── CMakeLists.txt │ ├── lp_sw_timer.c │ └── lp_sw_timer.h ├── relay │ ├── CMakeLists.txt │ ├── relay_driver.c │ └── relay_driver.h └── system │ ├── CMakeLists.txt │ ├── system.cpp │ └── system.h ├── docs ├── all_documents.md ├── create_product.md ├── debugging.md ├── device_setup.md ├── getting_started_terminal.md ├── getting_started_vscode.md ├── hardware_setup.md ├── images │ ├── commands.png │ ├── lowcode_ready.txt │ ├── open_codespace.png │ ├── status_bar.png │ └── status_bar_steps.png ├── matter_solutions.md ├── product_configuration.md ├── production_considerations.md └── programmer_model.md ├── export.sh ├── install.sh ├── pre_built_binaries ├── bootloader.bin ├── flash_args ├── low_code_lp_core_maincore.bin ├── ota_data_initial.bin ├── partition-table.bin └── partitions.csv ├── products ├── README.md ├── common │ ├── menuconfig_util.py │ └── sdkconfig.defaults ├── light_cw_pwm │ ├── CMakeLists.txt │ ├── configuration │ │ ├── cd_cert_fff1_8000.der │ │ ├── data_model.bin │ │ ├── data_model.zap │ │ ├── product_config.json │ │ └── product_info.json │ ├── main │ │ ├── CMakeLists.txt │ │ ├── app_driver.cpp │ │ ├── app_main.cpp │ │ └── app_priv.h │ └── sdkconfig.defaults ├── light_rgbcw_ws2812 │ ├── CMakeLists.txt │ ├── configuration │ │ ├── cd_cert_fff1_8000.der │ │ ├── data_model.bin │ │ ├── data_model.zap │ │ ├── product_config.json │ │ └── product_info.json │ ├── main │ │ ├── CMakeLists.txt │ │ ├── app_driver.cpp │ │ ├── app_main.cpp │ │ └── app_priv.h │ └── sdkconfig.defaults ├── socket │ ├── CMakeLists.txt │ ├── configuration │ │ ├── cd_cert_fff1_8000.der │ │ ├── data_model.bin │ │ ├── data_model.zap │ │ ├── product_config.json │ │ └── product_info.json │ ├── main │ │ ├── CMakeLists.txt │ │ ├── app_driver.cpp │ │ ├── app_main.cpp │ │ └── app_priv.h │ └── sdkconfig.defaults ├── socket_2_channel │ ├── CMakeLists.txt │ ├── configuration │ │ ├── cd_cert_fff1_8000.der │ │ ├── data_model.bin │ │ ├── data_model.zap │ │ ├── product_config.json │ │ └── product_info.json │ ├── main │ │ ├── CMakeLists.txt │ │ ├── app_driver.cpp │ │ ├── app_main.cpp │ │ └── app_priv.h │ └── sdkconfig.defaults ├── template │ ├── CMakeLists.txt │ ├── configuration │ │ ├── cd_cert_fff1_8000.der │ │ ├── data_model.bin │ │ ├── data_model.zap │ │ ├── product_config.json │ │ └── product_info.json │ ├── main │ │ ├── CMakeLists.txt │ │ ├── app_driver.cpp │ │ ├── app_main.cpp │ │ └── app_priv.h │ └── sdkconfig.defaults └── thermostat │ ├── CMakeLists.txt │ ├── configuration │ ├── cd_cert_fff1_8000.der │ ├── data_model.bin │ ├── data_model.zap │ ├── product_config.json │ └── product_info.json │ ├── main │ ├── CMakeLists.txt │ ├── app_driver.cpp │ ├── app_main.cpp │ └── app_priv.h │ └── sdkconfig.defaults └── tools ├── cmake ├── low_code.cmake └── low_code_menuconfig.cmake ├── dependencies ├── esp-matter │ ├── connectedhomeip │ │ └── connectedhomeip │ │ │ ├── scripts │ │ │ ├── idl_lint.py │ │ │ ├── py_matter_idl │ │ │ │ ├── BUILD.gn │ │ │ │ ├── examples │ │ │ │ │ ├── README.md │ │ │ │ │ └── matter_idl_plugin │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ └── matter_cluster_proto.jinja │ │ │ │ ├── files.gni │ │ │ │ ├── matter_idl │ │ │ │ │ ├── README.md │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── backwards_compatibility.py │ │ │ │ │ ├── data_model_xml │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ └── handlers │ │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ │ ├── base.py │ │ │ │ │ │ │ ├── context.py │ │ │ │ │ │ │ ├── derivation.py │ │ │ │ │ │ │ ├── handlers.py │ │ │ │ │ │ │ └── parsing.py │ │ │ │ │ ├── data_model_xml_parser.py │ │ │ │ │ ├── generators │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── cluster_selection.py │ │ │ │ │ │ ├── cpp │ │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ │ ├── application │ │ │ │ │ │ │ │ ├── CallbackStubSource.jinja │ │ │ │ │ │ │ │ ├── ClusterInitCallbackSource.jinja │ │ │ │ │ │ │ │ ├── PluginApplicationCallbacksHeader.jinja │ │ │ │ │ │ │ │ └── __init__.py │ │ │ │ │ │ │ └── tlvmeta │ │ │ │ │ │ │ │ ├── TLVMetaData_cpp.jinja │ │ │ │ │ │ │ │ ├── TLVMetaData_h.jinja │ │ │ │ │ │ │ │ └── __init__.py │ │ │ │ │ │ ├── filters.py │ │ │ │ │ │ ├── idl │ │ │ │ │ │ │ ├── MatterIdl.jinja │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ └── __init__.py │ │ │ │ │ │ ├── java │ │ │ │ │ │ │ ├── ChipClusters_java.jinja │ │ │ │ │ │ │ ├── ChipEventStructs.jinja │ │ │ │ │ │ │ ├── ChipEventStructs_java.jinja │ │ │ │ │ │ │ ├── ChipStructFiles_gni.jinja │ │ │ │ │ │ │ ├── ChipStructs.jinja │ │ │ │ │ │ │ ├── ChipStructs_java.jinja │ │ │ │ │ │ │ ├── ClusterIDMapping.jinja │ │ │ │ │ │ │ ├── ClusterInfoMapping_java.jinja │ │ │ │ │ │ │ ├── ClusterReadMapping.jinja │ │ │ │ │ │ │ ├── ClusterWriteMapping.jinja │ │ │ │ │ │ │ └── __init__.py │ │ │ │ │ │ ├── kotlin │ │ │ │ │ │ │ ├── MatterClusters.jinja │ │ │ │ │ │ │ ├── MatterEventStructs.jinja │ │ │ │ │ │ │ ├── MatterFiles_gni.jinja │ │ │ │ │ │ │ ├── MatterStructs.jinja │ │ │ │ │ │ │ └── __init__.py │ │ │ │ │ │ ├── markdown │ │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ │ └── clusters_markdown.jinja │ │ │ │ │ │ ├── registry.py │ │ │ │ │ │ └── type_definitions.py │ │ │ │ │ ├── lint │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── lint_rules_grammar.lark │ │ │ │ │ │ ├── lint_rules_parser.py │ │ │ │ │ │ └── type_definitions.py │ │ │ │ │ ├── matter_grammar.lark │ │ │ │ │ ├── matter_idl_parser.py │ │ │ │ │ ├── matter_idl_types.py │ │ │ │ │ ├── test_backwards_compatibility.py │ │ │ │ │ ├── test_data_model_xml.py │ │ │ │ │ ├── test_generators.py │ │ │ │ │ ├── test_idl_generator.py │ │ │ │ │ ├── test_matter_idl_parser.py │ │ │ │ │ ├── test_supported_types.py │ │ │ │ │ ├── test_zapxml.py │ │ │ │ │ ├── tests │ │ │ │ │ │ ├── available_tests.yaml │ │ │ │ │ │ ├── inputs │ │ │ │ │ │ │ ├── cluster_struct_attribute.matter │ │ │ │ │ │ │ ├── cluster_with_commands.matter │ │ │ │ │ │ │ ├── global_struct_attribute.matter │ │ │ │ │ │ │ ├── large_all_clusters_app.matter │ │ │ │ │ │ │ ├── large_lighting_app.matter │ │ │ │ │ │ │ ├── optional_argument.matter │ │ │ │ │ │ │ ├── several_clusters.matter │ │ │ │ │ │ │ └── simple_attribute.matter │ │ │ │ │ │ └── outputs │ │ │ │ │ │ │ ├── cluster_struct_attribute │ │ │ │ │ │ │ └── cpp-tlvmeta │ │ │ │ │ │ │ │ ├── clusters_meta.cpp │ │ │ │ │ │ │ │ └── clusters_meta.h │ │ │ │ │ │ │ ├── cluster_with_commands │ │ │ │ │ │ │ └── cpp-tlvmeta │ │ │ │ │ │ │ │ ├── clusters_meta.cpp │ │ │ │ │ │ │ │ └── clusters_meta.h │ │ │ │ │ │ │ ├── large_all_clusters_app │ │ │ │ │ │ │ └── cpp-app │ │ │ │ │ │ │ │ ├── PluginApplicationCallbacks.h │ │ │ │ │ │ │ │ ├── callback-stub.cpp │ │ │ │ │ │ │ │ └── cluster-init-callback.cpp │ │ │ │ │ │ │ ├── large_lighting_app │ │ │ │ │ │ │ └── cpp-app │ │ │ │ │ │ │ │ ├── PluginApplicationCallbacks.h │ │ │ │ │ │ │ │ ├── callback-stub.cpp │ │ │ │ │ │ │ │ └── cluster-init-callback.cpp │ │ │ │ │ │ │ ├── proto │ │ │ │ │ │ │ ├── first_cluster.proto │ │ │ │ │ │ │ ├── second_cluster.proto │ │ │ │ │ │ │ └── third_cluster.proto │ │ │ │ │ │ │ └── several_clusters │ │ │ │ │ │ │ ├── cpp-app │ │ │ │ │ │ │ ├── PluginApplicationCallbacks.h │ │ │ │ │ │ │ ├── callback-stub.cpp │ │ │ │ │ │ │ └── cluster-init-callback.cpp │ │ │ │ │ │ │ └── java │ │ │ │ │ │ │ ├── ChipClusters.java │ │ │ │ │ │ │ ├── ChipEventStructs.java │ │ │ │ │ │ │ ├── ChipStructs.java │ │ │ │ │ │ │ ├── ClusterIDMapping.java │ │ │ │ │ │ │ ├── ClusterInfoMapping.java │ │ │ │ │ │ │ ├── ClusterReadMapping.java │ │ │ │ │ │ │ ├── ClusterWriteMapping.java │ │ │ │ │ │ │ ├── SecondClusterFabricDescriptorStruct.kt │ │ │ │ │ │ │ └── files.gni │ │ │ │ │ ├── zapxml │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ └── handlers │ │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ │ ├── base.py │ │ │ │ │ │ │ ├── context.py │ │ │ │ │ │ │ ├── handlers.py │ │ │ │ │ │ │ └── parsing.py │ │ │ │ │ └── zapxml_parser.py │ │ │ │ ├── pyproject.toml │ │ │ │ ├── setup.cfg │ │ │ │ └── setup.py │ │ │ ├── rules.matterlint │ │ │ └── tools │ │ │ │ └── zap │ │ │ │ ├── BUILD.gn │ │ │ │ ├── check_file_existence.py │ │ │ │ ├── convert.py │ │ │ │ ├── generate.py │ │ │ │ ├── run_zaptool.sh │ │ │ │ ├── test_generate.py │ │ │ │ ├── tests │ │ │ │ ├── available_tests.yaml │ │ │ │ ├── inputs │ │ │ │ │ ├── all-clusters-app.zap │ │ │ │ │ └── lighting-app.zap │ │ │ │ └── outputs │ │ │ │ │ ├── all-clusters-app │ │ │ │ │ └── app-templates │ │ │ │ │ │ ├── IMClusterCommandHandler.cpp │ │ │ │ │ │ ├── access.h │ │ │ │ │ │ ├── endpoint_config.h │ │ │ │ │ │ └── gen_config.h │ │ │ │ │ └── lighting-app │ │ │ │ │ └── app-templates │ │ │ │ │ ├── IMClusterCommandHandler.cpp │ │ │ │ │ ├── access.h │ │ │ │ │ ├── endpoint_config.h │ │ │ │ │ └── gen_config.h │ │ │ │ ├── update_cluster_revisions.py │ │ │ │ ├── version_update.py │ │ │ │ ├── zap_bootstrap.sh │ │ │ │ ├── zap_download.py │ │ │ │ ├── zap_execution.py │ │ │ │ └── zapfile_formatter.py │ │ │ └── src │ │ │ └── app │ │ │ └── zap-templates │ │ │ ├── README.md │ │ │ ├── app-templates.json │ │ │ ├── common │ │ │ └── override.js │ │ │ ├── matter-idl-client.json │ │ │ ├── matter-idl-server.json │ │ │ ├── partials │ │ │ ├── cluster-enums-enum.zapt │ │ │ ├── cluster-objects-attribute-typeinfo.zapt │ │ │ ├── cluster-objects-field-init.zapt │ │ │ ├── cluster-objects-struct.zapt │ │ │ ├── cluster_header.zapt │ │ │ ├── clusters_header.zapt │ │ │ ├── header.zapt │ │ │ └── idl │ │ │ │ ├── attribute_definition.zapt │ │ │ │ ├── cluster_definition.zapt │ │ │ │ ├── command_request_response.zapt │ │ │ │ ├── command_request_struct.zapt │ │ │ │ ├── command_response_struct.zapt │ │ │ │ ├── structure_definition.zapt │ │ │ │ └── structure_member.zapt │ │ │ ├── templates │ │ │ └── app │ │ │ │ ├── MatterIDL_Client.zapt │ │ │ │ ├── MatterIDL_Server.zapt │ │ │ │ ├── access.zapt │ │ │ │ ├── attribute-type.zapt │ │ │ │ ├── attributes │ │ │ │ ├── Accessors-src.zapt │ │ │ │ └── Accessors.zapt │ │ │ │ ├── callback.zapt │ │ │ │ ├── cluster-enums-check.zapt │ │ │ │ ├── cluster-enums.zapt │ │ │ │ ├── cluster-objects-src.zapt │ │ │ │ ├── cluster-objects.zapt │ │ │ │ ├── endpoint_config.zapt │ │ │ │ ├── gen_config.zapt │ │ │ │ ├── ids │ │ │ │ ├── Attributes.zapt │ │ │ │ ├── Clusters.zapt │ │ │ │ ├── Commands.zapt │ │ │ │ └── Events.zapt │ │ │ │ └── im-cluster-command-handler.zapt │ │ │ └── zcl │ │ │ ├── data-model │ │ │ ├── all.xml │ │ │ ├── chip │ │ │ │ ├── access-control-cluster.xml │ │ │ │ ├── access-control-definitions.xml │ │ │ │ ├── account-login-cluster.xml │ │ │ │ ├── actions-cluster.xml │ │ │ │ ├── administrator-commissioning-cluster.xml │ │ │ │ ├── air-quality-cluster.xml │ │ │ │ ├── application-basic-cluster.xml │ │ │ │ ├── application-launcher-cluster.xml │ │ │ │ ├── audio-output-cluster.xml │ │ │ │ ├── ballast-configuration-cluster.xml │ │ │ │ ├── basic-information-cluster.xml │ │ │ │ ├── binding-cluster.xml │ │ │ │ ├── boolean-state-cluster.xml │ │ │ │ ├── boolean-state-configuration-cluster.xml │ │ │ │ ├── bridged-device-basic-information.xml │ │ │ │ ├── channel-cluster.xml │ │ │ │ ├── chip-ota.xml │ │ │ │ ├── chip-types.xml │ │ │ │ ├── clusters-extensions.xml │ │ │ │ ├── color-control-cluster.xml │ │ │ │ ├── concentration-measurement-cluster.xml │ │ │ │ ├── content-app-observer-cluster.xml │ │ │ │ ├── content-control-cluster.xml │ │ │ │ ├── content-launch-cluster.xml │ │ │ │ ├── descriptor-cluster.xml │ │ │ │ ├── device-energy-management-cluster.xml │ │ │ │ ├── device-energy-management-mode-cluster.xml │ │ │ │ ├── diagnostic-logs-cluster.xml │ │ │ │ ├── dishwasher-alarm-cluster.xml │ │ │ │ ├── dishwasher-mode-cluster.xml │ │ │ │ ├── door-lock-cluster.xml │ │ │ │ ├── drlc-cluster.xml │ │ │ │ ├── electrical-energy-measurement-cluster.xml │ │ │ │ ├── electrical-power-measurement-cluster.xml │ │ │ │ ├── energy-evse-cluster.xml │ │ │ │ ├── energy-evse-mode-cluster.xml │ │ │ │ ├── energy-preference-cluster.xml │ │ │ │ ├── ethernet-network-diagnostics-cluster.xml │ │ │ │ ├── fan-control-cluster.xml │ │ │ │ ├── fault-injection-cluster.xml │ │ │ │ ├── fixed-label-cluster.xml │ │ │ │ ├── flow-measurement-cluster.xml │ │ │ │ ├── general-commissioning-cluster.xml │ │ │ │ ├── general-diagnostics-cluster.xml │ │ │ │ ├── global-attributes.xml │ │ │ │ ├── group-key-mgmt-cluster.xml │ │ │ │ ├── groups-cluster.xml │ │ │ │ ├── icd-management-cluster.xml │ │ │ │ ├── identify-cluster.xml │ │ │ │ ├── illuminance-measurement-cluster.xml │ │ │ │ ├── keypad-input-cluster.xml │ │ │ │ ├── laundry-dryer-controls-cluster.xml │ │ │ │ ├── laundry-washer-mode-cluster.xml │ │ │ │ ├── level-control-cluster.xml │ │ │ │ ├── localization-configuration-cluster.xml │ │ │ │ ├── low-power-cluster.xml │ │ │ │ ├── matter-devices.xml │ │ │ │ ├── measurement-and-sensing.xml │ │ │ │ ├── media-input-cluster.xml │ │ │ │ ├── media-playback-cluster.xml │ │ │ │ ├── messages-cluster.xml │ │ │ │ ├── microwave-oven-control-cluster.xml │ │ │ │ ├── microwave-oven-mode-cluster.xml │ │ │ │ ├── mode-base-cluster.xml │ │ │ │ ├── mode-select-cluster.xml │ │ │ │ ├── network-commissioning-cluster.xml │ │ │ │ ├── occupancy-sensing-cluster.xml │ │ │ │ ├── onoff-cluster.xml │ │ │ │ ├── operational-credentials-cluster.xml │ │ │ │ ├── operational-state-cluster.xml │ │ │ │ ├── operational-state-oven-cluster.xml │ │ │ │ ├── operational-state-rvc-cluster.xml │ │ │ │ ├── oven-mode-cluster.xml │ │ │ │ ├── power-source-cluster.xml │ │ │ │ ├── power-source-configuration-cluster.xml │ │ │ │ ├── power-topology-cluster.xml │ │ │ │ ├── pressure-measurement-cluster.xml │ │ │ │ ├── proxy-configuration-cluster.xml │ │ │ │ ├── proxy-discovery-cluster.xml │ │ │ │ ├── proxy-valid-cluster.xml │ │ │ │ ├── pump-configuration-and-control-cluster.xml │ │ │ │ ├── pwm-cluster.xml │ │ │ │ ├── refrigerator-alarm.xml │ │ │ │ ├── refrigerator-and-temperature-controlled-cabinet-mode-cluster.xml │ │ │ │ ├── relative-humidity-measurement-cluster.xml │ │ │ │ ├── resource-monitoring-cluster.xml │ │ │ │ ├── rvc-clean-mode-cluster.xml │ │ │ │ ├── rvc-run-mode-cluster.xml │ │ │ │ ├── sample-mei-cluster.xml │ │ │ │ ├── scene.xml │ │ │ │ ├── smoke-co-alarm-cluster.xml │ │ │ │ ├── software-diagnostics-cluster.xml │ │ │ │ ├── switch-cluster.xml │ │ │ │ ├── target-navigator-cluster.xml │ │ │ │ ├── temperature-control-cluster.xml │ │ │ │ ├── temperature-measurement-cluster.xml │ │ │ │ ├── test-cluster.xml │ │ │ │ ├── thermostat-cluster.xml │ │ │ │ ├── thermostat-user-interface-configuration-cluster.xml │ │ │ │ ├── thread-network-diagnostics-cluster.xml │ │ │ │ ├── time-format-localization-cluster.xml │ │ │ │ ├── time-synchronization-cluster.xml │ │ │ │ ├── timer-cluster.xml │ │ │ │ ├── unit-localization-cluster.xml │ │ │ │ ├── user-label-cluster.xml │ │ │ │ ├── valve-configuration-and-control-cluster.xml │ │ │ │ ├── wake-on-lan-cluster.xml │ │ │ │ ├── washer-controls-cluster.xml │ │ │ │ ├── wifi-network-diagnostics-cluster.xml │ │ │ │ └── window-covering.xml │ │ │ ├── draft │ │ │ │ ├── README.md │ │ │ │ ├── barrier-control-cluster.xml │ │ │ │ ├── electrical-measurement-cluster.xml │ │ │ │ ├── input-output-value-clusters.xml │ │ │ │ └── onoff-switch-configuration-cluster.xml │ │ │ ├── manufacturers.xml │ │ │ └── test │ │ │ │ └── mode-select-extensions.xml │ │ │ ├── validate.sh │ │ │ ├── zcl-with-test-extensions.json │ │ │ ├── zcl.json │ │ │ └── zcl.xsd │ └── tools │ │ └── matter_data_model_interpreter │ │ ├── attribute_bounds.csv │ │ ├── attribute_bounds.pkl │ │ ├── attribute_bounds_lookup.py │ │ ├── attribute_bounds_maker.py │ │ ├── create_binary.py │ │ ├── create_json.py │ │ ├── data_model_binary_decoder.py │ │ ├── esp_matter_data_model_api_messages_pb2.py │ │ ├── main.py │ │ ├── matter_enums.py │ │ └── shared_imports.py ├── esp-rainmaker │ └── cli │ │ ├── .gitignore │ │ ├── html │ │ └── welcome.html │ │ ├── rainmaker.py │ │ ├── requirements.txt │ │ ├── rmaker_cmd │ │ ├── __init__.py │ │ ├── browserlogin.py │ │ ├── cmd_response.py │ │ ├── node.py │ │ ├── provision.py │ │ ├── test.py │ │ └── user.py │ │ ├── rmaker_lib │ │ ├── __init__.py │ │ ├── cmd_response.py │ │ ├── configmanager.py │ │ ├── constants.py │ │ ├── device.py │ │ ├── envval.py │ │ ├── exceptions.py │ │ ├── logger.py │ │ ├── node.py │ │ ├── serverconfig.py │ │ ├── service.py │ │ ├── session.py │ │ └── user.py │ │ ├── rmaker_tools │ │ ├── __init__.py │ │ ├── rmaker_claim │ │ │ ├── __init__.py │ │ │ ├── claim.py │ │ │ └── claim_config.py │ │ └── rmaker_prov │ │ │ ├── README.md │ │ │ ├── __init__.py │ │ │ ├── config │ │ │ ├── custom_cloud_config.proto │ │ │ └── custom_cloud_config_pb2.py │ │ │ ├── esp_rainmaker_prov.py │ │ │ ├── proto │ │ │ └── __init__.py │ │ │ ├── protocomm │ │ │ ├── proto │ │ │ │ ├── constants.proto │ │ │ │ ├── sec0.proto │ │ │ │ ├── sec1.proto │ │ │ │ └── session.proto │ │ │ └── python │ │ │ │ ├── constants_pb2.py │ │ │ │ ├── sec0_pb2.py │ │ │ │ ├── sec1_pb2.py │ │ │ │ ├── sec2_pb2.py │ │ │ │ └── session_pb2.py │ │ │ ├── prov │ │ │ ├── __init__.py │ │ │ ├── prov_util.py │ │ │ ├── user_mapping.py │ │ │ ├── wifi_prov.py │ │ │ └── wifi_scan.py │ │ │ ├── security │ │ │ ├── __init__.py │ │ │ ├── security.py │ │ │ ├── security0.py │ │ │ └── security1.py │ │ │ ├── transport │ │ │ ├── __init__.py │ │ │ ├── ble_cli.py │ │ │ ├── transport.py │ │ │ ├── transport_ble.py │ │ │ ├── transport_console.py │ │ │ └── transport_http.py │ │ │ ├── utils │ │ │ ├── __init__.py │ │ │ └── convenience.py │ │ │ └── wifi_provisioning │ │ │ ├── proto │ │ │ ├── wifi_config.proto │ │ │ ├── wifi_constants.proto │ │ │ └── wifi_scan.proto │ │ │ └── python │ │ │ ├── wifi_config_pb2.py │ │ │ ├── wifi_constants_pb2.py │ │ │ └── wifi_scan_pb2.py │ │ └── server_cert │ │ └── server_cert.pem ├── esp_secure_cert_mgr │ └── tools │ │ └── esp_secure_cert │ │ ├── __init__.py │ │ ├── configure_ds.py │ │ ├── custflash_format.py │ │ ├── efuse_helper.py │ │ ├── esp_secure_cert_helper.py │ │ ├── nvs_format.py │ │ └── tlv_format.py └── matter-one │ └── tools │ ├── product_config_validator │ ├── README.md │ ├── data_handler │ │ ├── base_model.py │ │ ├── error_handling.py │ │ ├── mandatory_field.py │ │ └── var_handler.py │ ├── doc_generator.py │ ├── driver │ │ ├── configuration.py │ │ ├── driver.py │ │ ├── en-us │ │ │ └── description.py │ │ └── zh-cn │ │ │ └── description.py │ ├── json_validator.py │ ├── low_code_product │ │ ├── en-us │ │ │ └── description.py │ │ ├── lowcode_product_config.py │ │ └── zh-cn │ │ │ └── description.py │ ├── output │ │ ├── en-us │ │ │ ├── json_documentation.md │ │ │ └── json_schema.json │ │ ├── status.json │ │ └── zh-cn │ │ │ ├── json_documentation.md │ │ │ └── json_schema.json │ ├── pre_driver │ │ ├── en-us │ │ │ └── description.py │ │ ├── pre_driver.py │ │ └── zh-cn │ │ │ └── description.py │ ├── product │ │ ├── en-us │ │ │ └── description.py │ │ ├── product.py │ │ └── zh-cn │ │ │ └── description.py │ ├── product_common │ │ ├── en-us │ │ │ └── description.py │ │ ├── indicator_event.py │ │ ├── product_common.py │ │ └── zh-cn │ │ │ └── description.py │ ├── product_config_validator_command.txt │ ├── requirements.txt │ ├── requirements_fixes.txt │ ├── test_mode │ │ ├── en-us │ │ │ └── description.py │ │ ├── test_mode.py │ │ └── zh-cn │ │ │ └── description.py │ └── zerocode_product │ │ ├── en-us │ │ └── description.py │ │ ├── zerocode_product_config.py │ │ └── zh-cn │ │ └── description.py │ ├── product_info_validator │ ├── pid_info_get.py │ ├── product_info_validator.py │ ├── requirements.txt │ └── share_point_client.py │ ├── product_io_validator │ ├── io_check.py │ ├── io_data.json │ └── io_data_json_validator.py │ ├── product_validator │ ├── output │ │ └── status.json │ ├── product_validator.py │ ├── product_validator_command.txt │ ├── requirements.txt │ └── requirements_fixes.txt │ └── qr_code_image_generator │ ├── output │ ├── qr_code.png │ └── qr_code.svg │ ├── qr_code_image_generator.py │ ├── requirements.txt │ └── templates │ └── matter_qr_code_type_1.svg └── mfg ├── certs ├── cd_signing_cert.pem ├── cd_signing_key.pem ├── paa_cert_fff1.der ├── paa_cert_fff1.pem ├── paa_key_fff1.pem ├── pai_cert_fff1.pem └── pai_key_fff1.pem ├── local_claim.py ├── matter_config.py ├── matter_one_config.py ├── mfg_gen.py ├── mfg_low_code.sh ├── output_file_creation.py ├── qr_code.py ├── rainmaker_claim.py ├── rainmaker_config.py └── requirements.txt /.gitignore: -------------------------------------------------------------------------------- 1 | .cache 2 | compile_commands.json 3 | *.swp 4 | build/ 5 | sdkconfig 6 | sdkconfig.old 7 | dependencies.lock 8 | managed_components/ 9 | __pycache__/ 10 | out/ 11 | _build/ 12 | products/*/configuration/output/* 13 | .DS_Store 14 | .vscode/ 15 | .environment/ 16 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "components/esp-amp"] 2 | path = components/esp-amp 3 | url = ../esp-amp.git 4 | -------------------------------------------------------------------------------- /components/README.md: -------------------------------------------------------------------------------- 1 | # LowCode Components 2 | 3 | | Component Name | Description | 4 | |-------------------------|--------------------------------------------------------------------------------------------------------------| 5 | | button | Button input driver component supporting both HP (High Power) and LP (Low Power) GPIO configurations | 6 | | light | PWM and WS2812 light control component supporting various channel combinations (RGB, RGBCW, etc.) | 7 | | low_code | Core low code implementation component | 8 | | low_code_transport | Communication transport layer component for data exchange between the cores | 9 | | lp_rmt | RMT (Remote Control) peripheral driver for LP core supporting transmit operations (used for WS2812) | 10 | | lp_sw_timer | Software timer implementation for LP core with support for periodic and one-shot timers | 11 | | relay | GPIO based relay control driver component | 12 | | system | System utilities component providing GPIO, timing, and basic system functions for LP core | 13 | 14 | ## Related Documents 15 | 16 | * [Create LowCode Product](../docs/create_product.md) 17 | * [Products](../products/README.md) 18 | * [All Documents](../docs/all_documents.md) 19 | -------------------------------------------------------------------------------- /components/button/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register(SRC_DIRS . 2 | INCLUDE_DIRS . 3 | REQUIRES lp_sw_timer esp_amp) 4 | 5 | target_include_directories( 6 | ${COMPONENT_LIB} PRIVATE ${COMPONENT_INCLUDES} 7 | ) 8 | -------------------------------------------------------------------------------- /components/button/Kconfig: -------------------------------------------------------------------------------- 1 | menu "BUTTON" 2 | choice BUTTON_DRIVER_GPIO_SETTINGS 3 | prompt "Select HP/LP gpio as button input" 4 | default BUTTON_DRIVER_USE_HP_GPIO 5 | 6 | config BUTTON_DRIVER_USE_HP_GPIO 7 | bool "Select HP GPIO as button input" 8 | 9 | config HP_BUTTON_LOOP_INTERVAL 10 | depends on BUTTON_DRIVER_USE_HP_GPIO 11 | int "Interval between HP GPIO timer in ms" 12 | default 50 13 | 14 | config BUTTON_DRIVER_USE_LP_GPIO 15 | bool "Select LP GPIO as button input" 16 | endchoice 17 | 18 | config MAX_BUTTON_NUM 19 | int "Maximum number of buttons" 20 | default 4 21 | endmenu 22 | -------------------------------------------------------------------------------- /components/light/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register(SRC_DIRS led utils ws2812 . 2 | INCLUDE_DIRS led utils ws2812 . 3 | REQUIRES lp_sw_timer lp_rmt) 4 | 5 | target_include_directories( 6 | ${COMPONENT_LIB} PRIVATE ${COMPONENT_INCLUDES} 7 | ) 8 | -------------------------------------------------------------------------------- /components/light/Kconfig: -------------------------------------------------------------------------------- 1 | menu "Light" 2 | choice LIGHT_DEVICE_TYPE 3 | prompt "Select light device type" 4 | default USE_LIGHT_DEVICE_TYPE_WS2812 5 | 6 | config USE_LIGHT_DEVICE_TYPE_WS2812 7 | bool "Select WS2812 as light device" 8 | 9 | config USE_LIGHT_DEVICE_TYPE_LED 10 | bool "Select LED as light device" 11 | endchoice 12 | endmenu -------------------------------------------------------------------------------- /components/light/led/led_driver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "soc/gpio_num.h" 4 | 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | typedef enum { 10 | LED_CHANNEL_NC = -1, 11 | LED_CHANNEL_RED = 0, 12 | LED_CHANNEL_GREEN, 13 | LED_CHANNEL_BLUE, 14 | LED_CHANNEL_COLD, 15 | LED_CHANNEL_WARM, 16 | LED_CHANNEL_MAX, 17 | } led_channel_enum_t; 18 | 19 | /* enable clock & timer */ 20 | int led_driver_init(void); 21 | 22 | /* disable clock & timer */ 23 | void led_driver_deinit(void); 24 | int led_driver_set_channel(uint8_t channel, uint8_t val); 25 | 26 | /* init channel */ 27 | int led_driver_regist_channel(uint8_t channel, gpio_num_t gpio); 28 | int led_driver_update_channels(void); 29 | 30 | #ifdef __cplusplus 31 | } 32 | #endif 33 | -------------------------------------------------------------------------------- /components/light/utils/color_format.h: -------------------------------------------------------------------------------- 1 | // Copyright 2021 Espressif Systems (Shanghai) CO LTD 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // http://www.apache.org/licenses/LICENSE-2.0 7 | // 8 | // Unless required by applicable law or agreed to in writing, software 9 | // distributed under the License is distributed on an "AS IS" BASIS, 10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | // See the License for the specific language governing permissions and 12 | // limitations under the License 13 | 14 | #pragma once 15 | #include 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | typedef struct { 22 | uint16_t hue; 23 | uint8_t saturation; 24 | } HS_color_t; 25 | 26 | typedef struct { 27 | uint8_t cold; 28 | uint8_t warm; 29 | } CW_white_t; 30 | 31 | typedef struct { 32 | uint8_t red; 33 | uint8_t green; 34 | uint8_t blue; 35 | } RGB_color_t; 36 | 37 | void temp_to_hs(uint32_t temperature, HS_color_t *HS); 38 | 39 | void rgb2hs(RGB_color_t RGB, HS_color_t *HS); 40 | 41 | void temp_to_cw(uint32_t temperature, CW_white_t *CW); 42 | 43 | void hsv_to_rgb(HS_color_t HS, uint8_t brightness, RGB_color_t *RGB); 44 | 45 | void cw_to_temp(CW_white_t CW, uint32_t* temperature); 46 | 47 | void cw_to_hsv(CW_white_t CW, HS_color_t* HS); 48 | 49 | #ifdef __cplusplus 50 | } 51 | #endif 52 | -------------------------------------------------------------------------------- /components/light/ws2812/ws2812_driver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "lp_sw_timer.h" 4 | #include "color_format.h" 5 | #include "lp_rmt.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | // Initialize ws2812 12 | int ws2812_driver_init(void); 13 | 14 | // Deinitialize ws2812 15 | void ws2812_driver_deinit(void); 16 | 17 | typedef enum { 18 | WS2812_CHANNEL_NC = -1, 19 | WS2812_CHANNEL_RED = 0, 20 | WS2812_CHANNEL_GREEN, 21 | WS2812_CHANNEL_BLUE, 22 | WS2812_CHANNEL_COLD, 23 | WS2812_CHANNEL_WARM, 24 | WS2812_CHANNEL_BRIGHTNESS, 25 | WS2812_CHANNEL_MAX, 26 | } ws2812_channel_enum_t; 27 | 28 | struct ws2812_buffer_t { 29 | RGB_color_t RGBBuffer; 30 | HS_color_t HSBuffer; 31 | CW_white_t CWBuffer; 32 | // uint32_t TempBuffer; 33 | uint8_t BrightBuffer; 34 | uint8_t RMTBufferGRB[3]; 35 | uint32_t FadeSpeed; 36 | ws2812_channel_enum_t lastUpdatedChannel; 37 | }; 38 | 39 | typedef struct ws2812_buffer_t ws2812_buffer_t; 40 | 41 | int ws2812_driver_set_channel(uint8_t channel, uint8_t val); 42 | int ws2812_driver_regist_channel(uint8_t channel, gpio_num_t gpio); 43 | int ws2812_driver_update_channels(void); 44 | // int ws2812_driver_set_channel_fade(uint8_t channel, uint8_t start, uint8_t end, uint32_t speed); 45 | // int ws2812_driver_start_channel_fade(void); 46 | // int ws2812_driver_stop_channel_fade(uint8_t channel); 47 | 48 | 49 | #ifdef __cplusplus 50 | } 51 | #endif -------------------------------------------------------------------------------- /components/low_code/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register(SRC_DIRS . 2 | INCLUDE_DIRS . 3 | REQUIRES) 4 | -------------------------------------------------------------------------------- /components/low_code_transport/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register(SRC_DIRS . 2 | INCLUDE_DIRS . 3 | REQUIRES low_code ulp esp_amp) 4 | -------------------------------------------------------------------------------- /components/low_code_transport/low_code_transport.h: -------------------------------------------------------------------------------- 1 | // Copyright 2024 Espressif Systems (Shanghai) PTE LTD 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | /** 16 | * @file low_code_transport.h 17 | * @brief Communication transport layer for data exchange between cores 18 | * 19 | * This component implements the transport layer for communication between the main core 20 | * and the LP core using RPMSG (Remote Processor Messaging) protocol. It handles data 21 | * serialization, transmission, and callback management. 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | 28 | #ifdef __cplusplus 29 | extern "C" { 30 | #endif 31 | 32 | /** 33 | * @brief Register transport layer callbacks 34 | * 35 | * This function registers the internal callback functions that will be called when data 36 | * is received from the other core. 37 | * 38 | * This needs to be called at the beginning. It is called in system_setup() by default. 39 | * @return int 0 on success, negative value on error 40 | */ 41 | int low_code_transport_register_callbacks(void); 42 | 43 | #ifdef __cplusplus 44 | } 45 | #endif 46 | -------------------------------------------------------------------------------- /components/lp_rmt/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register(SRC_DIRS . 2 | INCLUDE_DIRS . 3 | REQUIRES ulp hal) 4 | 5 | target_include_directories( 6 | ${COMPONENT_LIB} PRIVATE ${COMPONENT_INCLUDES} 7 | ) 8 | -------------------------------------------------------------------------------- /components/lp_sw_timer/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register(SRC_DIRS . 2 | INCLUDE_DIRS . 3 | REQUIRES ulp hal) 4 | 5 | target_include_directories( 6 | ${COMPONENT_LIB} PRIVATE ${COMPONENT_INCLUDES} 7 | ) 8 | -------------------------------------------------------------------------------- /components/relay/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register(SRC_DIRS . 2 | INCLUDE_DIRS . 3 | REQUIRES ulp hal) 4 | 5 | target_include_directories( 6 | ${COMPONENT_LIB} PRIVATE ${COMPONENT_INCLUDES} 7 | ) 8 | -------------------------------------------------------------------------------- /components/relay/relay_driver.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "relay_driver.h" 6 | 7 | void relay_driver_init(int gpio_num) 8 | { 9 | ulp_lp_core_gpio_init(gpio_num); 10 | ulp_lp_core_gpio_output_enable(gpio_num); 11 | ulp_lp_core_gpio_input_disable(gpio_num); 12 | ulp_lp_core_gpio_set_output_mode(gpio_num, RTCIO_LL_OUTPUT_NORMAL); 13 | } 14 | 15 | void relay_driver_set_power(int gpio_num, bool power) 16 | { 17 | ulp_lp_core_gpio_set_level(gpio_num, power); 18 | } 19 | 20 | -------------------------------------------------------------------------------- /components/relay/relay_driver.h: -------------------------------------------------------------------------------- 1 | // Copyright 2024 Espressif Systems (Shanghai) PTE LTD 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | /** 16 | * @file relay_driver.h 17 | * @brief GPIO-based relay control driver 18 | * 19 | * This component provides functionality to control relay modules through GPIO pins. 20 | * It supports basic relay operations like initialization and power control. 21 | */ 22 | 23 | #pragma once 24 | 25 | #include 26 | #include 27 | 28 | #ifdef __cplusplus 29 | extern "C" { 30 | #endif 31 | 32 | /** 33 | * @brief Initialize the relay driver for a specific GPIO 34 | * 35 | * This function initializes the relay driver for a given GPIO pin. 36 | * It configures the GPIO as an output for relay control. 37 | * 38 | * @param gpio_num The GPIO number to use for relay control 39 | */ 40 | void relay_driver_init(int gpio_num); 41 | 42 | /** 43 | * @brief Set the power state of the relay 44 | * 45 | * This function controls the power state of the relay connected to the specified GPIO. 46 | * 47 | * @param gpio_num The GPIO number connected to the relay 48 | * @param power true to turn the relay on, false to turn it off 49 | */ 50 | void relay_driver_set_power(int gpio_num, bool power); 51 | 52 | #ifdef __cplusplus 53 | } 54 | #endif 55 | 56 | -------------------------------------------------------------------------------- /components/system/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register(SRC_DIRS . 2 | INCLUDE_DIRS . 3 | REQUIRES low_code low_code_transport ulp esp_amp lp_sw_timer) 4 | -------------------------------------------------------------------------------- /docs/all_documents.md: -------------------------------------------------------------------------------- 1 | # All LowCode Documents 2 | 3 | * [Components](../components/README.md): List of all the components and their functionalities 4 | * [Create LowCode Product](./create_product.md): Create and customise the lowcode product 5 | * [Debugging](./debugging.md): Debugging the lowcode firmware 6 | * [Device Setup](./device_setup.md): Steps to setup device 7 | * [Discussions](https://github.com/espressif/esp-lowcode-matter/discussions): Discussions on lowcode 8 | * [Getting Started: Codespaces](../README.md): Getting started with lowcode and its features 9 | * [Getting Started: Terminal](./getting_started_terminal.md): Detailed description on getting started with lowcode on local machine 10 | * [Getting Started: VSCode](./getting_started_vscode.md): Steps on getting started with lowcode vscode plugins/extension 11 | * [Hardware Setup](./hardware_setup.md): Steps to configure and set permissions for hardware 12 | * [Matter Solutions](./matter_solutions.md): List of all the matter solutions along with lowcode 13 | * [Product Configuration](./product_configuration.md): Customisation and configuration for product 14 | * [Products](../products/README.md): List of all the out of the box supported products and their functionalities 15 | * [Production Considerations](./production_considerations.md): Production considerations for lowcode product 16 | * [Programmer's Model](./programmer_model.md): Programmer's model for lowcode product 17 | -------------------------------------------------------------------------------- /docs/images/commands.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/esp-lowcode-matter/49064eeeb501481662142d84c04ab9dc1ceefc62/docs/images/commands.png -------------------------------------------------------------------------------- /docs/images/lowcode_ready.txt: -------------------------------------------------------------------------------- 1 | 2 | _ _____ _ _ ______ _ 3 | | | / __ \ | | (_) | ___ \ | | 4 | | | _____ _| / \/ ___ __| | ___ _ ___ | |_/ /___ __ _ __| |_ _ 5 | | | / _ \ \ /\ / / | / _ \ / _` |/ _ \ | / __| | // _ \/ _` |/ _` | | | | 6 | | |___| (_) \ V V /| \__/\ (_) | (_| | __/ | \__ \ | |\ \ __/ (_| | (_| | |_| | 7 | \_____/\___/ \_/\_/ \____/\___/ \__,_|\___| |_|___/ \_| \_\___|\__,_|\__,_|\__, | 8 | __/ | 9 | |___/ 10 | 11 | -------------------------------------------------------------------------------- /docs/images/open_codespace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/esp-lowcode-matter/49064eeeb501481662142d84c04ab9dc1ceefc62/docs/images/open_codespace.png -------------------------------------------------------------------------------- /docs/images/status_bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/esp-lowcode-matter/49064eeeb501481662142d84c04ab9dc1ceefc62/docs/images/status_bar.png -------------------------------------------------------------------------------- /docs/images/status_bar_steps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/esp-lowcode-matter/49064eeeb501481662142d84c04ab9dc1ceefc62/docs/images/status_bar_steps.png -------------------------------------------------------------------------------- /docs/production_considerations.md: -------------------------------------------------------------------------------- 1 | # Production Considerations 2 | 3 | TODO 4 | 5 | ## OTA 6 | 7 | ## Certification 8 | 9 | ## Security 10 | 11 | ## Device certificates 12 | 13 | ## Manufacturing 14 | 15 | ## Test Mode 16 | 17 | ## Related Documents 18 | 19 | * [Product Configuration](./product_configuration.md) 20 | * [All Documents](./all_documents.md) 21 | -------------------------------------------------------------------------------- /pre_built_binaries/bootloader.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/esp-lowcode-matter/49064eeeb501481662142d84c04ab9dc1ceefc62/pre_built_binaries/bootloader.bin -------------------------------------------------------------------------------- /pre_built_binaries/flash_args: -------------------------------------------------------------------------------- 1 | --flash_mode dio --flash_freq 80m --flash_size 4MB 2 | 0x0 bootloader.bin 3 | 0x10000 low_code_lp_core_maincore.bin 4 | 0xc000 partition-table.bin 5 | 0x1f8000 ota_data_initial.bin 6 | -------------------------------------------------------------------------------- /pre_built_binaries/low_code_lp_core_maincore.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/esp-lowcode-matter/49064eeeb501481662142d84c04ab9dc1ceefc62/pre_built_binaries/low_code_lp_core_maincore.bin -------------------------------------------------------------------------------- /pre_built_binaries/ota_data_initial.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/esp-lowcode-matter/49064eeeb501481662142d84c04ab9dc1ceefc62/pre_built_binaries/ota_data_initial.bin -------------------------------------------------------------------------------- /pre_built_binaries/partition-table.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/esp-lowcode-matter/49064eeeb501481662142d84c04ab9dc1ceefc62/pre_built_binaries/partition-table.bin -------------------------------------------------------------------------------- /pre_built_binaries/partitions.csv: -------------------------------------------------------------------------------- 1 | # Name,            Type, SubType,  Offset,   Size,     Flags,     Comments 2 | # bootloader,      ,     ,         0x0,      0xC000,   encrypted, # Reserved for bootloader 3 | # partition_table, ,     ,         0xC000,   0x1000,   encrypted, # Reserved for partition table 4 | esp_secure_cert,   0x3F, ,         0xD000,   0x2000,   encrypted, 5 | nvs_keys,          data, nvs_keys, 0xF000, 0x1000,   encrypted, 6 | ota_0, app, ota_0, 0x10000, 0x1E1000, encrypted, # Should be 0x10000 aligned. Additional 4kb for secure boot signature 7 | phy_init,          data, phy,      0x1F1000, 0x1000,   encrypted, 8 | fctry, data, nvs, 0x1F2000, 0x6000,   ,          # NVS encrypted 9 | otadata,           data, ota,      0x1F8000, 0x2000,   encrypted, 10 | nvs,               data, nvs,      0x1FA000, 0xD000,   ,          # NVS encrypted 11 | nvs_misc,       data, nvs,      0x207000, 0x5000,   ,          # NVS encrypted 12 | lp_core, data, 0x40,     0x20C000, 0x14000,  ,          # Reserved for future use 13 | ota_1, app, ota_1, 0x220000, 0x1D1000, encrypted, # Should be 0x10000 aligned. Additional 4kb for secure boot signature 14 | coredump, data, coredump, 0x3F1000, 0xF000,   encrypted, 15 | -------------------------------------------------------------------------------- /products/README.md: -------------------------------------------------------------------------------- 1 | # LowCode Products 2 | 3 | | Product Name | Description | 4 | |-----------------------|--------------------------------------------------------------------------------------------------------------| 5 | | **light_cw_pwm** | Light that supports the dimming of cold and warm white (CW) using PWM (Pulse Width Modulation). | 6 | | **light_rgbcw_ws2812**| Light that supports RGB color along with cold and warm white (CW) using WS2812 addressable RGB LEDs. | 7 | | **socket** | Smart socket that controls a device or load connected to it. | 8 | | **socket_2_channel** | Two-channel smart socket that independently controls two devices or loads connected to it. | 9 | | **template** | Generic and flexible product template for creating new device types or control systems. Customizable and extendable to meet specific product requirements. | 10 | | **thermostat** | Smart thermostat for controlling heating and cooling systems based on predefined temperature settings. | 11 | 12 | ## Related Documents 13 | 14 | * [Create LowCode Product](../docs/create_product.md) 15 | * [Components](../components/README.md) 16 | * [All Documents](../docs/all_documents.md) 17 | -------------------------------------------------------------------------------- /products/common/menuconfig_util.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | import json 3 | import os 4 | 5 | parser = argparse.ArgumentParser(description="Low code menuconfig parser script") 6 | parser.add_argument("--build_path", default="", type=str, help="Provide path for the build directory") 7 | parser.add_argument("--idf_path", default="", type=str, help="Provide the IDF path") 8 | args = vars(parser.parse_args()) 9 | 10 | build_path = args['build_path'] 11 | idf_path = args['idf_path'] 12 | config_env_path = "{}/config.env".format(build_path) 13 | 14 | # These components are present in IDF_PATH but are required for low_code 15 | exception_config = ['ulp', 'log', 'soc'] 16 | 17 | # edit the config.env file 18 | with open(config_env_path, 'r') as config_env_file: 19 | config_env = json.load(config_env_file) 20 | component_kconfigs_list = config_env['COMPONENT_KCONFIGS'].split(";") 21 | 22 | # Remove all the kconfigs which are present in idf_path, since the program is baremetal 23 | for kconfig in component_kconfigs_list[:]: 24 | if kconfig.startswith(idf_path) and not any(substring in kconfig for substring in exception_config): 25 | component_kconfigs_list.remove(kconfig) 26 | config_env['COMPONENT_KCONFIGS'] = ';'.join(component_kconfigs_list) 27 | 28 | component_kconfigs_projbuild = config_env['COMPONENT_KCONFIGS_PROJBUILD'].split(";") 29 | for kconfig in component_kconfigs_projbuild[:]: 30 | if kconfig.startswith(idf_path) and not any(substring in kconfig for substring in exception_config): 31 | component_kconfigs_projbuild.remove(kconfig) 32 | config_env['COMPONENT_KCONFIGS_PROJBUILD'] = ';'.join(component_kconfigs_projbuild) 33 | 34 | os.remove(config_env_path) 35 | with open(config_env_path, 'w') as config_env_file: 36 | json.dump(config_env, config_env_file, indent=4) 37 | -------------------------------------------------------------------------------- /products/common/sdkconfig.defaults: -------------------------------------------------------------------------------- 1 | # Enable LP Core 2 | CONFIG_ULP_PANIC_OUTPUT_ENABLE=y 3 | CONFIG_ULP_COPROC_ENABLED=y 4 | CONFIG_ULP_COPROC_TYPE_LP_CORE=y 5 | CONFIG_ULP_HP_UART_CONSOLE_PRINT=y 6 | 7 | # AMP 8 | CONFIG_ESP_AMP_ENABLED=y 9 | CONFIG_ESP_AMP_SUBCORE_TYPE_LP_CORE=y 10 | CONFIG_ESP_AMP_SYSTEM_ENABLE_SUPPLICANT=y 11 | CONFIG_ESP_AMP_ROUTE_SUBCORE_PRINT=y 12 | CONFIG_ESP_AMP_SHARED_MEM_SIZE=20480 13 | 14 | # LP Core Memory 15 | CONFIG_ULP_COPROC_RESERVE_MEM=14500 16 | CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y 17 | 18 | # HP Core Memory 19 | CONFIG_ESP_AMP_SUBCORE_USE_HP_MEM=y 20 | CONFIG_ESP_AMP_SUBCORE_USE_HP_MEM_SIZE=49152 21 | 22 | # Memory Optimisation 23 | CONFIG_COMPILER_OPTIMIZATION_SIZE=y 24 | 25 | CONFIG_OPTIMIZATION_ASSERTIONS_SILENT=y 26 | # CONFIG_ULP_HP_UART_CONSOLE_PRINT=n 27 | -------------------------------------------------------------------------------- /products/light_cw_pwm/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # The following lines have to be present in your project's CMakeLists in this exact order for cmake to work correctly 2 | cmake_minimum_required(VERSION 3.16) 3 | 4 | include(../../tools/cmake/low_code.cmake) 5 | 6 | list(APPEND SDKCONFIG_DEFAULTS "sdkconfig.defaults") 7 | 8 | list(APPEND EXTRA_COMPONENT_DIRS 9 | ../../components 10 | ) 11 | 12 | set(PROJECT_VER "1.0") 13 | project(light_cw_pwm) 14 | -------------------------------------------------------------------------------- /products/light_cw_pwm/configuration/cd_cert_fff1_8000.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/esp-lowcode-matter/49064eeeb501481662142d84c04ab9dc1ceefc62/products/light_cw_pwm/configuration/cd_cert_fff1_8000.der -------------------------------------------------------------------------------- /products/light_cw_pwm/configuration/data_model.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/esp-lowcode-matter/49064eeeb501481662142d84c04ab9dc1ceefc62/products/light_cw_pwm/configuration/data_model.bin -------------------------------------------------------------------------------- /products/light_cw_pwm/configuration/product_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "config_version": 3, 3 | "pre_driver": [ 4 | { 5 | "type": "ezc.pre_driver.power_management", 6 | "enable_light_sleep": true, 7 | "max_freq_mhz": 160, 8 | "min_freq_mhz": 10 9 | } 10 | ], 11 | "product_common": [ 12 | { 13 | "type": "ezc.product_common.factory_reset", 14 | "subtype": 1, 15 | "count": 3, 16 | "auto_trigger": true 17 | } 18 | ], 19 | "test_mode": [ 20 | { 21 | "type": "ezc.test_mode.common", 22 | "subtype": 1 23 | }, 24 | { 25 | "type": "ezc.test_mode.ble", 26 | "subtype": 1 27 | }, 28 | { 29 | "type": "ezc.test_mode.sniffer", 30 | "subtype": 1, 31 | "trigger": 3 32 | }, 33 | { 34 | "type": "ezc.test_mode.low_code", 35 | "subtype": 1, 36 | "ssid": "test_low_code_1" 37 | }, 38 | { 39 | "type": "ezc.test_mode.low_code", 40 | "subtype": 2, 41 | "ssid": "test_low_code_2" 42 | }, 43 | { 44 | "type": "ezc.test_mode.low_code", 45 | "subtype": 3, 46 | "ssid": "test_low_code_3" 47 | } 48 | ], 49 | "device_management": true 50 | } 51 | -------------------------------------------------------------------------------- /products/light_cw_pwm/configuration/product_info.json: -------------------------------------------------------------------------------- 1 | { 2 | "config_version": 3, 3 | "vendor_id": 65521, 4 | "product_id": 32768, 5 | "origin_vendor_id": 65521, 6 | "origin_product_id": 32768, 7 | "device_type_id": 268, 8 | "vendor_name": "Espressif", 9 | "product_name": "Matter Product", 10 | "hw_ver": 1, 11 | "hw_ver_str": "1", 12 | "chip": "esp32c6", 13 | "connection_type": "wifi", 14 | "module": "ESP32-C6-MINI-1", 15 | "flash_size": "4MB", 16 | "secure_boot": "enabled", 17 | "product_type": "light", 18 | "solution_type": "low_code" 19 | } 20 | -------------------------------------------------------------------------------- /products/light_cw_pwm/main/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register(SRC_DIRS . 2 | INCLUDE_DIRS . 3 | REQUIRES low_code system light) 4 | -------------------------------------------------------------------------------- /products/light_cw_pwm/main/app_priv.h: -------------------------------------------------------------------------------- 1 | // Copyright 2024 Espressif Systems (Shanghai) PTE LTD 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #pragma once 16 | 17 | #include 18 | #include 19 | 20 | /* Driver functions */ 21 | int app_driver_init(); 22 | int app_driver_set_light_state(bool state); 23 | int app_driver_set_light_brightness(uint8_t brightness); 24 | int app_driver_set_light_temperature(uint16_t temperature); 25 | 26 | /* Events handler */ 27 | int app_driver_event_handler(low_code_event_t *event); 28 | 29 | /* Callbacks from system */ 30 | int feature_update_from_system(low_code_feature_data_t *data); 31 | int event_from_system(low_code_event_t *event); 32 | -------------------------------------------------------------------------------- /products/light_cw_pwm/sdkconfig.defaults: -------------------------------------------------------------------------------- 1 | # set light type to led 2 | CONFIG_USE_LIGHT_DEVICE_TYPE_LED=y 3 | -------------------------------------------------------------------------------- /products/light_rgbcw_ws2812/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # The following lines have to be present in your project's CMakeLists in this exact order for cmake to work correctly 2 | cmake_minimum_required(VERSION 3.16) 3 | 4 | include(../../tools/cmake/low_code.cmake) 5 | 6 | list(APPEND SDKCONFIG_DEFAULTS "sdkconfig.defaults") 7 | 8 | list(APPEND EXTRA_COMPONENT_DIRS 9 | ../../components 10 | ) 11 | 12 | set(PROJECT_VER "1.0") 13 | project(light_rgbcw_ws2812) 14 | -------------------------------------------------------------------------------- /products/light_rgbcw_ws2812/configuration/cd_cert_fff1_8000.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/esp-lowcode-matter/49064eeeb501481662142d84c04ab9dc1ceefc62/products/light_rgbcw_ws2812/configuration/cd_cert_fff1_8000.der -------------------------------------------------------------------------------- /products/light_rgbcw_ws2812/configuration/data_model.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/esp-lowcode-matter/49064eeeb501481662142d84c04ab9dc1ceefc62/products/light_rgbcw_ws2812/configuration/data_model.bin -------------------------------------------------------------------------------- /products/light_rgbcw_ws2812/configuration/product_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "config_version": 3, 3 | "pre_driver": [ 4 | { 5 | "type": "ezc.pre_driver.power_management", 6 | "enable_light_sleep": true, 7 | "max_freq_mhz": 160, 8 | "min_freq_mhz": 10 9 | } 10 | ], 11 | "product_common": [ 12 | { 13 | "type": "ezc.product_common.factory_reset", 14 | "subtype": 1, 15 | "count": 3, 16 | "auto_trigger": true 17 | } 18 | ], 19 | "test_mode": [ 20 | { 21 | "type": "ezc.test_mode.common", 22 | "subtype": 1 23 | }, 24 | { 25 | "type": "ezc.test_mode.ble", 26 | "subtype": 1 27 | }, 28 | { 29 | "type": "ezc.test_mode.sniffer", 30 | "subtype": 1, 31 | "trigger": 3 32 | }, 33 | { 34 | "type": "ezc.test_mode.low_code", 35 | "subtype": 1, 36 | "ssid": "test_low_code_1" 37 | }, 38 | { 39 | "type": "ezc.test_mode.low_code", 40 | "subtype": 2, 41 | "ssid": "test_low_code_2" 42 | }, 43 | { 44 | "type": "ezc.test_mode.low_code", 45 | "subtype": 3, 46 | "ssid": "test_low_code_3" 47 | } 48 | ], 49 | "device_management": true 50 | } 51 | -------------------------------------------------------------------------------- /products/light_rgbcw_ws2812/configuration/product_info.json: -------------------------------------------------------------------------------- 1 | { 2 | "config_version": 3, 3 | "vendor_id": 65521, 4 | "product_id": 32768, 5 | "origin_vendor_id": 65521, 6 | "origin_product_id": 32768, 7 | "device_type_id": 268, 8 | "vendor_name": "Espressif", 9 | "product_name": "Matter Product", 10 | "hw_ver": 1, 11 | "hw_ver_str": "1", 12 | "chip": "esp32c6", 13 | "connection_type": "wifi", 14 | "module": "ESP32-C6-MINI-1", 15 | "flash_size": "4MB", 16 | "secure_boot": "enabled", 17 | "product_type": "light", 18 | "solution_type": "low_code" 19 | } 20 | -------------------------------------------------------------------------------- /products/light_rgbcw_ws2812/main/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register(SRC_DIRS . 2 | INCLUDE_DIRS . 3 | REQUIRES low_code system light) 4 | -------------------------------------------------------------------------------- /products/light_rgbcw_ws2812/main/app_priv.h: -------------------------------------------------------------------------------- 1 | // Copyright 2024 Espressif Systems (Shanghai) PTE LTD 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #pragma once 16 | 17 | #include 18 | #include 19 | 20 | /* Driver functions */ 21 | int app_driver_init(); 22 | int app_driver_set_light_state(bool state); 23 | int app_driver_set_light_brightness(uint8_t brightness); 24 | int app_driver_set_light_temperature(uint16_t temperature); 25 | int app_driver_set_light_hue(uint8_t hue); 26 | int app_driver_set_light_saturation(uint8_t saturation); 27 | 28 | /* Events handler */ 29 | int app_driver_event_handler(low_code_event_t *event); 30 | 31 | /* Callbacks from system */ 32 | int feature_update_from_system(low_code_feature_data_t *data); 33 | int event_from_system(low_code_event_t *event); 34 | -------------------------------------------------------------------------------- /products/light_rgbcw_ws2812/sdkconfig.defaults: -------------------------------------------------------------------------------- 1 | # set light driver to ws2812 2 | CONFIG_USE_LIGHT_DEVICE_TYPE_WS2812=y 3 | 4 | -------------------------------------------------------------------------------- /products/socket/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # The following lines have to be present in your project's CMakeLists in this exact order for cmake to work correctly 2 | cmake_minimum_required(VERSION 3.16) 3 | 4 | include(../../tools/cmake/low_code.cmake) 5 | 6 | list(APPEND SDKCONFIG_DEFAULTS "sdkconfig.defaults") 7 | 8 | list(APPEND EXTRA_COMPONENT_DIRS 9 | ../../components 10 | ) 11 | 12 | set(PROJECT_VER "1.0") 13 | project(socket) 14 | -------------------------------------------------------------------------------- /products/socket/configuration/cd_cert_fff1_8000.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/esp-lowcode-matter/49064eeeb501481662142d84c04ab9dc1ceefc62/products/socket/configuration/cd_cert_fff1_8000.der -------------------------------------------------------------------------------- /products/socket/configuration/data_model.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/esp-lowcode-matter/49064eeeb501481662142d84c04ab9dc1ceefc62/products/socket/configuration/data_model.bin -------------------------------------------------------------------------------- /products/socket/configuration/product_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "config_version": 3, 3 | "test_mode": [ 4 | { 5 | "type": "ezc.test_mode.common", 6 | "subtype": 1 7 | }, 8 | { 9 | "type": "ezc.test_mode.ble", 10 | "subtype": 1 11 | }, 12 | { 13 | "type": "ezc.test_mode.sniffer", 14 | "subtype": 1, 15 | "trigger": 3 16 | }, 17 | { 18 | "type": "ezc.test_mode.low_code", 19 | "subtype": 1, 20 | "ssid": "test_low_code_1" 21 | }, 22 | { 23 | "type": "ezc.test_mode.low_code", 24 | "subtype": 2, 25 | "ssid": "test_low_code_2" 26 | }, 27 | { 28 | "type": "ezc.test_mode.low_code", 29 | "subtype": 3, 30 | "ssid": "test_low_code_3" 31 | } 32 | ], 33 | "device_management": true 34 | } 35 | -------------------------------------------------------------------------------- /products/socket/configuration/product_info.json: -------------------------------------------------------------------------------- 1 | { 2 | "config_version": 3, 3 | "vendor_id": 65521, 4 | "product_id": 32768, 5 | "origin_vendor_id": 65521, 6 | "origin_product_id": 32768, 7 | "device_type_id": 266, 8 | "vendor_name": "Espressif", 9 | "product_name": "Matter Product", 10 | "hw_ver": 1, 11 | "hw_ver_str": "1", 12 | "chip": "esp32c6", 13 | "connection_type": "wifi", 14 | "module": "ESP32-C6-MINI-1", 15 | "flash_size": "4MB", 16 | "secure_boot": "enabled", 17 | "product_type": "socket", 18 | "solution_type": "low_code" 19 | } 20 | -------------------------------------------------------------------------------- /products/socket/main/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register(SRC_DIRS . 2 | INCLUDE_DIRS . 3 | REQUIRES low_code system button relay light) 4 | -------------------------------------------------------------------------------- /products/socket/main/app_priv.h: -------------------------------------------------------------------------------- 1 | // Copyright 2024 Espressif Systems (Shanghai) PTE LTD 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #pragma once 16 | 17 | #include 18 | #include 19 | 20 | /* Driver functions */ 21 | int app_driver_init(); 22 | int app_driver_set_socket_state(bool state); 23 | 24 | /* Events handler */ 25 | int app_driver_event_handler(low_code_event_t *event); 26 | 27 | /* Callbacks from system */ 28 | int feature_update_from_system(low_code_feature_data_t *data); 29 | int event_from_system(low_code_event_t *event); 30 | -------------------------------------------------------------------------------- /products/socket/sdkconfig.defaults: -------------------------------------------------------------------------------- 1 | # Button 2 | CONFIG_BUTTON_DRIVER_USE_HP_GPIO=y 3 | -------------------------------------------------------------------------------- /products/socket_2_channel/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # The following lines have to be present in your project's CMakeLists in this exact order for cmake to work correctly 2 | cmake_minimum_required(VERSION 3.16) 3 | 4 | include(../../tools/cmake/low_code.cmake) 5 | 6 | list(APPEND SDKCONFIG_DEFAULTS "sdkconfig.defaults") 7 | 8 | list(APPEND EXTRA_COMPONENT_DIRS 9 | ../../components 10 | ) 11 | 12 | set(PROJECT_VER "1.0") 13 | project(socket_2_channel) 14 | -------------------------------------------------------------------------------- /products/socket_2_channel/configuration/cd_cert_fff1_8000.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/esp-lowcode-matter/49064eeeb501481662142d84c04ab9dc1ceefc62/products/socket_2_channel/configuration/cd_cert_fff1_8000.der -------------------------------------------------------------------------------- /products/socket_2_channel/configuration/data_model.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/esp-lowcode-matter/49064eeeb501481662142d84c04ab9dc1ceefc62/products/socket_2_channel/configuration/data_model.bin -------------------------------------------------------------------------------- /products/socket_2_channel/configuration/product_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "config_version": 3, 3 | "test_mode": [ 4 | { 5 | "type": "ezc.test_mode.common", 6 | "subtype": 1 7 | }, 8 | { 9 | "type": "ezc.test_mode.ble", 10 | "subtype": 1 11 | }, 12 | { 13 | "type": "ezc.test_mode.sniffer", 14 | "subtype": 1, 15 | "trigger": 3 16 | }, 17 | { 18 | "type": "ezc.test_mode.low_code", 19 | "subtype": 1, 20 | "ssid": "test_low_code_1" 21 | }, 22 | { 23 | "type": "ezc.test_mode.low_code", 24 | "subtype": 2, 25 | "ssid": "test_low_code_2" 26 | }, 27 | { 28 | "type": "ezc.test_mode.low_code", 29 | "subtype": 3, 30 | "ssid": "test_low_code_3" 31 | } 32 | ], 33 | "device_management": true 34 | } 35 | -------------------------------------------------------------------------------- /products/socket_2_channel/configuration/product_info.json: -------------------------------------------------------------------------------- 1 | { 2 | "config_version": 3, 3 | "vendor_id": 65521, 4 | "product_id": 32768, 5 | "origin_vendor_id": 65521, 6 | "origin_product_id": 32768, 7 | "device_type_id": 266, 8 | "vendor_name": "Espressif", 9 | "product_name": "Matter Product", 10 | "hw_ver": 1, 11 | "hw_ver_str": "1", 12 | "chip": "esp32c6", 13 | "connection_type": "wifi", 14 | "module": "ESP32-C6-MINI-1", 15 | "flash_size": "4MB", 16 | "secure_boot": "enabled", 17 | "product_type": "socket", 18 | "solution_type": "low_code" 19 | } 20 | -------------------------------------------------------------------------------- /products/socket_2_channel/main/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register(SRC_DIRS . 2 | INCLUDE_DIRS . 3 | REQUIRES low_code system button relay light) 4 | -------------------------------------------------------------------------------- /products/socket_2_channel/main/app_priv.h: -------------------------------------------------------------------------------- 1 | // Copyright 2024 Espressif Systems (Shanghai) PTE LTD 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #pragma once 16 | 17 | #include 18 | #include 19 | 20 | /* Driver functions */ 21 | int app_driver_init(); 22 | int app_driver_set_socket_state(uint16_t endpoint_id, bool state); 23 | 24 | /* Events handler */ 25 | int app_driver_event_handler(low_code_event_t *event); 26 | 27 | /* Callbacks from system */ 28 | int feature_update_from_system(low_code_feature_data_t *data); 29 | int event_from_system(low_code_event_t *event); 30 | -------------------------------------------------------------------------------- /products/socket_2_channel/sdkconfig.defaults: -------------------------------------------------------------------------------- 1 | # Button 2 | CONFIG_BUTTON_DRIVER_USE_HP_GPIO=y 3 | -------------------------------------------------------------------------------- /products/template/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # The following lines have to be present in your project's CMakeLists in this exact order for cmake to work correctly 2 | cmake_minimum_required(VERSION 3.16) 3 | 4 | include(../../tools/cmake/low_code.cmake) 5 | 6 | list(APPEND SDKCONFIG_DEFAULTS "sdkconfig.defaults") 7 | 8 | list(APPEND EXTRA_COMPONENT_DIRS 9 | ../../components 10 | ) 11 | 12 | set(PROJECT_VER "1.0") 13 | project(template) 14 | -------------------------------------------------------------------------------- /products/template/configuration/cd_cert_fff1_8000.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/esp-lowcode-matter/49064eeeb501481662142d84c04ab9dc1ceefc62/products/template/configuration/cd_cert_fff1_8000.der -------------------------------------------------------------------------------- /products/template/configuration/data_model.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/esp-lowcode-matter/49064eeeb501481662142d84c04ab9dc1ceefc62/products/template/configuration/data_model.bin -------------------------------------------------------------------------------- /products/template/configuration/product_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "config_version": 3, 3 | "pre_driver": [ 4 | { 5 | "type": "ezc.pre_driver.power_management", 6 | "enable_light_sleep": true, 7 | "max_freq_mhz": 160, 8 | "min_freq_mhz": 10 9 | } 10 | ], 11 | "product_common": [ 12 | { 13 | "type": "ezc.product_common.factory_reset", 14 | "subtype": 1, 15 | "count": 3, 16 | "auto_trigger": true 17 | } 18 | ], 19 | "test_mode": [ 20 | { 21 | "type": "ezc.test_mode.common", 22 | "subtype": 1 23 | }, 24 | { 25 | "type": "ezc.test_mode.ble", 26 | "subtype": 1 27 | }, 28 | { 29 | "type": "ezc.test_mode.sniffer", 30 | "subtype": 1, 31 | "trigger": 3 32 | }, 33 | { 34 | "type": "ezc.test_mode.low_code", 35 | "subtype": 1, 36 | "ssid": "test_low_code_1" 37 | }, 38 | { 39 | "type": "ezc.test_mode.low_code", 40 | "subtype": 2, 41 | "ssid": "test_low_code_2" 42 | }, 43 | { 44 | "type": "ezc.test_mode.low_code", 45 | "subtype": 3, 46 | "ssid": "test_low_code_3" 47 | } 48 | ], 49 | "device_management": true 50 | } 51 | -------------------------------------------------------------------------------- /products/template/configuration/product_info.json: -------------------------------------------------------------------------------- 1 | { 2 | "config_version": 3, 3 | "vendor_id": 65521, 4 | "product_id": 32768, 5 | "origin_vendor_id": 65521, 6 | "origin_product_id": 32768, 7 | "device_type_id": 1, 8 | "vendor_name": "Espressif", 9 | "product_name": "Matter Product", 10 | "hw_ver": 1, 11 | "hw_ver_str": "1", 12 | "chip": "esp32c6", 13 | "connection_type": "wifi", 14 | "module": "ESP32-C6-MINI-1", 15 | "flash_size": "4MB", 16 | "secure_boot": "enabled", 17 | "product_type": "template", 18 | "solution_type": "low_code" 19 | } 20 | -------------------------------------------------------------------------------- /products/template/main/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register(SRC_DIRS . 2 | INCLUDE_DIRS . 3 | REQUIRES low_code system) 4 | -------------------------------------------------------------------------------- /products/template/main/app_priv.h: -------------------------------------------------------------------------------- 1 | // Copyright 2024 Espressif Systems (Shanghai) PTE LTD 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #pragma once 16 | 17 | #include 18 | #include 19 | 20 | /* Driver functions */ 21 | int app_driver_init(); 22 | int app_driver_feature_update(); 23 | 24 | /* Events handler */ 25 | int app_driver_event_handler(low_code_event_t *event); 26 | 27 | /* Callbacks from system */ 28 | int feature_update_from_system(low_code_feature_data_t *data); 29 | int event_from_system(low_code_event_t *event); 30 | -------------------------------------------------------------------------------- /products/template/sdkconfig.defaults: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/esp-lowcode-matter/49064eeeb501481662142d84c04ab9dc1ceefc62/products/template/sdkconfig.defaults -------------------------------------------------------------------------------- /products/thermostat/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # The following lines have to be present in your project's CMakeLists in this exact order for cmake to work correctly 2 | cmake_minimum_required(VERSION 3.16) 3 | 4 | include(../../tools/cmake/low_code.cmake) 5 | 6 | list(APPEND SDKCONFIG_DEFAULTS "sdkconfig.defaults") 7 | 8 | list(APPEND EXTRA_COMPONENT_DIRS 9 | ../../components 10 | ) 11 | 12 | set(PROJECT_VER "1.0") 13 | project(thermostat) 14 | -------------------------------------------------------------------------------- /products/thermostat/configuration/cd_cert_fff1_8000.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/esp-lowcode-matter/49064eeeb501481662142d84c04ab9dc1ceefc62/products/thermostat/configuration/cd_cert_fff1_8000.der -------------------------------------------------------------------------------- /products/thermostat/configuration/data_model.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/esp-lowcode-matter/49064eeeb501481662142d84c04ab9dc1ceefc62/products/thermostat/configuration/data_model.bin -------------------------------------------------------------------------------- /products/thermostat/configuration/product_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "config_version": 3, 3 | "test_mode": [ 4 | { 5 | "type": "ezc.test_mode.common", 6 | "subtype": 1 7 | }, 8 | { 9 | "type": "ezc.test_mode.ble", 10 | "subtype": 1 11 | }, 12 | { 13 | "type": "ezc.test_mode.sniffer", 14 | "subtype": 1, 15 | "trigger": 3 16 | }, 17 | { 18 | "type": "ezc.test_mode.low_code", 19 | "subtype": 1, 20 | "ssid": "test_low_code_1" 21 | }, 22 | { 23 | "type": "ezc.test_mode.low_code", 24 | "subtype": 2, 25 | "ssid": "test_low_code_2" 26 | }, 27 | { 28 | "type": "ezc.test_mode.low_code", 29 | "subtype": 3, 30 | "ssid": "test_low_code_3" 31 | } 32 | ], 33 | "device_management": true 34 | } 35 | -------------------------------------------------------------------------------- /products/thermostat/configuration/product_info.json: -------------------------------------------------------------------------------- 1 | { 2 | "config_version": 3, 3 | "vendor_id": 65521, 4 | "product_id": 32768, 5 | "origin_vendor_id": 65521, 6 | "origin_product_id": 32768, 7 | "device_type_id": 769, 8 | "vendor_name": "Espressif", 9 | "product_name": "Matter Product", 10 | "hw_ver": 1, 11 | "hw_ver_str": "1", 12 | "chip": "esp32c6", 13 | "connection_type": "wifi", 14 | "module": "ESP32-C6-MINI-1", 15 | "flash_size": "4MB", 16 | "secure_boot": "enabled", 17 | "product_type": "thermostat", 18 | "solution_type": "low_code" 19 | } 20 | 21 | -------------------------------------------------------------------------------- /products/thermostat/main/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register(SRC_DIRS . 2 | INCLUDE_DIRS . 3 | REQUIRES low_code system) 4 | -------------------------------------------------------------------------------- /products/thermostat/main/app_priv.h: -------------------------------------------------------------------------------- 1 | // Copyright 2024 Espressif Systems (Shanghai) PTE LTD 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #pragma once 16 | 17 | #include 18 | #include 19 | 20 | /* Driver functions */ 21 | int app_driver_init(); 22 | int app_driver_set_temperature(int16_t temperature); 23 | int app_driver_set_cooling_setpoint(int16_t cooling_setpoint); 24 | int app_driver_set_heating_setpoint(int16_t heating_setpoint); 25 | 26 | /* Events handler */ 27 | int app_driver_event_handler(low_code_event_t *event); 28 | 29 | /* Callbacks from system */ 30 | int feature_update_from_system(low_code_feature_data_t *data); 31 | int event_from_system(low_code_event_t *event); 32 | -------------------------------------------------------------------------------- /products/thermostat/sdkconfig.defaults: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/esp-lowcode-matter/49064eeeb501481662142d84c04ab9dc1ceefc62/products/thermostat/sdkconfig.defaults -------------------------------------------------------------------------------- /tools/cmake/low_code.cmake: -------------------------------------------------------------------------------- 1 | ## set IDF_PATH & ESP_AMP_PATH 2 | if(NOT DEFINED ENV{IDF_PATH}) 3 | message(FATAL_ERROR "Please set IDF_PATH to the path of esp-idf repo") 4 | endif(NOT DEFINED ENV{IDF_PATH}) 5 | set(IDF_PATH $ENV{IDF_PATH} CACHE PATH "" FORCE) 6 | 7 | if(NOT IDF_TARGET STREQUAL "esp32c6") 8 | message(FATAL_ERROR "Please set idf target to esp32c6 by running: idf.py set-target esp32c6") 9 | endif() 10 | 11 | if(NOT DEFINED ENV{ESP_AMP_PATH}) 12 | message(FATAL_ERROR "Please set ESP_AMP_PATH to the path of esp_amp repo") 13 | endif(NOT DEFINED ENV{ESP_AMP_PATH}) 14 | set(ESP_AMP_PATH $ENV{ESP_AMP_PATH} CACHE PATH "" FORCE) 15 | 16 | ## esp_amp settings 17 | include($ENV{ESP_AMP_PATH}/components/esp_amp/cmake/subcore_project.cmake) 18 | 19 | ## set sdkconfig.defaults 20 | list(APPEND SDKCONFIG_DEFAULTS "../common/sdkconfig.defaults") 21 | 22 | ## additional flags for LP core 23 | idf_build_set_property(COMPILE_OPTIONS "-Wno-error=uninitialized;-Wno-error=maybe-uninitialized;-Wno-missing-field-initializers" APPEND) 24 | 25 | if(NOT DEFINED ENV{LOW_CODE_PATH}) 26 | message(FATAL_ERROR "Please set LOW_CODE_PATH to the path of low_code repo") 27 | endif(NOT DEFINED ENV{LOW_CODE_PATH}) 28 | include($ENV{LOW_CODE_PATH}/tools/cmake/low_code_menuconfig.cmake) 29 | -------------------------------------------------------------------------------- /tools/cmake/low_code_menuconfig.cmake: -------------------------------------------------------------------------------- 1 | ## TODO: To be removed later 2 | ## setting required for build system 3 | add_compile_definitions(CONFIG_ESP_CONSOLE_UART_NUM=0) 4 | add_compile_definitions(CONFIG_BOOTLOADER_LOG_LEVEL=0) 5 | set(CONFIG_ESPTOOLPY_FLASHMODE dio CACHE PATH "" FORCE) 6 | set(CONFIG_ESPTOOLPY_FLASHFREQ "80m" CACHE PATH "" FORCE) 7 | set(CONFIG_ESPTOOLPY_FLASHSIZE "4MB" CACHE PATH "" FORCE) 8 | set(CONFIG_PARTITION_TABLE_OFFSET 0xC000 CACHE PATH "" FORCE) 9 | set(CONFIG_BOOTLOADER_OFFSET_IN_FLASH 0x0 CACHE PATH "" FORCE) 10 | set(CONFIG_ESP_REV_MIN_FULL 0 CACHE PATH "" FORCE) 11 | set(CONFIG_ESP_REV_MAX_FULL 99 CACHE PATH "" FORCE) 12 | 13 | # override the cmake configure_file function 14 | # This has been done to check when config.env file is generated and edit it 15 | # refer: https://gitlab.kitware.com/cmake/cmake/-/issues/23482 16 | function(configure_file) 17 | # This calls the original configure_file func 18 | _configure_file(${ARGN}) 19 | 20 | list(GET ARGN 0 configure_file_input) 21 | list(GET ARGN 1 configure_file_output) 22 | set(config_env_path "${CMAKE_BINARY_DIR}/config.env") 23 | if (config_env_path STREQUAL configure_file_output) 24 | message(STATUS "The input is: ${configure_file_input}") 25 | message(STATUS "The output is: ${configure_file_output}") 26 | execute_process( 27 | COMMAND ${python} ${CMAKE_SOURCE_DIR}/../common/menuconfig_util.py --build_path ${CMAKE_BINARY_DIR} --idf_path $ENV{IDF_PATH} 28 | RESULT_VARIABLE menuconfig_utils_result 29 | COMMAND_ECHO STDOUT 30 | ) 31 | if (menuconfig_utils_result) 32 | message(FATAL_ERROR "Failed to run the menuconfig_util script") 33 | endif() 34 | endif() 35 | endfunction() 36 | -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/py_matter_idl/examples/README.md: -------------------------------------------------------------------------------- 1 | ## Creating a custom matter_idl generator 2 | 3 | The matter_idl tool can be used to generate arbitrary code based on the Matter 4 | data model schemas. To create a custom generator that lives outside of the 5 | Matter SDK tree, follow the design pattern of 6 | scripts/py_matter_idl/examples/matter_idl_plugin: 7 | 8 | 1. Create a directory for your python generator module, for example 9 | "matter_idl_plugin". 10 | 2. Add an `__init__.py` under "matter_idl_plugin" implementing a subclass of 11 | `CodeGenerator` named `CustomGenerator`. 12 | 3. Have `CustomGenerator` load jinja templates, also under the 13 | "matter_idl_plugin" subdirectory. 14 | 4. Execute the `codegen.py` script passing the path to the parent directory of 15 | "matter_idl_plugin" via 16 | `--generator custom::` argument and package 17 | name like `--option package:com.example.matter.proto` 18 | 19 | ``` 20 | # From top-of-tree in this example 21 | ./scripts/codegen.py \ 22 | --generator custom:./scripts/py_matter_idl/examples:matter_idl_plugin \ 23 | --option package:com.example.matter.proto \ 24 | ./src/controller/data_model/controller-clusters.matter 25 | ``` 26 | -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/py_matter_idl/matter_idl/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/esp-lowcode-matter/49064eeeb501481662142d84c04ab9dc1ceefc62/tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/py_matter_idl/matter_idl/__init__.py -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/py_matter_idl/matter_idl/generators/cluster_selection.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2023 Project CHIP Authors 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | from typing import List 18 | 19 | from matter_idl.matter_idl_types import Cluster, Idl 20 | 21 | 22 | def server_side_clusters(idl: Idl) -> List[Cluster]: 23 | """ 24 | Return a list of clusters that are instantiated in at least one endpoint 25 | within the given IDL. 26 | """ 27 | cluster_names = set() 28 | 29 | for e in idl.endpoints: 30 | for item in e.server_clusters: 31 | cluster_names.add(item.name) 32 | 33 | return [c for c in idl.clusters if c.name in cluster_names] 34 | 35 | 36 | def binding_clusters(idl: Idl) -> List[Cluster]: 37 | """ 38 | Return a list of clusters that show up as bindings on some endpoints 39 | within the given IDL. 40 | """ 41 | cluster_names = set() 42 | 43 | for e in idl.endpoints: 44 | for item in e.client_bindings: 45 | cluster_names.add(item) 46 | 47 | return [c for c in idl.clusters if c.name in cluster_names] 48 | -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/py_matter_idl/matter_idl/generators/cpp/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/esp-lowcode-matter/49064eeeb501481662142d84c04ab9dc1ceefc62/tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/py_matter_idl/matter_idl/generators/cpp/__init__.py -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/py_matter_idl/matter_idl/generators/cpp/application/CallbackStubSource.jinja: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | using namespace chip; 4 | 5 | {%- for name in clusters | sort(attribute='name') | map(attribute='name') | unique %} 6 | void __attribute__((weak)) emberAf{{name}}ClusterInitCallback(EndpointId endpoint) 7 | { 8 | // To prevent warning 9 | (void) endpoint; 10 | } 11 | {%- endfor %} 12 | -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/py_matter_idl/matter_idl/generators/cpp/application/ClusterInitCallbackSource.jinja: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | using namespace chip; 7 | 8 | // Cluster Init Functions 9 | void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) 10 | { 11 | switch (clusterId) 12 | { 13 | {%- for name in clusters | sort(attribute='name') | map(attribute='name') | unique %} 14 | case app::Clusters::{{name}}::Id: 15 | emberAf{{name}}ClusterInitCallback(endpoint); 16 | break; 17 | {%- endfor %} 18 | default: 19 | // Unrecognized cluster ID 20 | break; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/py_matter_idl/matter_idl/generators/cpp/application/PluginApplicationCallbacksHeader.jinja: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | {%- for cluster in clusters | sort(attribute='name') %} 4 | void Matter{{ cluster.name }}PluginServerInitCallback(); 5 | {%- endfor %} 6 | 7 | #define MATTER_PLUGINS_INIT \ 8 | {%- for cluster in clusters | sort(attribute='name') %} 9 | Matter{{ cluster.name }}PluginServerInitCallback();{{ " \\" if not loop.last else ""}} 10 | {%- else %} 11 | (void)0; /* No server side clusters */ 12 | {%- endfor %} 13 | 14 | -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/py_matter_idl/matter_idl/generators/cpp/tlvmeta/TLVMetaData_cpp.jinja: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace chip { 4 | namespace TLVMeta { 5 | namespace { 6 | 7 | using namespace chip::FlatTree; 8 | using namespace chip::TLV; 9 | 10 | {%- for table in sub_tables %} 11 | 12 | const Entry _{{table.full_name}}[] = { 13 | {%- for entry in table.entries %} 14 | { { {{entry.code}}, "{{entry.name}}", ItemType::{{entry.item_type}} }, {{entry.reference | indexInTable(sub_tables)}} }, // {{entry.real_type}} 15 | {%- endfor %} 16 | }; 17 | {%- endfor %} 18 | 19 | const Entry _all_clusters[] = { 20 | {%- for cluster in clusters | sort(attribute='code') %} 21 | { { ClusterTag({{"0x%02X" | format(cluster.code)}}), "{{cluster.name}}", ItemType::kDefault }, {{cluster.name | indexInTable(sub_tables)}} }, 22 | {%- endfor %} 23 | 24 | }; 25 | 26 | // For any non-structure list like u64[] or similar. 27 | const Entry _primitive_type_list[] = { 28 | { { AnonymousTag(), "Anonymous<>", ItemType::kDefault }, kInvalidNodeIndex }, 29 | }; 30 | 31 | } // namespace 32 | 33 | #define _ENTRY(n) { sizeof(n) / sizeof(n[0]), n} 34 | 35 | const std::array, {{ sub_tables | length }} + 2> {{table_name}} = { { 36 | _ENTRY(_all_clusters), // 0 37 | _ENTRY(_primitive_type_list), // 1 38 | {%- for table in sub_tables %} 39 | _ENTRY(_{{table.full_name}}), // {{loop.index + 1}} 40 | {%- endfor %} 41 | } }; 42 | 43 | } // namespace TLVMeta 44 | } // namespace chip 45 | -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/py_matter_idl/matter_idl/generators/cpp/tlvmeta/TLVMetaData_h.jinja: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include 5 | 6 | namespace chip { 7 | namespace TLVMeta { 8 | 9 | extern const std::array, {{ sub_tables | length }} + 2> {{table_name}}; 10 | 11 | } // namespace TLVMeta 12 | } // namespace chip 13 | -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/py_matter_idl/matter_idl/generators/idl/README.md: -------------------------------------------------------------------------------- 1 | ## Generator description 2 | 3 | Generates a structured `Idl` data type into a human-readable text format 4 | (`.matter` file). 5 | 6 | It is useful for tools that ingest non-idl data but convert into idl data (e.g. 7 | `zapxml` or CSA data model XML data.) 8 | 9 | ### Usage 10 | 11 | A no-op usage can be: 12 | 13 | ``` 14 | ./scripts/codegen.py -g idl --output-dir out/idlgen examples/all-clusters-app/all-clusters-common/all-clusters-app.matter 15 | ``` 16 | 17 | which would re-generate the entire `all-clusters-app.matter` into 18 | `out/idlgen/idl.matter` 19 | 20 | This generation is useful for testing/validating that both parsing and 21 | generation works. Actual usage of this generator would be inside XML tools. 22 | 23 | ### Within XML parsing 24 | 25 | A XML parser will use this code generator to output a human readable view of the 26 | parsed data: 27 | 28 | ``` 29 | ./scripts/py_matter_idl/matter_idl/zapxml_parser.py \ 30 | ./src/app/zap-templates/zcl/data-model/chip/onoff-cluster.xml \ 31 | ./src/app/zap-templates/zcl/data-model/chip/global-attributes.xm 32 | ``` 33 | -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/py_matter_idl/matter_idl/generators/java/ChipStructFiles_gni.jinja: -------------------------------------------------------------------------------- 1 | import("//build_overrides/build.gni") 2 | import("//build_overrides/chip.gni") 3 | 4 | structs_sources = [ 5 | {%- for cluster in clientClusters | sort(attribute='name') %} 6 | {%- set typeLookup = idl | createLookupContext(cluster) %} 7 | {%- for struct in cluster.structs | sort(attribute='name') %} 8 | {%- if not struct.tag %} 9 | "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/{{cluster.name}}Cluster{{struct.name}}.kt", 10 | {%- endif %} 11 | {%- endfor %} 12 | {%- endfor %} 13 | ] 14 | 15 | eventstructs_sources = [ 16 | {%- for cluster in clientClusters | sort(attribute='name') %} 17 | {%- set typeLookup = idl | createLookupContext(cluster) %} 18 | {%- for event in cluster.events | sort(attribute='name') %} 19 | {%- if event.fields %} 20 | "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/{{cluster.name}}Cluster{{event.name}}Event.kt", 21 | {%- endif %} 22 | {%- endfor %} 23 | {%- endfor %} 24 | ] -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/py_matter_idl/matter_idl/generators/kotlin/MatterFiles_gni.jinja: -------------------------------------------------------------------------------- 1 | import("//build_overrides/build.gni") 2 | import("//build_overrides/chip.gni") 3 | 4 | matter_structs_sources = [ 5 | {%- for cluster in clientClusters | sort(attribute='name') %} 6 | {%- set typeLookup = idl | createLookupContext(cluster) %} 7 | {%- for struct in cluster.structs | sort(attribute='name') %} 8 | {%- if not struct.tag %} 9 | "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/{{cluster.name}}Cluster{{struct.name}}.kt", 10 | {%- endif %} 11 | {%- endfor %} 12 | {%- endfor %} 13 | ] 14 | 15 | matter_eventstructs_sources = [ 16 | {%- for cluster in clientClusters | sort(attribute='name') %} 17 | {%- set typeLookup = idl | createLookupContext(cluster) %} 18 | {%- for event in cluster.events | sort(attribute='name') %} 19 | {%- if event.fields %} 20 | "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/{{cluster.name}}Cluster{{event.name}}Event.kt", 21 | {%- endif %} 22 | {%- endfor %} 23 | {%- endfor %} 24 | ] 25 | 26 | matter_clusters_sources = [ 27 | {%- for cluster in clientClusters | sort(attribute='name') %} 28 | {%- set typeLookup = idl | createLookupContext(cluster) %} 29 | "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/{{cluster.name}}Cluster.kt", 30 | {%- endfor %} 31 | ] -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/py_matter_idl/matter_idl/generators/markdown/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2023 Project CHIP Authors 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | import os 15 | 16 | from matter_idl.generators import CodeGenerator, GeneratorStorage 17 | from matter_idl.matter_idl_types import Idl 18 | 19 | 20 | class SummaryMarkdownGenerator(CodeGenerator): 21 | """ 22 | Code generation for markdown files 23 | """ 24 | 25 | def __init__(self, storage: GeneratorStorage, idl: Idl, **kargs): 26 | super().__init__(storage, idl, fs_loader_searchpath=os.path.dirname(__file__)) 27 | 28 | def internal_render_all(self): 29 | self.internal_render_one_output( 30 | template_path="clusters_markdown.jinja", 31 | output_file_name="clusters.md", 32 | vars={ 33 | 'idl': self.idl, 34 | } 35 | ) 36 | -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/py_matter_idl/matter_idl/generators/markdown/clusters_markdown.jinja: -------------------------------------------------------------------------------- 1 | 10 | 11 | ## List of currently defined clusters 12 | 13 | | Code (dec) | Code (hex) | Name | 14 | | ---------- | ---------- | ------------------------------------------------------- | 15 | {%- for cluster in idl.clusters | sort(attribute="code") %} 16 | | {{ "%10d" | format(cluster.code) }} | {{ ("0x%02X" | format(cluster.code)).rjust(10) }} | {{cluster.name.ljust(55)}} | 17 | {%- endfor %} 18 | -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/py_matter_idl/matter_idl/lint/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022 Project CHIP Authors 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | from .lint_rules_parser import CreateParser 16 | 17 | __all__ = [CreateParser] 18 | -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/py_matter_idl/matter_idl/lint/lint_rules_grammar.lark: -------------------------------------------------------------------------------- 1 | start: instruction* 2 | 3 | instruction: load_xml|all_endpoint_rule|specific_endpoint_rule 4 | 5 | load_xml: "load" ESCAPED_STRING ";" 6 | 7 | all_endpoint_rule: "all" "endpoints" "{" (required_global_attribute|denylist_cluster_attribute)* "}" 8 | 9 | specific_endpoint_rule: "endpoint" integer "{" (required_server_cluster|rejected_server_cluster)* "}" 10 | 11 | required_global_attribute: "require" "global" "attribute" id "=" integer ";" 12 | 13 | required_server_cluster: "require" "server" "cluster" id_or_number ";" 14 | 15 | rejected_server_cluster: "reject" "server" "cluster" id_or_number ";" 16 | 17 | // Allows deny like: 18 | // deny cluster 234; // Deny an entire cluster 19 | // deny cluster DescriptorCluster attribute 123; // attribute deny (mix name and number) 20 | // deny cluster 11 attribute 22; // attribute deny 21 | denylist_cluster_attribute: "deny" "cluster" id_or_number ["attribute" id_or_number] ";" 22 | 23 | integer: positive_integer | negative_integer 24 | 25 | ?id_or_number: (id|positive_integer) 26 | 27 | positive_integer: POSITIVE_INTEGER | HEX_INTEGER 28 | negative_integer: "-" positive_integer 29 | 30 | id: ID 31 | 32 | POSITIVE_INTEGER: /\d+/ 33 | HEX_INTEGER: /0x[A-Fa-f0-9]+/ 34 | ID: /[a-zA-Z_][a-zA-Z0-9_]*/ 35 | 36 | %import common.ESCAPED_STRING 37 | %import common.WS 38 | %import common.C_COMMENT 39 | %import common.CPP_COMMENT 40 | %ignore WS 41 | %ignore C_COMMENT 42 | %ignore CPP_COMMENT 43 | -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/py_matter_idl/matter_idl/tests/inputs/cluster_struct_attribute.matter: -------------------------------------------------------------------------------- 1 | client cluster DemoCluster = 10 { 2 | request struct ArmFailSafeRequest { 3 | INT16U expiryLengthSeconds = 0; 4 | INT64U breadcrumb = 1; 5 | INT32U timeoutMs = 2; 6 | } 7 | 8 | attribute ArmFailSafeRequest singleFailSafe = 5; 9 | attribute ArmFailSafeRequest armFailsafes[] = 100; 10 | } 11 | 12 | -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/py_matter_idl/matter_idl/tests/inputs/cluster_with_commands.matter: -------------------------------------------------------------------------------- 1 | cluster OnOff = 6 { 2 | enum DelayedAllOffEffectVariantEnum : ENUM8 { 3 | kDelayedOffFastFade = 0; 4 | kNoFade = 1; 5 | kDelayedOffSlowFade = 2; 6 | } 7 | 8 | enum DyingLightEffectVariantEnum : ENUM8 { 9 | kDyingLightFadeOff = 0; 10 | } 11 | 12 | enum EffectIdentifierEnum : ENUM8 { 13 | kDelayedAllOff = 0; 14 | kDyingLight = 1; 15 | } 16 | 17 | enum StartUpOnOffEnum : ENUM8 { 18 | kOff = 0; 19 | kOn = 1; 20 | kToggle = 2; 21 | } 22 | 23 | bitmap OnOffControl : BITMAP8 { 24 | kAcceptOnlyWhenOn = 0x1; 25 | } 26 | 27 | bitmap OnOffFeature : BITMAP32 { 28 | kLighting = 0x1; 29 | } 30 | 31 | bitmap ScenesFeature : BITMAP32 { 32 | kSceneNames = 0x1; 33 | } 34 | 35 | readonly attribute boolean onOff = 0; 36 | readonly attribute bitmap32 featureMap = 65532; 37 | readonly attribute int16u clusterRevision = 65533; 38 | 39 | command Off(): DefaultSuccess = 0; 40 | command On(): DefaultSuccess = 1; 41 | command Toggle(): DefaultSuccess = 2; 42 | } 43 | -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/py_matter_idl/matter_idl/tests/inputs/global_struct_attribute.matter: -------------------------------------------------------------------------------- 1 | client cluster DemoCluster = 0x12 { 2 | struct LabelStruct { 3 | CHAR_STRING<16> label = 0; 4 | CHAR_STRING<16> value = 1; 5 | } 6 | 7 | attribute LabelStruct singleLabel = 0x20; 8 | attribute LabelStruct someLabels[] = 0x21; 9 | } 10 | -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/py_matter_idl/matter_idl/tests/inputs/optional_argument.matter: -------------------------------------------------------------------------------- 1 | client cluster MyCluster = 1 { 2 | request struct FooRequest { 3 | optional OCTET_STRING argument = 0; 4 | } 5 | 6 | command Foo(FooRequest): DefaultSuccess = 0; 7 | } -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/py_matter_idl/matter_idl/tests/inputs/several_clusters.matter: -------------------------------------------------------------------------------- 1 | cluster First = 1 { 2 | attribute int16u someInteger = 1; 3 | } 4 | 5 | cluster Second = 2 { 6 | fabric_scoped struct FabricDescriptorStruct { 7 | octet_string<65> rootPublicKey = 1; 8 | vendor_id vendorID = 2; 9 | fabric_id fabricID = 3; 10 | node_id nodeID = 4; 11 | char_string<32> label = 5; 12 | fabric_idx fabricIndex = 254; 13 | } 14 | 15 | readonly attribute FabricDescriptorStruct fabrics[] = 0; 16 | readonly attribute octet_string<32> someBytes = 123; 17 | } 18 | 19 | cluster Third = 3 { 20 | enum MyEnum : enum8 { 21 | kUnknown = 0; 22 | kKnown = 100; 23 | } 24 | 25 | bitmap LevelControlOptions : BITMAP8 { 26 | kExecuteIfOff = 0x1; 27 | kCoupleColorTempToLevel = 0x2; 28 | } 29 | 30 | attribute MyEnum someEnum = 10; 31 | attribute LevelControlOptions options = 20; 32 | } 33 | 34 | endpoint 0 { 35 | device type rootdevice = 22, version 1; 36 | binding cluster Second; 37 | 38 | server cluster Third { 39 | ram attribute someEnum; 40 | ram attribute clusterRevision default = 2; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/py_matter_idl/matter_idl/tests/inputs/simple_attribute.matter: -------------------------------------------------------------------------------- 1 | client cluster MyCluster = 123 { 2 | attribute int16u clusterAttr = 1; 3 | } 4 | 5 | -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/cpp-tlvmeta/clusters_meta.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace chip { 4 | namespace TLVMeta { 5 | namespace { 6 | 7 | using namespace chip::FlatTree; 8 | using namespace chip::TLV; 9 | 10 | const Entry _DemoCluster[] = { 11 | { { AttributeTag(5), "singleFailSafe", ItemType::kDefault }, 3 }, // DemoCluster::ArmFailSafeRequest 12 | { { AttributeTag(100), "armFailsafes", ItemType::kList }, 4 }, // DemoCluster::ArmFailSafeRequest[] 13 | }; 14 | 15 | const Entry _DemoCluster_ArmFailSafeRequest[] = { 16 | { { ContextTag(0), "expiryLengthSeconds", ItemType::kDefault }, kInvalidNodeIndex }, // DemoCluster::INT16U 17 | { { ContextTag(1), "breadcrumb", ItemType::kDefault }, kInvalidNodeIndex }, // DemoCluster::INT64U 18 | { { ContextTag(2), "timeoutMs", ItemType::kDefault }, kInvalidNodeIndex }, // DemoCluster::INT32U 19 | }; 20 | 21 | const Entry _DemoCluster_ArmFailSafeRequest_list_[] = { 22 | { { AnonymousTag(), "Anonymous<>", ItemType::kDefault }, 3 }, // DemoCluster_ArmFailSafeRequest[] 23 | }; 24 | 25 | const Entry _all_clusters[] = { 26 | { { ClusterTag(0x0A), "DemoCluster", ItemType::kDefault }, 2 }, 27 | 28 | }; 29 | 30 | // For any non-structure list like u64[] or similar. 31 | const Entry _primitive_type_list[] = { 32 | { { AnonymousTag(), "Anonymous<>", ItemType::kDefault }, kInvalidNodeIndex }, 33 | }; 34 | 35 | } // namespace 36 | 37 | #define _ENTRY(n) { sizeof(n) / sizeof(n[0]), n} 38 | 39 | const std::array, 3 + 2> clusters_meta = { { 40 | _ENTRY(_all_clusters), // 0 41 | _ENTRY(_primitive_type_list), // 1 42 | _ENTRY(_DemoCluster), // 2 43 | _ENTRY(_DemoCluster_ArmFailSafeRequest), // 3 44 | _ENTRY(_DemoCluster_ArmFailSafeRequest_list_), // 4 45 | } }; 46 | 47 | } // namespace TLVMeta 48 | } // namespace chip 49 | -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/cpp-tlvmeta/clusters_meta.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include 5 | 6 | namespace chip { 7 | namespace TLVMeta { 8 | 9 | extern const std::array, 3 + 2> clusters_meta; 10 | 11 | } // namespace TLVMeta 12 | } // namespace chip 13 | -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_with_commands/cpp-tlvmeta/clusters_meta.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include 5 | 6 | namespace chip { 7 | namespace TLVMeta { 8 | 9 | extern const std::array, 8 + 2> clusters_meta; 10 | 11 | } // namespace TLVMeta 12 | } // namespace chip 13 | -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/py_matter_idl/matter_idl/tests/outputs/proto/first_cluster.proto: -------------------------------------------------------------------------------- 1 | 2 | /// AUTO-GENERATED with matter_idl. 3 | 4 | syntax = "proto3"; 5 | 6 | package com.matter.example.proto; 7 | 8 | option java_multiple_files = true; 9 | 10 | message FirstCluster { 11 | // option (message_type) = MATTER_TRAIT; 12 | 13 | enum ClusterId { 14 | CLUSTER_ID_UNSUPPORTED = 0; 15 | CLUSTER_ID = 1; 16 | } 17 | 18 | // Attributes 19 | /** int16u Type: 6 IsList: 0 FieldId: 1 */ 20 | int16u some_integer = 3145729; 21 | /* 22 | [(attribute) = { 23 | is_writable : true, 24 | is_subscribable: true, 25 | }]; 26 | */ 27 | 28 | 29 | } // FirstCluster 30 | -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/py_matter_idl/matter_idl/tests/outputs/proto/second_cluster.proto: -------------------------------------------------------------------------------- 1 | 2 | /// AUTO-GENERATED with matter_idl. 3 | 4 | syntax = "proto3"; 5 | 6 | package com.matter.example.proto; 7 | 8 | option java_multiple_files = true; 9 | 10 | message SecondCluster { 11 | // option (message_type) = MATTER_TRAIT; 12 | 13 | enum ClusterId { 14 | CLUSTER_ID_UNSUPPORTED = 0; 15 | CLUSTER_ID = 2; 16 | } 17 | 18 | // Structs 19 | message FabricDescriptorStruct { 20 | /** octet_string Type: 5 IsList: 0 FieldId: 1 */ 21 | bytes root_public_key = 2621441; 22 | /** vendor_id Type: 1 IsList: 0 FieldId: 2 */ 23 | uint32 vendor_id = 524290; 24 | /** fabric_id Type: 1 IsList: 0 FieldId: 3 */ 25 | uint64 fabric_id = 524291; 26 | /** node_id Type: 1 IsList: 0 FieldId: 4 */ 27 | uint64 node_id = 524292; 28 | /** char_string Type: 4 IsList: 0 FieldId: 5 */ 29 | string label = 2097157; 30 | /** fabric_idx Type: 1 IsList: 0 FieldId: 254 */ 31 | uint32 fabric_index = 524542; 32 | } 33 | 34 | 35 | // Attributes 36 | /** FabricDescriptorStruct Type: 6 IsList: 1 FieldId: 0 */ 37 | FabricDescriptorStruct fabrics = 3145728; 38 | /* 39 | [(attribute) = { 40 | is_subscribable: true, 41 | }]; 42 | */ 43 | 44 | 45 | /** octet_string Type: 5 IsList: 0 FieldId: 123 */ 46 | bytes some_bytes = 2621563; 47 | /* 48 | [(attribute) = { 49 | is_subscribable: true, 50 | }]; 51 | */ 52 | 53 | 54 | } // SecondCluster 55 | -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/py_matter_idl/matter_idl/tests/outputs/proto/third_cluster.proto: -------------------------------------------------------------------------------- 1 | 2 | /// AUTO-GENERATED with matter_idl. 3 | 4 | syntax = "proto3"; 5 | 6 | package com.matter.example.proto; 7 | 8 | option java_multiple_files = true; 9 | 10 | message ThirdCluster { 11 | // option (message_type) = MATTER_TRAIT; 12 | 13 | enum ClusterId { 14 | CLUSTER_ID_UNSUPPORTED = 0; 15 | CLUSTER_ID = 3; 16 | } 17 | 18 | // Enums 19 | enum MyEnum { 20 | ME_UNKNOWN = 0; 21 | ME_KNOWN = 100; 22 | } 23 | 24 | 25 | // Bitmaps 26 | enum LevelControlOptions { 27 | LCO_UNSUPPORTED = 0; 28 | LCO_EXECUTE_IF_OFF = 1; 29 | LCO_COUPLE_COLOR_TEMP_TO_LEVEL = 2; 30 | } 31 | 32 | 33 | // Attributes 34 | /** MyEnum Type: 6 IsList: 0 FieldId: 10 */ 35 | MyEnum some_enum = 3145738; 36 | /* 37 | [(attribute) = { 38 | is_writable : true, 39 | is_subscribable: true, 40 | }]; 41 | */ 42 | 43 | 44 | /** LevelControlOptions Type: 1 IsList: 0 FieldId: 20 */ 45 | uint32 options = 524308; 46 | /* 47 | [(attribute) = { 48 | is_writable : true, 49 | is_subscribable: true, 50 | }]; 51 | */ 52 | 53 | 54 | } // ThirdCluster 55 | -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/cpp-app/PluginApplicationCallbacks.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | void MatterThirdPluginServerInitCallback(); 3 | 4 | #define MATTER_PLUGINS_INIT \ 5 | MatterThirdPluginServerInitCallback(); 6 | 7 | -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/cpp-app/callback-stub.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | using namespace chip; 4 | void __attribute__((weak)) emberAfThirdClusterInitCallback(EndpointId endpoint) 5 | { 6 | // To prevent warning 7 | (void) endpoint; 8 | } 9 | -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/cpp-app/cluster-init-callback.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | using namespace chip; 7 | 8 | // Cluster Init Functions 9 | void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) 10 | { 11 | switch (clusterId) 12 | { 13 | case app::Clusters::Third::Id: 14 | emberAfThirdClusterInitCallback(endpoint); 15 | break; 16 | default: 17 | // Unrecognized cluster ID 18 | break; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/java/ChipEventStructs.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2023 Project CHIP Authors 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package chip.devicecontroller; 18 | 19 | import javax.annotation.Nullable; 20 | import java.util.ArrayList; 21 | import java.util.Arrays; 22 | import java.util.Optional; 23 | 24 | import static chip.devicecontroller.ChipTLVType.*; 25 | 26 | public class ChipEventStructs { 27 | } 28 | -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/java/files.gni: -------------------------------------------------------------------------------- 1 | import("//build_overrides/build.gni") 2 | import("//build_overrides/chip.gni") 3 | 4 | structs_sources = [ 5 | "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/SecondClusterFabricDescriptorStruct.kt", 6 | ] 7 | 8 | eventstructs_sources = [ 9 | ] -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/py_matter_idl/matter_idl/zapxml/handlers/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022 Project CHIP Authors 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | from .base import BaseHandler 16 | from .context import Context 17 | from .handlers import ConfiguratorHandler 18 | 19 | from matter_idl.matter_idl_types import Idl 20 | 21 | 22 | class ZapXmlHandler(BaseHandler): 23 | """Handles the top level (/) of a zap xml file. 24 | 25 | Generally these files only contain a 'configurator' element in them 26 | """ 27 | 28 | def __init__(self, context: Context, idl: Idl): 29 | super().__init__(context) 30 | self._idl = idl 31 | 32 | def GetNextProcessor(self, name, attrs): 33 | if name.lower() == 'configurator': 34 | return ConfiguratorHandler(self.context, self._idl) 35 | else: 36 | return BaseHandler(self.context) 37 | -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/py_matter_idl/pyproject.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022 Project CHIP Authors 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | [build-system] 16 | requires = ['setuptools', 'wheel'] 17 | build-backend = 'setuptools.build_meta' 18 | -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/py_matter_idl/setup.cfg: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022 Project CHIP Authors 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | [metadata] 16 | name = matter_idl 17 | version = 0.0.1 18 | author = Project CHIP Authors 19 | description = Parse matter idl files 20 | 21 | [options] 22 | packages = find: 23 | zip_safe = False 24 | install_requires= 25 | lark 26 | jinja2 27 | stringcase 28 | 29 | [options.package_data] 30 | matter_idl = 31 | lint/lint_rules_grammar.lark 32 | matter_grammar.lark 33 | generators/cpp/application/CallbackStubSource.jinja 34 | generators/cpp/application/ClusterInitCallbackSource.jinja 35 | generators/cpp/application/PluginApplicationCallbacksHeader.jinja 36 | generators/cpp/tlvmeta/TLVMetaData_cpp.jinja 37 | generators/cpp/tlvmeta/TLVMetaData_h.jinja 38 | generators/idl/MatterIdl.jinja 39 | generators/java/ClusterIDMapping.jinja 40 | generators/java/ClusterReadMapping.jinja 41 | generators/java/ClusterWriteMapping.jinja 42 | -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/py_matter_idl/setup.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022 Project CHIP Authors 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | 16 | """The matter_idl package.""" 17 | 18 | import setuptools # type: ignore 19 | 20 | setuptools.setup() # Package definition in setup.cfg 21 | -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/tools/zap/BUILD.gn: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2020 Project CHIP Authors 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | import("//build_overrides/build.gni") 16 | import("//build_overrides/chip.gni") 17 | import("//build_overrides/pigweed.gni") 18 | 19 | import("$dir_pw_build/python.gni") 20 | 21 | pw_python_action("tests") { 22 | script = "test_generate.py" 23 | 24 | _stamp = "${target_gen_dir}/generate.test.passed" 25 | 26 | inputs = [ 27 | "tests/available_tests.yaml", 28 | "tests/inputs/all-clusters-app.zap", 29 | "tests/inputs/lighting-app.zap", 30 | ] 31 | 32 | args = [ 33 | "--stamp", 34 | rebase_path(_stamp), 35 | "--output", 36 | rebase_path("${target_gen_dir}"), 37 | ] 38 | 39 | outputs = [ _stamp ] 40 | } 41 | -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/tools/zap/check_file_existence.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Copyright (c) 2022 Project CHIP Authors 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | import argparse 17 | import os 18 | import sys 19 | 20 | 21 | def main(): 22 | parser = argparse.ArgumentParser( 23 | description='Validate that some specific files exist (or not)') 24 | 25 | parser.add_argument('--touch', help="Create this file on success") 26 | parser.add_argument('--exists', action='append', default=[], help="Validate that these files exist") 27 | parser.add_argument('--missing', action='append', default=[], help="Validate that these files DO NOT exist") 28 | 29 | args = parser.parse_args() 30 | 31 | if args.touch: 32 | if os.path.exists(args.touch): 33 | os.remove(args.touch) 34 | 35 | for name in args.exists: 36 | if not os.path.exists(name): 37 | print(f"File {name} was NOT FOUND.") 38 | sys.exit(1) 39 | 40 | for name in args.missing: 41 | if os.path.exists(name): 42 | print(f"File {name} was FOUND but expected missing.") 43 | sys.exit(1) 44 | 45 | if args.touch: 46 | open(args.touch, "wb").close() 47 | 48 | sys.exit(0) 49 | 50 | 51 | if __name__ == '__main__': 52 | main() 53 | -------------------------------------------------------------------------------- /tools/dependencies/esp-matter/connectedhomeip/connectedhomeip/scripts/tools/zap/tests/available_tests.yaml: -------------------------------------------------------------------------------- 1 | # These are the available tests codegen.py 2 | # 3 | # General format is: 4 | # 5 | #