Skip to main content

Firmware Pre-Production Checklist

Before finalizing your firmware, ensure the following steps are completed.

Creating a Project

While standard examples are useful starting points, create a copy tailored to your use case and maintain it separately to avoid conflicts due to esp-rainmaker code updates. It is recommended to track project-specific changes using a version control system like Git.

Claiming

Claiming is not available on private RainMaker deployments. Please use the RainMaker Admin CLI to generate the credentials for the factory partition. Additionally, disable these config options in your project's sdkconfig.defaults to save flash memory:

CONFIG_ESP_RMAKER_ASSISTED_CLAIM
CONFIG_ESP_RMAKER_SELF_CLAIM

Provisioning QR Code

In the developer use case, the provisioning QR code is shown on the serial terminal. However, in production environment, the QR code needs to be generated outside the device. The RainMaker Admin CLI can generate these QR codes.

Over the Air Updates (OTA)

OTA firmware updates are enabled by default in the switch and led_light examples. Here is a code snippet:

esp_rmaker_ota_config_t ota_config = {
.server_cert = ESP_RMAKER_OTA_DEFAULT_SERVER_CERT,
};
esp_rmaker_ota_enable(&ota_config, OTA_USING_PARAMS);

This configuration is for OTA using parameters, suitable for makers. For dashboard-driven upgrades, change OTA_USING_PARAMS to OTA_USING_TOPICS.

esp_rmaker_ota_enable(&ota_config, OTA_USING_TOPICS);

Refer to this guide for more details on OTA. Only the Superadmin user can access the dashboard for OTA operations.

Timezones

If you plan to use scheduling, please ensure that a timezone is set in your firmware or the timezone service is added for runtime timezone configuration. More information is available here. Most examples include the timezone service by default.

Scheduling

To enable scheduling in your firmware, add it explicitly using the appropriate API. Refer to this guide for more information. Timezones are mandatory for scheduling to function correctly. Most examples include the scheduling service by default.

Max Supported Schedules

Go to idf.py menuconfig > ESP RainMaker Config > ESP RainMaker Scheduling > Maximum Schedules, configure the maximum number of supported schedules using the CONFIG_ESP_RMAKER_SCHEDULING_MAX_SCHEDULES option. The default value was 5 earlier, but is now 10. If this is insufficient, you can increase it. Note that all scheduling information is reported as a RainMaker "parameter", with a hard limit of 8 KB on the total size of all parameters combined, as we use AWS IoT Shadow to maintain parameter values in the cloud.

Local Control

ESP RainMaker offers a local control facility, providing:

  • Faster response
  • Lower cost (by avoiding REST API calls)

Refer to this guide for instructions on enabling local control. Before enabling, make sure to review the security considerations.

On this page