espressif / esp-rainmaker

ESP RainMaker Agent for firmware development
Apache License 2.0
433 stars 146 forks source link

Adding new parameter after esp_rmaker_start() (MEGH-3814) #166

Closed jacek12345 closed 1 year ago

jacek12345 commented 1 year ago

What is the proper way for adding new parameter for device "on-the-fly"? I need to add parameter and want see this param in mobile app.

shahpiyushv commented 1 year ago

@jacek12345 If you add a new parameter, you can call the esp_rmaker_report_node_details() API to report the new config and param value to the RainMaker backend. However, you will need to refresh the phone app for the new parameter to reflect.

jacek12345 commented 1 year ago
  1. esp_rmaker_param_create()
  2. esp_rmaker_param_add_ui_type()
  3. esp_rmaker_device_add_param()
  4. esp_rmaker_param_update_and_report()
  5. esp_rmaker_report_node_details() Is it good way or something wrong/unnecessary? suppose, 4 is unnecessary?
shahpiyushv commented 1 year ago

Step 4 is not required, since esp_rmaker_report_node_details() will report all params. Rest all is fine.

jacek12345 commented 1 year ago

Thank You