Merge branch 'remove_insights' into 'main'

Remove esp-insights support for now

See merge request app-frameworks/esp-matter!129
This commit is contained in:
Shu Chen
2022-05-27 21:45:07 +08:00
7 changed files with 1 additions and 113 deletions
@@ -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()
-12
View File
@@ -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
@@ -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 <esp_insights.h>
#include <esp_rmaker_utils.h>
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);
}
@@ -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
@@ -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
+1 -1
View File
@@ -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 "."
-13
View File
@@ -17,15 +17,6 @@
#include <app_priv.h>
#include <app_qrcode.h>
#include <app_insights.h>
#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 = "<paste_insights_auth_key_here>";
#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
}