Page 1 of 1

How to setup a parameter to show bar graph in app

Posted: Wed Oct 23, 2024 3:07 am
by djorr5
Hi all,

In the Rainmaker vanilla app when you have a temperature parameter setup you can click on it in the app and you have the option for it to show the past values as a bar graph. I would like to be able to do this for a parameter I create. Is there something I need to do when I create the parameter?

Code: Select all

    fence_sensor_device = esp_rmaker_device_create("Fence", NULL, NULL);
    esp_rmaker_param_t *voltage = esp_rmaker_param_create("V", NULL, esp_rmaker_int(0), PROP_FLAG_READ);
    esp_rmaker_device_add_param(fence_sensor_device, voltage);
    esp_rmaker_device_assign_primary_param(fence_sensor_device, voltage);
    esp_rmaker_node_add_device(node, fence_sensor_device);

Re: How to setup a parameter to show bar graph in app

Posted: Thu Oct 24, 2024 2:07 pm
by ESP_Piyush
Check out the docs here to understand time series data. You will need to use the full featured time series data to see graphs on the phone app. In your code, just change the param creation line to include PROP_FLAG_TIME_SERIES

Code: Select all

esp_rmaker_param_t *voltage = esp_rmaker_param_create("V", NULL, esp_rmaker_int(0), PROP_FLAG_READ | PROP_FLAG_TIME_SERIES);