diff --git a/config/esp32/components/chip/Kconfig b/config/esp32/components/chip/Kconfig index b39105d1285fac..589f33b1c70830 100644 --- a/config/esp32/components/chip/Kconfig +++ b/config/esp32/components/chip/Kconfig @@ -271,6 +271,12 @@ menu "CHIP Core" Opens the commissioning window automatically at application boot time if the node is not yet commissioned. + config ENABLE_SNTP_TIME_SYNC + bool "Enable SNTP time synchronization" + default n + help + Enable this option to enable SNTP time synchronization + endmenu # "System Options" menu "Security Options" diff --git a/examples/energy-management-app/esp32/main/CMakeLists.txt b/examples/energy-management-app/esp32/main/CMakeLists.txt index 0c038632b4feab..a38ce499bc1ea5 100644 --- a/examples/energy-management-app/esp32/main/CMakeLists.txt +++ b/examples/energy-management-app/esp32/main/CMakeLists.txt @@ -31,6 +31,7 @@ set(SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/src" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/ota" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/common" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/time" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/shell_extension" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util" diff --git a/examples/energy-management-app/esp32/main/main.cpp b/examples/energy-management-app/esp32/main/main.cpp index 8132b1ba2f3aff..e61e6cb00cca9b 100644 --- a/examples/energy-management-app/esp32/main/main.cpp +++ b/examples/energy-management-app/esp32/main/main.cpp @@ -22,6 +22,9 @@ #include #include #include +#if CONFIG_ENABLE_SNTP_TIME_SYNC +#include