Door unlocks after a specific person leaves!? can't fix

So I have been having a problem where when my husband leaves the house, the front door unlocks. I have two automations set up:

Door Lock:
If (all away from Home) then (lock front door)

Door Unlock:
If (any at Home after being away for 10 minutes) then (unlock front door)

These are the only two automations that involve the front door lock. I don’t think it does this when I leave, just my husband. I’ve had Smartthings for several years and this is a recent problem (the new app sucks). He has always had Samsung phones and currently has a Note 20 and all of his Samsung phones have had problems reporting location to Smartthings (super ironic that Samsung stuff doesn’t play well together but my iPhone is rock solid with it). This doesn’t appear to be a location reporting issue but I can’t figure out why it is doing the opposite of the automation, and only for him. How can I fix this?

I initially had the unlocking routine set up without the (after 10 minutes) bit, but added it in case that helped. It makes no difference either way.

All I want it to do is unlock by itself ONLY when someone comes home, and lock itself when we are all gone.

Is it only running when he leaves and you’re still at home? That’s the way I’m reading the automation… That he’s leaving, but you’re still present, so after 10 minutes, the door unlocks.

Nope, he leaves and it immediately unlocks. Does the same thing if I remove the 10 minute part of the automation.

The way the 10 minute part should work as I understand it, is that if you say leave and come back 5 minutes later, it wouldn’t unlock. You’d have to be gone at least 10 minutes before it would unlock when you came back. But like I said even if I remove that part completely it still unlocks when he leaves.

The only possible reason I can come up with for why it is doing this is that it is unlocking because I’m still home and thus I qualify as “any at Home” but I haven’t been away (much less for 10 minutes) and it hasn’t done this until recently. There is no option to specify an action upon arriving at home, just “at home” and “away from home” which as far as I can tell operates like “arrives at home” and “leaves home”. It would not make sense for the “at home” to run any time someone leaves, and it hasn’t operated like that in the past.

You can try to break it apart into 3 separate automations.

  1. If you arrive home and door is locked, unlock door.
  2. If he arrives home and door is locked, unlock door.
  3. If both are gone, lock door.

I’ll try that and hopefully it will fix it.

With the classic Smartthings app I would be able to look at our phones as devices and see which one is setting it off (his leaving or mine staying at home) but there doesn’t seem to be any way to tell what exactly is triggering this with the new app. When I go in to look at the history it just says it was unlocked with no indication why.

Yes, that is exactly why it is doing it. Your Automations have conditions that may change when either one if you leaves or arrives so they get evaluated to check and you are at home.

Bear in mind the automation effectively says ‘if anyone is home unlock the door’. You are relying on that only running on the occasions you want it to.

It is a shame Automations don’t have a Test button as if you pressed the Test button and your door unlocked you’d probably be worried.

It means that before you were at home you were away for at least ten minutes. If the last time you were away was three days ago that changes nothing.

You might like to go away for five minutes and stay at home for a couple of days. The condition should effectively report you are not at home. At least I think it should.

It is really there to deal with ‘bouncing’ presence. Some people find they get marked as present, immediately get marked as away again, then marked as present a couple of minutes later. The flag, combined with one on departure routines, is there to ignore the spurious changes.

Conditions using multiple member locations are most useful for determining a collective status, like is the home currently occupied or unoccupied.

If you are going to unlock the door on arrival I’d suggest an individual automation for each person. I’d also consider imagining whether a hypothetical Test button would open the door.

2 Likes

Automation presence is a bit quirky and different from how SmartApps process it like @orangebucket pointed out. I’ve seen this automation work as you’ve written it and also fail at times. The automation appears to reevaluate the rules when anything changes rather than when it changes to the desired state.

If you have access to RBoyApps you can check out Lock User Management (LUM) which an option of creating a presence based user and one of the key features in there is the ability to lock and unlock doors when someone arrives or everyone leaves. This is more reliable since it checks specific states. You’ll see in the screenshot below you can set it to activate when any of these people are there (you and your husband) and when both leave it can lock the door and if anyone arrives it’ll unlock the door. So now if either of you get home it’ll also unlock the door for you. You can also set additional conditions like if specific people aren’t at home but that may not be applicable for your current use case. Also if you can have it assigned to specific locks and if you create two different presence users you can one lock all locks when everyone leaves and the other only unlock the front door when someone arrives.

Thanks. I set up individual automations and that seems to have done the trick. It is so frustrating that this works differently than the Classic app did - the current app just has so much less functionality! And there was, for instance, no indication anywhere that locations work differently for the current app than they did in the Classic one, so I wouldn’t’ve considered that it might have changed.

And you are also right, it is unreliable because it has worked the way I wanted it to (in the current app) in the past. This has only been a more recent problem, despite no changes to the automation other than switching the location for my husband from his old phone to his new one. So weird. A test button would be quite helpful, or a “History” tab for the automations so you can see when it went off and what triggered it.

ETA: I feel like what I want it to do - have the door unlock when someone arrives home - is a really, really, really common thing that people want to do. So it seems weird they made it so difficult to do!

Glad you got this sorted out!

I had the exact ame problem but the opposite. My wife has an iPhone and I have a Samsung. It used to work with no issues in the new app for quite a while. But for the past month, month and a half I have bee experiencing the same issue. When she left home and I was still here the door would unlock when the phone was out the geofencing. I did not know what was wrong. But I stumbled on this post and now I see that I am not alone. It must of been either an OS update or an App update that disrupted it. I took the advise of creating individual automations and now it works like it used too. Thank you for helping me keep my sanity :wink: