Fix for Android presence arrival problems

presence
how_to

(Scott) #1

It seems like I get a lot of false presence arrived triggers. If my battery is low, it’ll turn off GPS until I start using my phone again, so when it turns back on registers that I just arrived even though I’ve been in the house the whole time.
I also shut my phone off when I go to bed. When I turn it on in the morning, it thinks I’ve arrived, even though I haven’t left. There are other issues too.

There are 2 very easy ways for SmartThings to fix this.

  1. Check the previous status. If my status is/was present, and you get a new update with the same status, don’t fire a trigger event.
  2. Since this is GPS based, the definition of AWAY should be a reported location outside of the geofence of my home, and PRESENT should only be reported when a location is reported inside my geofence. If no location is reported, don’t change the status. Ie, if I was AWAY and you don’t know where I’m at, leave me as AWAY. And if I was PRESENT and my phone gets turned off, leave me as PRESENT.

EDIT: Looks like ST is doing these 2 things and that this is actually an Android issue when using ‘High Accuracy’ location. See post 6 below.


[SOLVED] Android reporting incorrect presence after wireless router or home location change
Android Phone Presence Sensing
(Mark) #2

I’m fairly confident that this is in fact how presence is handled by ST. I say that because I live within a block of a subway station, so it’s within the geofence of my hub. Every day when I go to work, ST doesn’t think I’ve left until I get back above ground.


(Zachary Evans) #3

I quit using presence for routines months ago…I see nothing has changed.


(Scott) #4

I’ll be at home and it will show me as away, even though it showed me as present 15 minutes ago. Happened this morning. It doesn’t seem like its using that logic, at least not with the Android app.


(Scott) #5

Here is a screen shot of events. Notice it shows me as leaving and coming a bunch of times. I was home the entire time. My timeout is even set to10 minutes.


(Scott) #6

Digging more into this it appears that the App maybe doing those two things and that my phone thinks its jumping to different locations. In Android my Location settings is set to High Accuracy which uses GPS, WiFi, Bluetooth, and/or cellular networks to determine location. Problem with this is that it can use just cell towers to determine location. This has my location jumping around, even when I’m sitting in my house watching TV.

I went to the Verizon store and showed them this and they told me to change the Location setting to Device GPS Only. Problem is SmartThings doesn’t think I’m allowing Location Services and so my ST Presence won’t work now.

Anyone got a way to make their Android location services more accurate and work with ST?

Maybe the ST app needs to allow Device Only location settings for Presence? @slagle would that work?


(Bob) #7

Have you thought of trying Life360. (The free version).
It works well for me here in the UK.


(Scott) #8

If my phone doesn’t register the right position, not sure Life360 will work? Unless it works when the location setting is set to Device GPS Only?


(Bob) #9

I believe Life360 works from your GPS location.


(Scott) #10

Why the hell can’t they make SmartThings app do that?


(Scott) #11

I think I have come up with a work around for smart phone app presence constantly arriving and leaving even when home.
I created a Virtual Presence Sensor using the Universal Virtual Device Type Handler. I then use 3 IFTTT recipes and an ST Smart App to control the Virtual Presence

  1. IFTTT Android Location enters a location, turn on ST Virtual Presence Sensor. This location is the same size GeoFence as ST
  2. IFTTT Android Location leaves a location, turn off ST Virtual Presence Sensor. This location is much bigger as it includes the areas where Google thinks I’m jumping around to (more on that later)
  3. ST Smart Lighting App to turn on Virtual Presence Sensor when my Android Presence Sensor arrives.
  4. IFTTT Android connects to Home WiFi turn on ST Virtual Presence Sensor

Now change your Routines (I’m Back, Goodbye, etc) to use your new Virtual Presence Sensor instead of your Smart Phone sensor.

What this does is any time I enter my home geofence, either IFTTT or ST will turn on my Virtual Presence Sensor. Because it’s a switch, turning it on multiple times when its already on won’t trigger multiple events. Using both ST and IFTTT should help trigger your arrival as soon as possible.

