Is there a way? Whatever presence will occur before you get home. Opening the front door could be going out as well as in. I’m assuming the only way would be with a facial recognition camera at the door or just inside? Any other cheaper ways?!
Depends how exact you need the time to be.
If you need it down to the second, the usual way it’s done in buildings is with two trip beams just an inch or two apart. Then you just figure out which one broke first in order to tell the direction the person was walking. There’s some discussion of this in the micro location topic.
If you’re OK within a minute or two, and you want to use something that works well with smartthings, you just need two different devices. You have the first device change the mode, and then the second device do something different based on what mode you’re in, and that way you can pick up that direction. This only requires two pretty inexpensive devices and no special code.
Here’s one that I use:
@Kristopher also has a “wasp in a box” Microlocation system but it requires a lot more devices and significant code.
Alternatively, if you use a smart combination lock and capture the user code you get someone coming in that way, as they don’t use the code when they go out.
So just depends on the details of the use case.
Epic reply. Much appreciated and uber clear - cheers!
The solution needs to distinguish between opening the door to go out and opening to, say, let visitors in or pay for your pizza, which is why the more complex solutions (as above) are the only way to do it automatically - just saying “if door opens when mode is home then set to away and vice versa” wouldn’t work.
If you don’t mind doing it manually, a keyfob or wall mounted device with a button would be ideal. Press to toggle mode between home and away. Quicker than opening the app on your phone to run the routine. I’m thinking something like a panic button could be used - effectively use it as a manual presence sensor?