Trigger automation based on distance from home (radius)

I need to kick off an automation/routine based on distance from a location in the app, currently home. So far I’m not seeing anything in the routine/automation set up that will allow me to get the distance from home.

So questions are:

  1. Am I missing something?
  2. I know the Lat/Lon for home, is there a way for me to get Lat/Lon of the device and do the calculation myself?

I am very new to Smartthings, as in just installed it yesterday. Google hasn’t been greatly helpful.

Not at present, this functionality is not available through the official features. Hopefully, if someone knows how to do it some other way they’ll post about that.

If you have a Samsung galaxy phone, there is an official feature which lets you specify multiple locations and then do some stuff based on being near one of those. Most people use that for home and office or home and school, but you could just pick some other location that was what you wanted to trigger some events off of. I know that’s not exactly what you’re asking for, but I did just want to mention it.

But as far as something just based on distance, I haven’t heard of one, but maybe someone else will know a way.

This the the method I use, assuming you don’t care which direction you are from home, just that you’re X distance. I created a second location centered on my house with a radius of 50km. I use it to activate routines depending on whether or not I’m “out of town” (beyond the location radius).

If you have an Android, you can use Tasker to calculate distance between GPS coordinates, then use the API to do something in ST. I feel like @Jake_Mohl is the resident Tasker expert so he’ll probably know if/how/the best way to do this.

1 Like

This is a good solution, if you have a galaxy phone.

Can you give us a use case so we can help better understand how to solve this problem?

Are you wanting to be a certain distance from a certain location in any direction?

1 Like

This feature is called ‘Linked Places’ and is no longer limited to Galaxy phones as it once was though I can’t comment on whether it ever got implemented on iOS.

It basically allows you to add three extra geolocations to each of your SmartThings Location. These appear as presenceSensor capabilities in extra components of the mobile presence devices and in Routines behave like additional ‘Member locations’.

I am using a non-Galaxy Android phone at the moment and the ‘Linked places’ option is tucked away in the three dot options menu when you open the ‘Manage {Location name}’ page. This is a bit odd as it used to be a prominent feature like ‘Rooms’. I notice you currently have to wait a few seconds for the current Geolocation to show up, and then a few seconds more after that for the option to appear in the menu. Even then the page takes a few seconds to populate.

In Routines they can be selected in ‘Member location’ conditions by clicking on ‘Location’. Again I see a delay of several seconds while the page populates. There is an ‘Add place’ option on that page.


Any direction, just care about X mile radius. I want a reminder notification to set my A/C when I leave or re-enter the radius. Don’t want to auto set it as we take day trips from time to time, and don’t need to put it in vacation mode.

If all members are using galaxy device or if it’s just you, I would use a linked place with a larger geofence. You can find that here.

If you have the Alexa app on your phone(s) and you’re in the US, you can create as many Alexa Routines as you want with different locations and radii. Alexa can trigger SmartThings Scenes (now manually run routines) or, with the help of @TAustin 's vEdge Creator, it can operate a virtual presence sensor. State changes on the presence sensor can do anything you care via SmartThings Routines.

I use Alexa for both a close-by and more distant presence change.


Up to a maximum total of 200 Alexa routines per Amazon account. :wink:

Set Up an Alexa Routine - Amazon Customer Service.

1 Like

Well played, Mr Roberts, well played!