Custom Live tracking - how to display other users' or embedded devices positions?

Slavomir Hustaty shared this question 13 days ago
Answered

Hello Asamm team, Menion,

is there any option on displaying other users or owned assets on the map? I would like to integrate custom made GSM and LoRa devices that actually aren't smartphones but belong to my group of assets (dogs, cattle, ...).

What kind of response is Locus Pro able to parse in order to display an icon with current position of my dog? I have noticed that so far you do only support HTTP/HTTPS but MQTT/MQTTS would be a way to ease such integration.


Or is this meant to be a paid service "private group" by your hosted solution?

Best Answer
photo

Hello Slavomír,

I did not know MQTTS protocol. Nice one.

If you have your own running server available for the Locus Map "Custom Live tracking" solution, you may use one nice feature it offers.

You may specify response returned from your server as GPX file: "Content-Type: application/gpx+xml" or KML file: "Content-Type: application/vnd.google-earth.kml+xml". The app should then load and display this content on the map. So this way, you may supply your own data that should be visible on the screen.

Private groups in the paid Live Tracking are probably not usable for your use-case, where you want to have full control over visible data.

Hope this helps. Feel free to ask if something won't work correctly.

Menion

Comments (5)

photo
2

Hello Slavomír,

I did not know MQTTS protocol. Nice one.

If you have your own running server available for the Locus Map "Custom Live tracking" solution, you may use one nice feature it offers.

You may specify response returned from your server as GPX file: "Content-Type: application/gpx+xml" or KML file: "Content-Type: application/vnd.google-earth.kml+xml". The app should then load and display this content on the map. So this way, you may supply your own data that should be visible on the screen.

Private groups in the paid Live Tracking are probably not usable for your use-case, where you want to have full control over visible data.

Hope this helps. Feel free to ask if something won't work correctly.

Menion

photo
1

It seem to work well with KML - smoke test with 5 seconds location share interval and randomly changing Placemarks around my position work fine on phone and even on my Samsung Watch.


Is there any documentation about the supported XML tags and attributes that Locus can interpret? Because by default regardless of type the "assets" get only an "info" icon shown which is OK if I would only need to see single moving object.


Explanation:

With each backend update call the popup toolbox over the selected "asset" disappears and the assets are freshly re-rendered over the map layer. I know it is not possible to solve without proper identification of "highlighted"/"selected" object - so KML Placemark would need some ID. I will give a try to GPX test as well but I think there is no option either to provide an ID if Locus doesn't solve it somehow internally.

For purpose of integration with smartwatch it would make sense to have custom icon. Maybe for start even an "owntracks" solution with 2 letters (initials abbreviation) and few colors would do the job. I could assign red placemark icon with "JM" label to person "Jiri Mlavec" and some other color with 2 chars (26^2 alphabetical or 36^2 alfanumeric) icons to dogs/cattle.

photo
2

Perfect.

Documentation is a week spot, do not expect it, sorry. The best is to experiment and ask if something won't work as expected.

The ID of objects is really needed for the proper exchange of the items. You may give a try to "id" tag for KML Placemark objects, it should work.

Icons, probably best is to supply full Url to own icons hosted on your server, this should work as well.

To be true, I've never tested this functionality too much, so really, if something won't work, the best will be to provide me some sample file/steps to simulate the issue on my own device.

Good luck!

Menion

photo
1

Excellent, thanks!

To provide feedback on the KML->Placemark[id=""] attribute:

The Placemark attribute "id" doesn't keep selected placemark/asset focused after refresh but attached screenshots show that icon stylization works as expected and so the picture representing asset on map should be more than sufficient from visual differentiation perspective (and you can still click on the icon to get name and description of the placemark).

photo
1

Hello,

perfect.

Focus may be lost, it is possible. What should work is for example enabled guidance to the point. After refresh with the same ID, app should keep guidance to selected point active.

Thanks also for shared access parameters that you send on my email. I'm not sure, there is something I should test & fix. If so, let me know.

Menion

photo
photo
1

Perhaps with tasker


you could use an MQTT subscriber app, gather the data, parse it

create a kml file with tasker, save it in the map items folder

and have locus show the kml

photo
1

Not sure how to understand your hint but until Locus doesn't have MQTT implemented I could avoid use of MQTT entirely in my own embedded devices (if I would like to stick to Locus as human level GUI out in the field).

If additional 3rd party tool deployment and monitoring should anyhow enrich me in the situation where I can literally achieve subscription and data processing in few lines of code - not sure.

Use of HTTP will only increase data usage a bit but other than that it will make the life much simpler.


Will have a look on that "tasker" just to learn something new. Anyhow, Thanks a lot for taking time to respond!

photo