Coder Social home page Coder Social logo

espressif / esp-insights Goto Github PK

View Code? Open in Web Editor NEW
92.0 11.0 24.0 3.2 MB

ESP Insights: A remote diagnostics/observability framework for connected devices

License: Apache License 2.0

CMake 3.12% C 94.06% Python 2.83%
esp32 diagnostics observability debugging

esp-insights's Introduction

ESP Insights (Beta)

ESP Insights is a remote diagnostics solution that allows users to remotely monitor the health of ESP devices in the field.

Introduction

Developers normally prefer debugging issues by physically probing them using gdb or observing the logs. This surely helps debug issues, but there are often cases wherein issues are seen only in specific environments under specific conditions. Even things like casings and placement of the product can affect the behaviour. A few examples are

  • Wi-Fi disconnections for a smart switch concealed in a wall.
  • Smart speakers crashing during some specific usage pattern.
  • Appliance frequently rebooting due to power supply issues.

Having remote diagnostics facility helps in identifying such issues faster. ESP Insights includes a firmware agent (the Insights agent) that captures some of the vital pieces of diagnostics information from the device during runtime and uploads them to the ESP Insights cloud. The cloud then processes this data for easy visualisation. Developers can log in to a web-based dashboard to look at the health and issues reported by their devices in the field. A sample screen is shown here.

Insights Overview

Developers can monitor the following information from the web-based dashboard:

  • Error logs: Anything that is logged on console with calls with ESP_LOGE by any component in the firmware
  • Warning logs: Anything that is logged on console with calls with ESP_LOGW by any component in the firmware
  • Custom Events: Application specific custom events that the firmware wishes to track via calls to ESP_DIAG_EVENT
  • Reset reason: The reason why the device was reset (power on, watchdog, brownout, etc.)
  • Coredump summary: In case of a crash, the register contents as well as the stack backtrace of the offending thread (wherever possible)
  • Metrics: Time-varying data like the free heap size, the Wi-Fi signal strength that is plotted over a period of time
  • Variables: Variable values like the IP Address or state variables that report their current value
  • Group analytics: Insights into how group of devices are performing

All of this information should help the developer understand better how their device is performing in the field.

You can find more details on Insights Features page.

ESP Insights currently works with the ESP Insights cloud and ESP RainMaker cloud. Support for other cloud services will be available in a subsequent release.

Getting Started

Following code should get you started, and your application can start reporting ESP Insights data to the Insights cloud.

Enabling ESP-Insights

By default, ESP-Insights is disabled. User need to enable it via menuconfig option. (Component config → ESP Insights)

To select transport to be used, please follow next step.

Enabling Insights with HTTPS

For Insights agent HTTPS is configure as the default transport.

#include <esp_insights.h>
#define ESP_INSIGHTS_AUTH_KEY "<Paste-Auth-Key-Here>"

{
    esp_insights_config_t config  = {
        .log_type = ESP_DIAG_LOG_TYPE_ERROR,
        .auth_key = ESP_INSIGHTS_AUTH_KEY,
    };

    esp_insights_init(&config);

    /* Rest of the application initialization */
}

As you may have noticed, all you will need is the unique ESP_INSIGHTS_AUTH_KEY to be embedded in your firmware. Here is how you can obtain the ESP Insights Auth Key:

Enabling Insights with MQTT

Configure the default insights transport to MQTT (Component config → ESP Insights → Insights default transport → MQTT). Alternatively, you can add CONFIG_ESP_INSIGHTS_TRANSPORT_MQTT=y to sdkconfig.defaults.

#include <esp_insights.h>

{
    esp_insights_config_t config  = {
        .log_type = ESP_DIAG_LOG_TYPE_ERROR,
    };

    esp_insights_init(&config);

    /* Rest of the application initialization */
}

You will require the MQTT certs which you can obtain by performing Claiming.

For more details please head over to examples.

Behind the Scenes

  • As described in the overview section, ESP-Insights collects data of your choice and stores it in storage, the storage currently used is RTC store.
  • The data is split into two sections, and the size is configurable via menuconfig:
    • Critical: Errors, Warnings and Events
    • Non-Critical: Metrics and Variables
  • This data is then periodically encoded in CBOR format and is sent over the transport.
  • The data send algorithm is dynamic withing a range. It adapts to the need of the reporting.

RTC data store

ESP-Insight currently uses RTC memory to store the messages until it is sent to the cloud. Unlike, normal RAM, RTC store makes data available across soft resets. Thus, it brodens the usefulness of the data across reboot.

Messages in Critical data take 121 bytes per message. Hence, one can calculate, say a 2048 bytes of critical section can hold 16 messages before it starts dropping new messages. Likewise Non-critical messages take 49 bytes per message and hence a 1024 bytes storage can hold 21 messages.

The RTC memory is limited and flooding too many messages, makes RTC storage full. Once full, the framework has to drop the messages. One solution is to increase the data reporting frequency to cloud, and thereby emptying the RTC store frequently.

Note This however comes with the network cost. It is advisable for a developer to keep Insights logging concise and not overdo it.

Contributing

If you find an issue with ESP-Insights, or wish to submit an enhancement request, please use the Issues section on Github. For ESP-IDF related issues please use esp-idf repo.

License

ESP-Insights code is covered under Apache2 license. Submodules and other third party repos have their own license.

esp-insights's People

Contributors

avsheth avatar chiragatal avatar dhrishi avatar kedars avatar rupalifartade avatar sanketwadekar avatar shahpiyushv avatar shubhamdp avatar tmedicci avatar vikramdattu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esp-insights's Issues

projbuild_gitconfig.py fails due to the empty _CMAKE_TOOLCHAIN_PREFIX argument

I have noticed that the building(flashing, monitoring) of the system sometimes fails due to the empty TOOLCHAIN_PREFIX argument.

Logs:

Traceback (most recent call last):
  File "<path_to_the_script>/get_projbuild_gitconfig.py", line 25, in <module>
    TOOLCHAIN_PREFIX=sys.argv[6]
IndexError: list index out of range

It is hard to tell when and how this happens, but sometimes it just fails with the same error. I have noticed that the issue won't appear once fullclean is performed before the build.

Looking at the build.ninja file I have seen that the argument TOOLCHAIN_PREFIX does not exist once the build fails.

I have tried to build the system using the idf.py directly as well as using the VS Code extension shortcuts. Both of them are sometimes failing.

ESP-IDF version: 4.4.3
Operating system: I have used both Linux Ubuntu and Windows 10(same behavior)
Target: esp32
ESP Insights version: 1.0.1

Thank you in advance,
Imer Hamidovic

can link

