Skip to main content

Scheduling Usage Guide

Firmware Usage Guide

about

Scheduling in ESP RainMaker allows devices to perform actions at specific times, either absolute (e.g., at 6:30 p.m.) or relative (e.g., 3 hours from now). It supports one-time events, recurring actions on specific days, dates, or every year, and can handle time zone and daylight saving changes. The feature is implemented on the node side, with the cloud serving as a conduit for communication, and is easily accessed through a API and mobile apps.

  • To learn more about scheduling, click here
  • On what to note for Schedules Across Nodes for phone apps, click here
caution

Scheduling comes hand in hand with time service. Therefore, it is mandatory to set up and configure time service. If not schedule will not trigger.


Usage Guide

Enable Scheduling

The ESP RainMaker exposes a single API to enable scheduling:

esp_err_t esp_rmaker_schedule_enable(void);
important

This API should be called after esp_rmaker_node_init()
but before esp_rmaker_start().

  • The maximum number of schedules supported can be configured by using
    CONFIG_ESP_RMAKER_SCHEDULING_MAX_SCHEDULES config option.
  • You can find this in idf.py menuconfig according to the steps below:
tip

You may have to also increase CONFIG_ESP_RMAKER_MAX_PARAM_DATA_SIZE to support larger number of schedules, as the schedules payload size will increase.

Reminder

Before using scheduling feature, as mentioned earlier, it is recommended to set the timezone first. Please check here for information regarding timezones. The simplest way is to just set the CONFIG_ESP_RMAKER_DEF_TIMEZONE config option,such as
CONFIG_ESP_RMAKER_DEF_TIMEZONE="Asia/Shanghai".

You can find this in idf.py menuconfig according to the steps below:

On this page