Reputation: 11
I'm using the IOTC firmware (through python).I have been able to upload location data as telemetry. However I have not been able to upload location data as a basic property. Is this possible?
I'm formatting my JSON like this
{"location":{"lon":3.837585, "lat":41.174130}}
I have also tried this
{"location":{"value": {"lon":3.837585, "lat":41.174130}}}
The answer from Roman below shows that it is possible to do it through the MQTT API. But I would like to do it through the Azure iot central firmware with Python.
Upvotes: 0
Views: 539
Reputation: 8255
Yes, it is possible to make a Location property. The following screen snippets show this example with a simple PnP template:
As the above picture shows, the reported property has the following format:
{
"Location":{
"value":{
"lat":41.17413,
"lon":3.837585
}
}
}
Publishing the above reported property to the IoT Central, we can see the Location on the dashboard:
Upvotes: 3