How espressif/esp-rainmaker works
ESP RainMaker is firmware for ESP32 products that exposes device state and controls to RainMaker clients through the cloud. The primary workflow is defining a node, devices, and parameters in firmware, connecting it to the cloud over MQTT, and enabling phone apps or CLI tools to monitor and control it. The README also identifies claiming as the source of cloud credentials. Other documented or tree-visible capabilities include OTA, local control, scenes, schedules, groups, authentication, and Thread border-router support. Some connections are documented only at the product level; unsampled implementation links are omitted.
Main entry points: esp_rmaker_node.c Node, devices, parameters · esp_rmaker_mqtt.c MQTT transport · esp_rmaker_ota.c OTA workflow · esp_rmaker_client_data.c Client credentials
Components 24
Device model
- Node, devices, parameters
components/esp_rainmaker/src/core/esp_rmaker_node.c - Standard device types
components/esp_rainmaker/src/standard_types/esp_rmaker_standard_devices.c - Standard parameters
components/esp_rainmaker/src/standard_types/esp_rmaker_standard_params.c - Standard services
components/esp_rainmaker/src/standard_types/esp_rmaker_standard_services.c
Connectivity and identity
- MQTT transport
components/esp_rainmaker/src/mqtt/esp_rmaker_mqtt.c - Client credentials
components/esp_rainmaker/src/core/esp_rmaker_client_data.c - Node authentication
components/esp_rainmaker/src/core/esp_rmaker_node_auth.c - Authentication service
components/esp_rainmaker/src/core/esp_rmaker_auth_service.c - Command responses
components/esp_rainmaker/src/core/esp_rmaker_cmd_resp_manager.c - Device console
components/esp_rainmaker/src/console/esp_rmaker_commands.c
Control capabilities
- Local control
components/esp_rainmaker/src/core/esp_rmaker_local_ctrl.c - Scenes
components/esp_rainmaker/src/core/esp_rmaker_scenes.c - Schedules
components/esp_rainmaker/src/core/esp_rmaker_schedule.c - Device groups
components/esp_rainmaker/src/core/esp_rmaker_groups.c - RainMaker controller
components/esp_rainmaker/src/rainmaker_controller/esp_rmaker_controller.c
Firmware updates
- OTA workflow
components/esp_rainmaker/src/ota/esp_rmaker_ota.c - Topic-based OTA
components/esp_rainmaker/src/ota/esp_rmaker_ota_using_topics.c - MQTT image transfer
components/esp_rainmaker/src/ota/esp_rmaker_mqtt_ota.c - HTTPS image transfer
components/esp_rainmaker/src/ota/esp_rmaker_https_ota.c
Platform integrations
- Thread border router
components/esp_rainmaker/src/thread_br/esp_rmaker_thread_br.c
Other components
- Firmware developer
- Phone app / CLI
- RainMaker Cloud
- Claiming Service
Connections 18
- Firmware developer → Node, devices, parameters: defines devices
- Node, devices, parameters → Standard device types: can use
- Node, devices, parameters → Standard parameters: can use
- Node, devices, parameters → Standard services: can use
- Claiming Service → Client credentials: provides credentials
- Client credentials → Node authentication: supplies identity data
- Node authentication → MQTT transport: uses connection data
- MQTT transport → RainMaker Cloud: connects device
- Phone app / CLI → RainMaker Cloud: remote access
- RainMaker Cloud → MQTT transport: remote connectivity
- Command responses → MQTT transport: publishes response
components/esp_rainmaker/src/core/esp_rmaker_cmd_resp_manager.c - Device console → Node, devices, parameters: sets parameters
components/esp_rainmaker/src/console/esp_rmaker_commands.c - OTA workflow → Topic-based OTA: configures protocol
components/esp_rainmaker/src/ota/esp_rmaker_ota.c - OTA workflow → HTTPS image transfer: selects transfer
components/esp_rainmaker/src/ota/esp_rmaker_ota.c - OTA workflow → MQTT image transfer: selects transfer
components/esp_rainmaker/src/ota/esp_rmaker_ota.c - Topic-based OTA → MQTT transport: publishes status
components/esp_rainmaker/src/ota/esp_rmaker_ota_using_topics.c - MQTT image transfer → OTA workflow: writes image blocks
- Thread border router → Node, devices, parameters: exposes service