undefined reference to `esp_insights_init'

Idf patch not working

I am using esp idf 4.3.1 and trying to apply the patch for 4.3

Here is the output of the patch file:

    ~/esp/esp-idf  on  #v4.3.1 !8183  git apply -v /Users/miroslavpetrov/esp/esp-rainmaker/components/esp-insights/idf-patches/Diagnostics-support-in-esp-idf-tag-v4.3.patch
Checking patch components/espcoredump/CMakeLists.txt...
warning: components/espcoredump/CMakeLists.txt has type 100755, expected 100644
Checking patch components/espcoredump/Kconfig...
warning: components/espcoredump/Kconfig has type 100755, expected 100644
Hunk #1 succeeded at 90 (offset 8 lines).
Checking patch components/espcoredump/component.mk...
warning: components/espcoredump/component.mk has type 100755, expected 100644
Checking patch components/espcoredump/include/esp_core_dump.h...
warning: components/espcoredump/include/esp_core_dump.h has type 100755, expected 100644
error: while searching for:
 */
esp_err_t esp_core_dump_image_get(size_t* out_addr, size_t *out_size);

#ifdef __cplusplus
}
#endif

error: patch failed: components/espcoredump/include/esp_core_dump.h:89
error: components/espcoredump/include/esp_core_dump.h: patch does not apply
Checking patch components/espcoredump/include/port/riscv/esp_core_dump_summary_port.h...
Checking patch components/espcoredump/include/port/xtensa/esp_core_dump_summary_port.h...
Checking patch components/espcoredump/include_core_dump/esp_core_dump_port.h...
warning: components/espcoredump/include_core_dump/esp_core_dump_port.h has type 100755, expected 100644
Checking patch components/espcoredump/src/core_dump_elf.c...
warning: components/espcoredump/src/core_dump_elf.c has type 100755, expected 100644
Checking patch components/espcoredump/src/core_dump_flash.c...
warning: components/espcoredump/src/core_dump_flash.c has type 100755, expected 100644
error: while searching for:
#include "esp_flash_encrypt.h"
#include "esp_rom_crc.h"

const static DRAM_ATTR char TAG[] __attribute__((unused)) = "esp_core_dump_flash";

#if CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH

error: patch failed: components/espcoredump/src/core_dump_flash.c:20
error: components/espcoredump/src/core_dump_flash.c: patch does not apply
Checking patch components/espcoredump/src/port/riscv/core_dump_port.c...
warning: components/espcoredump/src/port/riscv/core_dump_port.c has type 100755, expected 100644
Checking patch components/espcoredump/src/port/xtensa/core_dump_port.c...
warning: components/espcoredump/src/port/xtensa/core_dump_port.c has type 100755, expected 100644
    ~/esp/esp-idf  on  #v4.3.1 !8183 

Insights SSID variable 1st letter uppercase

Thanks for this functionality!

Using the switch example code and with variable and metrics enabled, I noticed that the SSID is reported with the 1st letter in uppercase.

in this case the ssid is
Screenshot (167)
Screenshot (168)

How to wait for Esp Insights data to finish sending?

I am following minimal diagnostics example and in my code after sending the esp insights data, it goes to deep sleep. I noticed I have to add a 5 second wait time in order to get the data to Esp Insights Cloud

esp_diag_heap_metrics_dump(); vTaskDelay(5000 / portTICK_PERIOD_MS); //deep_sleep code

Looking at esp_insights.h on line 52 I see this

/** Asynchronous data send succeded. Event data contains the msg_id of the data. */
INSIGHTS_EVENT_TRANSPORT_SEND_SUCCESS 

Does that mean there is an available event handler to retrieve the success/fail? I see in esp_insights.c line 247 an insights_event_handler() function so I have some code like this but it's failing to catch the event

static void esp_insights_event(void* arg, esp_event_base_t event_base, int32_t event_id, void* event_data) {
  esp_insights_transport_event_data_t *data = event_data;

  if (event_base != INSIGHTS_EVENT) {
    return;
  }

  switch(event_id) {
    case INSIGHTS_EVENT_TRANSPORT_SEND_SUCCESS:
        ESP_LOGI(TAG, "Insights transport success");
      break;
    case INSIGHTS_EVENT_TRANSPORT_SEND_FAILED:
        ESP_LOGI(TAG, "Insights transport failed");
      break;
    default:
        ESP_LOGI(TAG, "Insights defaulted");
      break;
  }
}

 esp_event_handler_register(INSIGHTS_EVENT, ESP_EVENT_ANY_ID, &esp_insights_event, NULL);

Thank you for the help!

Cannot login from CLI with password

It says incorrect username or password, whether I enter the password at the command line or use the browser to try to log in with email and password. I copied it from my password manager, and it lets me log in with that email and password at both https://dashboard.insights.espressif.com/ and https://dashboard.rainmaker.espressif.com/ (I made sure to use all lowercase)

I can log in with Google, but then I assume it's connecting to a different account than the one I created.

btw, I had to pull a more recent version of CLI as the one cloned in as a submodule gave this error when I tried to claim: module 'esptool' has no attribute 'main'

ESP_LOGI compile errors and rtc_store info is used uninitialized in "rtc_store_read_complete"

Hello,

I'm refreshing a ESP-IDF 4.4 project of mine towards ESP-IDF 5.x:

https://github.com/brainstorm/esp-modbus-power-meter

But I'm encountering some issues with rtc_store component in esp-insights, is this a known issue?:

/Users/rvalls/dev/personal/esp-modbus-power-meter/lib/esp-rainmaker/components/esp-insights/components/rtc_store/src/rtc_store.c:123:43: error: 'info' is used uninitialized [-Werror=uninitialized]
  123 |     ((data_store_info_t *) &info)->filled -= len;
      |                                           ^~

Full idf.py build log:

(esp) rvalls@m1 esp-modbus-power-meter % idf.py build
Executing action: all (aliases: build)
Running ninja in directory /Users/rvalls/dev/personal/esp-modbus-power-meter/build
Executing "ninja all"...
[0/1] Re-running CMake...-- Component directory /Users/rvalls/esp/esp-idf/components/asio does not contain a CMakeLists.txt file. No component will be added
-- Component directory /Users/rvalls/esp/esp-idf/components/cbor does not contain a CMakeLists.txt file. No component will be added
-- Component directory /Users/rvalls/esp/esp-idf/components/coap does not contain a CMakeLists.txt file. No component will be added
-- Component directory /Users/rvalls/esp/esp-idf/components/expat does not contain a CMakeLists.txt file. No component will be added
-- Component directory /Users/rvalls/esp/esp-idf/components/libsodium does not contain a CMakeLists.txt file. No component will be added
-- Component directory /Users/rvalls/esp/esp-idf/components/nghttp does not contain a CMakeLists.txt file. No component will be added
-- Component directory /Users/rvalls/dev/personal/esp-modbus-power-meter/lib/esp-rainmaker/components/esp-insights does not contain a CMakeLists.txt file. No component will be added
-- Building ESP-IDF components for target esp32s2
Processing 1 dependencies:
[1/1] idf (5.1.0)-- Project sdkconfig file /Users/rvalls/dev/personal/esp-modbus-power-meter/sdkconfig
/Users/rvalls/dev/personal/esp-modbus-power-meter/sdkconfig:300 CONFIG_MCPWM_ISR_IN_IRAM was replaced with CONFIG_MCPWM_ISR_IRAM_SAFE
/Users/rvalls/dev/personal/esp-modbus-power-meter/sdkconfig:355 CONFIG_ESP32S2_DEFAULT_CPU_FREQ_80 was replaced with CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_80
/Users/rvalls/dev/personal/esp-modbus-power-meter/sdkconfig:356 CONFIG_ESP32S2_DEFAULT_CPU_FREQ_160 was replaced with CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_160
/Users/rvalls/dev/personal/esp-modbus-power-meter/sdkconfig:357 CONFIG_ESP32S2_DEFAULT_CPU_FREQ_240 was replaced with CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240
/Users/rvalls/dev/personal/esp-modbus-power-meter/sdkconfig:358 CONFIG_ESP32S2_DEFAULT_CPU_FREQ_MHZ was replaced with CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ
/Users/rvalls/dev/personal/esp-modbus-power-meter/sdkconfig:376 CONFIG_ESP32S2_SPIRAM_SUPPORT was replaced with CONFIG_SPIRAM
/Users/rvalls/dev/personal/esp-modbus-power-meter/sdkconfig:379 CONFIG_ESP32S2_ULP_COPROC_ENABLED was replaced with CONFIG_ULP_COPROC_ENABLED
/Users/rvalls/dev/personal/esp-modbus-power-meter/sdkconfig:380 CONFIG_ESP32S2_ULP_COPROC_RESERVE_MEM was replaced with CONFIG_ULP_COPROC_RESERVE_MEM
/Users/rvalls/dev/personal/esp-modbus-power-meter/sdkconfig:381 CONFIG_ESP32S2_DEBUG_OCDAWARE was replaced with CONFIG_ESP_DEBUG_OCDAWARE
/Users/rvalls/dev/personal/esp-modbus-power-meter/sdkconfig:382 CONFIG_ESP32S2_BROWNOUT_DET was replaced with CONFIG_ESP_BROWNOUT_DET
/Users/rvalls/dev/personal/esp-modbus-power-meter/sdkconfig:383 CONFIG_ESP32S2_BROWNOUT_DET_LVL_SEL_7 was replaced with CONFIG_ESP_BROWNOUT_DET_LVL_SEL_7
/Users/rvalls/dev/personal/esp-modbus-power-meter/sdkconfig:384 CONFIG_ESP32S2_BROWNOUT_DET_LVL_SEL_6 was replaced with CONFIG_ESP_BROWNOUT_DET_LVL_SEL_6
/Users/rvalls/dev/personal/esp-modbus-power-meter/sdkconfig:385 CONFIG_ESP32S2_BROWNOUT_DET_LVL_SEL_5 was replaced with CONFIG_ESP_BROWNOUT_DET_LVL_SEL_5
/Users/rvalls/dev/personal/esp-modbus-power-meter/sdkconfig:386 CONFIG_ESP32S2_BROWNOUT_DET_LVL_SEL_4 was replaced with CONFIG_ESP_BROWNOUT_DET_LVL_SEL_4
/Users/rvalls/dev/personal/esp-modbus-power-meter/sdkconfig:387 CONFIG_ESP32S2_BROWNOUT_DET_LVL_SEL_3 was replaced with CONFIG_ESP_BROWNOUT_DET_LVL_SEL_3
/Users/rvalls/dev/personal/esp-modbus-power-meter/sdkconfig:388 CONFIG_ESP32S2_BROWNOUT_DET_LVL_SEL_2 was replaced with CONFIG_ESP_BROWNOUT_DET_LVL_SEL_2
/Users/rvalls/dev/personal/esp-modbus-power-meter/sdkconfig:389 CONFIG_ESP32S2_BROWNOUT_DET_LVL_SEL_1 was replaced with CONFIG_ESP_BROWNOUT_DET_LVL_SEL_1
/Users/rvalls/dev/personal/esp-modbus-power-meter/sdkconfig:390 CONFIG_ESP32S2_BROWNOUT_DET_LVL was replaced with CONFIG_ESP_BROWNOUT_DET_LVL
/Users/rvalls/dev/personal/esp-modbus-power-meter/sdkconfig:391 CONFIG_ESP32S2_TIME_SYSCALL_USE_RTC_FRC1 was replaced with CONFIG_NEWLIB_TIME_SYSCALL_USE_RTC_HRT
/Users/rvalls/dev/personal/esp-modbus-power-meter/sdkconfig:392 CONFIG_ESP32S2_TIME_SYSCALL_USE_RTC was replaced with CONFIG_NEWLIB_TIME_SYSCALL_USE_RTC
/Users/rvalls/dev/personal/esp-modbus-power-meter/sdkconfig:393 CONFIG_ESP32S2_TIME_SYSCALL_USE_FRC1 was replaced with CONFIG_NEWLIB_TIME_SYSCALL_USE_HRT
/Users/rvalls/dev/personal/esp-modbus-power-meter/sdkconfig:394 CONFIG_ESP32S2_TIME_SYSCALL_USE_NONE was replaced with CONFIG_NEWLIB_TIME_SYSCALL_USE_NONE
/Users/rvalls/dev/personal/esp-modbus-power-meter/sdkconfig:395 CONFIG_ESP32S2_RTC_CLK_SRC_INT_RC was replaced with CONFIG_RTC_CLK_SRC_INT_RC
/Users/rvalls/dev/personal/esp-modbus-power-meter/sdkconfig:396 CONFIG_ESP32S2_RTC_CLK_SRC_EXT_CRYS was replaced with CONFIG_RTC_CLK_SRC_EXT_CRYS
/Users/rvalls/dev/personal/esp-modbus-power-meter/sdkconfig:397 CONFIG_ESP32S2_RTC_CLK_SRC_EXT_OSC was replaced with CONFIG_RTC_CLK_SRC_EXT_OSC
/Users/rvalls/dev/personal/esp-modbus-power-meter/sdkconfig:398 CONFIG_ESP32S2_RTC_CLK_SRC_INT_8MD256 was replaced with CONFIG_RTC_CLK_SRC_INT_8MD256
/Users/rvalls/dev/personal/esp-modbus-power-meter/sdkconfig:399 CONFIG_ESP32S2_RTC_CLK_CAL_CYCLES was replaced with CONFIG_RTC_CLK_CAL_CYCLES
/Users/rvalls/dev/personal/esp-modbus-power-meter/sdkconfig:400 CONFIG_ESP32S2_NO_BLOBS was replaced with CONFIG_APP_NO_BLOBS
/Users/rvalls/dev/personal/esp-modbus-power-meter/sdkconfig:459 CONFIG_OTA_ALLOW_HTTP was replaced with CONFIG_ESP_HTTPS_OTA_ALLOW_HTTP
/Users/rvalls/dev/personal/esp-modbus-power-meter/sdkconfig:580 CONFIG_ESP_TASK_WDT was replaced with CONFIG_ESP_TASK_WDT_INIT
/Users/rvalls/dev/personal/esp-modbus-power-meter/sdkconfig:751 CONFIG_HAL_ASSERTION_SILIENT was replaced with CONFIG_HAL_ASSERTION_SILENT
-- App "esp-modbus-power-meter" version: portimao-27-g4491fac-dirty
-- Adding linker script /Users/rvalls/dev/personal/esp-modbus-power-meter/build/esp-idf/esp_system/ld/memory.ld
-- Adding linker script /Users/rvalls/esp/esp-idf/components/esp_system/ld/esp32s2/sections.ld.in
-- Adding linker script /Users/rvalls/esp/esp-idf/components/esp_rom/esp32s2/ld/esp32s2.rom.ld
-- Adding linker script /Users/rvalls/esp/esp-idf/components/esp_rom/esp32s2/ld/esp32s2.rom.api.ld
-- Adding linker script /Users/rvalls/esp/esp-idf/components/esp_rom/esp32s2/ld/esp32s2.rom.libgcc.ld
-- Adding linker script /Users/rvalls/esp/esp-idf/components/esp_rom/esp32s2/ld/esp32s2.rom.newlib-funcs.ld
-- Adding linker script /Users/rvalls/esp/esp-idf/components/esp_rom/esp32s2/ld/esp32s2.rom.newlib-data.ld
-- Adding linker script /Users/rvalls/esp/esp-idf/components/esp_rom/esp32s2/ld/esp32s2.rom.spiflash.ld
-- Adding linker script /Users/rvalls/esp/esp-idf/components/soc/esp32s2/ld/esp32s2.peripherals.ld
ESP RainMaker Project commit: fee5190-dirty
ESP Insights Project commit: 
-- Components: app_insights app_reset app_trace app_update app_wifi bootloader bootloader_support bt cbor cmock console cxx driver efuse esp-tls esp_adc esp_app_format esp_common esp_diagnostics esp_eth esp_event esp_gdbstub esp_hid esp_http_client esp_http_server esp_https_ota esp_https_server esp_hw_support esp_insights esp_lcd esp_local_ctrl esp_netif esp_phy esp_pm esp_psram esp_rainmaker esp_ringbuf esp_rom esp_schedule esp_system esp_timer esp_wifi espcoredump esptool_py fatfs freertos gpio_button hal heap http_parser idf_test ieee802154 json json_generator json_parser log lwip mbedtls mdns mqtt newlib nvs_flash openthread partition_table perfmon protobuf-c protocomm pthread qrcode rmaker_common rtc_store sdmmc soc spi_flash spiffs tcp_transport tinyusb touch_element ulp unity usb vfs wear_levelling wifi_provisioning wpa_supplicant ws2812_led xtensa
-- Component paths: /Users/rvalls/dev/personal/esp-modbus-power-meter/lib/esp-rainmaker/examples/common/app_insights /Users/rvalls/dev/personal/esp-modbus-power-meter/lib/esp-rainmaker/examples/common/app_reset /Users/rvalls/esp/esp-idf/components/app_trace /Users/rvalls/esp/esp-idf/components/app_update /Users/rvalls/dev/personal/esp-modbus-power-meter/lib/esp-rainmaker/examples/common/app_wifi /Users/rvalls/esp/esp-idf/components/bootloader /Users/rvalls/esp/esp-idf/components/bootloader_support /Users/rvalls/esp/esp-idf/components/bt /Users/rvalls/dev/personal/esp-modbus-power-meter/lib/esp-rainmaker/components/esp-insights/components/cbor /Users/rvalls/esp/esp-idf/components/cmock /Users/rvalls/esp/esp-idf/components/console /Users/rvalls/esp/esp-idf/components/cxx /Users/rvalls/esp/esp-idf/components/driver /Users/rvalls/esp/esp-idf/components/efuse /Users/rvalls/esp/esp-idf/components/esp-tls /Users/rvalls/esp/esp-idf/components/esp_adc /Users/rvalls/esp/esp-idf/components/esp_app_format /Users/rvalls/esp/esp-idf/components/esp_common /Users/rvalls/dev/personal/esp-modbus-power-meter/lib/esp-rainmaker/components/esp-insights/components/esp_diagnostics /Users/rvalls/esp/esp-idf/components/esp_eth /Users/rvalls/esp/esp-idf/components/esp_event /Users/rvalls/esp/esp-idf/components/esp_gdbstub /Users/rvalls/esp/esp-idf/components/esp_hid /Users/rvalls/esp/esp-idf/components/esp_http_client /Users/rvalls/esp/esp-idf/components/esp_http_server /Users/rvalls/esp/esp-idf/components/esp_https_ota /Users/rvalls/esp/esp-idf/components/esp_https_server /Users/rvalls/esp/esp-idf/components/esp_hw_support /Users/rvalls/dev/personal/esp-modbus-power-meter/lib/esp-rainmaker/components/esp-insights/components/esp_insights /Users/rvalls/esp/esp-idf/components/esp_lcd /Users/rvalls/esp/esp-idf/components/esp_local_ctrl /Users/rvalls/esp/esp-idf/components/esp_netif /Users/rvalls/esp/esp-idf/components/esp_phy /Users/rvalls/esp/esp-idf/components/esp_pm /Users/rvalls/esp/esp-idf/components/esp_psram /Users/rvalls/dev/personal/esp-modbus-power-meter/lib/esp-rainmaker/components/esp_rainmaker /Users/rvalls/esp/esp-idf/components/esp_ringbuf /Users/rvalls/esp/esp-idf/components/esp_rom /Users/rvalls/dev/personal/esp-modbus-power-meter/lib/esp-rainmaker/components/esp_schedule /Users/rvalls/esp/esp-idf/components/esp_system /Users/rvalls/esp/esp-idf/components/esp_timer /Users/rvalls/esp/esp-idf/components/esp_wifi /Users/rvalls/esp/esp-idf/components/espcoredump /Users/rvalls/esp/esp-idf/components/esptool_py /Users/rvalls/esp/esp-idf/components/fatfs /Users/rvalls/esp/esp-idf/components/freertos /Users/rvalls/dev/personal/esp-modbus-power-meter/lib/esp-rainmaker/components/gpio_button /Users/rvalls/esp/esp-idf/components/hal /Users/rvalls/esp/esp-idf/components/heap /Users/rvalls/esp/esp-idf/components/http_parser /Users/rvalls/esp/esp-idf/components/idf_test /Users/rvalls/esp/esp-idf/components/ieee802154 /Users/rvalls/esp/esp-idf/components/json /Users/rvalls/dev/personal/esp-modbus-power-meter/lib/esp-rainmaker/components/json_generator /Users/rvalls/dev/personal/esp-modbus-power-meter/lib/esp-rainmaker/components/json_parser /Users/rvalls/esp/esp-idf/components/log /Users/rvalls/esp/esp-idf/components/lwip /Users/rvalls/esp/esp-idf/components/mbedtls /Users/rvalls/dev/personal/esp-modbus-power-meter/lib/mdns /Users/rvalls/esp/esp-idf/components/mqtt /Users/rvalls/esp/esp-idf/components/newlib /Users/rvalls/esp/esp-idf/components/nvs_flash /Users/rvalls/esp/esp-idf/components/openthread /Users/rvalls/esp/esp-idf/components/partition_table /Users/rvalls/esp/esp-idf/components/perfmon /Users/rvalls/esp/esp-idf/components/protobuf-c /Users/rvalls/esp/esp-idf/components/protocomm /Users/rvalls/esp/esp-idf/components/pthread /Users/rvalls/dev/personal/esp-modbus-power-meter/lib/esp-rainmaker/components/qrcode /Users/rvalls/dev/personal/esp-modbus-power-meter/lib/esp-rainmaker/components/esp-insights/components/rmaker_common /Users/rvalls/dev/personal/esp-modbus-power-meter/lib/esp-rainmaker/components/esp-insights/components/rtc_store /Users/rvalls/esp/esp-idf/components/sdmmc /Users/rvalls/esp/esp-idf/components/soc /Users/rvalls/esp/esp-idf/components/spi_flash /Users/rvalls/esp/esp-idf/components/spiffs /Users/rvalls/esp/esp-idf/components/tcp_transport /Users/rvalls/esp/esp-idf/components/tinyusb /Users/rvalls/esp/esp-idf/components/touch_element /Users/rvalls/esp/esp-idf/components/ulp /Users/rvalls/esp/esp-idf/components/unity /Users/rvalls/esp/esp-idf/components/usb /Users/rvalls/esp/esp-idf/components/vfs /Users/rvalls/esp/esp-idf/components/wear_levelling /Users/rvalls/esp/esp-idf/components/wifi_provisioning /Users/rvalls/esp/esp-idf/components/wpa_supplicant /Users/rvalls/dev/personal/esp-modbus-power-meter/lib/esp-rainmaker/components/ws2812_led /Users/rvalls/esp/esp-idf/components/xtensa
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/rvalls/dev/personal/esp-modbus-power-meter/build
[0/1] Re-running CMake...-- Component directory /Users/rvalls/esp/esp-idf/components/asio does not contain a CMakeLists.txt file. No component will be added
-- Component directory /Users/rvalls/esp/esp-idf/components/cbor does not contain a CMakeLists.txt file. No component will be added
-- Component directory /Users/rvalls/esp/esp-idf/components/coap does not contain a CMakeLists.txt file. No component will be added
-- Component directory /Users/rvalls/esp/esp-idf/components/expat does not contain a CMakeLists.txt file. No component will be added
-- Component directory /Users/rvalls/esp/esp-idf/components/libsodium does not contain a CMakeLists.txt file. No component will be added
-- Component directory /Users/rvalls/esp/esp-idf/components/nghttp does not contain a CMakeLists.txt file. No component will be added
-- Building ESP-IDF components for target esp32s2
-- Project sdkconfig file /Users/rvalls/dev/personal/esp-modbus-power-meter/sdkconfig
-- Adding linker script /Users/rvalls/esp/esp-idf/components/soc/esp32s2/ld/esp32s2.peripherals.ld
-- App "bootloader" version: v5.1-dev-1195-gfa5d0a3513
-- Adding linker script /Users/rvalls/esp/esp-idf/components/esp_rom/esp32s2/ld/esp32s2.rom.ld
-- Adding linker script /Users/rvalls/esp/esp-idf/components/esp_rom/esp32s2/ld/esp32s2.rom.api.ld
-- Adding linker script /Users/rvalls/esp/esp-idf/components/esp_rom/esp32s2/ld/esp32s2.rom.libgcc.ld
-- Adding linker script /Users/rvalls/esp/esp-idf/components/esp_rom/esp32s2/ld/esp32s2.rom.newlib-funcs.ld
-- Adding linker script /Users/rvalls/esp/esp-idf/components/esp_rom/esp32s2/ld/esp32s2.rom.spiflash.ld
-- Adding linker script /Users/rvalls/esp/esp-idf/components/bootloader/subproject/main/ld/esp32s2/bootloader.ld
-- Adding linker script /Users/rvalls/esp/esp-idf/components/bootloader/subproject/main/ld/esp32s2/bootloader.rom.ld
-- Components: bootloader bootloader_support efuse esp_app_format esp_common esp_hw_support esp_rom esp_system esptool_py freertos hal log main micro-ecc newlib partition_table soc spi_flash xtensa
-- Component paths: /Users/rvalls/esp/esp-idf/components/bootloader /Users/rvalls/esp/esp-idf/components/bootloader_support /Users/rvalls/esp/esp-idf/components/efuse /Users/rvalls/esp/esp-idf/components/esp_app_format /Users/rvalls/esp/esp-idf/components/esp_common /Users/rvalls/esp/esp-idf/components/esp_hw_support /Users/rvalls/esp/esp-idf/components/esp_rom /Users/rvalls/esp/esp-idf/components/esp_system /Users/rvalls/esp/esp-idf/components/esptool_py /Users/rvalls/esp/esp-idf/components/freertos /Users/rvalls/esp/esp-idf/components/hal /Users/rvalls/esp/esp-idf/components/log /Users/rvalls/esp/esp-idf/components/bootloader/subproject/main /Users/rvalls/esp/esp-idf/components/bootloader/subproject/components/micro-ecc /Users/rvalls/esp/esp-idf/components/newlib /Users/rvalls/esp/esp-idf/components/partition_table /Users/rvalls/esp/esp-idf/components/soc /Users/rvalls/esp/esp-idf/components/spi_flash /Users/rvalls/esp/esp-idf/components/xtensa
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/rvalls/dev/personal/esp-modbus-power-meter/build/bootloader
[1/1] cd /Users/rvalls/dev/personal/esp-modbus-power-meter/build/bootloader/esp-idf/esptool_p...ader 0x1000 /Users/rvalls/dev/personal/esp-modbus-power-meter/build/bootloader/bootloader.binBootloader binary size 0x4f70 bytes. 0x2090 bytes (29%) free.
[836/919] Building C object esp-idf/ws2812_led/CMakeFiles/__idf_ws2812_led.dir/ws2812_led.c.objIn file included from /Users/rvalls/dev/personal/esp-modbus-power-meter/lib/esp-rainmaker/components/ws2812_led/ws2812_led.c:22:
/Users/rvalls/esp/esp-idf/components/driver/deprecated/driver/rmt.h:18:2: warning: #warning "The legacy RMT driver is deprecated, please use driver/rmt_tx.h and/or driver/rmt_rx.h" [-Wcpp]
   18 | #warning "The legacy RMT driver is deprecated, please use driver/rmt_tx.h and/or driver/rmt_rx.h"
      |  ^~~~~~~
[839/919] Building C object esp-idf/ws2812_led/CMakeFiles/__idf_ws2812_led.dir/led_strip_rmt_ws2812.c.objIn file included from /Users/rvalls/dev/personal/esp-modbus-power-meter/lib/esp-rainmaker/components/ws2812_led/led_strip_rmt_ws2812.c:20:
/Users/rvalls/esp/esp-idf/components/driver/deprecated/driver/rmt.h:18:2: warning: #warning "The legacy RMT driver is deprecated, please use driver/rmt_tx.h and/or driver/rmt_rx.h" [-Wcpp]
   18 | #warning "The legacy RMT driver is deprecated, please use driver/rmt_tx.h and/or driver/rmt_rx.h"
      |  ^~~~~~~
[860/919] Building C object esp-idf/rtc_store/CMakeFiles/__idf_rtc_store.dir/src/rtc_store.c.objFAILED: esp-idf/rtc_store/CMakeFiles/__idf_rtc_store.dir/src/rtc_store.c.obj 
/Users/rvalls/.espressif/tools/xtensa-esp32s2-elf/esp-2022r1-11.2.0/xtensa-esp32s2-elf/bin/xtensa-esp32s2-elf-gcc -DESP_PLATFORM -DIDF_VER=\"v5.1-dev-1195-gfa5d0a3513\" -D_GNU_SOURCE -D_POSIX_READER_WRITER_LOCKS -I/Users/rvalls/dev/personal/esp-modbus-power-meter/build/config -I/Users/rvalls/dev/personal/esp-modbus-power-meter/lib/esp-rainmaker/components/esp-insights/components/rtc_store/include -I/Users/rvalls/esp/esp-idf/components/newlib/platform_include -I/Users/rvalls/esp/esp-idf/components/freertos/FreeRTOS-Kernel/include -I/Users/rvalls/esp/esp-idf/components/freertos/esp_additions/include/freertos -I/Users/rvalls/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include -I/Users/rvalls/esp/esp-idf/components/freertos/esp_additions/include -I/Users/rvalls/esp/esp-idf/components/esp_hw_support/include -I/Users/rvalls/esp/esp-idf/components/esp_hw_support/include/soc -I/Users/rvalls/esp/esp-idf/components/esp_hw_support/include/soc/esp32s2 -I/Users/rvalls/esp/esp-idf/components/esp_hw_support/port/esp32s2/. -I/Users/rvalls/esp/esp-idf/components/esp_hw_support/port/esp32s2/private_include -I/Users/rvalls/esp/esp-idf/components/heap/include -I/Users/rvalls/esp/esp-idf/components/log/include -I/Users/rvalls/esp/esp-idf/components/soc/include -I/Users/rvalls/esp/esp-idf/components/soc/esp32s2/. -I/Users/rvalls/esp/esp-idf/components/soc/esp32s2/include -I/Users/rvalls/esp/esp-idf/components/hal/esp32s2/include -I/Users/rvalls/esp/esp-idf/components/hal/include -I/Users/rvalls/esp/esp-idf/components/hal/platform_port/include -I/Users/rvalls/esp/esp-idf/components/esp_rom/include -I/Users/rvalls/esp/esp-idf/components/esp_rom/include/esp32s2 -I/Users/rvalls/esp/esp-idf/components/esp_rom/esp32s2 -I/Users/rvalls/esp/esp-idf/components/esp_common/include -I/Users/rvalls/esp/esp-idf/components/esp_system/include -I/Users/rvalls/esp/esp-idf/components/esp_system/port/soc -I/Users/rvalls/esp/esp-idf/components/esp_system/port/include/private -I/Users/rvalls/esp/esp-idf/components/xtensa/include -I/Users/rvalls/esp/esp-idf/components/xtensa/esp32s2/include -I/Users/rvalls/esp/esp-idf/components/lwip/include -I/Users/rvalls/esp/esp-idf/components/lwip/include/apps -I/Users/rvalls/esp/esp-idf/components/lwip/include/apps/sntp -I/Users/rvalls/esp/esp-idf/components/lwip/lwip/src/include -I/Users/rvalls/esp/esp-idf/components/lwip/port/esp32/include -I/Users/rvalls/esp/esp-idf/components/lwip/port/esp32/include/arch -I/Users/rvalls/esp/esp-idf/components/esp_event/include -mlongcalls  -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-enum-conversion -gdwarf-4 -ggdb -Os -freorder-blocks -fmacro-prefix-map=/Users/rvalls/dev/personal/esp-modbus-power-meter=. -fmacro-prefix-map=/Users/rvalls/esp/esp-idf=/IDF -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -DconfigENABLE_FREERTOS_DEBUG_OCDAWARE=1 -std=gnu17 -Wno-old-style-declaration -MD -MT esp-idf/rtc_store/CMakeFiles/__idf_rtc_store.dir/src/rtc_store.c.obj -MF esp-idf/rtc_store/CMakeFiles/__idf_rtc_store.dir/src/rtc_store.c.obj.d -o esp-idf/rtc_store/CMakeFiles/__idf_rtc_store.dir/src/rtc_store.c.obj -c /Users/rvalls/dev/personal/esp-modbus-power-meter/lib/esp-rainmaker/components/esp-insights/components/rtc_store/src/rtc_store.c
/Users/rvalls/dev/personal/esp-modbus-power-meter/lib/esp-rainmaker/components/esp-insights/components/rtc_store/src/rtc_store.c: In function 'rtc_store_read_complete':
/Users/rvalls/dev/personal/esp-modbus-power-meter/lib/esp-rainmaker/components/esp-insights/components/rtc_store/src/rtc_store.c:123:6: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
  123 |     ((data_store_info_t *) &info)->filled -= len;
      |     ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/rvalls/dev/personal/esp-modbus-power-meter/lib/esp-rainmaker/components/esp-insights/components/rtc_store/src/rtc_store.c:124:6: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
  124 |     ((data_store_info_t *) &info)->read_offset += len;
      |     ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/rvalls/dev/personal/esp-modbus-power-meter/lib/esp-rainmaker/components/esp-insights/components/rtc_store/src/rtc_store.c:123:43: error: 'info' is used uninitialized [-Werror=uninitialized]
  123 |     ((data_store_info_t *) &info)->filled -= len;
      |                                           ^~
/Users/rvalls/dev/personal/esp-modbus-power-meter/lib/esp-rainmaker/components/esp-insights/components/rtc_store/src/rtc_store.c:120:14: note: 'info' declared here
  120 |     uint32_t info = rbuf_data->store->info;
      |              ^~~~
cc1: some warnings being treated as errors
[866/919] Building C object esp-idf/mdns/CMakeFiles/__idf_mdns.dir/mdns.c.objninja: build stopped: subcommand failed.
ninja failed with exit code 1, output of the command is in the /Users/rvalls/dev/personal/esp-modbus-power-meter/build/log/idf_py_stderr_output_40444 and /Users/rvalls/dev/personal/esp-modbus-power-meter/build/log/idf_py_stdout_output_40444

Failed to resolve component 'rmaker_common'.

I try to add ESP Insights to an ESP32-C3 project. I have added esp_diagnostics, esp_insights and esp-rainmaker (git clone --recursive https://github.com/espressif/esp-rainmaker.git) to the components directory of my project. During the build process the following error is thrown:

PS C:\Projects\wifi-prov> pio run -t menuconfig
Processing debug (board: esp32-c3-devkitm-1; platform: https://git.traplinked.com/traplinked/hardware/platformio/platforms/platform-espidf.git#idf_4.4.2; framework: espidf)
------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32-c3-devkitm-1.html
PLATFORM: Espressif 32 (4.4.2+sha.ce6cdd0) > Espressif ESP32-C3-DevKitM-1
HARDWARE: ESP32C3 160MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
 - framework-espidf @ 3.40402.0+sha.67bfcf25
 - tool-cmake @ 3.16.4
 - tool-esptoolpy @ 1.30300.0 (3.3.0)
 - tool-idf @ 1.0.1
 - tool-mconf @ 1.4060000.20190628 (406.0.0)
 - tool-mklittlefs @ 1.203.210628 (2.3)
 - tool-mkspiffs @ 2.230.0 (2.30)
 - tool-ninja @ 1.9.0
 - toolchain-esp32ulp @ 1.22851.191205 (2.28.51)
 - toolchain-riscv32-esp @ 8.4.0+2021r2-patch3
Reading CMake configuration...
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.38.1.windows.1")
-- Component directory C:/Projects/wifi-prov/components/esp-rainmaker does not contain a CMakeLists.txt file. No component will be added
-- The C compiler identification is GNU 8.4.0
-- The CXX compiler identification is GNU 8.4.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/Users/Daniel/.platformio/packages/toolchain-riscv32-esp/bin/riscv32-esp-elf-gcc.exe
-- Check for working C compiler: C:/Users/Daniel/.platformio/packages/toolchain-riscv32-esp/bin/riscv32-esp-elf-gcc.exe
-- Check for working C compiler: C:/Users/Daniel/.platformio/packages/toolchain-riscv32-esp/bin/riscv32-esp-elf-gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Users/Daniel/.platformio/packages/toolchain-riscv32-esp/bin/riscv32-esp-elf-g++.exe
-- Check for working CXX compiler: C:/Users/Daniel/.platformio/packages/toolchain-riscv32-esp/bin/riscv32-esp-elf-g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Project is not inside a git repository, or git repository has no commits; will not use 'git describe' to determine PROJECT_VER.
-- Building ESP-IDF components for target esp32c3
-- Configuring incomplete, errors occurred!
See also "C:/Projects/wifi-prov/.pio/build/debug/CMakeFiles/CMakeOutput.log".

CMake Error at C:/Users/Daniel/.platformio/packages/framework-espidf@src-7f04cf235f256dbc46d61361b84e2ab6/tools/cmake/build.cmake:201 (message):
  Failed to resolve component 'rmaker_common'.
Call Stack (most recent call first):
  C:/Users/Daniel/.platformio/packages/framework-espidf@src-7f04cf235f256dbc46d61361b84e2ab6/tools/cmake/build.cmake:232 (__build_resolve_and_add_req)
  C:/Users/Daniel/.platformio/packages/framework-espidf@src-7f04cf235f256dbc46d61361b84e2ab6/tools/cmake/build.cmake:509 (__build_expand_requirements)
  C:/Users/Daniel/.platformio/packages/framework-espidf@src-7f04cf235f256dbc46d61361b84e2ab6/tools/cmake/project.cmake:384 (idf_build_process)
  CMakeLists.txt:4 (project)

How can I fix this?

Unable to upload firmware package

Sometimes it's difficult to upload a new firmware package. Most of the time it says "Something went wrong" without uploading the firmware properly. However, it seems that the firmware is uploaded besides the error message.

Screenshot from 2022-02-13 11-57-13

can send data to cloud error will case device restart

05/12/22 21:01:46
Software reset due to exception/panic (ESP_RST_PANIC)

ERROR
05/12/22 21:02:39
E (7905) esp-tls: couldn't get hostname for :client.insights.espressif.com: getaddrinfo() returns 202, addrinfo=0x0

ERROR
05/12/22 21:02:39
E (7925) esp-tls: Failed to open new connection

ERROR
05/12/22 21:02:39
E (7925) transport_base: Failed to open a new connection

ERROR
05/12/22 21:02:39
E (7935) HTTP_CLIENT: Connection failed, sock < 0

ERROR
05/12/22 21:02:39
E (7935) tport_https: esp_http_client_perform failed err:0x7002

ERROR
05/12/22 21:02:39
E (7945) esp-tls: couldn't get hostname for :client.insights.espressif.com: getaddrinfo() returns 202, addrinfo=0x0

ERROR
05/12/22 21:02:39
E (7955) esp-tls: Failed to open new connection

ERROR
05/12/22 21:02:39
E (7965) transport_base: Failed to open a new connection

ERROR
05/12/22 21:02:39
E (7965) HTTP_CLIENT: Connection failed, sock < 0

ERROR
05/12/22 21:02:39
E (7975) tport_https: esp_http_client_perform failed err:0x700

Missing menu point ESP-INSIGHTS

Hey,

I am running a ESP32H2 Dev Board just bought a couple of days ago.
With idf.py menuconfig I can run the configuration menu.
Within Component config, there is no option for ESP-Insights.
All the other menu points are there.
Any ideas? Couldn't find any other issue on the internet with the same problem.

BR
Mario

No data in dashboard

I am trying to use esp insights together with esp rainmaker but no data is shown in the dashboard.
I have enabled all options in the sdkconfig, I have uploaded the .zip archive with the firmware to the dashboard.
In the serial output of the esp I can see that data is being transferred to the esp insights.
I (1020998) esp_insights: MQTT Published. Msg id: 12308. I (1021198) esp_insights: MQTT Published. Msg id: 5031. I (1021208) esp_insights: MQTT Published. Msg id: 63640.

I (902908) esp_insights: MQTT Published. Msg id: 1330. I (903038) esp_insights: MQTT Published. Msg id: 5125. I (903038) esp_insights: MQTT Published. Msg id: 33022. I (905708) esp_insights: Sending data of length 1535 to the MQTT Insights topic:

Screenshot 2021-08-26 at 12 56 06

Breaking backwards compatible change `log_printfv`

This change breaks trying to link to older versions of arduino-esp32. This method was added in this change.

However, esp-insights is not versioned. So now it is not possible to build the release tagged 2.0.5 of arduino-esp32 using esp32-arduino-lib-builder. This fails on linking log_printfv.

Is there any way to know the versions (I.e. head commit hash) of this library when the v2.0.5 version of arduino-esp32 was generated?

I'm not really sure the correct way to map this across all projects. I am trying to make a 1-line change to arduino-esp32 at the version I am currently using without changing versions and risking further breaks.

Enabling insights on devices in field w/ encrypted spiffs partition being used for coredump

We want to enable ESP-Insights for in-field devices. As the devices do not have coredump partition we are using
available spiffs partition (64K) for coredump.

When we upgrade the device with enabled ESP-Insights we get an error
E (6465) esp_core_dump_elf: Flash encryption enabled in hardware and core dump partition is not encrypted!

Please see the attached snapshot

How can we resolve this?

image

Add esp-insights to component manager

To test esp_insights in an existing project I had to clone the repository and copy the components folder into my project's component folder and then enable it using idf.py menuconfig. Not sure if there's an easier way of doing this, but using the component manager would be a nice way of simplifying the process.

Custom metrics demo

I would like to inquire about monitoring the Bluetooth connection status and how to create a custom Metric for this purpose. Could you please provide me with a demo or example on how to achieve this?

We could not find the firmware image to cross-reference this log entry. Please upload a firmware image to get cross-referenced information for this log entry.

Despite resetting everything, performing an idf.py fullclean, and rebuilding, when we upload the zip package to the ESP-Insight Firmware Packages tab, it shows the firmware there. However, the error on the dashboard still states:

wifi_metrics wifi_metrics: string at ROData: 0x3f41ae78 PC: 0x400da949 0x400da949 We could not find the firmware image to cross-reference this log entry. Please upload a firmware image to get cross-referenced information for this log entry.

The node does show the correct firmware version, so there appears to be a problem with the dashboard's ability to conclude the analysis.

"Some information is missing! There is a chance that some firmware package is not present."

[RESOLVED]
image

Is it due to unsynchronised firmware package? Can it still remains if updated firmware package?

Also have a lot of warnings like this:
image

I use ESP Insights with RainMaker. Using ESP32-C3-DevKitM-1, IDF v.4.4.3
I think that Firmware Package is in sync.

EDIT:
the warning disappears when there is no records on the screen, catched before firmware package sync.

Unable to build

C:/Users/he/Desktop/esp-insights/components/esp_diagnostics/src/esp_diagnostics_utils.c: In function 'esp_diag_task_snapshot_get$part$0':
C:/Users/he/Desktop/esp-insights/components/esp_diagnostics/src/esp_diagnostics_utils.c:156:13: error: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
strncpy(tasks[i].name, name, strlen(name));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Upload firmware package .zip with API?

Is it possible to automate the uploading of the firmware package generated at build time? It would be helpful if our CI/CD could do that during the deploy process so we don't have to manually do it.

Firmware Image Uploaded not Resolving String Information in Error Messages

Using the minimal_diagnostics example, I've successfully set up a connection to ESP_Insights. However, when I upload the matching firmware package (I've double checked it's correct according to the ReadMe instructions) it doesn't resolve the string information. I always get the error "We could not find the firmware image to cross-reference this log entry. Please upload a firmware image to get cross-referenced information for this log entry."

For the sake of thoroughness, I've tried this on 2 different esp32s3 modules and one regular esp32 module. Hopefully I'm just an unlucky one as this seems like a fairly big issue.

IDF Version: 5.2
Full Version: v5.2-dev-1890-g28167ea5a3

How to generate firmware package? /project_build_config.json: no such file or directory

Hello,

I am trying to upload the firmware package to esp-insights dashboard but it says that something went wrong:
image

I am using Arduino and platformio to build the firmware, so I have created the zip file using also the build/ directory from platformio, which contains the firmware.bin, elf, map and the rest of the files but it looks that this "project_build_config.json" file is not generated using arduino framework for firmware compilation.

If I use the ESP-IDF hello-world example and compile it, it also does not create such as "project_build_config.json" but it creates a "project_description.json" file. If I use that file (change the respective app_elf and app_bine properties to the correct ones) and upload this also within the zip file, the error I get while uploading the zip file is:

image

  • So what are the exact files (bin, elf, map, what else?) that should be added to the firmware package zip file?
  • How can I adjust the "project_description.json" file or what are the json properties that the backend needs?

Thank you!

ESP Insights simultaneous HTTP request error

I've recently come across an issue where using esp insights, while also polling a separate HTTPS GET request, can cause issues on occasion.

For example, I run a GET request every 5 seconds to check the active score of a hockey game. On occasion, insights will try to open an HTTPS request to upload to send the data to the cloud at the same time the HTTPS request for retrieving the score is open (or vice versa).

This isn't a huge deal as insights will just try again later and succeed. However, on a VERY rare occasion, this will somehow create a loop of back to back http failures that flood the console with logs and render the esp useless until the program is restarted.

Sadly I don't have a minimum reproducible example as this is so rare I've only ever caught it 4 times now. If there's a way to possibly let insights know when it should not attempt to open a connection to send the logs, that would be great.

Archive filename is incorrect

Hello

First, thank you for developing this amazing project!

When the project repository is tagged with "v1.0" the archive file is created with "-vv1.0".

Julien

Getting an Invalid Chip in Esp Insights Dashboard

Hello, I am getting an 'Invalid Chip' error in the ESP Insights Web Portal under Nodes.

I have also tried idf.py -DIDF_TARGET=esp32 reconfigure but no luck. Using ESP-IDF 5.1.1 (stable)

I have these in sdkconfig:

CONFIG_IDF_TARGET_ARCH_XTENSA=y
CONFIG_IDF_TARGET_ARCH="xtensa"
CONFIG_IDF_TARGET="esp32"
CONFIG_IDF_TARGET_ESP32=y

CONFIG_ESP_INSIGHTS_ENABLED=y
CONFIG_ESP_INSIGHTS_COREDUMP_ENABLE=y

Can't get crash stack info.

I get the tip below.

We could not find the firmware image to cross-rererence this log entry. Please upload a firmware image to get cross-referenced information for this log entry.

image I get err infomation,then i try to upload my *.bin file .But this file is gray,i can't select it. image PS: I use ”idf.py build “ cmd to create *.bin.

Reboot Reset Reason

In the esp insights marketing, it says you can have esp insights upload the core dump logs to the cloud if there was a crash upon reboot. Is there an esp insights implementation or should we use esp_reset_reason()? Thanks!

`

