Device or not in application

I’m about to build an application where I check the status of some devices that lives on another platform I use. I can get a status via an api. I’m thinking of creating a table where I add a specific token for each device I want to check. (It’s currently just 10 of them). Then loop through those records with a workflow and update that same table.

Does that seem like a good approach?

I will then use that data for gps dashboard.

I might recommend using devices instead of data tables for this purpose. The benefits of using a device is that they are easier to visualize on a dashboard and you also automatically get historical data. You would create 10 Losant devices to represent your 10 external devices. You would add a token tag to each that contains their token.

In the workflow, you would use a Device: Get to get all devices with the token tag. You can do this by changing the “Find By” to “Tag Query”. The tag key would be token and you’d leave the value blank. This will return all devices with the token key regardless of their actual value. I’d also recommend checking the “Return tags as an object map instead of an array” checkbox.

You’d then us a Loop Node to iterate over each Device, make the HTTP request using the value on the token tag, and then use a Device State node to record the value.

The only piece of information I’m after is really to see the last time of contact. Not really any historical data.
GPS information is static. I was hoping too not have to "waste " devices :wink:

Gotcha. Your method will absolutely work as well. Currently only device data can be displayed on the built-in GPS blocks. So if you’d like to use those, you’ll need to store it on a device. If you don’t need to use the GPS block, then a datatable will work well.

I was thinking a Vega lite map

Yep, that method will work just fine

Can a Vega lite map be zoomable like a google map?

It doesn’t particularly look like it. I haven’t used the mapping features at all since I typically use our built-in ones. None of the examples here demonstrate zooming: https://vega.github.io/vega-lite/examples/