@butilbenceno hi, did you try it with Artik cloud. ? Could you successfully send values from code to Artik cloud ?
Hello all,
I have tried the above solutions, unfortunately I didn't have success with ARTIK cloud.
This is in my code, trying to send 3 values to Artik cloud using web-hook
if((millis() - lastTime) > 40000)
{
char buf[1000];
sprintf(buf, "{ \"Humidity\": %d, \"Temperature\": 60, \"BatteryVolt\": 7}", 5 );
//hum, temp, batt);
Particle.publish("myEvent", buf, PRIVATE);
Serial.println("Event published");
Serial.print(buf);
lastTime = millis();
}
buf string printed on Terminal is perfect.
{ "Humidity": 5, "Temperature": 60, "BatteryVolt": 7}
But in the Web-Hook, escape character before double quotes is not removed. ( as seen from my Particle Console).
"data": "{ "Humidity": 5, "Temperature": 60, "BatteryVolt": 7}",
In the above link I found, particle cloud does not escape the back slash when sending the text to Web-hook.
Since the back slash is not escaped, Artik cloud is not able to read the incoming JSON data.. Even though I could successfully POST the data to Artik cloud, the data is not interpreted and Artik cloud shows No Data.
Can anyone help me how to resolve this ? Is it possible to escape the \ in the text sent to Web-hook.?
During testing, I created the web-hook with static JSON data and Artik cloud is able to read the value. I suspect only with this escape character it is not able to.
Thanks.