How espressif/esp-rainmaker-common works
ESP RainMaker Common is an ESP-IDF component library of reusable device-side services for RainMaker and Diagnostics. An integrating firmware calls the selected module APIs; the modules provide MQTT transport, device identity/storage and memory helpers, command/console facilities, system controls, time services, and background work. The README establishes the capabilities, while sampled code confirms MQTT subscription retry/event behavior and console commands invoking system-control and time APIs. Several component implementations are unsampled, so their internal links are omitted.
Main entry points: rmaker_common_cmds.c Common commands · esp_rmaker_utils.h Utility APIs · esp-mqtt-glue.c MQTT glue · system_ctrl.c System control
Components 15
Messaging
- MQTT glue
src/esp-mqtt/esp-mqtt-glue.c - MQTT broker/client
- Common events
components/rmaker_common_events/src/common_events.c - Command-response
components/rmaker_cmd_resp/src/cmd_resp.c
Device Services
- Factory NVS helpers
src/factory.c - System control
components/rmaker_system_ctrl/src/system_ctrl.c - Time synchronization
components/rmaker_time_sync/src/time_sync.c - Timezone APIs
components/rmaker_time_sync/src/timezone.c
Command Interface
- Console service
components/rmaker_console/src/rmaker_console.c - Common commands
components/rmaker_console/src/rmaker_common_cmds.c
Runtime Utilities
- Work queue
components/rmaker_work_queue/src/work_queue.c - Memory allocation
include/esp_rmaker_mem_alloc.h - Utility APIs
include/esp_rmaker_utils.h - MQTT identity string
src/create_APN3_PPI_string.c
Other components
- RainMaker firmware
Connections 22
- RainMaker firmware → MQTT glue: configures
README.md - RainMaker firmware → Factory NVS helpers: uses
README.md - RainMaker firmware → Command-response: uses
README.md - RainMaker firmware → Console service: uses
README.md - RainMaker firmware → System control: controls
README.md - RainMaker firmware → Time synchronization: syncs time
README.md - RainMaker firmware → Timezone APIs: sets timezone
README.md - RainMaker firmware → Work queue: schedules work
README.md - RainMaker firmware → Memory allocation: allocates memory
README.md - MQTT glue → MQTT broker/client: communicates
src/esp-mqtt/esp-mqtt-glue.c - MQTT glue → Common events: posts events
src/esp-mqtt/esp-mqtt-glue.c - MQTT glue → Work queue: defers retry
src/esp-mqtt/esp-mqtt-glue.c - Console service → Common commands: registers
components/rmaker_console/src/rmaker_common_cmds.c - Common commands → System control: invokes controls
components/rmaker_console/src/rmaker_common_cmds.c - Common commands → Time synchronization: reads local time
components/rmaker_console/src/rmaker_common_cmds.c - Common commands → Timezone APIs: sets timezone
components/rmaker_console/src/rmaker_common_cmds.c - Common commands → Memory allocation: allocates buffers
components/rmaker_console/src/rmaker_common_cmds.c - Utility APIs → Common events: exposes
include/esp_rmaker_utils.h - Utility APIs → Memory allocation: exposes
include/esp_rmaker_utils.h - Utility APIs → Time synchronization: exposes
include/esp_rmaker_utils.h - Utility APIs → System control: exposes
include/esp_rmaker_utils.h - RainMaker firmware → MQTT identity string: generates identity
README.md