Presence detection (Mobile) and timing of actual mode change

Question for ST support and fellow friends! How long do you think it takes after presence detection for the actual home mode to change via Hello Home “I am back” and what factors may be affecting it?

Reason I ask is my life depends on this question as it may end my love affair with ST for good because I have to make a choice between ST or missus as seriously warned couple of minutes back. :wink: after 18 years, it kind of blows thru the ears…

Situation: For the past two days, whenever she arrived home the alarms went blaring even though her presence is detected at least 1 minute back before she gets on the driveway. The garage has a motion sensor which detects unwarranted presence and triggers the alarm in “away” mode only. But looks like lately what’s happening is… Presence is detected…I am back triggers…at least 1 minute after she is in the driveway… Inside garage door motion detects her presence… All alarms go crazy on her because of sequence of events or delay or lag… End result… Have to make a choice… Never happened in 7 months but for the last two days in a row…

Update: to be safe I have disabled motion alert in garage… But the front door may do the same one day…

1 Like

I think it should take no longer than any other plain SmartThings Event triggered action, such as a light triggered by any of a Z-Wave Aeon Minimote, a door contact sensor, a motion sensor, etc. In my home, these usually trigger well within 1 second (usually 500ms or less, thankfully); but, when there is a SmartThings cloud backlog (rarely?), then the action is delayed. But this latter occurrence is rare.

So… I suggest debugging the scenario by using a very simple custom SmartApp that runs a location.mode event method, subscribed to the event trigger of the assigned presence tag(s).

The advantage is that you isolate the processing to exactly the most important action; and you have full control over the SmartApp source code to add log.debug messages with timestamps to verify the sequence and latency.

Let me know if you want any help at all. I have never used my presence tags yet, and this might be an opportunity for me to run the exact same code and compare latency, etc.


I use presence for mode changes too. Over the last month my garage door will be open before I even get in the driveway (I can see it start about a half block down). Over the last few days it’s not opened until we are out of the car & walking toward the garage. Sometimes even standing there waiting on it to open. Seems like it’s delayed more now than it was previously.

All the more reason to use a custom SmartApp, at least temporarily, so that the Event log can be analyzed to document the exact timing. :wink:

1 Like

The timing should be recorded on the regular hello homepage. It will show you the time when it change the mode. And you can check the activity log for the presence sensor from the things page to see when it was detected as having arrived.

If the presence sensor was in fact detected, but it took a minute or two for the hello home action to run, then there was probably lag inside the cloud itself.

Smartthings doesn’t guarantee any actions to occur in intervals of less than one minute. That includes those triggered by a presence sensor. A minute may be a long time if you’re waiting in your driveway, but they don’t promise any faster.

When performing a barrier Crossing, that one minute is likely actually two. One for the presence detection to be registered, and one more for the mode to be changed.

Again, could seem like forever if you’re waiting in your driveway, but it wouldn’t be "unexpected behavior."v

Thanks @tgauchat I actually do what you suggested via a simple smartapp when both of us leave… subscribe to presence detection… Check once both of us are away… Double check “Good Bye” (set to immediate) expected behavior and force hues to turn off if still on, check all doors, blah…blah… Guess I have to do the same which is to trigger mode change from Away to home as soon as presence is detected via the same custom app. I am back will be the double check and will simply complain that I am already in Home mode… Cool… And if I am stuck… Will definitely need help from you… THANKS A MILLION!

1 Like

That’s what I plugged in today in my custom code but was stupid enough to use “var” instead of “def” the groovy way… Coming from Microsoft and now ExtJs (JavaScript) framework… It is the sequence of events as I see in the logs…

And missus is not waiting in the driveway… Her presence correctly detected… I am back correctly fired… But the actual timing between presence detection and mode change actually happening. The sequence of events is the culprit… That’s the reason I didn’t whine and rant on ST… :slight_smile: it all happened between that few seconds…

1 Like

Never automated my garage door to open/close for precisely that reason…

1 Like

I’ve only had one false positive so far, but it works pretty well. My point was that it’s slower these last few days than it usually is :smile:

My understanding from things said elsewhere on other support topics (for example, the one about events firing twice) is that many (most? All?) Members are being moved from one server to another as the new scheduler code is being implemented that is supposed to address the sunset problem.

If that’s so, all kinds of timing could change, for all kinds of reasons, but you would still be within expected parameters.

1 Like

This is only the case when a schedule mechanism is used, such as runIn() (or perhaps even, delay:).

