How to set a GPS location manually through an Experience View?

I’m an embedded systems developer working a temperature probe device. Each temperature measurement (poll) is hours apart. To maximize battery life, the device utilizes deep sleep and disconnects from LTE while not doing a measurement.

The devices do not have GPS, but my client would like to allow users to utilize the GPS map so the users can remember where the device is planted. Ideally, this is done through a Losant Experience View (we want the users to be able to do this themselves without our intervention).

From what I’ve gathered, all data displayed from the dashboard is solely from devices. With that said, one way that I think works, although isn’t ideal, is sending the GPS string to each device, waiting for each device to read the GPS string, save it, and then send it back to Losant. With a polling time of hours, this seems far from ideal. In other words, I’m pretty sure the user wouldn’t be able to see if the location was actually updated until another poll occurs.

Hi @Dale_Mitchell,

Welcome to the Losant Forums :slight_smile:

Your solution would work. But, I’d recommend another way. In Experience Views, you can have a simple HTML form. The action of this form would be an experience endpoint. Once this form is submitted, you can trigger a workflow that takes the input data from the user and reports the GPS state to the device.

Does this make sense? I’m happy to explain further if needed.

Hi @anaptfox,

Thanks for your help so far.

Once this form is submitted, you can trigger a workflow that takes the input data from the user and reports the GPS state to the device.

Using the suggested method, the GPS state of a device won’t be updated in the Experience View until the device wakes up. That delay is too long for us. We don’t need the device itself to store its location, and we don’t want to force users to wait for a device to wake up before device locations are updated in the Experience View.

Here’s a rephrase of my original question while trying to avoid an XY problem: how do I allow Experience View users to instantly update the displayed location associated with a device, without relying on the device to send data back to Losant?

My suggestion above isn’t relying on the device, it’s the experience user that’s submitting the form in an experience view.

The device can update the location of its self, but in the route I’m mentioning, it’s the form that does it.

https://docs.losant.com/workflows/experience-workflows/

The location updating will happen in an experience workflow.

Ah, my misunderstanding. Thanks, @anaptfox, I will give this a try.