Using smart phones as presence sensors


(Guy D.Nelson) #1

Lately I have been having less than desirable results using both an android lollipop (galaxy note 4) and an iPhone 6 as presence sensors. At times, being in the house, the system thinks I’ve broken the Geo fence (android) and the iPhone can be 3/4 miles away and it things it’s arrived. Unfortunately I have triggers set up that react to these states so I get mixed results. I use SONOS and have it integrated so some of my apps play things upon arrival etc… What I just tried to do is tighten down my “I’m Back” logic by adding criteria to it. What I originally did was “upon arrival” and I wanted to add AND “door opens”. Unfortunaly, when I select the “door opens”, it makes it an OR. is there anyway in the Sonos SmartApps to make it an AND condition?


(Keith Croshaw) #2

I think support is on it for iOS… We hope at least.


(Dave) #3

Let me ask what may be a dumb question. For a phone to be a presence detector, must it have ST’s loaded and logged in? If not, what’s the trick?


(Guy D.Nelson) #4

Yes it does. You add it through the ST app


(Christopher Birkhimer) #6

I had the same issue. If you are using Android you can usa other apps in conjunction with smartthings to make the presence detection better.

I use Tasker and Sharptools, both free (I think).

First you go to the smartthings IDE page and setup an On/Off button tile. Next install tasker and sharptools. In sharptools subscribe to the On/off button you created select the option to put sharptools in tasker. Now in tasker make a profile that is based on you not being connected to your wifi (this will mean you are away) and have it run a task that turn off the on/off button. Set up another profile that Is based on you being connected to the wifi (you are home now) and have that trigger a task that turns on the on/off button.

in smartthings have your sonos apps based on the state of the on/off button.

Let me know if you need more detailed explanation for all this. This is what I have done and it has not failed once yet. The mobile presence in smartthings is very very unreliable. I had it freeze in a state for days before. Basing your location on your wifi is very reliable


(Ron S) #7

I keep maps and reminders open on iPhones as they use location and geofencing.


#8

Tasker/Sharptools integration needs a tasker plugin which is not free but well worth it. You can purchase it via the Shaptools app.


(Keith Croshaw) #9

That’s too much work… :stuck_out_tongue:
Especially for an app that tries to send me across the highway on the wrong side of the road to get to the wrong on ramp…


(Christopher Birkhimer) #10

If you take a little time it works better than the baked in programming of smartthings. I am starting now to move more and more automation options out of smartthings and into Tasker since it allows more options and better control of my devices.


(Guy D.Nelson) #11

I have to get familiar with the IDE. I haven’t ventured into that area yet. Will try it in a bit. Any good references ??


(Guy D.Nelson) #12

Christopher

I’m at the point where I create a task in tasker to virtually push the button. I have started the profile and am tryingvto add the task. I see nothing referencing the on/off tile anywhete . can you point Me in the right direction.

P.s. I did pay the 2.99 to put sharptools into tasker and sharptools is subscribed to the button I created


#13

When creating a task (+), select “Plugins” from the “Select Action Category” window . Next select Sharptool from the “Action Plugin” window. From the Sharptools dropdown, select “A Thing”. That puts you back to your task edit window in Tasker. From the configuartion box, click on the “Pencil”. Use the dropdowns within the “A things” windows to select device type name and command.


(Christopher Birkhimer) #14

Did you create the virtual on/off tile on the IDE page also?


(Guy D.Nelson) #15

I was just writing back to tell you I figured it out. I also changed from an on/off tile to a virtual door. Basically when WiFi connection is broken, it “closes” the virtual door and performs “Goodbye”. When WiFi connection is reestablished it “opens” the virtual door and performs “I’m back”

I would love to replace the section on the dashboard that shows people who are home to use my virtual door. Have you done any dashboard work?


(Impliciter) #16

You could use the device type described in this thread, Presence Detection using DD-WRT Router Script. I included a virtual switch in the device and it would be accessible from tasker and you can manually toggle the swtich. This device type would allow you to use the dashboard for your virtual presence sensor.


(Guy D.Nelson) #17

Solved my own question. I just had to remind myself that if they had a simulated I open/close sensor, there probably was a simulated presence sensor. I just changed it so, I have now virtualized myself.

The only issue I for see is when I’ve used tasker before for things like checking Bluetooth connection or checking WiFi connection, it did a decent battery drain on my droid. Hopefully that is not the case this time


(Christopher Birkhimer) #18

You need to stack the wifi checking to make it more efficient and use global variables.


(Christopher Birkhimer) #19

sorry for cryptic last response, I am out eating /shopping. I will reply with more details later


(Christopher Birkhimer) #20

I have my profiles for locating me based on if my wifi is connected to my home wifi and then checking if I am near my wifi and slso a global variable that is used to store my location as Home or Away. in the profile triggers they are checked in order from top to bottom so if you have the top condition based on connection to wifi, followed by the variable, then at the bottom is the wifi near condition the wifi near condition is only checked once in awhile. I think the wifi near check is more battery intense than e other 2 checks. my current battery drain seems about normal.

Hope that makes sense


(Guy D.Nelson) #21

I’m out eating/shopping. Will check later and get back to you. I have to wrap my head around the global variable.

Update

I have two profiles created and they are

  1. WiFi connected? Yes = change virtual presence state to “present”

  2. Not wifi connected? Yes = change virtual presence state to “not present”

Not sure where you are introducing the global variable. Please advise when you get a moment