#include "esp_system.h"
void app_main() {
// Check the reason for the last reset
esp_reset_reason_t reset_reason = esp_reset_reason();

// Determine the reset reason and take appropriate action
switch(reset_reason) {
    case ESP_RST_UNKNOWN:
        // This is the power-on reset, and the reason is unknown.
        // It could be a fresh boot or due to power-up.
        break;

    case ESP_RST_POWERON:
        // The system was reset due to a power-on event.
        break;

    case ESP_RST_EXT:
        // The system was reset by an external reset signal.
        break;

    case ESP_RST_SW:
        // The system was reset by software using the RESET button.
        break;

    case ESP_RST_PANIC:
        // The system was reset due to a panic (exception/crash).
        // You can take necessary recovery or logging actions here.
        break;

    case ESP_RST_INT_WDT:
        // The system was reset because the internal watchdog timer timed out.
        break;

    case ESP_RST_TASK_WDT:
        // The system was reset because a task watchdog timeout occurred.
        break;

    case ESP_RST_WDT:
        // The system was reset by the hardware watchdog timer.
        break;

    case ESP_RST_DEEPSLEEP:
        // The system was reset from deep sleep mode.
        break;

    default:
        // Other reset reasons, if any, can be handled here.
        break;
}

`

"Please provide a valid package name"

When trying to add the Firmware Package on the dashboard I get the "Please provide a valid package name" error.

Captura de pantalla 2022-11-29 213231

The Project name is: R84.24
The version is: 2_0_0_221118
The zip file generated is: R84.24-v2_0_0_221118.zip
The package name I'm using is: R84.24-v2_0_0_221118, also tried R84.24-2_0_0_221118 and other combinations.

Captura de pantalla 2022-11-29 213313

How to change node id

Hello, how do I change the node id that is being sent to insights? If not possible, is it using the mac address as the node id? Also, I see a node id in the rainmaker component. Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.