From 4052fe6353af6a11cc57a3090c3141f1687a6e0f Mon Sep 17 00:00:00 2001 From: Rodrigo Garcia Date: Wed, 2 Jul 2025 00:26:01 -0300 Subject: [PATCH 1/6] feat(matter): enables BLE Matter commissioning with NimBLE --- .../MatterColorLight/MatterColorLight.ino | 15 +- .../MatterCommissionTest.ino | 13 +- .../MatterComposedLights.ino | 13 +- .../MatterContactSensor.ino | 13 +- .../MatterDimmableLight.ino | 15 +- .../MatterEnhancedColorLight.ino | 15 +- .../examples/MatterEvents/MatterEvents.ino | 9 ++ .../Matter/examples/MatterFan/MatterFan.ino | 15 +- .../MatterHumiditySensor.ino | 13 +- .../examples/MatterMinimum/MatterMinimum.ino | 11 +- .../MatterOccupancySensor.ino | 13 +- .../MatterOnIdentify/MatterOnIdentify.ino | 13 +- .../MatterOnOffLight/MatterOnOffLight.ino | 15 +- .../MatterOnOffPlugin/MatterOnOffPlugin.ino | 15 +- .../MatterPressureSensor.ino | 13 +- .../MatterSmartButon/MatterSmartButon.ino | 15 +- .../MatterTemperatureLight.ino | 15 +- .../MatterTemperatureSensor.ino | 13 +- .../MatterThermostat/MatterThermostat.ino | 13 +- libraries/Matter/src/Matter.cpp | 18 ++- libraries/Matter/src/Matter.h | 2 +- libraries/Matter/src/MatterEndPoint.cpp | 139 ++++++++++++++++++ libraries/Matter/src/MatterEndPoint.h | 115 +++++---------- .../src/MatterEndpoints/MatterColorLight.cpp | 7 +- .../src/MatterEndpoints/MatterColorLight.h | 2 +- .../MatterColorTemperatureLight.cpp | 6 +- .../MatterColorTemperatureLight.h | 2 +- .../MatterEndpoints/MatterContactSensor.cpp | 7 +- .../src/MatterEndpoints/MatterContactSensor.h | 2 +- .../MatterEndpoints/MatterDimmableLight.cpp | 6 +- .../src/MatterEndpoints/MatterDimmableLight.h | 2 +- .../MatterEnhancedColorLight.cpp | 6 +- .../MatterEnhancedColorLight.h | 2 +- .../Matter/src/MatterEndpoints/MatterFan.cpp | 7 +- .../Matter/src/MatterEndpoints/MatterFan.h | 2 +- .../MatterEndpoints/MatterGenericSwitch.cpp | 7 +- .../src/MatterEndpoints/MatterGenericSwitch.h | 2 +- .../MatterEndpoints/MatterHumiditySensor.cpp | 7 +- .../MatterEndpoints/MatterHumiditySensor.h | 2 +- .../MatterEndpoints/MatterOccupancySensor.cpp | 7 +- .../MatterEndpoints/MatterOccupancySensor.h | 2 +- .../src/MatterEndpoints/MatterOnOffLight.cpp | 7 +- .../src/MatterEndpoints/MatterOnOffLight.h | 2 +- .../src/MatterEndpoints/MatterOnOffPlugin.cpp | 7 +- .../src/MatterEndpoints/MatterOnOffPlugin.h | 2 +- .../MatterEndpoints/MatterPressureSensor.cpp | 7 +- .../MatterEndpoints/MatterPressureSensor.h | 2 +- .../MatterTemperatureSensor.cpp | 7 +- .../MatterEndpoints/MatterTemperatureSensor.h | 2 +- .../src/MatterEndpoints/MatterThermostat.cpp | 7 +- .../src/MatterEndpoints/MatterThermostat.h | 2 +- 51 files changed, 501 insertions(+), 153 deletions(-) create mode 100644 libraries/Matter/src/MatterEndPoint.cpp diff --git a/libraries/Matter/examples/MatterColorLight/MatterColorLight.ino b/libraries/Matter/examples/MatterColorLight/MatterColorLight.ino index f3e45887576..932acbc7fdf 100644 --- a/libraries/Matter/examples/MatterColorLight/MatterColorLight.ino +++ b/libraries/Matter/examples/MatterColorLight/MatterColorLight.ino @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -14,16 +14,22 @@ // Matter Manager #include +#if !CONFIG_ENABLE_CHIPOBLE +// if the decive can be commissioned using BLE, WiFi is not used - save flash space #include +#endif #include // List of Matter Endpoints for this Node // Color Light Endpoint MatterColorLight ColorLight; +// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +#if !CONFIG_ENABLE_CHIPOBLE // WiFi is manually set and started const char *ssid = "your-ssid"; // Change this to your WiFi SSID const char *password = "your-password"; // Change this to your WiFi password +#endif // it will keep last OnOff & HSV Color state stored, using Preferences Preferences matterPref; @@ -81,6 +87,8 @@ void setup() { Serial.begin(115200); +// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +#if !CONFIG_ENABLE_CHIPOBLE // We start by connecting to a WiFi network Serial.print("Connecting to "); Serial.println(ssid); @@ -95,6 +103,7 @@ void setup() { Serial.println("IP address: "); Serial.println(WiFi.localIP()); delay(500); +#endif // Initialize Matter EndPoint matterPref.begin("MatterPrefs", false); @@ -121,7 +130,7 @@ void setup() { Matter.begin(); // This may be a restart of a already commissioned Matter accessory if (Matter.isDeviceCommissioned()) { - Serial.println("Matter Node is commissioned and connected to Wi-Fi. Ready for use."); + Serial.println("Matter Node is commissioned and connected to the network. Ready for use."); Serial.printf( "Initial state: %s | RGB Color: (%d,%d,%d) \r\n", ColorLight ? "ON" : "OFF", ColorLight.getColorRGB().r, ColorLight.getColorRGB().g, ColorLight.getColorRGB().b @@ -154,7 +163,7 @@ void loop() { ); // configure the Light based on initial on-off state and its color ColorLight.updateAccessory(); - Serial.println("Matter Node is commissioned and connected to Wi-Fi. Ready for use."); + Serial.println("Matter Node is commissioned and connected to the network. Ready for use."); } // A button is also used to control the light diff --git a/libraries/Matter/examples/MatterCommissionTest/MatterCommissionTest.ino b/libraries/Matter/examples/MatterCommissionTest/MatterCommissionTest.ino index 0e93ed6d155..6ddf4f266e4 100644 --- a/libraries/Matter/examples/MatterCommissionTest/MatterCommissionTest.ino +++ b/libraries/Matter/examples/MatterCommissionTest/MatterCommissionTest.ino @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -14,19 +14,27 @@ // Matter Manager #include +#if !CONFIG_ENABLE_CHIPOBLE +// if the decive can be commissioned using BLE, WiFi is not used - save flash space #include +#endif // List of Matter Endpoints for this Node // On/Off Light Endpoint MatterOnOffLight OnOffLight; +// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +#if !CONFIG_ENABLE_CHIPOBLE // WiFi is manually set and started const char *ssid = "your-ssid"; // Change this to your WiFi SSID const char *password = "your-password"; // Change this to your WiFi password +#endif void setup() { Serial.begin(115200); +// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +#if !CONFIG_ENABLE_CHIPOBLE // We start by connecting to a WiFi network Serial.print("Connecting to "); Serial.println(ssid); @@ -41,6 +49,7 @@ void setup() { Serial.println("IP address: "); Serial.println(WiFi.localIP()); delay(500); +#endif // Initialize at least one Matter EndPoint OnOffLight.begin(); @@ -64,7 +73,7 @@ void loop() { Serial.println("Matter Fabric not commissioned yet. Waiting for commissioning."); } } - Serial.println("Matter Node is commissioned and connected to Wi-Fi."); + Serial.println("Matter Node is commissioned and connected to the network."); Serial.println("====> Decommissioning in 30 seconds. <===="); delay(30000); Matter.decommission(); diff --git a/libraries/Matter/examples/MatterComposedLights/MatterComposedLights.ino b/libraries/Matter/examples/MatterComposedLights/MatterComposedLights.ino index b98cc8e19c9..f54edf5b1fd 100644 --- a/libraries/Matter/examples/MatterComposedLights/MatterComposedLights.ino +++ b/libraries/Matter/examples/MatterComposedLights/MatterComposedLights.ino @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -14,7 +14,10 @@ // Matter Manager #include +#if !CONFIG_ENABLE_CHIPOBLE +// if the decive can be commissioned using BLE, WiFi is not used - save flash space #include +#endif // List of Matter Endpoints for this Node // There will be 3 On/Off Light Endpoints in the same Node @@ -22,9 +25,12 @@ MatterOnOffLight Light1; MatterDimmableLight Light2; MatterColorLight Light3; +// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +#if !CONFIG_ENABLE_CHIPOBLE // WiFi is manually set and started const char *ssid = "your-ssid"; // Change this to your WiFi SSID const char *password = "your-password"; // Change this to your WiFi password +#endif // set your board USER BUTTON pin here - USED to decommission the Matter Node const uint8_t buttonPin = BOOT_PIN; // Set your pin here. Using BOOT Button. @@ -56,6 +62,8 @@ void setup() { Serial.begin(115200); +// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +#if !CONFIG_ENABLE_CHIPOBLE // We start by connecting to a WiFi network Serial.print("Connecting to "); Serial.println(ssid); @@ -71,6 +79,7 @@ void setup() { Serial.println("IP address: "); Serial.println(WiFi.localIP()); delay(500); +#endif // Initialize all 3 Matter EndPoints Light1.begin(); @@ -103,7 +112,7 @@ void loop() { Serial.println("Matter Node not commissioned yet. Waiting for commissioning."); } } - Serial.println("Matter Node is commissioned and connected to Wi-Fi. Ready for use."); + Serial.println("Matter Node is commissioned and connected to the network. Ready for use."); } //displays the Light state every 5 seconds diff --git a/libraries/Matter/examples/MatterContactSensor/MatterContactSensor.ino b/libraries/Matter/examples/MatterContactSensor/MatterContactSensor.ino index e4c41460d3a..d344c78b4d7 100644 --- a/libraries/Matter/examples/MatterContactSensor/MatterContactSensor.ino +++ b/libraries/Matter/examples/MatterContactSensor/MatterContactSensor.ino @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -30,15 +30,21 @@ // Matter Manager #include +#if !CONFIG_ENABLE_CHIPOBLE +// if the decive can be commissioned using BLE, WiFi is not used - save flash space #include +#endif // List of Matter Endpoints for this Node // Matter Contact Sensor Endpoint MatterContactSensor ContactSensor; +// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +#if !CONFIG_ENABLE_CHIPOBLE // WiFi is manually set and started const char *ssid = "your-ssid"; // Change this to your WiFi SSID const char *password = "your-password"; // Change this to your WiFi password +#endif // LED will be used to indicate the Contact Sensor state // set your board RGB LED pin here @@ -67,6 +73,8 @@ void setup() { Serial.begin(115200); +// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +#if !CONFIG_ENABLE_CHIPOBLE // Manually connect to WiFi WiFi.begin(ssid, password); // Wait for connection @@ -75,6 +83,7 @@ void setup() { Serial.print("."); } Serial.println(); +#endif // set initial contact sensor state as false (default) ContactSensor.begin(); @@ -99,7 +108,7 @@ void setup() { Serial.println("Matter Node not commissioned yet. Waiting for commissioning."); } } - Serial.println("Matter Node is commissioned and connected to Wi-Fi. Ready for use."); + Serial.println("Matter Node is commissioned and connected to the network. Ready for use."); } } diff --git a/libraries/Matter/examples/MatterDimmableLight/MatterDimmableLight.ino b/libraries/Matter/examples/MatterDimmableLight/MatterDimmableLight.ino index 79751905c20..2d1248bbebe 100644 --- a/libraries/Matter/examples/MatterDimmableLight/MatterDimmableLight.ino +++ b/libraries/Matter/examples/MatterDimmableLight/MatterDimmableLight.ino @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -14,16 +14,22 @@ // Matter Manager #include +#if !CONFIG_ENABLE_CHIPOBLE +// if the decive can be commissioned using BLE, WiFi is not used - save flash space #include +#endif #include // List of Matter Endpoints for this Node // Dimmable Light Endpoint MatterDimmableLight DimmableLight; +// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +#if !CONFIG_ENABLE_CHIPOBLE // WiFi is manually set and started const char *ssid = "your-ssid"; // Change this to your WiFi SSID const char *password = "your-password"; // Change this to your WiFi password +#endif // it will keep last OnOff & Brightness state stored, using Preferences Preferences matterPref; @@ -77,6 +83,8 @@ void setup() { Serial.begin(115200); +// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +#if !CONFIG_ENABLE_CHIPOBLE // We start by connecting to a WiFi network Serial.print("Connecting to "); Serial.println(ssid); @@ -91,6 +99,7 @@ void setup() { Serial.println("IP address: "); Serial.println(WiFi.localIP()); delay(500); +#endif // Initialize Matter EndPoint matterPref.begin("MatterPrefs", false); @@ -116,7 +125,7 @@ void setup() { Matter.begin(); // This may be a restart of a already commissioned Matter accessory if (Matter.isDeviceCommissioned()) { - Serial.println("Matter Node is commissioned and connected to Wi-Fi. Ready for use."); + Serial.println("Matter Node is commissioned and connected to the network. Ready for use."); Serial.printf("Initial state: %s | brightness: %d\r\n", DimmableLight ? "ON" : "OFF", DimmableLight.getBrightness()); // configure the Light based on initial on-off state and brightness DimmableLight.updateAccessory(); @@ -143,7 +152,7 @@ void loop() { Serial.printf("Initial state: %s | brightness: %d\r\n", DimmableLight ? "ON" : "OFF", DimmableLight.getBrightness()); // configure the Light based on initial on-off state and brightness DimmableLight.updateAccessory(); - Serial.println("Matter Node is commissioned and connected to Wi-Fi. Ready for use."); + Serial.println("Matter Node is commissioned and connected to the network. Ready for use."); } // A button is also used to control the light diff --git a/libraries/Matter/examples/MatterEnhancedColorLight/MatterEnhancedColorLight.ino b/libraries/Matter/examples/MatterEnhancedColorLight/MatterEnhancedColorLight.ino index 8e12581fdf2..1a87e0762bc 100644 --- a/libraries/Matter/examples/MatterEnhancedColorLight/MatterEnhancedColorLight.ino +++ b/libraries/Matter/examples/MatterEnhancedColorLight/MatterEnhancedColorLight.ino @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -14,16 +14,22 @@ // Matter Manager #include +#if !CONFIG_ENABLE_CHIPOBLE +// if the decive can be commissioned using BLE, WiFi is not used - save flash space #include +#endif #include // List of Matter Endpoints for this Node // Color Light Endpoint MatterEnhancedColorLight EnhancedColorLight; +// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +#if !CONFIG_ENABLE_CHIPOBLE // WiFi is manually set and started const char *ssid = "your-ssid"; // Change this to your WiFi SSID const char *password = "your-password"; // Change this to your WiFi password +#endif // It will use HSV color to control all Matter Attribute Changes HsvColor_t currentHSVColor = {0, 0, 0}; @@ -85,6 +91,8 @@ void setup() { Serial.begin(115200); +// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +#if !CONFIG_ENABLE_CHIPOBLE // We start by connecting to a WiFi network Serial.print("Connecting to "); Serial.println(ssid); @@ -99,6 +107,7 @@ void setup() { Serial.println("IP address: "); Serial.println(WiFi.localIP()); delay(500); +#endif // Initialize Matter EndPoint matterPref.begin("MatterPrefs", false); @@ -143,7 +152,7 @@ void setup() { Matter.begin(); // This may be a restart of a already commissioned Matter accessory if (Matter.isDeviceCommissioned()) { - Serial.println("Matter Node is commissioned and connected to Wi-Fi. Ready for use."); + Serial.println("Matter Node is commissioned and connected to the network. Ready for use."); Serial.printf( "Initial state: %s | RGB Color: (%d,%d,%d) \r\n", EnhancedColorLight ? "ON" : "OFF", EnhancedColorLight.getColorRGB().r, EnhancedColorLight.getColorRGB().g, EnhancedColorLight.getColorRGB().b @@ -176,7 +185,7 @@ void loop() { ); // configure the Light based on initial on-off state and its color EnhancedColorLight.updateAccessory(); - Serial.println("Matter Node is commissioned and connected to Wi-Fi. Ready for use."); + Serial.println("Matter Node is commissioned and connected to the network. Ready for use."); } // A button is also used to control the light diff --git a/libraries/Matter/examples/MatterEvents/MatterEvents.ino b/libraries/Matter/examples/MatterEvents/MatterEvents.ino index dac599bf9fa..c8d825aa574 100644 --- a/libraries/Matter/examples/MatterEvents/MatterEvents.ino +++ b/libraries/Matter/examples/MatterEvents/MatterEvents.ino @@ -14,11 +14,17 @@ // Matter Manager #include +#if !CONFIG_ENABLE_CHIPOBLE +// if the decive can be commissioned using BLE, WiFi is not used - save flash space #include +#endif +// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +#if !CONFIG_ENABLE_CHIPOBLE // WiFi is manually set and started const char *ssid = "your-ssid"; // Change this to your WiFi SSID const char *password = "your-password"; // Change this to your WiFi password +#endif // List of Matter Endpoints for this Node // On/Off Light Endpoint @@ -119,6 +125,8 @@ void setup() { delay(10); // Wait for Serial to initialize } +// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +#if !CONFIG_ENABLE_CHIPOBLE // We start by connecting to a WiFi network Serial.print("Connecting to "); Serial.println(ssid); @@ -134,6 +142,7 @@ void setup() { Serial.println("IP address: "); Serial.println(WiFi.localIP()); delay(500); +#endif // Initialize at least one Matter EndPoint OnOffLight.begin(); diff --git a/libraries/Matter/examples/MatterFan/MatterFan.ino b/libraries/Matter/examples/MatterFan/MatterFan.ino index 705aa4853da..9686f0dd679 100644 --- a/libraries/Matter/examples/MatterFan/MatterFan.ino +++ b/libraries/Matter/examples/MatterFan/MatterFan.ino @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -14,15 +14,21 @@ // Matter Manager #include +#if !CONFIG_ENABLE_CHIPOBLE +// if the decive can be commissioned using BLE, WiFi is not used - save flash space #include +#endif // List of Matter Endpoints for this Node // Fan Endpoint - On/Off control + Speed Percent Control + Fan Modes MatterFan Fan; +// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +#if !CONFIG_ENABLE_CHIPOBLE // WiFi is manually set and started const char *ssid = "your-ssid"; // Change this to your WiFi SSID const char *password = "your-password"; // Change this to your WiFi password +#endif // set your board USER BUTTON pin here - used for toggling On/Off and decommission the Matter Node const uint8_t buttonPin = BOOT_PIN; // Set your pin here. Using BOOT Button. @@ -76,6 +82,8 @@ void setup() { Serial.begin(115200); +// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +#if !CONFIG_ENABLE_CHIPOBLE // We start by connecting to a WiFi network Serial.print("Connecting to "); Serial.println(ssid); @@ -90,6 +98,7 @@ void setup() { Serial.println("IP address: "); Serial.println(WiFi.localIP()); delay(500); +#endif // On Boot or Reset, Fan is set at 0% speed, OFF, changing between OFF, ON, SMART and HIGH Fan.begin(0, MatterFan::FAN_MODE_OFF, MatterFan::FAN_MODE_SEQ_OFF_HIGH); @@ -141,7 +150,7 @@ void setup() { Matter.begin(); // This may be a restart of a already commissioned Matter accessory if (Matter.isDeviceCommissioned()) { - Serial.println("Matter Node is commissioned and connected to Wi-Fi. Ready for use."); + Serial.println("Matter Node is commissioned and connected to the network. Ready for use."); } } @@ -162,7 +171,7 @@ void loop() { Serial.println("Matter Node not commissioned yet. Waiting for commissioning."); } } - Serial.println("Matter Node is commissioned and connected to Wi-Fi. Ready for use."); + Serial.println("Matter Node is commissioned and connected to the network. Ready for use."); } // A builtin button is used to trigger and send a command to the Matter Controller diff --git a/libraries/Matter/examples/MatterHumiditySensor/MatterHumiditySensor.ino b/libraries/Matter/examples/MatterHumiditySensor/MatterHumiditySensor.ino index 1c7889db849..af706fd02b0 100644 --- a/libraries/Matter/examples/MatterHumiditySensor/MatterHumiditySensor.ino +++ b/libraries/Matter/examples/MatterHumiditySensor/MatterHumiditySensor.ino @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -21,15 +21,21 @@ // Matter Manager #include +#if !CONFIG_ENABLE_CHIPOBLE +// if the decive can be commissioned using BLE, WiFi is not used - save flash space #include +#endif // List of Matter Endpoints for this Node // Matter Humidity Sensor Endpoint MatterHumiditySensor SimulatedHumiditySensor; +// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +#if !CONFIG_ENABLE_CHIPOBLE // WiFi is manually set and started const char *ssid = "your-ssid"; // Change this to your WiFi SSID const char *password = "your-password"; // Change this to your WiFi password +#endif // set your board USER BUTTON pin here - decommissioning button const uint8_t buttonPin = BOOT_PIN; // Set your pin here. Using BOOT Button. @@ -60,6 +66,8 @@ void setup() { Serial.begin(115200); +// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +#if !CONFIG_ENABLE_CHIPOBLE // Manually connect to WiFi WiFi.begin(ssid, password); // Wait for connection @@ -68,6 +76,7 @@ void setup() { Serial.print("."); } Serial.println(); +#endif // set initial humidity sensor measurement // Simulated Sensor - it shall initially print 95% and then move to the 10% to 30% humidity range @@ -92,7 +101,7 @@ void setup() { Serial.println("Matter Node not commissioned yet. Waiting for commissioning."); } } - Serial.println("Matter Node is commissioned and connected to Wi-Fi. Ready for use."); + Serial.println("Matter Node is commissioned and connected to the network. Ready for use."); } } diff --git a/libraries/Matter/examples/MatterMinimum/MatterMinimum.ino b/libraries/Matter/examples/MatterMinimum/MatterMinimum.ino index db591ee2226..96df2ec6ba3 100644 --- a/libraries/Matter/examples/MatterMinimum/MatterMinimum.ino +++ b/libraries/Matter/examples/MatterMinimum/MatterMinimum.ino @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -22,15 +22,21 @@ // Matter Manager #include +#if !CONFIG_ENABLE_CHIPOBLE +// if the decive can be commissioned using BLE, WiFi is not used - save flash space #include +#endif // List of Matter Endpoints for this Node // Single On/Off Light Endpoint - at least one per node MatterOnOffLight OnOffLight; +// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +#if !CONFIG_ENABLE_CHIPOBLE // WiFi is manually set and started const char *ssid = "your-ssid"; // Change this to your WiFi SSID const char *password = "your-password"; // Change this to your WiFi password +#endif // Light GPIO that can be controlled by Matter APP #ifdef LED_BUILTIN @@ -62,6 +68,8 @@ void setup() { // Initialize the LED GPIO pinMode(ledPin, OUTPUT); +// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +#if !CONFIG_ENABLE_CHIPOBLE // Manually connect to WiFi WiFi.begin(ssid, password); // Wait for connection @@ -73,6 +81,7 @@ void setup() { delay(500); } Serial.println(); +#endif // Initialize at least one Matter EndPoint OnOffLight.begin(); diff --git a/libraries/Matter/examples/MatterOccupancySensor/MatterOccupancySensor.ino b/libraries/Matter/examples/MatterOccupancySensor/MatterOccupancySensor.ino index 333f178e9de..9539e225bce 100644 --- a/libraries/Matter/examples/MatterOccupancySensor/MatterOccupancySensor.ino +++ b/libraries/Matter/examples/MatterOccupancySensor/MatterOccupancySensor.ino @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -28,15 +28,21 @@ // Matter Manager #include +#if !CONFIG_ENABLE_CHIPOBLE +// if the decive can be commissioned using BLE, WiFi is not used - save flash space #include +#endif // List of Matter Endpoints for this Node // Matter Occupancy Sensor Endpoint MatterOccupancySensor OccupancySensor; +// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +#if !CONFIG_ENABLE_CHIPOBLE // WiFi is manually set and started const char *ssid = "your-ssid"; // Change this to your WiFi SSID const char *password = "your-password"; // Change this to your WiFi password +#endif // set your board USER BUTTON pin here - decommissioning only const uint8_t buttonPin = BOOT_PIN; // Set your pin here. Using BOOT Button. @@ -52,6 +58,8 @@ void setup() { Serial.begin(115200); +// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +#if !CONFIG_ENABLE_CHIPOBLE // Manually connect to WiFi WiFi.begin(ssid, password); // Wait for connection @@ -60,6 +68,7 @@ void setup() { Serial.print("."); } Serial.println(); +#endif // set initial occupancy sensor state as false and connected to a PIR sensor type (default) OccupancySensor.begin(); @@ -83,7 +92,7 @@ void setup() { Serial.println("Matter Node not commissioned yet. Waiting for commissioning."); } } - Serial.println("Matter Node is commissioned and connected to Wi-Fi. Ready for use."); + Serial.println("Matter Node is commissioned and connected to the network. Ready for use."); } } diff --git a/libraries/Matter/examples/MatterOnIdentify/MatterOnIdentify.ino b/libraries/Matter/examples/MatterOnIdentify/MatterOnIdentify.ino index b2e77900e95..a70f1f5466c 100644 --- a/libraries/Matter/examples/MatterOnIdentify/MatterOnIdentify.ino +++ b/libraries/Matter/examples/MatterOnIdentify/MatterOnIdentify.ino @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -26,15 +26,21 @@ // Matter Manager #include +#if !CONFIG_ENABLE_CHIPOBLE +// if the decive can be commissioned using BLE, WiFi is not used - save flash space #include +#endif // List of Matter Endpoints for this Node // Single On/Off Light Endpoint - at least one per node MatterOnOffLight OnOffLight; +// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +#if !CONFIG_ENABLE_CHIPOBLE // WiFi is manually set and started const char *ssid = "your-ssid"; // Change this to your WiFi SSID const char *password = "your-password"; // Change this to your WiFi password +#endif // Light GPIO that can be controlled by Matter APP #ifdef LED_BUILTIN @@ -88,6 +94,8 @@ void setup() { Serial.begin(115200); +// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +#if !CONFIG_ENABLE_CHIPOBLE // Manually connect to WiFi WiFi.begin(ssid, password); // Wait for connection @@ -96,6 +104,7 @@ void setup() { Serial.print("."); } Serial.println(); +#endif // Initialize at least one Matter EndPoint OnOffLight.begin(); @@ -125,7 +134,7 @@ void setup() { Serial.println("Matter Node not commissioned yet. Waiting for commissioning."); } } - Serial.println("Matter Node is commissioned and connected to Wi-Fi. Ready for use."); + Serial.println("Matter Node is commissioned and connected to the network. Ready for use."); } } diff --git a/libraries/Matter/examples/MatterOnOffLight/MatterOnOffLight.ino b/libraries/Matter/examples/MatterOnOffLight/MatterOnOffLight.ino index 5faa0a385b0..25a148267d3 100644 --- a/libraries/Matter/examples/MatterOnOffLight/MatterOnOffLight.ino +++ b/libraries/Matter/examples/MatterOnOffLight/MatterOnOffLight.ino @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -14,12 +14,18 @@ // Matter Manager #include +#if !CONFIG_ENABLE_CHIPOBLE +// if the decive can be commissioned using BLE, WiFi is not used - save flash space #include +#endif #include +// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +#if !CONFIG_ENABLE_CHIPOBLE // WiFi is manually set and started const char *ssid = "your-ssid"; // Change this to your WiFi SSID const char *password = "your-password"; // Change this to your WiFi password +#endif // List of Matter Endpoints for this Node // On/Off Light Endpoint @@ -68,6 +74,8 @@ void setup() { Serial.begin(115200); +// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +#if !CONFIG_ENABLE_CHIPOBLE // We start by connecting to a WiFi network Serial.print("Connecting to "); Serial.println(ssid); @@ -82,6 +90,7 @@ void setup() { Serial.println("IP address: "); Serial.println(WiFi.localIP()); delay(500); +#endif // Initialize Matter EndPoint matterPref.begin("MatterPrefs", false); @@ -93,7 +102,7 @@ void setup() { Matter.begin(); // This may be a restart of a already commissioned Matter accessory if (Matter.isDeviceCommissioned()) { - Serial.println("Matter Node is commissioned and connected to Wi-Fi. Ready for use."); + Serial.println("Matter Node is commissioned and connected to the network. Ready for use."); Serial.printf("Initial state: %s\r\n", OnOffLight.getOnOff() ? "ON" : "OFF"); OnOffLight.updateAccessory(); // configure the Light based on initial state } @@ -118,7 +127,7 @@ void loop() { } Serial.printf("Initial state: %s\r\n", OnOffLight.getOnOff() ? "ON" : "OFF"); OnOffLight.updateAccessory(); // configure the Light based on initial state - Serial.println("Matter Node is commissioned and connected to Wi-Fi. Ready for use."); + Serial.println("Matter Node is commissioned and connected to the network. Ready for use."); } // A button is also used to control the light diff --git a/libraries/Matter/examples/MatterOnOffPlugin/MatterOnOffPlugin.ino b/libraries/Matter/examples/MatterOnOffPlugin/MatterOnOffPlugin.ino index d14e2189ec1..61d62f7c5e3 100644 --- a/libraries/Matter/examples/MatterOnOffPlugin/MatterOnOffPlugin.ino +++ b/libraries/Matter/examples/MatterOnOffPlugin/MatterOnOffPlugin.ino @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -14,16 +14,22 @@ // Matter Manager #include +#if !CONFIG_ENABLE_CHIPOBLE +// if the decive can be commissioned using BLE, WiFi is not used - save flash space #include +#endif #include // List of Matter Endpoints for this Node // On/Off Plugin Endpoint MatterOnOffPlugin OnOffPlugin; +// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +#if !CONFIG_ENABLE_CHIPOBLE // WiFi is manually set and started const char *ssid = "your-ssid"; // Change this to your WiFi SSID const char *password = "your-password"; // Change this to your WiFi password +#endif // it will keep last OnOff state stored, using Preferences Preferences matterPref; @@ -67,6 +73,8 @@ void setup() { Serial.begin(115200); +// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +#if !CONFIG_ENABLE_CHIPOBLE // We start by connecting to a WiFi network Serial.print("Connecting to "); Serial.println(ssid); @@ -80,6 +88,7 @@ void setup() { Serial.println("IP address: "); Serial.println(WiFi.localIP()); delay(500); +#endif // Initialize Matter EndPoint matterPref.begin("MatterPrefs", false); @@ -91,7 +100,7 @@ void setup() { Matter.begin(); // This may be a restart of a already commissioned Matter accessory if (Matter.isDeviceCommissioned()) { - Serial.println("Matter Node is commissioned and connected to Wi-Fi. Ready for use."); + Serial.println("Matter Node is commissioned and connected to the network. Ready for use."); Serial.printf("Initial state: %s\r\n", OnOffPlugin.getOnOff() ? "ON" : "OFF"); OnOffPlugin.updateAccessory(); // configure the Plugin based on initial state } @@ -116,7 +125,7 @@ void loop() { } Serial.printf("Initial state: %s\r\n", OnOffPlugin.getOnOff() ? "ON" : "OFF"); OnOffPlugin.updateAccessory(); // configure the Plugin based on initial state - Serial.println("Matter Node is commissioned and connected to Wi-Fi. Ready for use."); + Serial.println("Matter Node is commissioned and connected to the network. Ready for use."); } // Check if the button has been pressed diff --git a/libraries/Matter/examples/MatterPressureSensor/MatterPressureSensor.ino b/libraries/Matter/examples/MatterPressureSensor/MatterPressureSensor.ino index db035e951c9..8e0930e97d5 100644 --- a/libraries/Matter/examples/MatterPressureSensor/MatterPressureSensor.ino +++ b/libraries/Matter/examples/MatterPressureSensor/MatterPressureSensor.ino @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -21,15 +21,21 @@ // Matter Manager #include +#if !CONFIG_ENABLE_CHIPOBLE +// if the decive can be commissioned using BLE, WiFi is not used - save flash space #include +#endif // List of Matter Endpoints for this Node // Matter Pressure Sensor Endpoint MatterPressureSensor SimulatedPressureSensor; +// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +#if !CONFIG_ENABLE_CHIPOBLE // WiFi is manually set and started const char *ssid = "your-ssid"; // Change this to your WiFi SSID const char *password = "your-password"; // Change this to your WiFi password +#endif // set your board USER BUTTON pin here - decommissioning button const uint8_t buttonPin = BOOT_PIN; // Set your pin here. Using BOOT Button. @@ -60,6 +66,8 @@ void setup() { Serial.begin(115200); +// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +#if !CONFIG_ENABLE_CHIPOBLE // Manually connect to WiFi WiFi.begin(ssid, password); // Wait for connection @@ -68,6 +76,7 @@ void setup() { Serial.print("."); } Serial.println(); +#endif // set initial pressure sensor measurement // Simulated Sensor - it shall initially print 900hPa and then move to the 950 to 1100 hPa as pressure range @@ -92,7 +101,7 @@ void setup() { Serial.println("Matter Node not commissioned yet. Waiting for commissioning."); } } - Serial.println("Matter Node is commissioned and connected to Wi-Fi. Ready for use."); + Serial.println("Matter Node is commissioned and connected to the network. Ready for use."); } } diff --git a/libraries/Matter/examples/MatterSmartButon/MatterSmartButon.ino b/libraries/Matter/examples/MatterSmartButon/MatterSmartButon.ino index f8da970595d..9cf6571c75a 100644 --- a/libraries/Matter/examples/MatterSmartButon/MatterSmartButon.ino +++ b/libraries/Matter/examples/MatterSmartButon/MatterSmartButon.ino @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -14,15 +14,21 @@ // Matter Manager #include +#if !CONFIG_ENABLE_CHIPOBLE +// if the decive can be commissioned using BLE, WiFi is not used - save flash space #include +#endif // List of Matter Endpoints for this Node // Generic Switch Endpoint - works as a smart button with a single click MatterGenericSwitch SmartButton; +// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +#if !CONFIG_ENABLE_CHIPOBLE // WiFi is manually set and started const char *ssid = "your-ssid"; // Change this to your WiFi SSID const char *password = "your-password"; // Change this to your WiFi password +#endif // set your board USER BUTTON pin here const uint8_t buttonPin = BOOT_PIN; // Set your pin here. Using BOOT Button. @@ -43,6 +49,8 @@ void setup() { Serial.print("Connecting to "); Serial.println(ssid); +// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +#if !CONFIG_ENABLE_CHIPOBLE // Manually connect to WiFi WiFi.begin(ssid, password); // Wait for connection @@ -54,6 +62,7 @@ void setup() { Serial.println("IP address: "); Serial.println(WiFi.localIP()); delay(500); +#endif // Initialize the Matter EndPoint SmartButton.begin(); @@ -62,7 +71,7 @@ void setup() { Matter.begin(); // This may be a restart of a already commissioned Matter accessory if (Matter.isDeviceCommissioned()) { - Serial.println("Matter Node is commissioned and connected to Wi-Fi. Ready for use."); + Serial.println("Matter Node is commissioned and connected to the network. Ready for use."); } } @@ -83,7 +92,7 @@ void loop() { Serial.println("Matter Node not commissioned yet. Waiting for commissioning."); } } - Serial.println("Matter Node is commissioned and connected to Wi-Fi. Ready for use."); + Serial.println("Matter Node is commissioned and connected to the network. Ready for use."); } // A builtin button is used to trigger a command to the Matter Controller diff --git a/libraries/Matter/examples/MatterTemperatureLight/MatterTemperatureLight.ino b/libraries/Matter/examples/MatterTemperatureLight/MatterTemperatureLight.ino index d46427591ab..6f30f019c27 100644 --- a/libraries/Matter/examples/MatterTemperatureLight/MatterTemperatureLight.ino +++ b/libraries/Matter/examples/MatterTemperatureLight/MatterTemperatureLight.ino @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -14,16 +14,22 @@ // Matter Manager #include +#if !CONFIG_ENABLE_CHIPOBLE +// if the decive can be commissioned using BLE, WiFi is not used - save flash space #include +#endif #include // List of Matter Endpoints for this Node // Color Temperature CW/WW Light Endpoint MatterColorTemperatureLight CW_WW_Light; +// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +#if !CONFIG_ENABLE_CHIPOBLE // WiFi is manually set and started const char *ssid = "your-ssid"; // Change this to your WiFi SSID const char *password = "your-password"; // Change this to your WiFi password +#endif // it will keep last OnOff & Brightness state stored, using Preferences Preferences matterPref; @@ -88,6 +94,8 @@ void setup() { Serial.begin(115200); +// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +#if !CONFIG_ENABLE_CHIPOBLE // We start by connecting to a WiFi network Serial.print("Connecting to "); Serial.println(ssid); @@ -102,6 +110,7 @@ void setup() { Serial.println("IP address: "); Serial.println(WiFi.localIP()); delay(500); +#endif // Initialize Matter EndPoint matterPref.begin("MatterPrefs", false); @@ -133,7 +142,7 @@ void setup() { Matter.begin(); // This may be a restart of a already commissioned Matter accessory if (Matter.isDeviceCommissioned()) { - Serial.println("Matter Node is commissioned and connected to Wi-Fi. Ready for use."); + Serial.println("Matter Node is commissioned and connected to the network. Ready for use."); Serial.printf( "Initial state: %s | brightness: %d | Color Temperature: %d mireds \r\n", CW_WW_Light ? "ON" : "OFF", CW_WW_Light.getBrightness(), CW_WW_Light.getColorTemperature() @@ -166,7 +175,7 @@ void loop() { ); // configure the Light based on initial on-off state and brightness CW_WW_Light.updateAccessory(); - Serial.println("Matter Node is commissioned and connected to Wi-Fi. Ready for use."); + Serial.println("Matter Node is commissioned and connected to the network. Ready for use."); } // A button is also used to control the light diff --git a/libraries/Matter/examples/MatterTemperatureSensor/MatterTemperatureSensor.ino b/libraries/Matter/examples/MatterTemperatureSensor/MatterTemperatureSensor.ino index 086155aeffe..dc628691287 100644 --- a/libraries/Matter/examples/MatterTemperatureSensor/MatterTemperatureSensor.ino +++ b/libraries/Matter/examples/MatterTemperatureSensor/MatterTemperatureSensor.ino @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -21,15 +21,21 @@ // Matter Manager #include +#if !CONFIG_ENABLE_CHIPOBLE +// if the decive can be commissioned using BLE, WiFi is not used - save flash space #include +#endif // List of Matter Endpoints for this Node // Matter Temperature Sensor Endpoint MatterTemperatureSensor SimulatedTemperatureSensor; +// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +#if !CONFIG_ENABLE_CHIPOBLE // WiFi is manually set and started const char *ssid = "your-ssid"; // Change this to your WiFi SSID const char *password = "your-password"; // Change this to your WiFi password +#endif // set your board USER BUTTON pin here - decommissioning button const uint8_t buttonPin = BOOT_PIN; // Set your pin here. Using BOOT Button. @@ -60,6 +66,8 @@ void setup() { Serial.begin(115200); +// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +#if !CONFIG_ENABLE_CHIPOBLE // Manually connect to WiFi WiFi.begin(ssid, password); // Wait for connection @@ -68,6 +76,7 @@ void setup() { Serial.print("."); } Serial.println(); +#endif // set initial temperature sensor measurement // Simulated Sensor - it shall initially print -25C and then move to the -10C to 10C range @@ -92,7 +101,7 @@ void setup() { Serial.println("Matter Node not commissioned yet. Waiting for commissioning."); } } - Serial.println("Matter Node is commissioned and connected to Wi-Fi. Ready for use."); + Serial.println("Matter Node is commissioned and connected to the network. Ready for use."); } } diff --git a/libraries/Matter/examples/MatterThermostat/MatterThermostat.ino b/libraries/Matter/examples/MatterThermostat/MatterThermostat.ino index bf76477c846..3a141e5d0aa 100644 --- a/libraries/Matter/examples/MatterThermostat/MatterThermostat.ino +++ b/libraries/Matter/examples/MatterThermostat/MatterThermostat.ino @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -21,15 +21,21 @@ // Matter Manager #include +#if !CONFIG_ENABLE_CHIPOBLE +// if the decive can be commissioned using BLE, WiFi is not used - save flash space #include +#endif // List of Matter Endpoints for this Node // Matter Thermostat Endpoint MatterThermostat SimulatedThermostat; +// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +#if !CONFIG_ENABLE_CHIPOBLE // WiFi is manually set and started const char *ssid = "your-ssid"; // Change this to your WiFi SSID const char *password = "your-password"; // Change this to your WiFi password +#endif // set your board USER BUTTON pin here - decommissioning button const uint8_t buttonPin = BOOT_PIN; // Set your pin here. Using BOOT Button. @@ -62,6 +68,8 @@ void setup() { Serial.begin(115200); +// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +#if !CONFIG_ENABLE_CHIPOBLE // Manually connect to WiFi WiFi.begin(ssid, password); // Wait for connection @@ -70,6 +78,7 @@ void setup() { Serial.print("."); } Serial.println(); +#endif // Simulated Thermostat in COOLING and HEATING mode with Auto Mode to keep the temperature between setpoints // Auto Mode can only be used when the control sequence of operation is Cooling & Heating @@ -94,7 +103,7 @@ void setup() { Serial.println("Matter Node not commissioned yet. Waiting for commissioning."); } } - Serial.println("Matter Node is commissioned and connected to Wi-Fi. Ready for use."); + Serial.println("Matter Node is commissioned and connected to the network. Ready for use."); // after commissioning, set initial thermostat parameters // start the thermostat in AUTO mode diff --git a/libraries/Matter/src/Matter.cpp b/libraries/Matter/src/Matter.cpp index b16edfd85c1..5ddacc1622c 100644 --- a/libraries/Matter/src/Matter.cpp +++ b/libraries/Matter/src/Matter.cpp @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,6 +17,10 @@ #include #include +#if CONFIG_ENABLE_MATTER_OVER_THREAD +#include "esp_openthread_types.h" +#include "platform/ESP32/OpenthreadLauncher.h" +#endif using namespace esp_matter; using namespace esp_matter::attribute; @@ -151,6 +155,18 @@ void ArduinoMatter::begin() { return; } +#if CONFIG_ENABLE_MATTER_OVER_THREAD + // Set OpenThread platform config + esp_openthread_platform_config_t config; + memset(&config, 0, sizeof(esp_openthread_platform_config_t)); + config.radio_config.radio_mode = RADIO_MODE_NATIVE; + config.host_config.host_connection_mode = HOST_CONNECTION_MODE_NONE; + config.port_config.storage_partition_name = "nvs"; + config.port_config.netif_queue_size = 10; + config.port_config.task_queue_size = 10; + set_openthread_platform_config(&config); +#endif + /* Matter start */ esp_err_t err = esp_matter::start(app_event_cb); if (err != ESP_OK) { diff --git a/libraries/Matter/src/Matter.h b/libraries/Matter/src/Matter.h index 682a0498076..09e59b4e04b 100644 --- a/libraries/Matter/src/Matter.h +++ b/libraries/Matter/src/Matter.h @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/libraries/Matter/src/MatterEndPoint.cpp b/libraries/Matter/src/MatterEndPoint.cpp new file mode 100644 index 00000000000..fdc45057755 --- /dev/null +++ b/libraries/Matter/src/MatterEndPoint.cpp @@ -0,0 +1,139 @@ +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include +#ifdef CONFIG_ESP_MATTER_ENABLE_DATA_MODEL + +#include + +uint16_t MatterEndPoint::secondary_network_endpoint_id = 0; + +// This function is called to create a secondary network interface endpoint. +// It can be used for devices that support multiple network interfaces, +// such as Ethernet, Thread and Wi-Fi. +bool MatterEndPoint::createSecondaryNetworkInterface() { + if (secondary_network_endpoint_id != 0) { + log_v("Secondary network interface endpoint already exists with ID %d", secondary_network_endpoint_id); + return false; + } + // Create a secondary network interface endpoint + endpoint::secondary_network_interface::config_t secondary_network_interface_config; + secondary_network_interface_config.network_commissioning.feature_map = chip::to_underlying( + //chip::app::Clusters::NetworkCommissioning::Feature::kWiFiNetworkInterface) | + chip::app::Clusters::NetworkCommissioning::Feature::kThreadNetworkInterface + ); + endpoint_t *endpoint = endpoint::secondary_network_interface::create(node::get(), &secondary_network_interface_config, ENDPOINT_FLAG_NONE, nullptr); + if (endpoint == nullptr) { + log_e("Failed to create secondary network interface endpoint"); + return false; + } + secondary_network_endpoint_id = endpoint::get_id(endpoint); + log_i("Secondary Network Interface created with endpoint_id %d", secondary_network_endpoint_id); + return true; +} + +uint16_t MatterEndPoint::getSecondaryNetworkEndPointId() { + return secondary_network_endpoint_id; +} + +uint16_t MatterEndPoint::getEndPointId() { + return endpoint_id; +} + +void MatterEndPoint::setEndPointId(uint16_t ep) { + if (ep == 0) { + log_e("Invalid endpoint ID"); + return; + } + log_v("Endpoint ID set to %d", ep); + + endpoint_id = ep; +} + +// helper functions for attribute manipulation +esp_matter::attribute_t *MatterEndPoint::getAttribute(uint32_t cluster_id, uint32_t attribute_id) { + if (endpoint_id == 0) { + log_e("Endpoint ID is not set"); + return nullptr; + } + endpoint_t *endpoint = endpoint::get(node::get(), endpoint_id); + if (endpoint == nullptr) { + log_e("Endpoint [%d] not found", endpoint_id); + return nullptr; + } + cluster_t *cluster = cluster::get(endpoint, cluster_id); + if (cluster == nullptr) { + log_e("Cluster [%d] not found", cluster_id); + return nullptr; + } + esp_matter::attribute_t *attribute = attribute::get(cluster, attribute_id); + if (attribute == nullptr) { + log_e("Attribute [%d] not found", attribute_id); + return nullptr; + } + return attribute; +} + +// get the value of an attribute from its cluster id and attribute it +bool MatterEndPoint::getAttributeVal(uint32_t cluster_id, uint32_t attribute_id, esp_matter_attr_val_t *attrVal) { + esp_matter::attribute_t *attribute = getAttribute(cluster_id, attribute_id); + if (attribute == nullptr) { + return false; + } + if (attribute::get_val(attribute, attrVal) == ESP_OK) { + log_v("GET_VAL Success for cluster %d, attribute %d with value %d", cluster_id, attribute_id, attrVal->val.u32); + return true; + } + log_e("GET_VAL FAILED! for cluster %d, attribute %d with value %d", cluster_id, attribute_id, attrVal->val.u32); + return false; +} + +// set the value of an attribute from its cluster id and attribute it +bool MatterEndPoint::setAttributeVal(uint32_t cluster_id, uint32_t attribute_id, esp_matter_attr_val_t *attrVal) { + esp_matter::attribute_t *attribute = getAttribute(cluster_id, attribute_id); + if (attribute == nullptr) { + return false; + } + if (attribute::set_val(attribute, attrVal) == ESP_OK) { + log_v("SET_VAL Success for cluster %d, attribute %d with value %d", cluster_id, attribute_id, attrVal->val.u32); + return true; + } + log_e("SET_VAL FAILED! for cluster %d, attribute %d with value %d", cluster_id, attribute_id, attrVal->val.u32); + return false; +} + +// update the value of an attribute from its cluster id and attribute it +bool MatterEndPoint::updateAttributeVal(uint32_t cluster_id, uint32_t attribute_id, esp_matter_attr_val_t *attrVal) { + if (attribute::update(endpoint_id, cluster_id, attribute_id, attrVal) == ESP_OK) { + log_v("Update Success for cluster %d, attribute %d with value %d", cluster_id, attribute_id, attrVal->val.u32); + return true; + } + log_e("Update FAILED! for cluster %d, attribute %d with value %d", cluster_id, attribute_id, attrVal->val.u32); + return false; +} + +// This callback is invoked when clients interact with the Identify Cluster of an specific endpoint. +bool MatterEndPoint::endpointIdentifyCB(uint16_t endpoint_id, bool identifyIsEnabled) { + if (_onEndPointIdentifyCB) { + return _onEndPointIdentifyCB(identifyIsEnabled); + } + return true; +} + +// User callback for the Identify Cluster functionality +void MatterEndPoint::onIdentify(EndPointIdentifyCB onEndPointIdentifyCB) { + _onEndPointIdentifyCB = onEndPointIdentifyCB; +} + +#endif /* CONFIG_ESP_MATTER_ENABLE_DATA_MODEL */ \ No newline at end of file diff --git a/libraries/Matter/src/MatterEndPoint.h b/libraries/Matter/src/MatterEndPoint.h index 95d3d3c08df..8ba39cae3a8 100644 --- a/libraries/Matter/src/MatterEndPoint.h +++ b/libraries/Matter/src/MatterEndPoint.h @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,7 +16,8 @@ #include #ifdef CONFIG_ESP_MATTER_ENABLE_DATA_MODEL -#include +#include +#include #include using namespace esp_matter; @@ -29,93 +30,47 @@ class MatterEndPoint { ATTR_UPDATE = true }; - uint16_t getEndPointId() { - return endpoint_id; - } + using EndPointIdentifyCB = std::function; + + // this function is called by Matter internal event processor. It could be overwritten by the application, if necessary. + virtual bool attributeChangeCB(uint16_t endpoint_id, uint32_t cluster_id, uint32_t attribute_id, esp_matter_attr_val_t *val) = 0; + + // This function is called to create a secondary network interface endpoint. + // It can be used for devices that support multiple network interfaces, + // such as Ethernet, Thread and Wi-Fi. + bool createSecondaryNetworkInterface(); + + // This function is called to get the secondary network interface endpoint ID. + uint16_t getSecondaryNetworkEndPointId(); + + // This function is called to get the current Matter Accessory endpoint ID. + uint16_t getEndPointId(); - void setEndPointId(uint16_t ep) { - endpoint_id = ep; - } + // This function is called to set the current Matter Accessory endpoint ID. + void setEndPointId(uint16_t ep); // helper functions for attribute manipulation - esp_matter::attribute_t *getAttribute(uint32_t cluster_id, uint32_t attribute_id) { - if (endpoint_id == 0) { - log_e("Endpoint ID is not set"); - return nullptr; - } - endpoint_t *endpoint = endpoint::get(node::get(), endpoint_id); - if (endpoint == nullptr) { - log_e("Endpoint [%d] not found", endpoint_id); - return nullptr; - } - cluster_t *cluster = cluster::get(endpoint, cluster_id); - if (cluster == nullptr) { - log_e("Cluster [%d] not found", cluster_id); - return nullptr; - } - esp_matter::attribute_t *attribute = attribute::get(cluster, attribute_id); - if (attribute == nullptr) { - log_e("Attribute [%d] not found", attribute_id); - return nullptr; - } - return attribute; - } - - // get the value of an attribute from its cluster id and attribute it - bool getAttributeVal(uint32_t cluster_id, uint32_t attribute_id, esp_matter_attr_val_t *attrVal) { - esp_matter::attribute_t *attribute = getAttribute(cluster_id, attribute_id); - if (attribute == nullptr) { - return false; - } - if (attribute::get_val(attribute, attrVal) == ESP_OK) { - log_v("GET_VAL Success for cluster %d, attribute %d with value %d", cluster_id, attribute_id, attrVal->val.u32); - return true; - } - log_e("GET_VAL FAILED! for cluster %d, attribute %d with value %d", cluster_id, attribute_id, attrVal->val.u32); - return false; - } - - // set the value of an attribute from its cluster id and attribute it - bool setAttributeVal(uint32_t cluster_id, uint32_t attribute_id, esp_matter_attr_val_t *attrVal) { - esp_matter::attribute_t *attribute = getAttribute(cluster_id, attribute_id); - if (attribute == nullptr) { - return false; - } - if (attribute::set_val(attribute, attrVal) == ESP_OK) { - log_v("SET_VAL Success for cluster %d, attribute %d with value %d", cluster_id, attribute_id, attrVal->val.u32); - return true; - } - log_e("SET_VAL FAILED! for cluster %d, attribute %d with value %d", cluster_id, attribute_id, attrVal->val.u32); - return false; - } - - // update the value of an attribute from its cluster id and attribute it - bool updateAttributeVal(uint32_t cluster_id, uint32_t attribute_id, esp_matter_attr_val_t *attrVal) { - if (attribute::update(endpoint_id, cluster_id, attribute_id, attrVal) == ESP_OK) { - log_v("Update Success for cluster %d, attribute %d with value %d", cluster_id, attribute_id, attrVal->val.u32); - return true; - } - log_e("Update FAILED! for cluster %d, attribute %d with value %d", cluster_id, attribute_id, attrVal->val.u32); - return false; - } + esp_matter::attribute_t *getAttribute(uint32_t cluster_id, uint32_t attribute_id); - // this function is called by Matter internal event processor. It could be overwritten by the application, if necessary. - virtual bool attributeChangeCB(uint16_t endpoint_id, uint32_t cluster_id, uint32_t attribute_id, esp_matter_attr_val_t *val) = 0; + // get the value of an attribute from its cluster id and + bool getAttributeVal(uint32_t cluster_id, uint32_t attribute_id, esp_matter_attr_val_t *attrVal); + + // set the value of an attribute from its cluster id and + bool setAttributeVal(uint32_t cluster_id, uint32_t attribute_id, esp_matter_attr_val_t *attrVal); + + // update the value of an attribute from its cluster id + bool updateAttributeVal(uint32_t cluster_id, uint32_t attribute_id, esp_matter_attr_val_t *attrVal); // This callback is invoked when clients interact with the Identify Cluster of an specific endpoint. - bool endpointIdentifyCB(uint16_t endpoint_id, bool identifyIsEnabled) { - if (_onEndPointIdentifyCB) { - return _onEndPointIdentifyCB(identifyIsEnabled); - } - return true; - } + bool endpointIdentifyCB(uint16_t endpoint_id, bool identifyIsEnabled); + // User callaback for the Identify Cluster functionality - using EndPointIdentifyCB = std::function; - void onIdentify(EndPointIdentifyCB onEndPointIdentifyCB) { - _onEndPointIdentifyCB = onEndPointIdentifyCB; - } + void onIdentify(EndPointIdentifyCB onEndPointIdentifyCB); protected: + // used for secondary network interface endpoints + static uint16_t secondary_network_endpoint_id; + // main endpoint ID uint16_t endpoint_id = 0; EndPointIdentifyCB _onEndPointIdentifyCB = nullptr; }; diff --git a/libraries/Matter/src/MatterEndpoints/MatterColorLight.cpp b/libraries/Matter/src/MatterEndpoints/MatterColorLight.cpp index 39d79e86325..82d4918c75d 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterColorLight.cpp +++ b/libraries/Matter/src/MatterEndpoints/MatterColorLight.cpp @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -197,6 +197,11 @@ bool MatterColorLight::begin(bool initialState, espHsvColor_t _colorHSV) { esp_matter::attribute_t *current_level_attribute = attribute::get(level_control_cluster, LevelControl::Attributes::CurrentLevel::Id); attribute::set_deferred_persistence(current_level_attribute); +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD && CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION + createSecondaryNetworkInterface(); +#endif + + started = true; return true; } diff --git a/libraries/Matter/src/MatterEndpoints/MatterColorLight.h b/libraries/Matter/src/MatterEndpoints/MatterColorLight.h index 99449addd50..b07432a2cf5 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterColorLight.h +++ b/libraries/Matter/src/MatterEndpoints/MatterColorLight.h @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/libraries/Matter/src/MatterEndpoints/MatterColorTemperatureLight.cpp b/libraries/Matter/src/MatterEndpoints/MatterColorTemperatureLight.cpp index 3c4fccfa046..06a676d3093 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterColorTemperatureLight.cpp +++ b/libraries/Matter/src/MatterEndpoints/MatterColorTemperatureLight.cpp @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -129,6 +129,10 @@ bool MatterColorTemperatureLight::begin(bool initialState, uint8_t brightness, u esp_matter::attribute_t *color_temp_attribute = attribute::get(color_control_cluster, ColorControl::Attributes::ColorTemperatureMireds::Id); attribute::set_deferred_persistence(color_temp_attribute); +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD && CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION + createSecondaryNetworkInterface(); +#endif + started = true; return true; } diff --git a/libraries/Matter/src/MatterEndpoints/MatterColorTemperatureLight.h b/libraries/Matter/src/MatterEndpoints/MatterColorTemperatureLight.h index 539bc386e92..3c8b2dca882 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterColorTemperatureLight.h +++ b/libraries/Matter/src/MatterEndpoints/MatterColorTemperatureLight.h @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/libraries/Matter/src/MatterEndpoints/MatterContactSensor.cpp b/libraries/Matter/src/MatterEndpoints/MatterContactSensor.cpp index 17b0fe7a247..86074304653 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterContactSensor.cpp +++ b/libraries/Matter/src/MatterEndpoints/MatterContactSensor.cpp @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -60,6 +60,11 @@ bool MatterContactSensor::begin(bool _contactState) { contactState = _contactState; setEndPointId(endpoint::get_id(endpoint)); log_i("Contact Sensor created with endpoint_id %d", getEndPointId()); + +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD && CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION + createSecondaryNetworkInterface(); +#endif + started = true; return true; } diff --git a/libraries/Matter/src/MatterEndpoints/MatterContactSensor.h b/libraries/Matter/src/MatterEndpoints/MatterContactSensor.h index 257da785e53..687bf0d0b4b 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterContactSensor.h +++ b/libraries/Matter/src/MatterEndpoints/MatterContactSensor.h @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/libraries/Matter/src/MatterEndpoints/MatterDimmableLight.cpp b/libraries/Matter/src/MatterEndpoints/MatterDimmableLight.cpp index 5167cf1f21c..0f0dd43074b 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterDimmableLight.cpp +++ b/libraries/Matter/src/MatterEndpoints/MatterDimmableLight.cpp @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -104,6 +104,10 @@ bool MatterDimmableLight::begin(bool initialState, uint8_t brightness) { esp_matter::attribute_t *current_level_attribute = attribute::get(level_control_cluster, LevelControl::Attributes::CurrentLevel::Id); attribute::set_deferred_persistence(current_level_attribute); +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD && CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION + createSecondaryNetworkInterface(); +#endif + started = true; return true; } diff --git a/libraries/Matter/src/MatterEndpoints/MatterDimmableLight.h b/libraries/Matter/src/MatterEndpoints/MatterDimmableLight.h index 4497edd2fe2..45b112100cb 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterDimmableLight.h +++ b/libraries/Matter/src/MatterEndpoints/MatterDimmableLight.h @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/libraries/Matter/src/MatterEndpoints/MatterEnhancedColorLight.cpp b/libraries/Matter/src/MatterEndpoints/MatterEnhancedColorLight.cpp index 9b245fb9408..f641cf71ace 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterEnhancedColorLight.cpp +++ b/libraries/Matter/src/MatterEndpoints/MatterEnhancedColorLight.cpp @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -217,6 +217,10 @@ bool MatterEnhancedColorLight::begin(bool initialState, espHsvColor_t _colorHSV, esp_matter::attribute_t *current_level_attribute = attribute::get(level_control_cluster, LevelControl::Attributes::CurrentLevel::Id); attribute::set_deferred_persistence(current_level_attribute); +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD && CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION + createSecondaryNetworkInterface(); +#endif + started = true; return true; } diff --git a/libraries/Matter/src/MatterEndpoints/MatterEnhancedColorLight.h b/libraries/Matter/src/MatterEndpoints/MatterEnhancedColorLight.h index a4baef968a4..97f0279b9e4 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterEnhancedColorLight.h +++ b/libraries/Matter/src/MatterEndpoints/MatterEnhancedColorLight.h @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/libraries/Matter/src/MatterEndpoints/MatterFan.cpp b/libraries/Matter/src/MatterEndpoints/MatterFan.cpp index 1647490aa05..a1250f08881 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterFan.cpp +++ b/libraries/Matter/src/MatterEndpoints/MatterFan.cpp @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -110,6 +110,11 @@ bool MatterFan::begin(uint8_t percent, FanMode_t fanMode, FanModeSequence_t fanM setEndPointId(endpoint::get_id(endpoint)); log_i("Fan created with endpoint_id %d", getEndPointId()); + +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD && CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION + createSecondaryNetworkInterface(); +#endif + started = true; return true; } diff --git a/libraries/Matter/src/MatterEndpoints/MatterFan.h b/libraries/Matter/src/MatterEndpoints/MatterFan.h index a1cd6e42423..53736ac70f2 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterFan.h +++ b/libraries/Matter/src/MatterEndpoints/MatterFan.h @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/libraries/Matter/src/MatterEndpoints/MatterGenericSwitch.cpp b/libraries/Matter/src/MatterEndpoints/MatterGenericSwitch.cpp index e20479af088..f84a63cb827 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterGenericSwitch.cpp +++ b/libraries/Matter/src/MatterEndpoints/MatterGenericSwitch.cpp @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -79,6 +79,11 @@ bool MatterGenericSwitch::begin() { setEndPointId(endpoint::get_id(endpoint)); log_i("Generic Switch created with endpoint_id %d", getEndPointId()); + +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD && CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION + createSecondaryNetworkInterface(); +#endif + started = true; return true; } diff --git a/libraries/Matter/src/MatterEndpoints/MatterGenericSwitch.h b/libraries/Matter/src/MatterEndpoints/MatterGenericSwitch.h index 14118462932..ffcc6f47706 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterGenericSwitch.h +++ b/libraries/Matter/src/MatterEndpoints/MatterGenericSwitch.h @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/libraries/Matter/src/MatterEndpoints/MatterHumiditySensor.cpp b/libraries/Matter/src/MatterEndpoints/MatterHumiditySensor.cpp index d31d0e43728..89be7dd2e3d 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterHumiditySensor.cpp +++ b/libraries/Matter/src/MatterEndpoints/MatterHumiditySensor.cpp @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -68,6 +68,11 @@ bool MatterHumiditySensor::begin(uint16_t _rawHumidity) { rawHumidity = _rawHumidity; setEndPointId(endpoint::get_id(endpoint)); log_i("Humidity Sensor created with endpoint_id %d", getEndPointId()); + +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD && CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION + createSecondaryNetworkInterface(); +#endif + started = true; return true; } diff --git a/libraries/Matter/src/MatterEndpoints/MatterHumiditySensor.h b/libraries/Matter/src/MatterEndpoints/MatterHumiditySensor.h index aed758b7b7a..48c3a4b9e28 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterHumiditySensor.h +++ b/libraries/Matter/src/MatterEndpoints/MatterHumiditySensor.h @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/libraries/Matter/src/MatterEndpoints/MatterOccupancySensor.cpp b/libraries/Matter/src/MatterEndpoints/MatterOccupancySensor.cpp index 0d55c37708a..4865f3e2b1b 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterOccupancySensor.cpp +++ b/libraries/Matter/src/MatterEndpoints/MatterOccupancySensor.cpp @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -71,6 +71,11 @@ bool MatterOccupancySensor::begin(bool _occupancyState, OccupancySensorType_t _o occupancyState = _occupancyState; setEndPointId(endpoint::get_id(endpoint)); log_i("Occupancy Sensor created with endpoint_id %d", getEndPointId()); + +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD && CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION + createSecondaryNetworkInterface(); +#endif + started = true; return true; } diff --git a/libraries/Matter/src/MatterEndpoints/MatterOccupancySensor.h b/libraries/Matter/src/MatterEndpoints/MatterOccupancySensor.h index 30f312a9841..acfa7fec632 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterOccupancySensor.h +++ b/libraries/Matter/src/MatterEndpoints/MatterOccupancySensor.h @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/libraries/Matter/src/MatterEndpoints/MatterOnOffLight.cpp b/libraries/Matter/src/MatterEndpoints/MatterOnOffLight.cpp index f400390f9a7..94624e085c9 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterOnOffLight.cpp +++ b/libraries/Matter/src/MatterEndpoints/MatterOnOffLight.cpp @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -79,6 +79,11 @@ bool MatterOnOffLight::begin(bool initialState) { setEndPointId(endpoint::get_id(endpoint)); log_i("On-Off Light created with endpoint_id %d", getEndPointId()); + +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD && CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION + createSecondaryNetworkInterface(); +#endif + started = true; return true; } diff --git a/libraries/Matter/src/MatterEndpoints/MatterOnOffLight.h b/libraries/Matter/src/MatterEndpoints/MatterOnOffLight.h index ec524d2c300..2c52858cc9a 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterOnOffLight.h +++ b/libraries/Matter/src/MatterEndpoints/MatterOnOffLight.h @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/libraries/Matter/src/MatterEndpoints/MatterOnOffPlugin.cpp b/libraries/Matter/src/MatterEndpoints/MatterOnOffPlugin.cpp index 9b08958684c..c0524344cf0 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterOnOffPlugin.cpp +++ b/libraries/Matter/src/MatterEndpoints/MatterOnOffPlugin.cpp @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -78,6 +78,11 @@ bool MatterOnOffPlugin::begin(bool initialState) { onOffState = initialState; setEndPointId(endpoint::get_id(endpoint)); log_i("On-Off Plugin created with endpoint_id %d", getEndPointId()); + +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD && CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION + createSecondaryNetworkInterface(); +#endif + started = true; return true; } diff --git a/libraries/Matter/src/MatterEndpoints/MatterOnOffPlugin.h b/libraries/Matter/src/MatterEndpoints/MatterOnOffPlugin.h index 0b05c0944c4..e3489b355a8 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterOnOffPlugin.h +++ b/libraries/Matter/src/MatterEndpoints/MatterOnOffPlugin.h @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/libraries/Matter/src/MatterEndpoints/MatterPressureSensor.cpp b/libraries/Matter/src/MatterEndpoints/MatterPressureSensor.cpp index 86d245d4041..e04ca517102 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterPressureSensor.cpp +++ b/libraries/Matter/src/MatterEndpoints/MatterPressureSensor.cpp @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -61,6 +61,11 @@ bool MatterPressureSensor::begin(int16_t _rawPressure) { rawPressure = _rawPressure; setEndPointId(endpoint::get_id(endpoint)); log_i("Pressure Sensor created with endpoint_id %d", getEndPointId()); + +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD && CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION + createSecondaryNetworkInterface(); +#endif + started = true; return true; } diff --git a/libraries/Matter/src/MatterEndpoints/MatterPressureSensor.h b/libraries/Matter/src/MatterEndpoints/MatterPressureSensor.h index 0715c05609d..6b1973049ca 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterPressureSensor.h +++ b/libraries/Matter/src/MatterEndpoints/MatterPressureSensor.h @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/libraries/Matter/src/MatterEndpoints/MatterTemperatureSensor.cpp b/libraries/Matter/src/MatterEndpoints/MatterTemperatureSensor.cpp index 863f86386c1..0dc672e7491 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterTemperatureSensor.cpp +++ b/libraries/Matter/src/MatterEndpoints/MatterTemperatureSensor.cpp @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -61,6 +61,11 @@ bool MatterTemperatureSensor::begin(int16_t _rawTemperature) { rawTemperature = _rawTemperature; setEndPointId(endpoint::get_id(endpoint)); log_i("Temperature Sensor created with endpoint_id %d", getEndPointId()); + +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD && CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION + createSecondaryNetworkInterface(); +#endif + started = true; return true; } diff --git a/libraries/Matter/src/MatterEndpoints/MatterTemperatureSensor.h b/libraries/Matter/src/MatterEndpoints/MatterTemperatureSensor.h index 3be6101166c..51a1eeb3b0a 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterTemperatureSensor.h +++ b/libraries/Matter/src/MatterEndpoints/MatterTemperatureSensor.h @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/libraries/Matter/src/MatterEndpoints/MatterThermostat.cpp b/libraries/Matter/src/MatterEndpoints/MatterThermostat.cpp index 5a68421bd8a..cdd1c77d230 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterThermostat.cpp +++ b/libraries/Matter/src/MatterEndpoints/MatterThermostat.cpp @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -202,6 +202,11 @@ bool MatterThermostat::begin(ControlSequenceOfOperation_t _controlSequence, Ther setEndPointId(endpoint::get_id(endpoint)); log_i("Thermostat created with endpoint_id %d", getEndPointId()); + +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD && CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION + createSecondaryNetworkInterface(); +#endif + started = true; return true; } diff --git a/libraries/Matter/src/MatterEndpoints/MatterThermostat.h b/libraries/Matter/src/MatterEndpoints/MatterThermostat.h index 2d64bdf3b01..53df61d191e 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterThermostat.h +++ b/libraries/Matter/src/MatterEndpoints/MatterThermostat.h @@ -1,4 +1,4 @@ -// Copyright 2024 Espressif Systems (Shanghai) PTE LTD +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From 27c18c46e2eb539fef3fcfc4083aef7ecd96a1d5 Mon Sep 17 00:00:00 2001 From: Rodrigo Garcia Date: Wed, 2 Jul 2025 00:40:46 -0300 Subject: [PATCH 2/6] fix(matter): commentary typo and formatting --- libraries/Matter/examples/MatterColorLight/MatterColorLight.ino | 2 +- .../examples/MatterCommissionTest/MatterCommissionTest.ino | 2 +- .../examples/MatterComposedLights/MatterComposedLights.ino | 2 +- .../Matter/examples/MatterContactSensor/MatterContactSensor.ino | 2 +- .../Matter/examples/MatterDimmableLight/MatterDimmableLight.ino | 2 +- .../MatterEnhancedColorLight/MatterEnhancedColorLight.ino | 2 +- libraries/Matter/examples/MatterEvents/MatterEvents.ino | 2 +- libraries/Matter/examples/MatterFan/MatterFan.ino | 2 +- .../examples/MatterHumiditySensor/MatterHumiditySensor.ino | 2 +- libraries/Matter/examples/MatterMinimum/MatterMinimum.ino | 2 +- .../examples/MatterOccupancySensor/MatterOccupancySensor.ino | 2 +- libraries/Matter/examples/MatterOnIdentify/MatterOnIdentify.ino | 2 +- libraries/Matter/examples/MatterOnOffLight/MatterOnOffLight.ino | 2 +- .../Matter/examples/MatterOnOffPlugin/MatterOnOffPlugin.ino | 2 +- .../examples/MatterPressureSensor/MatterPressureSensor.ino | 2 +- libraries/Matter/examples/MatterSmartButon/MatterSmartButon.ino | 2 +- .../examples/MatterTemperatureLight/MatterTemperatureLight.ino | 2 +- .../MatterTemperatureSensor/MatterTemperatureSensor.ino | 2 +- libraries/Matter/examples/MatterThermostat/MatterThermostat.ino | 2 +- libraries/Matter/src/MatterEndpoints/MatterColorLight.cpp | 1 - 20 files changed, 19 insertions(+), 20 deletions(-) diff --git a/libraries/Matter/examples/MatterColorLight/MatterColorLight.ino b/libraries/Matter/examples/MatterColorLight/MatterColorLight.ino index 932acbc7fdf..8c553978394 100644 --- a/libraries/Matter/examples/MatterColorLight/MatterColorLight.ino +++ b/libraries/Matter/examples/MatterColorLight/MatterColorLight.ino @@ -15,7 +15,7 @@ // Matter Manager #include #if !CONFIG_ENABLE_CHIPOBLE -// if the decive can be commissioned using BLE, WiFi is not used - save flash space +// if the device can be commissioned using BLE, WiFi is not used - save flash space #include #endif #include diff --git a/libraries/Matter/examples/MatterCommissionTest/MatterCommissionTest.ino b/libraries/Matter/examples/MatterCommissionTest/MatterCommissionTest.ino index 6ddf4f266e4..4eef38fbdba 100644 --- a/libraries/Matter/examples/MatterCommissionTest/MatterCommissionTest.ino +++ b/libraries/Matter/examples/MatterCommissionTest/MatterCommissionTest.ino @@ -15,7 +15,7 @@ // Matter Manager #include #if !CONFIG_ENABLE_CHIPOBLE -// if the decive can be commissioned using BLE, WiFi is not used - save flash space +// if the device can be commissioned using BLE, WiFi is not used - save flash space #include #endif diff --git a/libraries/Matter/examples/MatterComposedLights/MatterComposedLights.ino b/libraries/Matter/examples/MatterComposedLights/MatterComposedLights.ino index f54edf5b1fd..68e5eb75748 100644 --- a/libraries/Matter/examples/MatterComposedLights/MatterComposedLights.ino +++ b/libraries/Matter/examples/MatterComposedLights/MatterComposedLights.ino @@ -15,7 +15,7 @@ // Matter Manager #include #if !CONFIG_ENABLE_CHIPOBLE -// if the decive can be commissioned using BLE, WiFi is not used - save flash space +// if the device can be commissioned using BLE, WiFi is not used - save flash space #include #endif diff --git a/libraries/Matter/examples/MatterContactSensor/MatterContactSensor.ino b/libraries/Matter/examples/MatterContactSensor/MatterContactSensor.ino index d344c78b4d7..ba542883a61 100644 --- a/libraries/Matter/examples/MatterContactSensor/MatterContactSensor.ino +++ b/libraries/Matter/examples/MatterContactSensor/MatterContactSensor.ino @@ -31,7 +31,7 @@ // Matter Manager #include #if !CONFIG_ENABLE_CHIPOBLE -// if the decive can be commissioned using BLE, WiFi is not used - save flash space +// if the device can be commissioned using BLE, WiFi is not used - save flash space #include #endif diff --git a/libraries/Matter/examples/MatterDimmableLight/MatterDimmableLight.ino b/libraries/Matter/examples/MatterDimmableLight/MatterDimmableLight.ino index 2d1248bbebe..f2ad607d5cc 100644 --- a/libraries/Matter/examples/MatterDimmableLight/MatterDimmableLight.ino +++ b/libraries/Matter/examples/MatterDimmableLight/MatterDimmableLight.ino @@ -15,7 +15,7 @@ // Matter Manager #include #if !CONFIG_ENABLE_CHIPOBLE -// if the decive can be commissioned using BLE, WiFi is not used - save flash space +// if the device can be commissioned using BLE, WiFi is not used - save flash space #include #endif #include diff --git a/libraries/Matter/examples/MatterEnhancedColorLight/MatterEnhancedColorLight.ino b/libraries/Matter/examples/MatterEnhancedColorLight/MatterEnhancedColorLight.ino index 1a87e0762bc..aa20b301780 100644 --- a/libraries/Matter/examples/MatterEnhancedColorLight/MatterEnhancedColorLight.ino +++ b/libraries/Matter/examples/MatterEnhancedColorLight/MatterEnhancedColorLight.ino @@ -15,7 +15,7 @@ // Matter Manager #include #if !CONFIG_ENABLE_CHIPOBLE -// if the decive can be commissioned using BLE, WiFi is not used - save flash space +// if the device can be commissioned using BLE, WiFi is not used - save flash space #include #endif #include diff --git a/libraries/Matter/examples/MatterEvents/MatterEvents.ino b/libraries/Matter/examples/MatterEvents/MatterEvents.ino index c8d825aa574..2d28b7c12c1 100644 --- a/libraries/Matter/examples/MatterEvents/MatterEvents.ino +++ b/libraries/Matter/examples/MatterEvents/MatterEvents.ino @@ -15,7 +15,7 @@ // Matter Manager #include #if !CONFIG_ENABLE_CHIPOBLE -// if the decive can be commissioned using BLE, WiFi is not used - save flash space +// if the device can be commissioned using BLE, WiFi is not used - save flash space #include #endif diff --git a/libraries/Matter/examples/MatterFan/MatterFan.ino b/libraries/Matter/examples/MatterFan/MatterFan.ino index 9686f0dd679..94d510fd04b 100644 --- a/libraries/Matter/examples/MatterFan/MatterFan.ino +++ b/libraries/Matter/examples/MatterFan/MatterFan.ino @@ -15,7 +15,7 @@ // Matter Manager #include #if !CONFIG_ENABLE_CHIPOBLE -// if the decive can be commissioned using BLE, WiFi is not used - save flash space +// if the device can be commissioned using BLE, WiFi is not used - save flash space #include #endif diff --git a/libraries/Matter/examples/MatterHumiditySensor/MatterHumiditySensor.ino b/libraries/Matter/examples/MatterHumiditySensor/MatterHumiditySensor.ino index af706fd02b0..3375164c0dd 100644 --- a/libraries/Matter/examples/MatterHumiditySensor/MatterHumiditySensor.ino +++ b/libraries/Matter/examples/MatterHumiditySensor/MatterHumiditySensor.ino @@ -22,7 +22,7 @@ // Matter Manager #include #if !CONFIG_ENABLE_CHIPOBLE -// if the decive can be commissioned using BLE, WiFi is not used - save flash space +// if the device can be commissioned using BLE, WiFi is not used - save flash space #include #endif diff --git a/libraries/Matter/examples/MatterMinimum/MatterMinimum.ino b/libraries/Matter/examples/MatterMinimum/MatterMinimum.ino index 96df2ec6ba3..f85c18342d2 100644 --- a/libraries/Matter/examples/MatterMinimum/MatterMinimum.ino +++ b/libraries/Matter/examples/MatterMinimum/MatterMinimum.ino @@ -23,7 +23,7 @@ // Matter Manager #include #if !CONFIG_ENABLE_CHIPOBLE -// if the decive can be commissioned using BLE, WiFi is not used - save flash space +// if the device can be commissioned using BLE, WiFi is not used - save flash space #include #endif diff --git a/libraries/Matter/examples/MatterOccupancySensor/MatterOccupancySensor.ino b/libraries/Matter/examples/MatterOccupancySensor/MatterOccupancySensor.ino index 9539e225bce..79581a33b1c 100644 --- a/libraries/Matter/examples/MatterOccupancySensor/MatterOccupancySensor.ino +++ b/libraries/Matter/examples/MatterOccupancySensor/MatterOccupancySensor.ino @@ -29,7 +29,7 @@ // Matter Manager #include #if !CONFIG_ENABLE_CHIPOBLE -// if the decive can be commissioned using BLE, WiFi is not used - save flash space +// if the device can be commissioned using BLE, WiFi is not used - save flash space #include #endif diff --git a/libraries/Matter/examples/MatterOnIdentify/MatterOnIdentify.ino b/libraries/Matter/examples/MatterOnIdentify/MatterOnIdentify.ino index a70f1f5466c..c503f7af044 100644 --- a/libraries/Matter/examples/MatterOnIdentify/MatterOnIdentify.ino +++ b/libraries/Matter/examples/MatterOnIdentify/MatterOnIdentify.ino @@ -27,7 +27,7 @@ // Matter Manager #include #if !CONFIG_ENABLE_CHIPOBLE -// if the decive can be commissioned using BLE, WiFi is not used - save flash space +// if the device can be commissioned using BLE, WiFi is not used - save flash space #include #endif diff --git a/libraries/Matter/examples/MatterOnOffLight/MatterOnOffLight.ino b/libraries/Matter/examples/MatterOnOffLight/MatterOnOffLight.ino index 25a148267d3..8a415bda969 100644 --- a/libraries/Matter/examples/MatterOnOffLight/MatterOnOffLight.ino +++ b/libraries/Matter/examples/MatterOnOffLight/MatterOnOffLight.ino @@ -15,7 +15,7 @@ // Matter Manager #include #if !CONFIG_ENABLE_CHIPOBLE -// if the decive can be commissioned using BLE, WiFi is not used - save flash space +// if the device can be commissioned using BLE, WiFi is not used - save flash space #include #endif #include diff --git a/libraries/Matter/examples/MatterOnOffPlugin/MatterOnOffPlugin.ino b/libraries/Matter/examples/MatterOnOffPlugin/MatterOnOffPlugin.ino index 61d62f7c5e3..f31fae1ccc0 100644 --- a/libraries/Matter/examples/MatterOnOffPlugin/MatterOnOffPlugin.ino +++ b/libraries/Matter/examples/MatterOnOffPlugin/MatterOnOffPlugin.ino @@ -15,7 +15,7 @@ // Matter Manager #include #if !CONFIG_ENABLE_CHIPOBLE -// if the decive can be commissioned using BLE, WiFi is not used - save flash space +// if the device can be commissioned using BLE, WiFi is not used - save flash space #include #endif #include diff --git a/libraries/Matter/examples/MatterPressureSensor/MatterPressureSensor.ino b/libraries/Matter/examples/MatterPressureSensor/MatterPressureSensor.ino index 8e0930e97d5..779c162e6db 100644 --- a/libraries/Matter/examples/MatterPressureSensor/MatterPressureSensor.ino +++ b/libraries/Matter/examples/MatterPressureSensor/MatterPressureSensor.ino @@ -22,7 +22,7 @@ // Matter Manager #include #if !CONFIG_ENABLE_CHIPOBLE -// if the decive can be commissioned using BLE, WiFi is not used - save flash space +// if the device can be commissioned using BLE, WiFi is not used - save flash space #include #endif diff --git a/libraries/Matter/examples/MatterSmartButon/MatterSmartButon.ino b/libraries/Matter/examples/MatterSmartButon/MatterSmartButon.ino index 9cf6571c75a..b75fbc21983 100644 --- a/libraries/Matter/examples/MatterSmartButon/MatterSmartButon.ino +++ b/libraries/Matter/examples/MatterSmartButon/MatterSmartButon.ino @@ -15,7 +15,7 @@ // Matter Manager #include #if !CONFIG_ENABLE_CHIPOBLE -// if the decive can be commissioned using BLE, WiFi is not used - save flash space +// if the device can be commissioned using BLE, WiFi is not used - save flash space #include #endif diff --git a/libraries/Matter/examples/MatterTemperatureLight/MatterTemperatureLight.ino b/libraries/Matter/examples/MatterTemperatureLight/MatterTemperatureLight.ino index 6f30f019c27..c425958ac09 100644 --- a/libraries/Matter/examples/MatterTemperatureLight/MatterTemperatureLight.ino +++ b/libraries/Matter/examples/MatterTemperatureLight/MatterTemperatureLight.ino @@ -15,7 +15,7 @@ // Matter Manager #include #if !CONFIG_ENABLE_CHIPOBLE -// if the decive can be commissioned using BLE, WiFi is not used - save flash space +// if the device can be commissioned using BLE, WiFi is not used - save flash space #include #endif #include diff --git a/libraries/Matter/examples/MatterTemperatureSensor/MatterTemperatureSensor.ino b/libraries/Matter/examples/MatterTemperatureSensor/MatterTemperatureSensor.ino index dc628691287..fcdab36a1d6 100644 --- a/libraries/Matter/examples/MatterTemperatureSensor/MatterTemperatureSensor.ino +++ b/libraries/Matter/examples/MatterTemperatureSensor/MatterTemperatureSensor.ino @@ -22,7 +22,7 @@ // Matter Manager #include #if !CONFIG_ENABLE_CHIPOBLE -// if the decive can be commissioned using BLE, WiFi is not used - save flash space +// if the device can be commissioned using BLE, WiFi is not used - save flash space #include #endif diff --git a/libraries/Matter/examples/MatterThermostat/MatterThermostat.ino b/libraries/Matter/examples/MatterThermostat/MatterThermostat.ino index 3a141e5d0aa..cac19a97344 100644 --- a/libraries/Matter/examples/MatterThermostat/MatterThermostat.ino +++ b/libraries/Matter/examples/MatterThermostat/MatterThermostat.ino @@ -22,7 +22,7 @@ // Matter Manager #include #if !CONFIG_ENABLE_CHIPOBLE -// if the decive can be commissioned using BLE, WiFi is not used - save flash space +// if the device can be commissioned using BLE, WiFi is not used - save flash space #include #endif diff --git a/libraries/Matter/src/MatterEndpoints/MatterColorLight.cpp b/libraries/Matter/src/MatterEndpoints/MatterColorLight.cpp index 82d4918c75d..0f438f1472d 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterColorLight.cpp +++ b/libraries/Matter/src/MatterEndpoints/MatterColorLight.cpp @@ -201,7 +201,6 @@ bool MatterColorLight::begin(bool initialState, espHsvColor_t _colorHSV) { createSecondaryNetworkInterface(); #endif - started = true; return true; } From 68bfa4d7c462c91162eae61d50e39d1a5b6de262 Mon Sep 17 00:00:00 2001 From: Rodrigo Garcia Date: Wed, 2 Jul 2025 00:52:13 -0300 Subject: [PATCH 3/6] fix(matter): commentary typo and formatting --- .../Matter/examples/MatterColorLight/MatterColorLight.ino | 4 ++-- .../examples/MatterCommissionTest/MatterCommissionTest.ino | 4 ++-- .../examples/MatterComposedLights/MatterComposedLights.ino | 4 ++-- .../examples/MatterContactSensor/MatterContactSensor.ino | 4 ++-- .../examples/MatterDimmableLight/MatterDimmableLight.ino | 4 ++-- .../MatterEnhancedColorLight/MatterEnhancedColorLight.ino | 4 ++-- libraries/Matter/examples/MatterEvents/MatterEvents.ino | 4 ++-- libraries/Matter/examples/MatterFan/MatterFan.ino | 4 ++-- .../examples/MatterHumiditySensor/MatterHumiditySensor.ino | 4 ++-- libraries/Matter/examples/MatterMinimum/MatterMinimum.ino | 4 ++-- .../examples/MatterOccupancySensor/MatterOccupancySensor.ino | 4 ++-- .../Matter/examples/MatterOnIdentify/MatterOnIdentify.ino | 4 ++-- .../Matter/examples/MatterOnOffLight/MatterOnOffLight.ino | 4 ++-- .../Matter/examples/MatterOnOffPlugin/MatterOnOffPlugin.ino | 4 ++-- .../examples/MatterPressureSensor/MatterPressureSensor.ino | 4 ++-- .../Matter/examples/MatterSmartButon/MatterSmartButon.ino | 4 ++-- .../MatterTemperatureLight/MatterTemperatureLight.ino | 4 ++-- .../MatterTemperatureSensor/MatterTemperatureSensor.ino | 4 ++-- .../Matter/examples/MatterThermostat/MatterThermostat.ino | 4 ++-- libraries/Matter/src/MatterEndPoint.h | 2 +- 20 files changed, 39 insertions(+), 39 deletions(-) diff --git a/libraries/Matter/examples/MatterColorLight/MatterColorLight.ino b/libraries/Matter/examples/MatterColorLight/MatterColorLight.ino index 8c553978394..e28c96e266c 100644 --- a/libraries/Matter/examples/MatterColorLight/MatterColorLight.ino +++ b/libraries/Matter/examples/MatterColorLight/MatterColorLight.ino @@ -24,7 +24,7 @@ // Color Light Endpoint MatterColorLight ColorLight; -// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +// CONFIG_ENABLE_CHIPOBLE is enabled when BLE is used to commission the Matter Network #if !CONFIG_ENABLE_CHIPOBLE // WiFi is manually set and started const char *ssid = "your-ssid"; // Change this to your WiFi SSID @@ -87,7 +87,7 @@ void setup() { Serial.begin(115200); -// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +// CONFIG_ENABLE_CHIPOBLE is enabled when BLE is used to commission the Matter Network #if !CONFIG_ENABLE_CHIPOBLE // We start by connecting to a WiFi network Serial.print("Connecting to "); diff --git a/libraries/Matter/examples/MatterCommissionTest/MatterCommissionTest.ino b/libraries/Matter/examples/MatterCommissionTest/MatterCommissionTest.ino index 4eef38fbdba..aa593758548 100644 --- a/libraries/Matter/examples/MatterCommissionTest/MatterCommissionTest.ino +++ b/libraries/Matter/examples/MatterCommissionTest/MatterCommissionTest.ino @@ -23,7 +23,7 @@ // On/Off Light Endpoint MatterOnOffLight OnOffLight; -// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +// CONFIG_ENABLE_CHIPOBLE is enabled when BLE is used to commission the Matter Network #if !CONFIG_ENABLE_CHIPOBLE // WiFi is manually set and started const char *ssid = "your-ssid"; // Change this to your WiFi SSID @@ -33,7 +33,7 @@ const char *password = "your-password"; // Change this to your WiFi password void setup() { Serial.begin(115200); -// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +// CONFIG_ENABLE_CHIPOBLE is enabled when BLE is used to commission the Matter Network #if !CONFIG_ENABLE_CHIPOBLE // We start by connecting to a WiFi network Serial.print("Connecting to "); diff --git a/libraries/Matter/examples/MatterComposedLights/MatterComposedLights.ino b/libraries/Matter/examples/MatterComposedLights/MatterComposedLights.ino index 68e5eb75748..48a6db8bedd 100644 --- a/libraries/Matter/examples/MatterComposedLights/MatterComposedLights.ino +++ b/libraries/Matter/examples/MatterComposedLights/MatterComposedLights.ino @@ -25,7 +25,7 @@ MatterOnOffLight Light1; MatterDimmableLight Light2; MatterColorLight Light3; -// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +// CONFIG_ENABLE_CHIPOBLE is enabled when BLE is used to commission the Matter Network #if !CONFIG_ENABLE_CHIPOBLE // WiFi is manually set and started const char *ssid = "your-ssid"; // Change this to your WiFi SSID @@ -62,7 +62,7 @@ void setup() { Serial.begin(115200); -// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +// CONFIG_ENABLE_CHIPOBLE is enabled when BLE is used to commission the Matter Network #if !CONFIG_ENABLE_CHIPOBLE // We start by connecting to a WiFi network Serial.print("Connecting to "); diff --git a/libraries/Matter/examples/MatterContactSensor/MatterContactSensor.ino b/libraries/Matter/examples/MatterContactSensor/MatterContactSensor.ino index ba542883a61..6472012a2ff 100644 --- a/libraries/Matter/examples/MatterContactSensor/MatterContactSensor.ino +++ b/libraries/Matter/examples/MatterContactSensor/MatterContactSensor.ino @@ -39,7 +39,7 @@ // Matter Contact Sensor Endpoint MatterContactSensor ContactSensor; -// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +// CONFIG_ENABLE_CHIPOBLE is enabled when BLE is used to commission the Matter Network #if !CONFIG_ENABLE_CHIPOBLE // WiFi is manually set and started const char *ssid = "your-ssid"; // Change this to your WiFi SSID @@ -73,7 +73,7 @@ void setup() { Serial.begin(115200); -// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +// CONFIG_ENABLE_CHIPOBLE is enabled when BLE is used to commission the Matter Network #if !CONFIG_ENABLE_CHIPOBLE // Manually connect to WiFi WiFi.begin(ssid, password); diff --git a/libraries/Matter/examples/MatterDimmableLight/MatterDimmableLight.ino b/libraries/Matter/examples/MatterDimmableLight/MatterDimmableLight.ino index f2ad607d5cc..2b853b25677 100644 --- a/libraries/Matter/examples/MatterDimmableLight/MatterDimmableLight.ino +++ b/libraries/Matter/examples/MatterDimmableLight/MatterDimmableLight.ino @@ -24,7 +24,7 @@ // Dimmable Light Endpoint MatterDimmableLight DimmableLight; -// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +// CONFIG_ENABLE_CHIPOBLE is enabled when BLE is used to commission the Matter Network #if !CONFIG_ENABLE_CHIPOBLE // WiFi is manually set and started const char *ssid = "your-ssid"; // Change this to your WiFi SSID @@ -83,7 +83,7 @@ void setup() { Serial.begin(115200); -// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +// CONFIG_ENABLE_CHIPOBLE is enabled when BLE is used to commission the Matter Network #if !CONFIG_ENABLE_CHIPOBLE // We start by connecting to a WiFi network Serial.print("Connecting to "); diff --git a/libraries/Matter/examples/MatterEnhancedColorLight/MatterEnhancedColorLight.ino b/libraries/Matter/examples/MatterEnhancedColorLight/MatterEnhancedColorLight.ino index aa20b301780..ac22ae768c5 100644 --- a/libraries/Matter/examples/MatterEnhancedColorLight/MatterEnhancedColorLight.ino +++ b/libraries/Matter/examples/MatterEnhancedColorLight/MatterEnhancedColorLight.ino @@ -24,7 +24,7 @@ // Color Light Endpoint MatterEnhancedColorLight EnhancedColorLight; -// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +// CONFIG_ENABLE_CHIPOBLE is enabled when BLE is used to commission the Matter Network #if !CONFIG_ENABLE_CHIPOBLE // WiFi is manually set and started const char *ssid = "your-ssid"; // Change this to your WiFi SSID @@ -91,7 +91,7 @@ void setup() { Serial.begin(115200); -// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +// CONFIG_ENABLE_CHIPOBLE is enabled when BLE is used to commission the Matter Network #if !CONFIG_ENABLE_CHIPOBLE // We start by connecting to a WiFi network Serial.print("Connecting to "); diff --git a/libraries/Matter/examples/MatterEvents/MatterEvents.ino b/libraries/Matter/examples/MatterEvents/MatterEvents.ino index 2d28b7c12c1..f33b13cf7fb 100644 --- a/libraries/Matter/examples/MatterEvents/MatterEvents.ino +++ b/libraries/Matter/examples/MatterEvents/MatterEvents.ino @@ -19,7 +19,7 @@ #include #endif -// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +// CONFIG_ENABLE_CHIPOBLE is enabled when BLE is used to commission the Matter Network #if !CONFIG_ENABLE_CHIPOBLE // WiFi is manually set and started const char *ssid = "your-ssid"; // Change this to your WiFi SSID @@ -125,7 +125,7 @@ void setup() { delay(10); // Wait for Serial to initialize } -// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +// CONFIG_ENABLE_CHIPOBLE is enabled when BLE is used to commission the Matter Network #if !CONFIG_ENABLE_CHIPOBLE // We start by connecting to a WiFi network Serial.print("Connecting to "); diff --git a/libraries/Matter/examples/MatterFan/MatterFan.ino b/libraries/Matter/examples/MatterFan/MatterFan.ino index 94d510fd04b..ac620167a40 100644 --- a/libraries/Matter/examples/MatterFan/MatterFan.ino +++ b/libraries/Matter/examples/MatterFan/MatterFan.ino @@ -23,7 +23,7 @@ // Fan Endpoint - On/Off control + Speed Percent Control + Fan Modes MatterFan Fan; -// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +// CONFIG_ENABLE_CHIPOBLE is enabled when BLE is used to commission the Matter Network #if !CONFIG_ENABLE_CHIPOBLE // WiFi is manually set and started const char *ssid = "your-ssid"; // Change this to your WiFi SSID @@ -82,7 +82,7 @@ void setup() { Serial.begin(115200); -// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +// CONFIG_ENABLE_CHIPOBLE is enabled when BLE is used to commission the Matter Network #if !CONFIG_ENABLE_CHIPOBLE // We start by connecting to a WiFi network Serial.print("Connecting to "); diff --git a/libraries/Matter/examples/MatterHumiditySensor/MatterHumiditySensor.ino b/libraries/Matter/examples/MatterHumiditySensor/MatterHumiditySensor.ino index 3375164c0dd..3149cf1dfbe 100644 --- a/libraries/Matter/examples/MatterHumiditySensor/MatterHumiditySensor.ino +++ b/libraries/Matter/examples/MatterHumiditySensor/MatterHumiditySensor.ino @@ -30,7 +30,7 @@ // Matter Humidity Sensor Endpoint MatterHumiditySensor SimulatedHumiditySensor; -// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +// CONFIG_ENABLE_CHIPOBLE is enabled when BLE is used to commission the Matter Network #if !CONFIG_ENABLE_CHIPOBLE // WiFi is manually set and started const char *ssid = "your-ssid"; // Change this to your WiFi SSID @@ -66,7 +66,7 @@ void setup() { Serial.begin(115200); -// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +// CONFIG_ENABLE_CHIPOBLE is enabled when BLE is used to commission the Matter Network #if !CONFIG_ENABLE_CHIPOBLE // Manually connect to WiFi WiFi.begin(ssid, password); diff --git a/libraries/Matter/examples/MatterMinimum/MatterMinimum.ino b/libraries/Matter/examples/MatterMinimum/MatterMinimum.ino index f85c18342d2..31599ad10cb 100644 --- a/libraries/Matter/examples/MatterMinimum/MatterMinimum.ino +++ b/libraries/Matter/examples/MatterMinimum/MatterMinimum.ino @@ -31,7 +31,7 @@ // Single On/Off Light Endpoint - at least one per node MatterOnOffLight OnOffLight; -// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +// CONFIG_ENABLE_CHIPOBLE is enabled when BLE is used to commission the Matter Network #if !CONFIG_ENABLE_CHIPOBLE // WiFi is manually set and started const char *ssid = "your-ssid"; // Change this to your WiFi SSID @@ -68,7 +68,7 @@ void setup() { // Initialize the LED GPIO pinMode(ledPin, OUTPUT); -// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +// CONFIG_ENABLE_CHIPOBLE is enabled when BLE is used to commission the Matter Network #if !CONFIG_ENABLE_CHIPOBLE // Manually connect to WiFi WiFi.begin(ssid, password); diff --git a/libraries/Matter/examples/MatterOccupancySensor/MatterOccupancySensor.ino b/libraries/Matter/examples/MatterOccupancySensor/MatterOccupancySensor.ino index 79581a33b1c..ecab016b473 100644 --- a/libraries/Matter/examples/MatterOccupancySensor/MatterOccupancySensor.ino +++ b/libraries/Matter/examples/MatterOccupancySensor/MatterOccupancySensor.ino @@ -37,7 +37,7 @@ // Matter Occupancy Sensor Endpoint MatterOccupancySensor OccupancySensor; -// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +// CONFIG_ENABLE_CHIPOBLE is enabled when BLE is used to commission the Matter Network #if !CONFIG_ENABLE_CHIPOBLE // WiFi is manually set and started const char *ssid = "your-ssid"; // Change this to your WiFi SSID @@ -58,7 +58,7 @@ void setup() { Serial.begin(115200); -// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +// CONFIG_ENABLE_CHIPOBLE is enabled when BLE is used to commission the Matter Network #if !CONFIG_ENABLE_CHIPOBLE // Manually connect to WiFi WiFi.begin(ssid, password); diff --git a/libraries/Matter/examples/MatterOnIdentify/MatterOnIdentify.ino b/libraries/Matter/examples/MatterOnIdentify/MatterOnIdentify.ino index c503f7af044..ec7129ecad9 100644 --- a/libraries/Matter/examples/MatterOnIdentify/MatterOnIdentify.ino +++ b/libraries/Matter/examples/MatterOnIdentify/MatterOnIdentify.ino @@ -35,7 +35,7 @@ // Single On/Off Light Endpoint - at least one per node MatterOnOffLight OnOffLight; -// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +// CONFIG_ENABLE_CHIPOBLE is enabled when BLE is used to commission the Matter Network #if !CONFIG_ENABLE_CHIPOBLE // WiFi is manually set and started const char *ssid = "your-ssid"; // Change this to your WiFi SSID @@ -94,7 +94,7 @@ void setup() { Serial.begin(115200); -// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +// CONFIG_ENABLE_CHIPOBLE is enabled when BLE is used to commission the Matter Network #if !CONFIG_ENABLE_CHIPOBLE // Manually connect to WiFi WiFi.begin(ssid, password); diff --git a/libraries/Matter/examples/MatterOnOffLight/MatterOnOffLight.ino b/libraries/Matter/examples/MatterOnOffLight/MatterOnOffLight.ino index 8a415bda969..3310cb8c4e9 100644 --- a/libraries/Matter/examples/MatterOnOffLight/MatterOnOffLight.ino +++ b/libraries/Matter/examples/MatterOnOffLight/MatterOnOffLight.ino @@ -20,7 +20,7 @@ #endif #include -// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +// CONFIG_ENABLE_CHIPOBLE is enabled when BLE is used to commission the Matter Network #if !CONFIG_ENABLE_CHIPOBLE // WiFi is manually set and started const char *ssid = "your-ssid"; // Change this to your WiFi SSID @@ -74,7 +74,7 @@ void setup() { Serial.begin(115200); -// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +// CONFIG_ENABLE_CHIPOBLE is enabled when BLE is used to commission the Matter Network #if !CONFIG_ENABLE_CHIPOBLE // We start by connecting to a WiFi network Serial.print("Connecting to "); diff --git a/libraries/Matter/examples/MatterOnOffPlugin/MatterOnOffPlugin.ino b/libraries/Matter/examples/MatterOnOffPlugin/MatterOnOffPlugin.ino index f31fae1ccc0..372874ddc9a 100644 --- a/libraries/Matter/examples/MatterOnOffPlugin/MatterOnOffPlugin.ino +++ b/libraries/Matter/examples/MatterOnOffPlugin/MatterOnOffPlugin.ino @@ -24,7 +24,7 @@ // On/Off Plugin Endpoint MatterOnOffPlugin OnOffPlugin; -// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +// CONFIG_ENABLE_CHIPOBLE is enabled when BLE is used to commission the Matter Network #if !CONFIG_ENABLE_CHIPOBLE // WiFi is manually set and started const char *ssid = "your-ssid"; // Change this to your WiFi SSID @@ -73,7 +73,7 @@ void setup() { Serial.begin(115200); -// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +// CONFIG_ENABLE_CHIPOBLE is enabled when BLE is used to commission the Matter Network #if !CONFIG_ENABLE_CHIPOBLE // We start by connecting to a WiFi network Serial.print("Connecting to "); diff --git a/libraries/Matter/examples/MatterPressureSensor/MatterPressureSensor.ino b/libraries/Matter/examples/MatterPressureSensor/MatterPressureSensor.ino index 779c162e6db..0a097ec979b 100644 --- a/libraries/Matter/examples/MatterPressureSensor/MatterPressureSensor.ino +++ b/libraries/Matter/examples/MatterPressureSensor/MatterPressureSensor.ino @@ -30,7 +30,7 @@ // Matter Pressure Sensor Endpoint MatterPressureSensor SimulatedPressureSensor; -// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +// CONFIG_ENABLE_CHIPOBLE is enabled when BLE is used to commission the Matter Network #if !CONFIG_ENABLE_CHIPOBLE // WiFi is manually set and started const char *ssid = "your-ssid"; // Change this to your WiFi SSID @@ -66,7 +66,7 @@ void setup() { Serial.begin(115200); -// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +// CONFIG_ENABLE_CHIPOBLE is enabled when BLE is used to commission the Matter Network #if !CONFIG_ENABLE_CHIPOBLE // Manually connect to WiFi WiFi.begin(ssid, password); diff --git a/libraries/Matter/examples/MatterSmartButon/MatterSmartButon.ino b/libraries/Matter/examples/MatterSmartButon/MatterSmartButon.ino index b75fbc21983..29caf00004c 100644 --- a/libraries/Matter/examples/MatterSmartButon/MatterSmartButon.ino +++ b/libraries/Matter/examples/MatterSmartButon/MatterSmartButon.ino @@ -23,7 +23,7 @@ // Generic Switch Endpoint - works as a smart button with a single click MatterGenericSwitch SmartButton; -// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +// CONFIG_ENABLE_CHIPOBLE is enabled when BLE is used to commission the Matter Network #if !CONFIG_ENABLE_CHIPOBLE // WiFi is manually set and started const char *ssid = "your-ssid"; // Change this to your WiFi SSID @@ -49,7 +49,7 @@ void setup() { Serial.print("Connecting to "); Serial.println(ssid); -// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +// CONFIG_ENABLE_CHIPOBLE is enabled when BLE is used to commission the Matter Network #if !CONFIG_ENABLE_CHIPOBLE // Manually connect to WiFi WiFi.begin(ssid, password); diff --git a/libraries/Matter/examples/MatterTemperatureLight/MatterTemperatureLight.ino b/libraries/Matter/examples/MatterTemperatureLight/MatterTemperatureLight.ino index c425958ac09..b7fcc11d873 100644 --- a/libraries/Matter/examples/MatterTemperatureLight/MatterTemperatureLight.ino +++ b/libraries/Matter/examples/MatterTemperatureLight/MatterTemperatureLight.ino @@ -24,7 +24,7 @@ // Color Temperature CW/WW Light Endpoint MatterColorTemperatureLight CW_WW_Light; -// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +// CONFIG_ENABLE_CHIPOBLE is enabled when BLE is used to commission the Matter Network #if !CONFIG_ENABLE_CHIPOBLE // WiFi is manually set and started const char *ssid = "your-ssid"; // Change this to your WiFi SSID @@ -94,7 +94,7 @@ void setup() { Serial.begin(115200); -// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +// CONFIG_ENABLE_CHIPOBLE is enabled when BLE is used to commission the Matter Network #if !CONFIG_ENABLE_CHIPOBLE // We start by connecting to a WiFi network Serial.print("Connecting to "); diff --git a/libraries/Matter/examples/MatterTemperatureSensor/MatterTemperatureSensor.ino b/libraries/Matter/examples/MatterTemperatureSensor/MatterTemperatureSensor.ino index fcdab36a1d6..46d6ace361f 100644 --- a/libraries/Matter/examples/MatterTemperatureSensor/MatterTemperatureSensor.ino +++ b/libraries/Matter/examples/MatterTemperatureSensor/MatterTemperatureSensor.ino @@ -30,7 +30,7 @@ // Matter Temperature Sensor Endpoint MatterTemperatureSensor SimulatedTemperatureSensor; -// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +// CONFIG_ENABLE_CHIPOBLE is enabled when BLE is used to commission the Matter Network #if !CONFIG_ENABLE_CHIPOBLE // WiFi is manually set and started const char *ssid = "your-ssid"; // Change this to your WiFi SSID @@ -66,7 +66,7 @@ void setup() { Serial.begin(115200); -// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +// CONFIG_ENABLE_CHIPOBLE is enabled when BLE is used to commission the Matter Network #if !CONFIG_ENABLE_CHIPOBLE // Manually connect to WiFi WiFi.begin(ssid, password); diff --git a/libraries/Matter/examples/MatterThermostat/MatterThermostat.ino b/libraries/Matter/examples/MatterThermostat/MatterThermostat.ino index cac19a97344..2c446f59e34 100644 --- a/libraries/Matter/examples/MatterThermostat/MatterThermostat.ino +++ b/libraries/Matter/examples/MatterThermostat/MatterThermostat.ino @@ -30,7 +30,7 @@ // Matter Thermostat Endpoint MatterThermostat SimulatedThermostat; -// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +// CONFIG_ENABLE_CHIPOBLE is enabled when BLE is used to commission the Matter Network #if !CONFIG_ENABLE_CHIPOBLE // WiFi is manually set and started const char *ssid = "your-ssid"; // Change this to your WiFi SSID @@ -68,7 +68,7 @@ void setup() { Serial.begin(115200); -// CONFIG_ENABLE_CHIPOBLE is enbaled when BLE is used to commission the Matter Network +// CONFIG_ENABLE_CHIPOBLE is enabled when BLE is used to commission the Matter Network #if !CONFIG_ENABLE_CHIPOBLE // Manually connect to WiFi WiFi.begin(ssid, password); diff --git a/libraries/Matter/src/MatterEndPoint.h b/libraries/Matter/src/MatterEndPoint.h index 8ba39cae3a8..3138014d624 100644 --- a/libraries/Matter/src/MatterEndPoint.h +++ b/libraries/Matter/src/MatterEndPoint.h @@ -64,7 +64,7 @@ class MatterEndPoint { // This callback is invoked when clients interact with the Identify Cluster of an specific endpoint. bool endpointIdentifyCB(uint16_t endpoint_id, bool identifyIsEnabled); - // User callaback for the Identify Cluster functionality + // User callback for the Identify Cluster functionality void onIdentify(EndPointIdentifyCB onEndPointIdentifyCB); protected: From 6f53b8cf34b63662ecd28cf2c85d8d0f0eef64ba Mon Sep 17 00:00:00 2001 From: Rodrigo Garcia Date: Wed, 2 Jul 2025 01:01:26 -0300 Subject: [PATCH 4/6] fix(matter): removes forcing second network clustter --- libraries/Matter/src/MatterEndpoints/MatterColorLight.cpp | 4 ---- .../src/MatterEndpoints/MatterColorTemperatureLight.cpp | 4 ---- libraries/Matter/src/MatterEndpoints/MatterContactSensor.cpp | 4 ---- libraries/Matter/src/MatterEndpoints/MatterDimmableLight.cpp | 4 ---- .../Matter/src/MatterEndpoints/MatterEnhancedColorLight.cpp | 4 ---- libraries/Matter/src/MatterEndpoints/MatterFan.cpp | 4 ---- libraries/Matter/src/MatterEndpoints/MatterGenericSwitch.cpp | 4 ---- libraries/Matter/src/MatterEndpoints/MatterHumiditySensor.cpp | 4 ---- .../Matter/src/MatterEndpoints/MatterOccupancySensor.cpp | 4 ---- libraries/Matter/src/MatterEndpoints/MatterOnOffLight.cpp | 4 ---- libraries/Matter/src/MatterEndpoints/MatterOnOffPlugin.cpp | 4 ---- libraries/Matter/src/MatterEndpoints/MatterPressureSensor.cpp | 4 ---- .../Matter/src/MatterEndpoints/MatterTemperatureSensor.cpp | 4 ---- libraries/Matter/src/MatterEndpoints/MatterThermostat.cpp | 4 ---- 14 files changed, 56 deletions(-) diff --git a/libraries/Matter/src/MatterEndpoints/MatterColorLight.cpp b/libraries/Matter/src/MatterEndpoints/MatterColorLight.cpp index 0f438f1472d..aff0972528b 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterColorLight.cpp +++ b/libraries/Matter/src/MatterEndpoints/MatterColorLight.cpp @@ -197,10 +197,6 @@ bool MatterColorLight::begin(bool initialState, espHsvColor_t _colorHSV) { esp_matter::attribute_t *current_level_attribute = attribute::get(level_control_cluster, LevelControl::Attributes::CurrentLevel::Id); attribute::set_deferred_persistence(current_level_attribute); -#if CHIP_DEVICE_CONFIG_ENABLE_THREAD && CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION - createSecondaryNetworkInterface(); -#endif - started = true; return true; } diff --git a/libraries/Matter/src/MatterEndpoints/MatterColorTemperatureLight.cpp b/libraries/Matter/src/MatterEndpoints/MatterColorTemperatureLight.cpp index 06a676d3093..db90edf1177 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterColorTemperatureLight.cpp +++ b/libraries/Matter/src/MatterEndpoints/MatterColorTemperatureLight.cpp @@ -129,10 +129,6 @@ bool MatterColorTemperatureLight::begin(bool initialState, uint8_t brightness, u esp_matter::attribute_t *color_temp_attribute = attribute::get(color_control_cluster, ColorControl::Attributes::ColorTemperatureMireds::Id); attribute::set_deferred_persistence(color_temp_attribute); -#if CHIP_DEVICE_CONFIG_ENABLE_THREAD && CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION - createSecondaryNetworkInterface(); -#endif - started = true; return true; } diff --git a/libraries/Matter/src/MatterEndpoints/MatterContactSensor.cpp b/libraries/Matter/src/MatterEndpoints/MatterContactSensor.cpp index 86074304653..52dcc8da7c0 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterContactSensor.cpp +++ b/libraries/Matter/src/MatterEndpoints/MatterContactSensor.cpp @@ -61,10 +61,6 @@ bool MatterContactSensor::begin(bool _contactState) { setEndPointId(endpoint::get_id(endpoint)); log_i("Contact Sensor created with endpoint_id %d", getEndPointId()); -#if CHIP_DEVICE_CONFIG_ENABLE_THREAD && CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION - createSecondaryNetworkInterface(); -#endif - started = true; return true; } diff --git a/libraries/Matter/src/MatterEndpoints/MatterDimmableLight.cpp b/libraries/Matter/src/MatterEndpoints/MatterDimmableLight.cpp index 0f0dd43074b..4659dd71675 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterDimmableLight.cpp +++ b/libraries/Matter/src/MatterEndpoints/MatterDimmableLight.cpp @@ -104,10 +104,6 @@ bool MatterDimmableLight::begin(bool initialState, uint8_t brightness) { esp_matter::attribute_t *current_level_attribute = attribute::get(level_control_cluster, LevelControl::Attributes::CurrentLevel::Id); attribute::set_deferred_persistence(current_level_attribute); -#if CHIP_DEVICE_CONFIG_ENABLE_THREAD && CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION - createSecondaryNetworkInterface(); -#endif - started = true; return true; } diff --git a/libraries/Matter/src/MatterEndpoints/MatterEnhancedColorLight.cpp b/libraries/Matter/src/MatterEndpoints/MatterEnhancedColorLight.cpp index f641cf71ace..5e9feb5aadd 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterEnhancedColorLight.cpp +++ b/libraries/Matter/src/MatterEndpoints/MatterEnhancedColorLight.cpp @@ -217,10 +217,6 @@ bool MatterEnhancedColorLight::begin(bool initialState, espHsvColor_t _colorHSV, esp_matter::attribute_t *current_level_attribute = attribute::get(level_control_cluster, LevelControl::Attributes::CurrentLevel::Id); attribute::set_deferred_persistence(current_level_attribute); -#if CHIP_DEVICE_CONFIG_ENABLE_THREAD && CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION - createSecondaryNetworkInterface(); -#endif - started = true; return true; } diff --git a/libraries/Matter/src/MatterEndpoints/MatterFan.cpp b/libraries/Matter/src/MatterEndpoints/MatterFan.cpp index a1250f08881..5745604ebde 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterFan.cpp +++ b/libraries/Matter/src/MatterEndpoints/MatterFan.cpp @@ -111,10 +111,6 @@ bool MatterFan::begin(uint8_t percent, FanMode_t fanMode, FanModeSequence_t fanM setEndPointId(endpoint::get_id(endpoint)); log_i("Fan created with endpoint_id %d", getEndPointId()); -#if CHIP_DEVICE_CONFIG_ENABLE_THREAD && CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION - createSecondaryNetworkInterface(); -#endif - started = true; return true; } diff --git a/libraries/Matter/src/MatterEndpoints/MatterGenericSwitch.cpp b/libraries/Matter/src/MatterEndpoints/MatterGenericSwitch.cpp index f84a63cb827..f69d4a2ab7f 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterGenericSwitch.cpp +++ b/libraries/Matter/src/MatterEndpoints/MatterGenericSwitch.cpp @@ -80,10 +80,6 @@ bool MatterGenericSwitch::begin() { setEndPointId(endpoint::get_id(endpoint)); log_i("Generic Switch created with endpoint_id %d", getEndPointId()); -#if CHIP_DEVICE_CONFIG_ENABLE_THREAD && CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION - createSecondaryNetworkInterface(); -#endif - started = true; return true; } diff --git a/libraries/Matter/src/MatterEndpoints/MatterHumiditySensor.cpp b/libraries/Matter/src/MatterEndpoints/MatterHumiditySensor.cpp index 89be7dd2e3d..ef8276e4a04 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterHumiditySensor.cpp +++ b/libraries/Matter/src/MatterEndpoints/MatterHumiditySensor.cpp @@ -69,10 +69,6 @@ bool MatterHumiditySensor::begin(uint16_t _rawHumidity) { setEndPointId(endpoint::get_id(endpoint)); log_i("Humidity Sensor created with endpoint_id %d", getEndPointId()); -#if CHIP_DEVICE_CONFIG_ENABLE_THREAD && CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION - createSecondaryNetworkInterface(); -#endif - started = true; return true; } diff --git a/libraries/Matter/src/MatterEndpoints/MatterOccupancySensor.cpp b/libraries/Matter/src/MatterEndpoints/MatterOccupancySensor.cpp index 4865f3e2b1b..f91a02e14a9 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterOccupancySensor.cpp +++ b/libraries/Matter/src/MatterEndpoints/MatterOccupancySensor.cpp @@ -72,10 +72,6 @@ bool MatterOccupancySensor::begin(bool _occupancyState, OccupancySensorType_t _o setEndPointId(endpoint::get_id(endpoint)); log_i("Occupancy Sensor created with endpoint_id %d", getEndPointId()); -#if CHIP_DEVICE_CONFIG_ENABLE_THREAD && CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION - createSecondaryNetworkInterface(); -#endif - started = true; return true; } diff --git a/libraries/Matter/src/MatterEndpoints/MatterOnOffLight.cpp b/libraries/Matter/src/MatterEndpoints/MatterOnOffLight.cpp index 94624e085c9..afd764088c5 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterOnOffLight.cpp +++ b/libraries/Matter/src/MatterEndpoints/MatterOnOffLight.cpp @@ -80,10 +80,6 @@ bool MatterOnOffLight::begin(bool initialState) { setEndPointId(endpoint::get_id(endpoint)); log_i("On-Off Light created with endpoint_id %d", getEndPointId()); -#if CHIP_DEVICE_CONFIG_ENABLE_THREAD && CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION - createSecondaryNetworkInterface(); -#endif - started = true; return true; } diff --git a/libraries/Matter/src/MatterEndpoints/MatterOnOffPlugin.cpp b/libraries/Matter/src/MatterEndpoints/MatterOnOffPlugin.cpp index c0524344cf0..33cee105833 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterOnOffPlugin.cpp +++ b/libraries/Matter/src/MatterEndpoints/MatterOnOffPlugin.cpp @@ -79,10 +79,6 @@ bool MatterOnOffPlugin::begin(bool initialState) { setEndPointId(endpoint::get_id(endpoint)); log_i("On-Off Plugin created with endpoint_id %d", getEndPointId()); -#if CHIP_DEVICE_CONFIG_ENABLE_THREAD && CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION - createSecondaryNetworkInterface(); -#endif - started = true; return true; } diff --git a/libraries/Matter/src/MatterEndpoints/MatterPressureSensor.cpp b/libraries/Matter/src/MatterEndpoints/MatterPressureSensor.cpp index e04ca517102..8674ad5936b 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterPressureSensor.cpp +++ b/libraries/Matter/src/MatterEndpoints/MatterPressureSensor.cpp @@ -62,10 +62,6 @@ bool MatterPressureSensor::begin(int16_t _rawPressure) { setEndPointId(endpoint::get_id(endpoint)); log_i("Pressure Sensor created with endpoint_id %d", getEndPointId()); -#if CHIP_DEVICE_CONFIG_ENABLE_THREAD && CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION - createSecondaryNetworkInterface(); -#endif - started = true; return true; } diff --git a/libraries/Matter/src/MatterEndpoints/MatterTemperatureSensor.cpp b/libraries/Matter/src/MatterEndpoints/MatterTemperatureSensor.cpp index 0dc672e7491..248bd29f05f 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterTemperatureSensor.cpp +++ b/libraries/Matter/src/MatterEndpoints/MatterTemperatureSensor.cpp @@ -62,10 +62,6 @@ bool MatterTemperatureSensor::begin(int16_t _rawTemperature) { setEndPointId(endpoint::get_id(endpoint)); log_i("Temperature Sensor created with endpoint_id %d", getEndPointId()); -#if CHIP_DEVICE_CONFIG_ENABLE_THREAD && CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION - createSecondaryNetworkInterface(); -#endif - started = true; return true; } diff --git a/libraries/Matter/src/MatterEndpoints/MatterThermostat.cpp b/libraries/Matter/src/MatterEndpoints/MatterThermostat.cpp index cdd1c77d230..6ee18ef0cc9 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterThermostat.cpp +++ b/libraries/Matter/src/MatterEndpoints/MatterThermostat.cpp @@ -203,10 +203,6 @@ bool MatterThermostat::begin(ControlSequenceOfOperation_t _controlSequence, Ther setEndPointId(endpoint::get_id(endpoint)); log_i("Thermostat created with endpoint_id %d", getEndPointId()); -#if CHIP_DEVICE_CONFIG_ENABLE_THREAD && CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION - createSecondaryNetworkInterface(); -#endif - started = true; return true; } From b1d41fa22865f08a934f5bc55b9b76aeca11d791 Mon Sep 17 00:00:00 2001 From: Rodrigo Garcia Date: Wed, 2 Jul 2025 01:28:42 -0300 Subject: [PATCH 5/6] fix(matter): adds matter source code to CMakeLists.txt --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 20cfc2b0955..e71911c1e38 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -184,7 +184,8 @@ set(ARDUINO_LIBRARY_Matter_SRCS libraries/Matter/src/MatterEndpoints/MatterOccupancySensor.cpp libraries/Matter/src/MatterEndpoints/MatterOnOffPlugin.cpp libraries/Matter/src/MatterEndpoints/MatterThermostat.cpp - libraries/Matter/src/Matter.cpp) + libraries/Matter/src/Matter.cpp + libraries/Matter/src/MatterEndPoint.cpp) set(ARDUINO_LIBRARY_PPP_SRCS libraries/PPP/src/PPP.cpp From f4b7ba6bc6e7c634c1ec60479188dc76861619b7 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Wed, 2 Jul 2025 19:30:37 +0000 Subject: [PATCH 6/6] ci(pre-commit): Apply automatic fixes --- libraries/Matter/src/MatterEndPoint.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/Matter/src/MatterEndPoint.cpp b/libraries/Matter/src/MatterEndPoint.cpp index fdc45057755..ecf1acff579 100644 --- a/libraries/Matter/src/MatterEndPoint.cpp +++ b/libraries/Matter/src/MatterEndPoint.cpp @@ -52,7 +52,7 @@ uint16_t MatterEndPoint::getEndPointId() { } void MatterEndPoint::setEndPointId(uint16_t ep) { - if (ep == 0) { + if (ep == 0) { log_e("Invalid endpoint ID"); return; } @@ -136,4 +136,4 @@ void MatterEndPoint::onIdentify(EndPointIdentifyCB onEndPointIdentifyCB) { _onEndPointIdentifyCB = onEndPointIdentifyCB; } -#endif /* CONFIG_ESP_MATTER_ENABLE_DATA_MODEL */ \ No newline at end of file +#endif /* CONFIG_ESP_MATTER_ENABLE_DATA_MODEL */