Custom Widget Variables / Dictionary Variables

Hello,

I have created a custom widget that pulls weather data. This is being used on a Blueprint Dashboard. I am trying to display local weather information based on the Lat/Long from the GPS tracking device. How can the Custom Widget access variables from my bucket?

In my example below, I have hard coded the lat/long. How can I use the latitude variable in my devices bucket?

Hi Thomas,

First you’ll need to select the variable within the device’s bucket in the custom widgets settings.

Having done that you’ll then need to get the data and utilize it. You can do that using the following code:

window.TagoIO.onRealtime((data) => {
// data is the variable received in realtime
});

This video from our learning center will definitely help you out.