From 16d62097c6c6abb8fce2425841bb6fb6d35c142a Mon Sep 17 00:00:00 2001 From: Vikram Dattu Date: Wed, 9 Aug 2023 10:19:17 +0530 Subject: [PATCH 1/2] Raise insights transport event from http_transport Previously, we had `INSIGHTS_EVENT_TRANSPORT_SEND_SUCCESS` and FAILED events only for mqtt transport. http transport didn't have this. The application might want to take some action depending on this event. Hence, adding this event for http transport as well. Signed-off-by: Vikram Dattu --- components/esp_insights/src/transport/esp_insights_https.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/esp_insights/src/transport/esp_insights_https.c b/components/esp_insights/src/transport/esp_insights_https.c index a97c394..81f9e1e 100644 --- a/components/esp_insights/src/transport/esp_insights_https.c +++ b/components/esp_insights/src/transport/esp_insights_https.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -138,6 +139,11 @@ static int esp_insights_https_data_send(void *data, size_t len) ESP_LOGE(TAG, "API response status = %d", status); } } + if (msg_id == 0) { + esp_event_post(INSIGHTS_EVENT, INSIGHTS_EVENT_TRANSPORT_SEND_SUCCESS, NULL, 0, portMAX_DELAY); + } else { + esp_event_post(INSIGHTS_EVENT, INSIGHTS_EVENT_TRANSPORT_SEND_FAILED, NULL, 0, portMAX_DELAY); + } cleanup: esp_http_client_cleanup(client); return msg_id; From 894647574b0d6023f09f5cb03ace21a99cadc432 Mon Sep 17 00:00:00 2001 From: Vikram Dattu Date: Wed, 9 Aug 2023 14:44:32 +0530 Subject: [PATCH 2/2] Bump up the component versions Signed-off-by: Vikram Dattu --- components/esp_diag_data_store/idf_component.yml | 2 +- components/esp_diagnostics/idf_component.yml | 2 +- components/esp_insights/idf_component.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/esp_diag_data_store/idf_component.yml b/components/esp_diag_data_store/idf_component.yml index 662ed24..484b750 100644 --- a/components/esp_diag_data_store/idf_component.yml +++ b/components/esp_diag_data_store/idf_component.yml @@ -1,4 +1,4 @@ -version: "1.0.0" +version: "1.0.1" description: Simple APIs to use ESP Diagnostics data storage url: https://github.com/espressif/esp-insights/tree/main/components/esp_diag_data_store repository: https://github.com/espressif/esp-insights.git diff --git a/components/esp_diagnostics/idf_component.yml b/components/esp_diagnostics/idf_component.yml index fcff440..17f9e6f 100644 --- a/components/esp_diagnostics/idf_component.yml +++ b/components/esp_diagnostics/idf_component.yml @@ -1,4 +1,4 @@ -version: "1.0.0" +version: "1.0.1" description: Diagnostics component used in ESP Insights, which is a remote diagnostics solution to monitor the health of ESP devices in the field. url: https://github.com/espressif/esp-insights/tree/main/components/esp_diagnostics repository: https://github.com/espressif/esp-insights.git diff --git a/components/esp_insights/idf_component.yml b/components/esp_insights/idf_component.yml index 7aae98d..bc053b7 100644 --- a/components/esp_insights/idf_component.yml +++ b/components/esp_insights/idf_component.yml @@ -1,4 +1,4 @@ -version: "1.0.0" +version: "1.0.1" description: Firmware agent for ESP Insights, which is a remote diagnostics solution to monitor the health of ESP devices in the field. url: https://github.com/espressif/esp-insights/tree/main/components/esp_insights repository: https://github.com/espressif/esp-insights.git