ESP-IDF SDK
The iotmer-sdk-esp-idf component connects Espressif chips to IOTMER: Wi‑Fi, HTTPS device provisioning, credential storage (NVS), MQTT over TLS, optional HTTPS OTA, optional BLE Wi‑Fi credential provisioning (NimBLE GATT v1, sibling component iotmer_ble_wifi_prov), and a small C API (iotmer_client.h).
Documentation covers the cloud side (workspaces, console, devices, REST API, MQTT). These pages are ESP-IDF integration only. Short narrative entry: Introduction (source in this repo).
Boot-time flow (summary)
- Wi‑Fi association (station mode).
- Load persisted credentials from NVS when present.
- Provision — skip HTTPS if NVS already holds a complete session; otherwise
POSTto the provisioning API (requires factory API key in Kconfig when used). - Persist credentials to NVS.
- Optionally download firmware (OTA) when the server returns
firmware_urland SHA256 metadata. - Application code calls
iotmer_connectfor MQTT, then publishes telemetry and subscribes to commands/config as required.
Typical split: factory vs field firmware (illustrated today)
The examples/ folder will gain more projects over time. The pattern below is shown by the current reference builds:
| Build | Example | Auth code in firmware | HTTPS provision |
|---|---|---|---|
| Factory / lab | examples/01_provisioning | Typically set | Runs on each boot where Kconfig supplies the auth code |
| Field / OTA image | examples/02_telemetry | Typically empty | Skipped if NVS already holds a complete session |
Requirements
- ESP-IDF ≥ 5.x (6.x supported; managed
cjson+mqttdeps are declared in the component). - A workspace and device flow — see documentation.
- Partition table with two OTA app slots when auto-OTA is enabled (see example
sdkconfig.defaults).