I’ve written a piston that sets the mode for my hub based off of the presence sensors installed on my iPhone as well as my wifes. We’ve got the webcore presence sensor as well as the default SmartThings presence sensor. Currently the script will run several times when my wife and I return home together (in the same car), I’m also getting some odd behavior when my wife is home and I come home. The script will sometimes run, sometimes not. Usually it will take a while after I’ve made it in the house before it will trigger.
What I’m hoping to do is set the mode based off of our presence, that should be pretty obvious by the code. I’m hoping that when both of us return home the script will only run once, I’m also hoping that if one of us returns home (the other already home) and the front door is locked, unlock the door, but do nothing with the lights. I’ve turned on logging and once I return home from work (my wife is home today) I will post the results of the log.