Auto unlock door on arrival?

Possibly this is a mode issue. It did exist as a problem with v one, but only with hello home actions, not with shortcut groups.

It’s pretty simple once you understand what’s going on, it’s just there’s nothing anywhere that tells you that this is what’s going to happen with routines.

OK if you have a routine that changes the mode, then nothing in that routine will run if the house is already in that mode. That’s not very intuitive. A lot of people assume that it will already run, just the mode won’t change because it’s already in that mode. But that’s not how smartthings handles routines. Instead, the entire routine gets bypassed because The system is already in the mode it’s supposed to end up in.

So if you have a situation where you want the door to unlock on arrival for two different people and you want the mode to change, you just need to have two separate routines.

The first routine changes the mode to home when either spouse arrives home.

The second routine does not do a mode change. All it does is unlock the door when either person arrives home.

That way if first spouse arrives home and the house is empty, routine one runs and changes the mode to home. Routine two runs and unlocks the door for them.

Then, when the second spouse arrives home and the first spouse is already there, routine one does not run because the house is already in Home mode. But routine two still runs and unlocks the door for the second spouse.

( @slagle it’s my belief that some of the situations where people are reporting that the mode is being ignored are situations where they used to have code that ran in the shortcut group and now they’re running that code in a routine and it is being ignored because the mode has already changed. This will explain all the wrong mode issues, but I think it explains some of them. )

Basically, anytime you have a routine with a mode change you need to think about whether you really intend to skip all the other logic in that routine if the house is already in that mode. If not, you need to break out the mode change from the other events and have multiple routines.