Distance of user from home

I want to display user's distance to home on the dashboard.
I guess there's no ready app which can do that.
So I wrote a small Android app which gets the location of user (Lat/Lon)
Now I want to post this parameter to a virtual device on the hub.
And then I will calculate the distance of the user and display on dashboard with a custom attribute.
How can I receive the lat/lon parameter posted from my Android app ?

Easiest way might be to send the data to a RM or webCoRE endpoint... Alternatively you could write an device driver and use MQTT or MakerAPI to update it.

how can I use MakerAPI to update my virtual device ?
what function on my driver shall receive the parameter ?

also, is there a way to get the lat/lon of the hub from its settings on my driver ?

I wrote a driver that can accept some basic data types that may be of use.

MakerAPI documentation is here: Maker API - Hubitat Documentation

Lat and Long for the hub are available in the Location object: Location Object - Hubitat Documentation

1 Like

can you share it ?

Yes, sorry, got a phone call :slightly_smiling_face:


Never fails, does it? :grin:

I'm sure I could setup something with Tasker to detect when I am on the Community forum and to block calls...:slightly_smiling_face:

1 Like

This post from last August for another user may be useful:


There is always Life 360 with states and the free Life 360 mobile app. It will display distance.

1 Like

wow , I didn't know that distance could be received from Life360
that's good.
Now I don'T have to write my own app since I already use Life360
is there also a map display feature on the app ?
I see a "lastMap" attribute but it displays "null" for me.

Not that I see but it gives you the latitude and longitude which you could use to get a map using the URL

Not sure if it is relevant, but I remember there used to be some kind of restrictions with Google and lat long type requests, could have been requesting lat longs for addresses, can't remember...

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.