[HOW TO] SmartThings Presence reporting using Tasker/SharpTools/AutoLocation

I would encourage adding some debugging statements to see where the profile is running slow (eg. An Alert > Flash at different points in the Task). If it’s actually SharpTools that is running slow I would want to work with you to figure out why. What I’ve found in these situations is more often than not it’s either the Tasker profile itself that is slow to trigger/run or the phone is switching networks causing a delay in all remote network calls.

I thought this as well… geofences and all… but that’s why I go back to my garage door task in tasker. It’s 2 things only… 1) Is on wifi (already green) and 2) Android auto notification… I could try to leave tasker open I suppose and see how long it takes before the Android Auto notification turns green. For what it’s worth the CoRE workaround was also delayed it seems… but not quite as long.

Could it be my tasker profile? The Notificaton trigger?

I agree with Joshua, if you have not already done a proper debug with Tasker, it is always good to start there. Tasker does tend to act erratically sometimes when using certain states and events in profiles like GPS, Wifi etc.,

Some other ways you can check:
Trigger the garage door profile with “Power Any” to check if Notification is the delay, use “Wifi Near/Connected” instead of Wifi On, look for a specific SSID in your Wifi events.

1 Like

Thank you. I’ll give this a try later today. Appreciate all the help guys!

1 Like

All i can say is wow testing this for 3 days and it has been dead on.
The only things I did differently from the main post at the top of the page is use the manual setting and I changed my inner geofence to 200 meters from 120.
Starts opening my garage door about 3-4 houses away.
No noticeable delay.
I also have 3 wireless routers in my house and have it activate as soon as it sees any if the networks.

I have tried tried SmartThings presence sensors and I had to pretty much be right at my garage door for it to open even with extra zigbee repeaters in the garage.

The default smartthings using my phones GPS opened the garage door sometimes even 2 blocks away depending on when 2 minute GPS poll happened.

Life360 app didn’t always report correctly and relied on the GPS polling.

So thank you this works great.
Running it on a Note5

2 Likes

Yes sir it does

Can you elaborate on what steps you used.

I initially had issues with SmartThings reporting my device at home when it was not. This is what fixed it for me.

Mostly used settings and steps from destructure00 CHRIS’s very first post
These are just notes to help with destructure00 CHRIS’s very first post please refer to it for full procedure.

except these slight changes and I will try to clarify some steps so you do not make the same mistakes I did.