For non-scheduled actions that are triggered by an Event subscription, the callback handler should execute “nearly” immediately … hopefully within a few hundred milliseconds.

1 Like

Exactly. 7 months with no issue on those same basic hello home action… Good bye triggers Away when both of us are away and “I am back” does nothing but changes the mode to home when one of us arrives. These two hello homes do nothing but change the mode… Guess would have detected this issue any ways if somebody pulled in the driveway when we were away! :wink: and nice to know that the sirens actually work in real life… But certainly I have one angry missus today…


Do you have an ST pull quote for this? Because…mesh, dude. Plus the addition of a cloud. This is why direct association was created. :zap:

Will it often work in what humans would perceive as “instant”? Sure. Would it be unexpected behaviour if it didn’t? Show us the quote.

@JDRoberts I totally get both yours and @tgauchat point of view… But we all agree that it is the asynchronous behavior in general. No guarantees…Great to face something in real life when I am facing this at work everyday with ExtJs Ajax calls not being chained correctly via their callbacks and just assuming that happened in a sequence… Everyday in my life…

On a lighter note… Missus wants everything out this weekend BUT the hues, ecobee3 and fibaros can stay… Figure that one out… I am hiding in basement and pretending to be at work…::slight_smile: no big deal… Have removed the alert from garage motion sensor. Nothing in there worth stealing when we are away… Couple of brooms and old paint tins…


Without near-instantaneous (sub-1000 ms) behavior, 99.99% of the time, SmartThings will not remain a viable system.

“Follow-me” lighting (via contact and motion sensors) is a prominently promised behavior, and slow response would kill this. Lighting automation experts recommend sub-300ms or better.

The Cloud was considered feasible since, well, by analogy, Google is able to autocomplete search
suggestions faster than most typists.

Turns out that load factors does cause too frequent cloud latency, so, among other benefits, Hub V2 distributes most event processing.

How much latency does the local mesh add? Dunno. I suddenly have one Z-Wave outlet that lags. I guess it’s time to do a repair (though I did not add any powered devices :confused:).

If direct association is necessary to establish reasonable service levels, then HA competitors will exploit this feature if ST doesn’t.

Just one question from a financial s/w pseudo tech savvy but nowhere near the real tech savvies like you guys, where does mesh come in picture in this situation? Everything inside the house where mesh comes into play is rock solid but for the hues known issues.

I learn so much from you guys everyday cannot be put into words…

1 Like

Or just avoid mesh altogether. Like the bridge and tunnel architecture that homekit is going to use. Bluetooth point to point to the bridge, then Wi-Fi star the bridge to the hub. It will work the way A generation brought up on Wi-Fi expect communications to work.

The biggest advantage of mesh is that it’s cheap in terms of both end devices and energy draw.

Bridge and tunnels is neither, but it will be quick. People may start having to choose.

But the Hues work fine with the bridge and the native app, right? The only problem is with ST? If so, likely using the zigbee mesh is fine, it’s a cloud to cloud issue.

That said, mesh is never “rock solid.” That’s just not what Mesh is. Mesh is full of holes, and bounces, and sleeping devices. All of which is fine, that’s how it’s designed. But it’s not how people think network protocols work these days.

Anyway, assuming your motion sensors that set off the alarms are in fact ST controlled zigbee or Z wave devices, then mesh is involved.

If instead you’re just using the smartthings presence sensor to fire off a notification to some other system, then there may not be any mesh involved, but there’s still the cloud.

If I had to guess, as in pick the place to start looking first, in your current situation I would guess cloud. But, just a guess.

It is definitely the cloud in this case. Presence detected (no mesh) --> ST MobileApp (I am back hello home trigger sent to cloud. No mesh.) ->. Missus driving, reaches driveway -> Motion detected by sensor inside garage -(part of mesh guided by cloud> sirens go off (inside the mesh) -> the siren still blaring even though house is in home mode)

So from the point from garage sensor picked her up she was in the matrix. :smile:

Just look at her desperation here:. Sequence of events hosed…she kept clicking I am back from the notification widget…brighter side I am to retire today in guest bedroomm. She will forget by morning.

Of course I realize I used the rock solid in loose way as I have never had any issues mostly.with 76 devices now except the hues. Please pardon my typos right now as I am typing without my glasses. It’s in missus’s proprietary room. My 6th sense asks me to behave and I am doing so…till then I am in the basement pulling my hair… I need to somehow test the presence in this scenario and have to wait till she goes out Sat evening with her friends and arrives.