Reliable Presence Sensor using phone and/or fob


(D Sed) #1

In my setup we have two mobile phones as presence sensor (2x iPhone 6+)and the mode turns automatically into Away when both phones have left the house (and thus ‘armed’ to fire motion alerts).

The problem is that from time to time (once or twice per week), the phone presence sensor, i.e. app is either delayed to tell the hub its home or fails to do so, resulting in a flurry of false motion alerts. It stops once I go into the ST app on the phone so the phone registers that its home.

We also bought two presence fobs/dongles that we have not activated yet, because the fob would stay in our cars, but we don’t always use our cars when we leave (e.g. take my motorcycle or bike or walk and I don’t to have to remember to take the fob with me).

Questions that I have is:

  • What can I do to make things more reliable on phone as the presence sensor?
  • can I have each fob make a pair with one of the phones so if either part of that pair (phone+fob) registers arrival or leave for that person, it is noted?
  • What suggestion do you have for this to work reliably (the goal here is for the system to ‘arm’ itself automatically based on presence?

(sidjohn1) #2

I only use the keyfobs for presence detection with a smart power outlet near the door to ensure stability. I keep my fob on my keychain so it always just works and i don’t have to think about it.


(Micheal ) #3

While another signin, Life360 seems to be rather reliable…and there are more interesting things you can do with it, like set ‘presence’ to areas that don’t have hubs like work or paths home so you can have actions based on those locations (i.e. cross a certain point 20 miles from home, set the thermostat).


(John Lord) #4

if your phone is lying about your presence (which mine did) then life360 won’t work either. I ended up installing a custom virtual presence sensor tied into a switch which i initially turned off/on with ifttt based on my connecting to my home wifi. I’ve since switched to using tasker and sharptools to do the same thing, and it works even when internet is down.


(Keith Croshaw) #5

I’ve been using IFTTT to toggle virtual switches. Then I use https://simplerulebuilder.com/ to change the mode based on those switches. It’s been working great. With a longer “It just works” streak than native mobile presence.


(John Lord) #6

i’m looking into using my setup on my wife’s and roommate’s phones, as sometimes my wife’s phone quickly leaves/arrives, triggering hue light changes, and the roommate’s phone sometimes doesn’t show she left because power saving kills her gps.


(D Sed) #7

@keithcroshaw, what you have done seems like what I need to achieve that reliability. Could you elaborate a little more on how you did this? I am familiar with IFTTT but can’t connect the dots with your initial comment. Thanks much!


(Keith Croshaw) #8

I wouldn’t mind at all. First are you familiar with how to setup a virtual switch in SmartThings? If not take a look here: FAQ: Creating a virtual Device

Then In IFTTT create 2 new recipes, I used:
If (iOS Location enters my area) Then (SmartThings - Keith Virtual Switch = On)
If (iOS Location leaves my area) Then (SmartThings - Keith Virtual Switch = Off)
(Do the same with any cohabitors with their own IFTTT accounts.

Then in SimpleRuleBuilder.com I just made 2 rules used:
If (Keith Virtual Switch = On) Then (Mode = Home) AND (Do any actions)
If (Keith Virtual Switch = Off) AND (Cohabitors Virtual Switch = Off) Then ((Mode = Home) AND (Do any actions)

(Do the same with any cohabitors)

Hope that all makes sense let me know if you have more questions.


(John Lord) #9

You could have that virtual switch toggle a virtual presence sensor. Mine does. But I’m going to look into that app. Ivr been wanting more robust rules. Example sonos welcomw wife home if presence home less than ten minutes and front door opens. This isn’t possible with stock apps


(Keith Croshaw) #10

How do you toggle the virtual presence sensor? I was never able to figure that out.


(John S) #11

Add this to the generic presence sensor device type:

def setPresence(String v) {	
	if (v == "not") v = "not present"
        def old = currentPresence()
        // do nothing if already in that state
	if ( old != v) {
	    sendEvent(displayed: true,  isStateChange: true, name: "presence", value: v, descriptionText: "$device.displayName is $v")
	} 
}

Then you call setPresence(“present” | “not present”) to set it from some other smart app.


(Keith Croshaw) #12

mmmyea sounds nice but mine’s working good for me. Thanks @schettj!