Samrtphone as presence sensor

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.