Hello,
I’m trying to get a better format on the data I’m sending from a Photon to an IOT Hub through the out of the box integration. Currently I send data from the Photon as follows:
snprintf(eventData, sizeof(eventData),"{ “tempf”:%f}", tempf);
Particle.publish(“Photon_WeatherData”, eventData);
And I get output from the cloud events like this:
{“data”:"{ “tempf”:72.207687}",“ttl”:60,“published_at”:“2017-12-11T20:12:55.699Z”,“coreid”:“1e0037000d47353136383631”,“name”:“Photon_WeatherData”}
I tried to use a custom JSON format which I created in the integration between Azure IOT Hub and particle cloud (Advanced Settings, Custom JSON Data)
{
“tempf”:"{{tempf}}",
}
However it’s not saving this format (everytime I go back to custom, my format is gone) and I’m expecting the event data to be formatted as this (back slashes removed):
{“data”:"{ “tempf”:72.207687}",“ttl”:60,“published_at”:“2017-12-11T20:12:55.699Z”,“coreid”:“1e0037000d47353136383631”,“name”:“Photon_WeatherData”}
What am I doing wrong?