Time Series Usage Guide
Firmware Usage Guide
Time Series is a feature in ESP RainMaker that has the ability to log and store data points over time, each tagged with a timestamp. This allows users to track changes in parameters like temperature, humidity, or energy usage, enabling historical analysis and trend monitoring.
To learn more about Time series and its variants, click here
Usage Guide
Enabling Time Series
To use time series data, just include PROP_FLAG_TIME_SERIES
(full featured time series) or PROP_FLAG_SIMPLE_TIME_SERIES
(simple time series) flag in the properties
while creating a RainMaker parameter.
esp_rmaker_param_t *param = esp_rmaker_param_create("Temperature", ESP_RMAKER_PARAM_TEMPERATURE,
esp_rmaker_float(15.5), PROP_FLAG_READ | PROP_FLAG_TIME_SERIES);
esp_rmaker_param_t *param = esp_rmaker_param_create("Mode", ESP_RMAKER_PARAM_MODE,
esp_rmaker_int(1), PROP_FLAG_READ | PROP_FLAG_SIMPLE_TIME_SERIES);
After adding these parameters to devices, the corresponding node configuration will show them as below (note the properties):
[
{
"name": "Temperature",
"type": "esp.param.temperature",
"data_type": "float",
"properties": [
"read",
"time_series"
]
},
{
"name": "Mode",
"type": "esp.param.mode",
"data_type": "int",
"properties": [
"read",
"simple_ts"
]
}
]
Please use esp_rmaker_param_update_and_report()
to update both parameters, the instantaneous value as well as the time series value of the parameter.
Specifications
To view the specifications of these MQTT topics for Time series variants, please refer here