Skip to main content

How do I implement time-series data logging?

Use Simple Time-Series to log and visualize historical parameter values (e.g., temperature, energy consumption). Add PROP_FLAG_SIMPLE_TIME_SERIES when creating the parameter:

esp_rmaker_param_t *temp_param = esp_rmaker_param_create(
"Temperature", ESP_RMAKER_PARAM_TEMPERATURE,
esp_rmaker_float(15.5),
PROP_FLAG_READ | PROP_FLAG_SIMPLE_TIME_SERIES);

Report data using esp_rmaker_param_update_and_report()—this updates both the live parameter value and the time-series record. For TS-only logging (no param update, no automations), use esp_rmaker_param_report_simple_ts_data(). The cloud stores the data; it can be viewed in the phone app or queried via APIs. For more information, see Time-Series Data Usage.