ESP-IDF Integration
Integrate your ESP-IDF devices using Spotflow module.
Prerequisites
If you don't have ESP-IDF 5.0 or newer already installed, refer to the official documentation for instructions.
Clone Spotflow Component
Run the following command to clone our device SDK repository together with examples:
git clone https://github.com/spotflow-io/device-sdkConfigure Sample Application
All the following terminal commands are expected to run with access to the ESP-IDF tools. See the official documentation for more details: Windows, Linux and macOS.
To try out logging to Spotflow, let's configure the sample application. Modify the following options in device-sdk/esp_idf/spotflow/device_sdk/examples/logs/sdkconfig.defaults:
CONFIG_EXAMPLE_WIFI_SSID="<Your Wi-Fi SSID>"
CONFIG_EXAMPLE_WIFI_PASSWORD="<Your Wi-Fi password>"
CONFIG_SPOTFLOW_DEVICE_ID="esp-device-001" # Set unique identifier of your device
CONFIG_SPOTFLOW_INGEST_KEY="<your-ingest-key>"The CONFIG_SPOTFLOW_INGEST_KEY is a secret key that allows your device to authenticate with Spotflow. You can manage your ingest keys in the ingest keys page.
Navigate to the logging sample application within the cloned repository and select the board of your choice as the target:
cd device-sdk/esp_idf/spotflow/device_sdk/examples/logs
idf.py set-target <your-board-target>Run Sample Application
Now, you are ready to build and flash the sample application to the device and start sending logs to Spotflow:
idf.py build
idf.py flashTo view the logs locally on your console, you can use:
idf.py monitorThe console output should be similar to this one:
ESP-ROM:esp32c6-20220919
Build:Sep 19 2022
rst:0x15 (USB_UART_HPSYS),boot:0x2c (SPI_FAST_FLASH_BOOT)
Saved PC:0x40804fae
--- 0x40804fae: rv_utils_wait_for_intr at C:/Espressif/frameworks/esp-idf-v5.5.2/components/riscv/include/riscv/rv_utils.h:79
--- (inlined by) esp_cpu_wait_for_intr at C:/Espressif/frameworks/esp-idf-v5.5.2/components/esp_hw_support/cpu.c:62
SPIWP:0xee
mode:DIO, clock div:2
load:0x40875730,len:0x175c
...
I (23) boot: ESP-IDF v5.5.2 2nd stage bootloader
I (23) boot: compile time Jan 16 2026 15:04:20
...
I (410) spotflow_testing: [APP] Startup..
I (410) spotflow_testing: [APP] Free memory: 371288 bytes
I (420) spotflow_testing: [APP] IDF version: v5.5.2
I (430) example_connect: Start example_connect.
...
I (630) example_connect: Connecting to TP-Link_B4F9...
W (630) wifi:Password length matches WPA2 standards, authmode threshold changes from OPEN to WPA2
I (640) example_connect: Waiting for IP(s)
...
I (9270) esp_netif_handlers: example_netif_sta ip: 192.168.0.180, mask: 255.255.255.0, gw: 192.168.0.1
I (9270) example_connect: Got IPv4 event: Interface "example_netif_sta" address: 192.168.0.180
I (9430) example_connect: Got IPv6 event: Interface "example_netif_sta" address: fe80:0000:0000:0000:1251:dbff:fe01:f0bc, type: ESP_IP6_ADDR_IS_LINK_LOCAL
I (9430) example_common: Connected to example_netif_sta
I (9430) example_common: - IPv4 address: 192.168.0.180,
I (9440) example_common: - IPv6 address: fe80:0000:0000:0000:1251:dbff:fe01:f0bc, type: ESP_IP6_ADDR_IS_LINK_LOCAL
[SPOTFLOW] Other event id:7
[SPOTFLOW] Initialized sent log level to 3
[SPOTFLOW] Message Added.
I (9450) spotflow_testing: Info log message works
D (9460) spotflow_testing: Debug log message works
[SPOTFLOW] Message Added.
E (9470) spotflow_testing: Error log message works
[SPOTFLOW] Message Added.
W (9480) spotflow_testing: Warning log message works
[SPOTFLOW] Message Added.
I (9480) spotflow_testing: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
[SPOTFLOW] Message Added.
W (10630) spotflow_testing: Test Number. 1
[SPOTFLOW] Queue full — dropped oldest message
[SPOTFLOW] Message Added.
I (10630) spotflow_testing: [APP] Free memory: 270176 bytes
[SPOTFLOW] MQTT_EVENT_CONNECTED
[SPOTFLOW] Received notification value: 6
[SPOTFLOW] MQTT subscribe OK: msg_id=64057 topic=config-cbor-c2d qos=0
[SPOTFLOW] Log message sent successfully topic config-cbor-d2c.
[SPOTFLOW] Log message sent successfully topic ingest-cbor.
[SPOTFLOW] Received notification value: 4
...How is this guide?