Samrtphone as presence sensor

I would avoid creating any virtual presence sensors in the legacy IDE at this point. IDE is for the old groovy architecture and ST is is the process of migrating to LUA and Edge drivers which can’t be managed in IDE. Anytime you notice Placeholder as the Device Type in IDE, means Edge driver or cloud-to-cloud using the new architecture. Do not edit them in IDE.

Check in Menu > Labs > if there is a virtual sensor there (on your Android but it may be limited to Samsung phones… I forget). Or you can use an Edge driver if you install CLI or use one of the custom ones such as the following…

I am fairly technical. Some router configuring, basic networking skills, etc, but just getting ST to run a routine based on my phone leaving my house is kicking my butt.
Am I over thinking this? I set up the routine, but even though the ST app appears to indicate that my phone (Pixcel 6) has left home, the routine does not run.

I did have this working for the past 2 yrs, but I was using the virtual presence process thru the IDE. I’m not sure, but I’m thinking the new non-sumsung phone is the wrench in the gears.
Surprisingly, there are none of those great youtube videos out there to walk me thru it.

It can be confusing. Use the virtual presence sensor to give a better indication of your location. Many users do! Just use one of the Edge presence sensors.

You may want to physically leave and return to see if your phone syncs up. Some people have had issues with presence from their phones so it is not fun!

Delete the old phone sensor if you haven’t already by either disabling get location for this phone on the old phone and checking IDE to ensure it got removed.

There are some users who have tutored others on how to create some great Routines utilizing phone location… especially if you have multiple household members.

Ok, thanks. I’ll try that. How would I find one of these tutors?

Is there a tutorial anywhere on how to use the vEdge creator?

They will just join in.

Edge drivers just involves clicking on the channel invitation link the developers provide in their thread. It will prompt you to login and there you can subscribe to their channel that contains their Edge drivers. Then you select the Drivers you want to install.

Right now, Edge works on all v2, v3 and Aeotec hubs. It is in the process of being pushed out to the Connect and Wifi Mesh hubs so not all have it at this time but should by July 25.

Click on the link above and look in the first thread for the link to subscribe to his channel. You can ask questions there on how to use the virtual creator.

The use of virtual presence devices in this context has always been largely about improving the visibility of the current status of individual mobile presence devices as that information remains unavailable in the app, to the bemusement of many. I personally use virtual presence devices in my automations as it allows me to manually override the mobile presence status where I know it is wrong.

So the need for the devices is there as much as it ever was, but only if you feel the need. However you no longer have to jump through hoops in the IDE to meet that need if you don’t want to, as has been explained.

Although I currently use Edge drivers for my virtual presence sensors just to move on from custom DTHs early, I really don’t want to. It makes no sense to me to use a local device as a proxy for a cloud device.

There are some interesting looking new virtual devices appearing that may eventually meet my requirements but many of them don’t seem to be usable in the real world yet.

I use EdgeBridge server and PhonePresence virtual device made by @TAustin. It takes some effort to make it work but has been stable and reliable.

Thanks orange and JKP
Well, some troubleshooting and patience have revealed that the problem is that for some reason, my Pixcel 6 registers much slower than my Samsing Galaxy S8 used to.
My wife’s iPhone till registers in less than a min after leaving the geo fence, just like the S8 used to.
The Pixcel takes 3+ mimutes (coming and going). Which is mostly a drag when arriving home because I will have time to open a door before the the system disarms. Any thoughts on how to speed this up? Obviously I can just push out the geofence farther, but we actually live close to several friends and family mambers, so a few blocks bigger, and it will disarm while at their house.

1 Like

Thanks Sakari. I’ll check that out.

On an Android phone you can use Tasker (~$3.50 US). To monitor connecting and disconnecting from your wifi as your presence triggers. It is very reliable.

Then you need Tasker to relay the message to ST via SharpTools or Alexa. You need a SharpTools/Tasker plug-in (~$3.50 US) or Alexa Buttons/Tasker plug-in (~$3.50 US) to do that.

I use SharpTools for this. SharpTools is free to use other than the plug-in for basic routines.

So total cost is about $7.00 plus tax in US.

1 Like

That is an option but there is a free and locally running option available.

I said it’s been reliable so far. Apparently I jinxed it. The server froze yesterday. Good thing is it took only a minute to make it run again.

That’s frustrating. I am lucky in that my home location works really well with the SmartThings app on four phones. My Linked Places (available on Samsung phones) are not all so reliable. One is reliable on the only phone that regularly uses it, the second one is hit and miss on one phone and rarely works on another, and the third almost never works on the phone that uses it. It really does seem to depend a lot on the availability of a data connection when the geofence is crossed as it doesn’t seem to play catch up.