Step 1.
Create a virtual presence sensor in SmartThings.
a. Open ST IDE in your browser https://graph-na02-useast1.api.smartthings.com/
** - select login (top right corner) and login**
** - select my location (top left corner)** and select your hub
b. Choose My Devices from the top menu
c. Click the green New Device button at the top right of your device list
d. Fill out Name, Label, give it a unique Device Network ID (something like presence-001, -002, etc should work, choose Simulated Presence Sensor from the Type drop-down menu, Version - Published, Location - select your location, Hub - select your hub, then Create.

Step 3
Authorize SharpTools to access your devices
You only need to authorize the virtual presence sensor that you created in step 1

Step 5 set my inner perimeter to 200 m (I don’t think this will be a big deal but I am listing every little thing I did differently) I used the small orange up arrow at the bottom right and then typed in the range.
Step 5 you do twice one for each size Geofence (I used 200 m for inner and 1500 m for outer) one for inner and one for outer.
Of course when you do step 5 twice you name them differently
I also did not put any spaces in the names
I used home-inner and home-outer for names

Steps 6 and 10 (this is where I think a lot of the problems are coming from)
In step 6 instead of selecting “geoface name” I selected “manual name” and typed in “home-outer” (my outer Geofence) again no spaces and no"" do not select the Geofence Name option above Manual Name.
Creating near home

In step 10 instead of selecting “geoface name” I selected “manual name” and typed in “home-inner” (my inner Geofence) again no spaces and no"" not the Geofence Name.
Creating home-location

Steps 6, 8, 10, and 11 (some problems are coming from this as well I did it wrong at first)
make sure you rename the profiles correctly and select the correct spot
Don’t rename the circled red in the picture below.

note: All my WiFi network SSID are transmitting not hidden.

After you get it working correctly you can just press the lightning bolt on the top of your phone screen and disable notifications as SmartThings will handle the popup notifications

hope this helps

1 Like

Cool and do you find that it doesn’t fire off any home automation then when you are away? Because that is my latest grief. I will be at work several miles away and all of a sudden, a notification that my garage door is opening and my autolocation fence shows I am inside it. That is why I started making the other profiles to turn off the home profile. So that if the fences go nuts, SharpTools won’t trigger because the home profile is off.

When I first used the automatic selection of Geofence name it was showing me at home when i was 40 minutes away at work.
Now I have not had single issue since I set it using the manual name option. I keep expecting something to happen but it has been rock solid.
No extra profiles created.

I have 3 wireless routers one in the basement one on the main floor and one on the second level, and I have set tasker to activate for all of SSID so whichever one it sees first it see me as home and opens my garage door and disarms my alarm.

Great post, @NoWon. Thank you. A couple of comments…

I’m using geofence sizes if 110 & 1500. For anyone reading this, the sizes are not rigid - feel free to experiment with what seems to work for your geography.

I suggest/request that everyone use the same profile names that Chris first described. This will allow us to share experiences without getting confused. (It will work for you as long as the profile names match within your individual Tasker profiles & tasks, but it will be hard for others to follow.)

I’m curious about your experience with geofence names, manual vs. selected. That seems to be a big part of your success story. It shouldn’t make a difference and is more likely to be done wrong if typed manually. Do you have any guess as to why it mattered for you?

Congratulations on a successful implementation. I’m an evangelist for Chris’s work because I have seen so many in the ST community flailing to get reliable presence, and this has been 99.9% solid for me.

2 Likes

I have had exactly zero issues since I went to the three fence setup detailed in post 64. Been rock solid for me.

1 Like

I am so glad I stumbled on this post!!! I installed everything Tuesday and have been monitoring it against my phone and Life360. Somehow, and this might be completely coincidental, all have improved since i added this in. The first day it didn’t switch to not present when I left, but I think that was due to my geofence not being large enough and the switch off WIFI was not happening fast enough. I increased the size and poof, it started working flawlessly.

Thank you for creating this @destructure00! It’s hard to find instructions on a solution in here that are so detailed and thought out and you nailed it. The only question I have or would like added to the instructions is how to add this to multiple phones. I see you mention it in the “What is this?” section, but can’t find instructions on how to do it. If they are in the comments already, I apologize, but trying to sift through them just to find this is a bit daunting.

2 Likes

@CAL7 I agree for this thread we should only be using one standard set of names so there is not so much confusion. I just used the names from destructure00 first post at the beginning of this thrtead.
As far as why using Manual Names worked better in Tasker I think because I changed my Geofences in the Autolocation program and just the way Autolocation handles cached names messes with Taskers auto Geofence Name selection.
I have only followed destructure00 first post and so far do not have a third boundary or any rebooting profiles (but they are a good idea) I also only use one entry in Sharptools the virtual presence sensor SmartThings handles everything from there.

@destructure00 I see what you mean in the Autolocation logs bouncing back and forth as you pass through a boundary adding a third departure boundary is a good idea (but it has not caused me any issues so far I likely pass through the boundary fast enough).

a few questions though:

  • In your post 64 why do you use Sharptools to activate your garage door open why not just use your virtual presence sensor in Sharptools and have SmartThings control the garage door (fewer steps and simplifies things)?
  • In post 64 under Home step 4 I assuming you are doing this in Sharptools but I am not sure why it is needed?
  • In your first post #1 at the beginning of this thread on step 10 you created a Home-location profile now you do not have this you have a different away profile with different instructions correct?

@destructure00 you have done so much I hate to ask but could you update your first in-depth post at the beginning of this thread to match up with post 64 so there is not so much confusion ?

lets make it real easy here are my Tasker profiles(no private or personel info in these just my SSID names which will not do you any good). All you have to change is the Home-wifi SSID to your own and as long as your Autolocation is named home-inner and home-outer and you still have to create a virtual presence sensor and setup Sharptools.
This is what works for me I apologizes if there are any mistakes (I don’t think so) and I have not added a third departure Geofence yet or reset.

step 1

  • install virtual presence sensor

step 2

  • purchase and install all 3 software (Tasker, Autoloaction, and Sharptools)

step 3

  • Authorize the virtual presence sensor in Sharptools

step 4

  • create 2 (at least 2 for mine I use 2) or 3 Geofences in Autolocation and name them home-inner (I used 200m) and home-outer (I used 1500 m) if you make a third lets call it home-departure (I am going to use 400 m I have not programmed in my home-departure yet as it is working so far without it)

step 5

  • download the profiles below and I found it it easiest after you download to use androids my files to find the files and copy them to the Tasker folder
  • Then in Tasker select profiles at the top (see the green circle in the picture below do not use the home at the bottom left) and select import

Home-wifi (after you install this you will have to go and edit the wifi SSID to your own see red circle)

Home-location

Home

near-home

step 6

  • once it is working press the lightning symbol at the top of your phones screen and disable notifications and let SmartThings handle notifications.
  • Setup SmartThings Automation to use your new virtual presence sensor however you like
  • hopefully destructure00 can improve on this above but this will get you going

If I’m not misunderstanding your question, you would just repeat the whole setup process on the second phone. I have a feeling I am missing something though, what specific part are you asking about?

1 Like

I only want the garage door to open if I arrive while I’m in my car, which Tasker knows by my Bluetooth connection. Can’t do this through SmartThings. I added this restriction for a couple reasons. First, if/when I have a false departure and arrival I don’t want my garage to open. Second, if I’m going for a walk around the block or something, I don’t want my garage to open while I’m still several houses away.

Variables are set in Tasker, not SharpTools. This is a second restriction on the garage door opening. With my 3-fence setup, it’s possible for Tasker/SharpTools to send multiple Arrived commands without sending Departed commands in between, and I don’t want my garage door to open every time this happens. If a second Arrived command is sent without a Departed command in between, the %Home variable restriction will prevent the Open Garage command from being sent.

This happened to me once while I was trying to leave. I backed the car out of the garage and closed it. I was sitting in my driveway looking something up on my phone and all of a sudden the garage opened again. Turns out that for whatever reason my Home profile wasn’t active in Tasker. When my WiFi disconnected Tasker fired up the AutoLocation high accuracy mode, which in turn reactivated my Home profile. Since this is the profile that triggers the Arrived action, Tasker told SharpTools to resend the Arrived command, and since I was connected to my car’s Bluetooth, it also sent the Open Garage command. Resending the Arrived command was no big deal but if I had just driven off instead of sitting in the driveway my garage would have been left open. The %Home variable prevents this scenario from occurring.

Post 1 and post 64 are completely independent of each other, you could follow either one without needing bits and pieces of the other. So yes, you are correct.

I’ve been think about doing this anyway, it gets confusing having multiple methods in the same post. If I get some time this weekend I’ll either update post 1 or create a separate thread.

3 Likes

No, you understood that right. Based on your description it sounded like you didn’t have to install Tasker and the rest on the second phone. It sounds like you do,which makes sense. I just didn’t want to pay for it multiple times, but if that’s the way to get this to finally work it’s worth it.

Ah gotcha, that’s what I was missing. Google play store has family account capability, where you can associate multiple email addresses with a single household. If you do this, you don’t have to pay for Tasker or AutoLocation again. They are both family account eligible, meaning you can share the app across all of the accounts in your family group.

https://support.google.com/googleplay/answer/7007852

1 Like

Like you guys I loved this. I forgot about it and turned my WiFi off at 10pm one night. Woke up and grabbed my phone to see what notifications I missed at 5am … The garage door opened. Not even sure how it happened. But the home wifi in tasker still wasn’t green when the door opened. I had to disable the garage completely. It’s just too dangerous.