Ubidots Community

Sending GPS data issue

Hi i am using esp32 module with AWS IOT CORE and i am trying to send location data to the ubidots but i cant upload the data
I followed this json structure…

{
“state”: {
“reported”: {
“time”: 54294,
“sensor_a0”: 0,
“Temp”: 1.635498,
“position”: {
“lat”: 40.78286,
“lng”: -73.96535
}
}
}
}
This json only i got from aws iot core side…

Hello @John

Sorry for not getting back to you sooner.

The payload being sent does not manage the correct format in accordance with Ubidots’ HTTP data ingestion API. If you refer to the Ubidots API documentation , you will notice that the payload must contain the following format:

{"temperature": 
     {"value":10, "timestamp": 1534881387000, "context": 
          {"machine": "1st floor"}
     }, 
"position": 
     {"value" : 1, "context":
          {"lat":-6.2, "lng":75.4}
     }
}

All the best,
Ángela