ESP Rainmaker switch Device adding parameter as esp_rmaker_obj()
Posted: Tue May 10, 2022 6:35 am
Hi,
I trying to add esp_rmaker_obj() parameter to a Switch device.
After firmware program when I try to set JSON object value as mentioned below, I getting error in JSON parsing at esp_rmaker_handle_set_params() in esp_rmaker_param.c file and I am not receiving write_cb().
JSON Object value which I am trying to set is
Also after updating this value from App, I receive JSON data as below
Also please note that in parsing jsmntype is assigned as JSMN_STRING, I think it should be JSMN_OBJECT for correct execution.
Please let me know whether I am making any mistake here. If so please guide me on the same.
Thanks in advance.
Regards,
Dinesh
I trying to add esp_rmaker_obj() parameter to a Switch device.
After firmware program when I try to set JSON object value as mentioned below, I getting error in JSON parsing at esp_rmaker_handle_set_params() in esp_rmaker_param.c file and I am not receiving write_cb().
JSON Object value which I am trying to set is
- {\"name1\":[{\"name2_1\":\"value2_1_str\",\"name2_2\":val2_2_int,\"name2_3\":val2_3_int},{\"name3_1\":\"value3_1_str\",\"name3_2\":val3_2_int,\"name3_3\":val3_3_int}]}
- {"Switch 1":{"mapping":"{\"name1\":[{\"name2_1\":\"value2_1_str\",\"name2_2\":val2_2_int,\"name2_3\":val2_3_int},{\"name3_1\":\"value3_1_str\",\"name3_2\":val3_2_int,\"name3_3\":val3_3_int}]}"}}
Please let me know whether I am making any mistake here. If so please guide me on the same.
Thanks in advance.
Regards,
Dinesh