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

Please share those tweaks i’ll give anything a shot. Thanks in advance.

Yeah mine… When it was showing me home, I clicked on the GPS map and looked at it and that blue dot was over my house even though I was at work. When I tapped the crosshairs icon it said about 3 times error 404. Tried to find what that meant and I couldn’t find it.


Mine around 5:20ish

Geofence craziness

Here’s the plain text version:

In AutoLocation I have 3 geofences. I separated the Arrival and Departure boundaries (they were previously combined into the single Home-Inner boundary) to reduce the chance of presence bouncing back and forth when I was right on the edge of the boundary. This happened to me a couple times when I was waiting to make a turn at the end of my street.

  1. Home - Arrival Boundary, radius 120m
  2. Home - Departure Boundary, radius 400m
  3. Home - Location Service Boundary, radius 1500m

In Tasker I have 4 profiles (5 if I include the one that just sets %Rebooting - true):

Near Home

  1. State = Autolocation Geofence
    a. Geofence name: Home - Location Service Boundary
    b. Status: Inside
  2. Entry Task 1 = Autolocation Location
    a. Starting Location Monitor
    b. Interval 3: seconds
    c. Update Type: High Accuracy
    d. Restriction: If %Rebooting = false
  3. Entry Task 2 = Notify
    a. Title = High Accuracy Location On
    b. Restriction: If %Rebooting = false
  4. Entry Task 3 = Variable Set
    a. Name: %Rebooting
    b. To: false
  5. Exit Task 1 = Autolocation Location
    a. Stopping Location Monitor
    b. Update Type: No Power
  6. Exit Task 2 = Notify Cancel
    a. Title = High Accuracy Location On

Home

  1. State = Autolocation Geofence
    a. Geofence name: Home - Arrival Boundary
    b. Status: Inside
  2. Entry Task 1 = A Thing (Sharptools)
    a. Thing: Chris (my virtual presence sensor)
    b. Command = Arrived
  3. Entry Task 2 = A Thing (Sharptools)
    a. Thing: Garage Door
    b. Command = open
    c. Restriction 1: If %PACTIVE ~ [asterisk],BMW,[asterisk] (only if I’m connected to my car’s bluetooth)
    d. Restriction 2: If %Home = false (only if I am just now arriving home, not if I was already home)
  4. Entry Task 3 = Variable Set
    a. Name: %Home
    b. To: true

Home WiFi Connected

  1. State = WiFi Connected
    a. SSID = my network name
  2. Entry Task 1 = Autolocation Location
    a. Stopping Location Monitor
    b. Update Type: No Power
  3. Entry Task 2 = Notify Cancel
    a. Title = High Accuracy Location On
  4. Exit Task 1 = Autolocation Location
    a. Starting Location Monitor
    b. Interval: 3 seconds
    c. Update Type: High Accuracy
  5. Exit Task 2 = Notify
    a. Title = High Accuracy Location On

Away

  1. State 1 = Autolocation Geofence
    a. Geofence name: Home - Departure Boundary
    b. Status: Outside
  2. State 2 = Variable Value
    a. %PACTIVE !~ [asterisk],Home WiFi Connected,[asterisk]
  3. Entry Task 1 = A Thing (Sharptools)
    a. Thing: Chris
    b. Command: Departed
  4. Entry Task 2 = Variable Set
    a. Name: %Home
    b. To: false

Device Shutdown

  1. Event = Device Shutdown
  2. Entry Task = Variable Set
    a. Name: %Rebooting
    b. To: true

I’m thinking you might be having issues with bouncing back and forth when you are at the edge of a boundary. I had this issue too. See my post above, separating the Arrival and Departure boundaries might help with this. I also have a %Home variable restriction that I forgot about that prevents my garage from opening if I’m already home and my Home profile re-activates for whatever reason.

So Tasker has its own GPS implementation. Wonder if we can make a variable that says if tasker matches autolocation then open garage.

You know…what if we make a few geofences like this. One circle gets the home boundary. That one is controlled by either tasker or autolocation. We make a second circle both are 120m and next to each other again, either a tasker or an autolocation. The third one is further away and tells autolocaton to go to fine…again…not touching the other two circles

For anyone having Autolocation inconsistencies, any chance you’re turning off Wi-Fi? The author strongly suggests that Wi-Fi be on all the time.

1 Like

My guess is that when Autolocation location monitor is off, it just uses your standard phone location service, which means that both it and Tasker (and ST app, though irrelevant to this discussion) will all say the same thing. Wouldn’t hurt to give it a shot though.

Second time trying this out , it simply does not work automatically , i have to physically press the present/not present button in the app for it to register. I looked at the autolocation logs and its all over the place as if i’m out running around in and out of my geofences when i reality i’m at home watching TV.

Anyone else having this problem ???

Phone is Samsung S7, when just using it as a presence sensor on it’s own it is a bit erratic so i thought i’d try this but it’s been a big fail for me again

For anyone having Autolocation inconsistencies, any chance you’re turning off Wi-Fi? The author strongly suggests that Wi-Fi be on all the time

Yeah, I leave mine on.

I have a Samsung S7 mine works. Mine is just having problems figuring out where it is. LOL.

Mine went off when I got to work again today and I wasn’t in any of my geofences. Which is weird.

I made a bunch of boundaries with tasker that turned the activity to stop AutoLocation to stop and this morning it was still monitoring when I got to work… I think what we need to do is tell tasker where to turn OFF the profile for home that contains the presense switches and then turn them on near home

I got an idea… I’ll post what I did in a bit… I’m at work… Look for this to be edited when I can sit in front of a keyboard… Hour or 2 from now

EDIT:

OK soooo Tasker is now full of fun extra Profiles…This is probably not the best use and I am not 100% sure it will work but on paper, it should.

So what I hope this accomplishes is to keep AutoLocation from thinking I am anywhere near the house…and if I am in ghost form near the house, the Sim-Presence hopefully will not be allowed to trigger…fingers crossed.

OK so first is to make some places that are “trip zones”. Back story, in my neighborhood, there are two ways in and out with a road that I can turn left or right on to get anywhere I want. What I want and hope to accomplish, is to tell AutoLocation, I don’t need you anymore when I pass these trip points. BUT, I need you AutoLocation when I enter my neighborhood. SOOOO to that end in Tasker I have set up 4 Profiles I call AutoLocation Off 1-4. and AutoLocation On 1-2

These are performed with fences by Tasker.

Here we go:

So the basics work like this for all of them. You make a profile based on location. So Location>New Location>This opens a world map>Tap the crosshairs icon at the top next to the X so it can find you>Grab your pin and drag it where you want. Now, here’s where it gets sketchy. You need the GPS coordinates to update. So even though you have dropped your pin where you want it, you have to click the location to set it AND MAKE SURE that it updates the GPS Coordinates in the top of the screen. You want to make how ever many you need for leaving your area. So…for me, I have the two different roads then I can go left or right. So for me, I have again 4 off and 2 on.

Once you place your pin, go back, here you need to name your location for the Offs I call them AutoLocation Off 1…etc, NEW TASK (blank), check mark.
Add an Action>Plugin>AutoLocation Here is where we want to turn off completely everything that AutoLocation does. So 1 for Activities, Geofences, and Location. You should have 3 in there for one profile.

Click the edit for each (the pencil) and turn all these monitors to STOP and go back ONLY ONCE. You will hit + every time to add something.

For Each of these that are OFF we need to add in one more safeguard
Click + > Tasker>Profile Status>Magnifying Glass and what ever profile you made that tells Sharp Tools to tell SmartThings that you are Present. Mine is called HOME>Click “HOME”. Under that Set to “OFF”. This IN THEORY…And I have tested it by manually firing the Task, will Turn off the HOME Task completely.

Now we need to turn it back on and get it to work. Remember I have only two entrances to my neighborhood so I have make a “Trip Location” that turns all this stuff ON when I get back to my neighborhood.

So Now I do the same exact steps as above but I make only TWO entrance trips because it doesn’t matter which side I am, there is only one street in on both sides of my neighborhood. This time for these two you will Start Everything and you will turn “HOME” on.

This IN THEORY should work and I have separated the Tasker App from the AutoLocation App. So if for some reason GPS freaks inside AutoLocation and says I am home, If…BIG IF…tasker doesn’t see that I have tripped the ON locations then HOME should NOT fire and my garage door should not open. It works the same as if you create a IF command in SmartThings. Which is another option. You could tell SharpTools that you want to set a mode to something that locks out the garage door or what ever you don’t want to fire.

Try also when you make these drop pins and such, try to keep your circles away or touching but not entering your other circles to make this work.

Tasker will probably look like a hot mess now with all these profiles in it and I bet there is another way to do it such as Scene but This makes it to where I can watch everything.

Take your time with your drop pins too it may not seem like it is working, but it is when you hit the crosshairs and also, take your time with those pins too paying attention to your GPS coordinates.

Hope this works!!!

Rich

Thanks let me know.

Added the edit

Tried for a 3rd time and it worked …I’ll report back after a couple of days

Nope …it’s all over the shop I arrived this morning whilst I was in bed

noticed in AutoLocation when you manage Geofences and select the about icon (top right) it mentions if you delete or re-create a Geofence with the same name then in Tasker conditions (near-home and home-location) you will have to use the “manual name” option and type in your Geofence name (home-inner and home-outer) not the “Geofence name” option.

I think this fixed mine
will test it for a few days

You sir are a Tasker wizard. I love this but like someone posted earlier. The sharptools delay seems a bit long :frowning:

I even made a tasker “close garage door” where it closes if my phone is connect to wifi and then it detects “android auto” notification … so that when I plug my phone into my cars USB it closes the garage door. Except I sit in my driveway for up to a minute sometimes before I get the “success” message. I wish there was a way to do this with CoRE as it’s response time is so much faster.

My wife has a S7 Edge and it reported her being home when we were at a friends house miles away one time. I wonder if Galaxy has a location issue?

I use tasker with CoRE to execute pistons. This has been working fairly well for me over the last few weeks. Let me know if this helps.

In tasker, I have a profile very similar to the one above that triggers when I arrive home. The action associated with the profile is “Http Get” instead of Sharptools.I use CoRE dashboard url/execute/:pistonname, to run a specific piston.

HOW TO:

  1. Create the tasker profiles as above
  2. At the steps where you have “Sharptools”, replace with a “http Get” action. Paste your CoRE URL by replacing “dashboard#” with "execute/:pistonname in “Server:Port” area. Exit out of tasker.

Your URL should look like this: https://graph-na02-useast1.api.smartthings.com/api/token/asdasd-asdasd-asdasd-sdasda/smartapps/installations/asdasd-asdasd-asdasd-sdasda/execute/virtualpresencepiston

Here - visrtualpresencepiston is the name of a “DO Piston” in the CoRe SmartApp. It turns on my Living Lights.

You can execute any piston with this method, just update the URL with the right name.

Another example: Mute TV when i get a phone call.

  1. Tasker profile triggers when I get a call.
  2. Http Get action sends the url/execute/onphone
  3. CoRE piston with name “onphone” runs which is a DO piston to mute my TV
2 Likes

Ok I’ll test this when I get home. Edited code… Pretty excited… fingers crossed! Thanks so much.