From 9ec2d301ac154bcc0a484f7820141db4a6c06b3a Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Fri, 27 May 2022 15:51:30 +0530 Subject: [PATCH] Remove esp-insights support for now --- examples/common/app_insights/CMakeLists.txt | 16 ---------- examples/common/app_insights/Kconfig | 12 -------- examples/common/app_insights/app_insights.c | 22 -------------- examples/common/app_insights/app_insights.h | 29 ------------------- .../common/app_insights/idf_component.yml | 20 ------------- examples/light/main/CMakeLists.txt | 2 +- examples/light/main/app_main.cpp | 13 --------- 7 files changed, 1 insertion(+), 113 deletions(-) delete mode 100644 examples/common/app_insights/CMakeLists.txt delete mode 100644 examples/common/app_insights/Kconfig delete mode 100644 examples/common/app_insights/app_insights.c delete mode 100644 examples/common/app_insights/app_insights.h delete mode 100644 examples/common/app_insights/idf_component.yml diff --git a/examples/common/app_insights/CMakeLists.txt b/examples/common/app_insights/CMakeLists.txt deleted file mode 100644 index 3e89c706e..000000000 --- a/examples/common/app_insights/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ -# App Insights - -if(CONFIG_ESP_MATTER_ENABLE_INSIGHTS) - set(srcs app_insights.c) -endif() - -idf_component_register(SRCS ${srcs} - INCLUDE_DIRS . - PRIV_REQUIRES ) - -if(CONFIG_ESP_MATTER_ENABLE_INSIGHTS) - idf_component_get_property(esp_insights_lib esp_insights COMPONENT_LIB) - idf_component_get_property(esp_diag_lib esp_diagnostics COMPONENT_LIB) - target_link_libraries(${COMPONENT_LIB} PRIVATE ${esp_insights_lib}) - target_link_libraries(${COMPONENT_LIB} PRIVATE ${esp_diag_lib}) -endif() diff --git a/examples/common/app_insights/Kconfig b/examples/common/app_insights/Kconfig deleted file mode 100644 index 55f0fcf4b..000000000 --- a/examples/common/app_insights/Kconfig +++ /dev/null @@ -1,12 +0,0 @@ -menu "ESP Matter Insights" - - config ESP_MATTER_ENABLE_INSIGHTS - bool "ESP Matter Enable Insights" - default n - select ESP_INSIGHTS_ENABLED - help - Enable the ESP Matter Insights service. - ESP Insights is a remote diagnostics solution that allows users to - remotely monitor the devices in the field. - -endmenu diff --git a/examples/common/app_insights/app_insights.c b/examples/common/app_insights/app_insights.c deleted file mode 100644 index b0d3e603f..000000000 --- a/examples/common/app_insights/app_insights.c +++ /dev/null @@ -1,22 +0,0 @@ -/* - This example code is in the Public Domain (or CC0 licensed, at your option.) - - Unless required by applicable law or agreed to in writing, this - software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - CONDITIONS OF ANY KIND, either express or implied. -*/ - -#include -#include - -esp_err_t app_insights_enable(const char *auth_key) -{ - // Sync the time with the NTP server - esp_rmaker_time_sync_init(NULL); - - esp_insights_config_t config = { - .log_type = ESP_DIAG_LOG_TYPE_ERROR | ESP_DIAG_LOG_TYPE_WARNING, - .auth_key = auth_key, - }; - return esp_insights_init(&config); -} diff --git a/examples/common/app_insights/app_insights.h b/examples/common/app_insights/app_insights.h deleted file mode 100644 index b5d2ac8ad..000000000 --- a/examples/common/app_insights/app_insights.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - This example code is in the Public Domain (or CC0 licensed, at your option.) - - Unless required by applicable law or agreed to in writing, this - software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - CONDITIONS OF ANY KIND, either express or implied. -*/ -#pragma once - -#if __cplusplus -extern "C" { -#endif - -#if CONFIG_ESP_MATTER_ENABLE_INSIGHTS - -/** - * @brief Initialize the app insights in matter example - * - * @param[in] auth_key The app insights auth key - * - * @return ESP_OK on success, appropriate error code otherwise - */ -esp_err_t app_insights_enable(const char *auth_key); - -#endif // CONFIG_ESP_MATTER_ENABLE_INSIGHTS - -#if __cplusplus -} -#endif diff --git a/examples/common/app_insights/idf_component.yml b/examples/common/app_insights/idf_component.yml deleted file mode 100644 index 43210f225..000000000 --- a/examples/common/app_insights/idf_component.yml +++ /dev/null @@ -1,20 +0,0 @@ -## IDF Component Manager Manifest File -dependencies: - idf: - version: ">=4.4.0" - - rtc_store: - path: components/rtc_store - git: https://github.com/espressif/esp-insights.git - - esp_diagnostics: - path: components/esp_diagnostics - git: https://github.com/espressif/esp-insights.git - - rmaker_common: - path: ./ - git: https://github.com/espressif/esp-rainmaker-common.git - - esp_insights: - path: components/esp_insights - git: https://github.com/espressif/esp-insights.git diff --git a/examples/light/main/CMakeLists.txt b/examples/light/main/CMakeLists.txt index b3725c3ae..b9a2c8e4b 100644 --- a/examples/light/main/CMakeLists.txt +++ b/examples/light/main/CMakeLists.txt @@ -1,4 +1,4 @@ -set(PRIV_REQUIRES_LIST device esp_matter esp_matter_console route_hook app_qrcode app_reset esp_matter_ota app_insights) +set(PRIV_REQUIRES_LIST device esp_matter esp_matter_console route_hook app_qrcode app_reset esp_matter_ota) idf_component_register(SRC_DIRS "." PRIV_INCLUDE_DIRS "." diff --git a/examples/light/main/app_main.cpp b/examples/light/main/app_main.cpp index d03d27465..2ca037137 100644 --- a/examples/light/main/app_main.cpp +++ b/examples/light/main/app_main.cpp @@ -17,15 +17,6 @@ #include #include -#include - -#if CONFIG_ESP_MATTER_ENABLE_INSIGHTS -/* - * Please check the below link to obtain the ESP Insights Auth Key - * https://github.com/espressif/esp-insights/tree/4bc3b0685223a75df0ce71c73af70014f4dd1633/examples#set-up-esp-insights-account - */ -const char * INSIGHTS_AUTH_KEY = ""; -#endif static const char *TAG = "app_main"; int light_endpoint_id = 0; @@ -103,8 +94,4 @@ extern "C" void app_main() #if CONFIG_ENABLE_OTA_REQUESTOR esp_matter_ota_requestor_init(); #endif - -#if CONFIG_ESP_MATTER_ENABLE_INSIGHTS - app_insights_enable(INSIGHTS_AUTH_KEY); -#endif }