RainMaker Agent

The primary function of the RainMaker Agent is to provide connectivity and assist the application layer to process uplink/downlink cloud data. It is built through the RainMaker SDK and developed based on the proven ESP-IDF framework, using ESP-IDF components such as RTOS, NVS, and MQTT. Figure 3.3 shows the structure of the RainMaker SDK.

Figure 3.3. Structure of RainMaker SDK

The RainMaker SDK includes two major features.


  1. Cooperating with Claiming Service to obtain device certificates.

  2. Connecting to the cloud backend using the secure MQTT protocol to provide remote connectivity and implement remote control, message reporting, user management, device management, etc. It uses the MQTT component in ESP-IDF by default and provides an abstraction layer to interface with other protocol stacks.

  3. Providing wifi_provisioning component for Wi-Fi connection and provisioning, esp_https_ota component for OTA upgrades, and esp_local_ctrl component for local device discovery and connection. All these objectives can be achieved through simple configuration.

Data processing

  1. Storing the device certificates issued by Claiming Service and the data needed when running RainMaker, by default using the interface provided by the nvs_flash component, and providing APIs for developers for direct use.

  2. Using the callback mechanism to process uplink/downlink cloud data and automatically unblocking the data to the application layer for easy processing by developers. For example, the RainMaker SDK provides rich interfaces for establishing TSL (Thing Specification Language) data, which are required to define TSL models to describe IoT devices and implement functions such as timing, countdown, and voice control. For basic interactive features such as timing, RainMaker SDK provides a development-free solution which can be simply enabled when needed. Then, the RainMaker Agent will directly process the data, send it to the cloud through the associated MQTT topic, and feed back the data changes in the cloud backend through callback mechanism.