Ubidots Mapping changed?


#1

I’ve been mapping the location of devices using Ubidots on your commercial platform for months now as I work on our project. When I set that up you selected both the device AND the variable that had the lat/lng context data attached to it and those dashboards setup that way (or using that as a template) still work.

However I have since created another device (using a Particle electron instead of a photon) this attaches the location context data to a different variable. When I add a map widget to the dashboard for this device it doesn’t ask which variable it should be loking, only the device. The widget claims there is no data to display, however the data is being send in exactly the same way as it was before.

snprintf(_publish,sizeof(_publish),"{\"Sig\":%i,\"M\":%i,\"C\":%i,\"W\":%i,\"P\":%i,\"A\":%i,\"lat\":%f,\"lon\":%f}",Signal.rssi,_var1,var2,var3,(AC_OK_State ? 1 : 0),(Alarming ? 1 : 0),lat,lon); Particle.publish("Sig",_publish,PRIVATE);
Webhook

          
{
  "Mind": "{{P}}",
  "Your": "{{C}}",
  "Own": "{{M}}",
  "Business": "{{W}}",
  "Matey": "{{A}}",
  "Signal": {
    "value": "{{Sig}}",
    "context": {
      "lat": " {{lat}}",
      "lng": "{{lon}}"
    }
  }
}

All the sent variables in this hook are received, its just lat/lng that are not picked up.


#2

I seem to have the solution & if I am correct your API documentation, blogs and examples need updating. Previously you could add lat/lng as context to a dummy variable or any other variable you happened to be sending. It would now appear that you need to send lat & lng as context for a variable called location which then needs a dummy value because its value is meaningless.


#3

Dear @The_Bot,

As you mentioned, the documentation needs to be updated and we are working on! :wink:

If you desire to send coordinates to Ubidots you should do it sending a variable called postion, location or gps including the coordinates desired in the context of the variable. At this point the Ubidots backend is in charge of take those variable an automatically assign the coordinates in the map widget, also in the map available for the device view.

I hope this clarify your doubts and thanks for your feedback! We work everyday to offers the best to our users.

All the best,
Maria C.


#4

Will older dashboards that currently still work the old way, continue to work or do they need updating to work this new way?


#5

Dear @The_Bot,

This feature is still available just in the Ubidots Educational License, but in a few months is going to be deprecated with a new map widget which offer more feature to improve your tracking applications. Based on that, we highly recommend you update the firmware to assign the payload using the location variable.

All the best,
Maria C.