When sitting at home my location will occasionally jump around due to it using cell phone towers for location instead of GPS. Using Google’s Location History, I looked at several days history to determine where it thought I was teleporting too. Most where to the same location not too far from me but further than I would like my ST Geofence to be. In IFTTT I created the 2nd recipe above using a much larger geofence that is large enough to include these locations. That way when Google think I magically teleport to these locations it won’t trigger a presence sensor left event. For the most part, when I leave my house I leave this area anyway, so will just take a little longer for ST to think I’ve left, but shouldn’t be more than an extra minute.

You can see your Google Location History by going into Maps on your phone, click the hamburger menu icon top left, and selecting “Your Timeline”, then click the calendar icon top right to check out different days. Zoom into the area near your home and look for your presence going somewhere you were not several times. You’ll basically see a bunch of lines going from your house to that location (see my post above).
You can also see your Google Location History in a web browser.
https://support.google.com/maps/answer/6258979?co=GENIE.Platform%3DDesktop&hl=en


Android Phone Presence Sensing
Phone presence sensors spotty all of a sudden
FAQ: The Many Ways of Detecting Presence
Is this Possible - Life 360 / Ecobee / Rule Question
How to detect Wifi presence on Asus router to disable in-home cameras?
(Rey Rios) #12

I have a problem like this but mine jumps from Houston, TX to Philadelphia, PA. So increasing the area does nothing for me. Mine has been working great for years and this just started a few weeks ago.

Based on my research I have found that:

It is not a ST problem
It is not my phone (my wife is having the same issue, different phone)
It is not my carrier (I have T-Mobile and my wife has Verizon. We both have the same issue now)
It only happens at home. Not at work. I created a Tasker profile to log all gps changes and it doesn’t happen at work, for example.

My suspicion, it has to do with the GPS signal in our area. With Tasker, I executed a beep sound every time it changed my presence in ST, immediately I would open maps and I could see the location somewhere in Pennsilvania.


(sapstar) #13

Hi Scott, I am having the same problem now. Can you please let me now how you captured the image where it shows you moving locations on map?


(Scott) #14

See the bottom of the solution post.


#15

Wow, this was broken when I started using Smartthings in 2014 and today it is STILL broken. When I add the mobile presence thing it works ok. Then after several days it stops reporting and/or it reports coming home/leaving at the complete wrong times.I chekced my good presence, it shows exactly where I was correctly. Set to high accuracy etc. What the heck.


(Sticky) #16

Just installed the latest Android app which has a “wizard” to ask about turning of battery optimization for the ST app. My wife’s phone has been problematic with the presence detection since day one, and so far it has been working fine about the ST app update and selecting “Yes to No battery optimization”. Hopefully this is finally the fix, very frustrating without this feature working the way it should.


(Michael Deffendall) #17

@Scott_Barton:

First, thank you for this, it looks wonderful!

Second, please forgive this ST newbie, but I’m trying to follow your directions but still learning the process.

a) I have the Universal Virtual Device Type Handler (thanks @Mike_Maxwell!) installed and published.

b) To create the Virtual Presence Sensor, you use +New Device on the IDE under My Devices? If so, I did that already.

c) I went to IFTTT and attempted to do your step #1, but it couldn’t find an ST switch to turn off.

I’m sure it’s something stupid I did (or didn’t do), so please forgive me. Hopefully, other newbies can learn from my mistake.

Michael

UPDATE: Ok, newbie found his own answer :slight_smile:

Make sure you update your Smartthings settings in IFTTT to allow access to your virtual switch(es).

Thank you again!


(Glen King) #18

ST is not the only system struggling with presence.

The presence in ecobee worked great for about four days, and changed the program at the right time. Since then it is changing the program a full hour after the device arrives within the geofence.


#20

How can I do this based on if multiple people arrive home. For example execute a task only when my phone and my wifes phone connect to the wifi.


#21

For anyone just is still having issues I’ve been working on this for a while and it updates almost instantly.