I'm using an ESP32 with IDF 5.0-dev. I'm trying to implement the ESP_insights, but I faced some problems: I can start the esp_insights correctly in this way:
Code: Select all
esp_rmaker_time_sync_init(NULL);
esp_insights_config_t config = {
.log_type = ESP_DIAG_LOG_TYPE_ERROR | ESP_DIAG_LOG_TYPE_WARNING | ESP_DIAG_LOG_TYPE_EVENT,
.auth_key = insights_auth_key_start,
};
ret = esp_insights_init(&config);
if (ret != ESP_OK) {
ESP_LOGE(TAG, "Failed to initialize ESP Insights, err:0x%x", ret);
}
ESP_ERROR_CHECK(ret);
/* Register a metrics to track room temperature */
esp_diag_metrics_register("temp", "temp1", "Room temperature", "room", ESP_DIAG_DATA_TYPE_FLOAT);
Code: Select all
I (3331) esp_rmaker_work_queue: Work Queue created.
I (3336) esp_insights: =========================================
I (3342) esp_insights: Insights enabled for Node ID 34AB9553C2DC
I (3349) esp_insights: =========================================
W (3355) insights_transport: connect callback not set
I (3361) esp_rmaker_work_queue: RainMaker Work Queue task started.
Code: Select all
I (3461) esp_insights: RTC_STORE_EVENT_NON_CRITICAL_DATA_LOW_MEM
rtc_store_non_critical_data_write failed group temp, len 40, err 0x0101
I (3563) esp_insights: RTC_STORE_EVENT_NON_CRITICAL_DATA_LOW_MEM
rtc_store_non_critical_data_write failed group temp, len 40, err 0x0101
Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled.
Setting breakpoint at 0x4008b7aa and returning...
Code: Select all
void InsightTask(void * argument)
{
while (1)
{
//esp_diag_heap_metrics_dump();
vTaskDelay(pdMS_TO_TICKS(60000));
/* Record a data point for room temperature */
float room_temp = 22.2;
esp_diag_metrics_add_float("temp1", room_temp);
}
}
.esp_insights: RTC_STORE_EVENT_NON_CRITICAL_DATA_LOW_MEM
Why does it happen? What should I do to avoid this Low mem error? From the ESP insight dashboard I can't see any node connected, but I see that "Billing and Usage" level keeps incrementing when I try to start the firmware, so it appears to be somehow connected. Can you help me?
Thank you,
Mattia