Some people get a lot of joy using Home and Away routines in Google Home to set devices on SmartThings. I found that with suitable background execution settings this can work more often than not, though for me the ‘or not’ is too frequent and far less reliable than SmartThings. I also find that spuriously being marked away is common, even when three phones are being used and they are all in the house, and being marked home can be delayed by several minutes, or sometimes hours, if it happens at all.

WiFi connection status has a lot of appeal. I don’t have Bixby Routines, which I am told work well. I try to avoid Tasker which could be used to set a virtual presence sensor via the REST API if I wished.

1 Like

Just arrived home and set off my cameras because I moved too fast for the system to disarm. Seems like a Pixcel specific problem because my wife’s iPhone still registers very quickly, just like my previous phone did.
Sakari, what is that “free and locally running” solution you mentioned?

Sorry for the late response, I didn’t see this post until now.

There are two possibilities.


I use the phone presence. I had some problems at first because OS I was using did mess up the server. But once we figured that out all has been running quite smoothly.

This works for me and hopefully this will suit your needs too. Ask @TAustin help if you need assistance. He’s always been great help when I’ve needed one.

Recently, my Galaxy S8+ Android v9 smartphone hasn’t performed any geolocation at all in SmartThings for a week now. So I setup two virtual presence devices. One named Alexa and the other Google. I then setup Alexa Routines and Google Home/Away Routines to turn On/Off their specific virtual presence device. But, no geolocation is happening in those apps either apparently since neither Alexa’s nor Goggle’s virtual presence devices are changing at all either.

I hope it starts working again since for now I’m relying on in pocket Google Assistant voice commands to turn Off my virtual Home Security switch to disarm the STHM, and just manually arming SmartThings when I leave.

If it doesn’t start working, then it’ll probably be Tasker to the rescue. And I’d use @orangebucket suggestion using HTML API commands to toggle the virtual presence device via Tasker actions.

Have you checked that SmartThings still has permission to get the location at any time and also that any battery optimisation leaves it alone and it never sleeps? The same would also apply to Alexa and Google Home, and also Tasker if you go that way.

Today, both Google and Alexa triggered their specific virtual presence devices, but SmartThings still did not change. I remember a trick that I did a few years ago when this happened, so I just now re-applied that trick which was to use the SmartThings ‘Presence Change Push’ smartapp that is available in the IDE ‘from template’. We’ll see if it has the same affect and restores SmartThings geolocation like it did for me years ago…

Just remember that it is groovy code… so when ST ends support for groovy… it will cease.

Well, even though both Alexa and Google triggered and changed the specific virtual presence devices when I left home, they did not trigger anything when I returned home. However, I setup Tasker to notify me when I returned home, and it did. But still SmartThings even with the Presence Change Push didn’t do anything. No battery optimizing or sleeping apps on my smartphone.

So, it just disabled the get location for my smartphone is SmartThings, checked the IDE to ensure it was gone, rebooted my hub, and re-enabled get location from my smartphone in SmartThings. Hope that re-establishes geolocation in SmartThings…

Update: Yesterday SmartThings, Alexa, and Google all knew that I left my geolocation (albeit 10 minutes afterwards), but none of them knew that I had returned. However, Tasker and Arlo knew that I had returned though.

I’m thinking if Tasker and Arlo use GPS primarily, then maybe these other services are using Cell Tower location data before using GPS location perhaps since 10 minutes is how long it would take for my smartphone to switch to a different cell tower which provided good location data. And, I have my Work location setup in SmartThings with a Routine that toggles a virtual presence device, and it turned On/Off in SmartThings when I arrived and left the Work location. So this has to be it because my wireless carrier sent me an email advising that cell towers are being upgraded over the next few months. Interesting coincidence that cell towers are being upgraded when I’m having location triggering issues with all these services, and SmartThings knew when I arrived and left my Work location. So SmartThings must be using cell tower location data before using GPS location data.

I THINK I JUST CONFIRMED IT! I turned Off WiFi and Mobile Data on my phone, then I only turned on WiFi, and immediately SmartThings triggered the location that I was home!

Update: Just updating this since I recently got a new Samsung Galaxy S22+ smartphone to replace my aging S8+ and on the first outing the Galaxy S22+ performed geolocation triggering just fine. I also like it that SmartThings is now exposed to the built-in Bixby Routines, except the list of supported devices is a bit weak in my opinion so I’m having to manipulate a few virtual devices to make it better.