Using smart phones as presence sensors

Well in my specific use case I have modes change and the garage door open when I am connected to my wifi. I had issues in the past (an update might of fixed this in tasker) where if it was based on just if the wifi was connected that profile kept running so I pair it with a global variable thst represents my location so the wifi being connected only causes something to happen if my global variable was previously set to away.

I also think I am finding it is faster to control smartthings using global variables in tasker then to keep polling values from smartthings if that makes sense.

The global variables also prevent issues where for some reason the wifi on phone is turned off then home, ssy your phone turns off. In my example if my phone dies at home then I charge it and turn on, if there is no variable my garage door would open when the wifi connects after turning back on

Conceptually I see what you are doing but being somewhat new at tasker, I’m not visioning it. Any way to screen shot your setup?

Here is the profile and task for when I arrive home. The reason for the wait and checking the AMY variable is to determine if only I am coming home or both my wife and I are coming home together

In your first screen shot, you have
Profiles, Tasks, Scenes, Vars

I’m missing the Vars tab

Is that where you would initialize the Global Variable?

In my profile, I’ve added a check for the variable %STMODE ~ Away

That will never happen because I have to initialize it

On the main page go to preferences under the top right pull down menu and make sure beginner mode is not checked. That is all I can think to fix that.

You could set up a task to just initiate the variable. No profile would actually activate it. Just set it so %ST MODE = Home and then just manually run the task and then the global variable is set and can be used

Correct, beginner mode was set. Once I took it out of beginner more, the VARS tab showed up, I noticed the variable was NULL. I typed in “Away” thus forcing the first profile to execute. I verified in the log that the profile did indeed go active. Before using the variable method, the first profile was ALWAYS active. Now its active momentarily. I assume the fact that the profile is not constantly active will ease up on the battery (hopefully)

same here, it seems to though. Months ago I was using tasker for other location profiles and my battery only lasted about 8 hours. Now it seems to at least last most of the day under normal use.

With more tinkering and more variables and sharptools you should see how tasker really opens up smartthings to do more things and do them more reliable

Thanks for your help. You have started my brain firing in a million directions and i can see this working flawlessly for me…unfortunately, the husbands iPhone is going to be an issue since, as I recall, tasker doesn’t exist for the iPhone. I think I’m just going to have to leave him out of automation for coming and going

Yout can add IFTTT to smartthings and that does location tracking plus a ton more options. Just look up IFTTT.

Oh the ole “FBI Van” SSID trick. :smile: