Pls can someone help! I’m half way through setting up and don’t have time to finish untill tomorrow, but I have a bubble that won’t go!! Result:Success!
What’s causing that? How can I get rid of it plaits so annoying!?!
joshua_lyon
(Josh, SharpTools.io Dashboard)
January 7, 2019, 8:06pm
346
It’s probably one of the tasks that is trying to set you away or home as those trigger the actual commands to set you away or home which show the toast messages by default.
From what I recall, these are triggered based on the YourName variable. If you want to just disable things until you finish, you flip the switch next to a Profile to disable it.
Just make sure to either tap the check mark in the top action bar to apply the profile changes or back out of Tasker completely to apply things.
My best guess is that the %YourName variable is not getting set to present since that’s one of the main checks before the Tasker profiles if they should try to set you as away or not. My focus would be on trying to figure out why that isn’t happening.
Edit: You should be able to check the current status of the %YourName variable from the Vars tab of Tasker.
Did you see the “YourName Variable Set” profile getting triggered in your Tasker logs? You should be able to see it in the logs, but as a debugging step you could add an Alert > Notify with a title of %st_attr_value in the “YourName Variable Set” profile – then anytime your presence sensor changes, you should get a notification showing the status of the presence sensor if the push notifications are working as expected.
You can manua…
Thanks ms for quick reply. It was Autolocation app so for now have deleted it and will sort it all out when I have time to set this all up again. Thanks again.
1 Like
Todd_Basche
(Todd Basche)
January 16, 2019, 10:45pm
348
destructure00:
In plain English
This setup consists of 3 geofences in AutoLocation, along with 6 profiles with various tasks in Tasker. AutoLocation stays disabled until I am near home. Once I am near home (when I enter a large 1500m radius location service boundary), Tasker tells AutoLocation to switch on high accuracy mode and update my location every 3 seconds. When I arrive home (enter a small 120m radius arrival boundary) , Tasker tells SharpTools to set me as Present. When I connect to my home Wifi network, Tasker tells AutoLocation to switch off high accuracy mode. As long as I stay connected to my home wifi network or I stay inside my departure boundary, I stay Present. Once I disconnect from my wifi network, Tasker tells AutoLocation to start high accuracy mode again. If I am disconnected from wifi and leave my departure boundary, SharpTools tells SmartThings to set me as Not Present. Once I leave my location service boundary, Tasker tells AutoLocation to turn off high accuracy mode.
Configuration
Create 3 Geofences in AutoLocation
a. Home - Arrival Boundary (120m radius centered on your home)
b. Home - Departure Boundary (400m radius centered on your home)
c. Home - Location Service Boundary (1500m centered on your home)
Create two variables in Tasker
a. %YourName (replace YourName with your actual name) - initialize to “present” if you are home, “not present” if you are not home
b. %Rebooting - initialize to “false”
Create two named tasks in Tasker (the rest will be anonymous and added along with the profiles)
Depart YourName
a. Action 1: Wait 5 seconds
b. Action 2: Sharptools - Thing: YourPresenceSensorName, Command: departed, If %PACTIVE !~ [asterisk],Home,[asterisk] (replace [asterisk] with actual asterisk)
c. Action 3: Wait 5 seconds, If %PACTIVE !~ [asterisk],Home,[asterisk]
d. Action 4: Perform Task, name Depart YourName (the name of this action, you are telling it to loop itself), If %YourName eq present and %PACTIVE !~ [asterisk],Home,[asterisk]
Arrive YourName
a. Action 1: Sharptools - Thing: YourPresenceSensorName, Command: arrived
b. Action 2: Wait 1 second
c. Action 3: Perform Task Arrive YourName (name of this action, you are telling it to loop itself), if %YourName eq not present
Create the 6 Tasker profiles and associated tasks
Near Home
a. State - AutoLocation - Geofence NameL Home - Location Service Boundary, Status: Inside
b. Entry Task 1: AutoLocation Location - Starting Location Monitor, Interval 3 seconds, Update Type High Accuracy, If %Rebooting eq false and %PACTIVE !~ [asterisk],Home WiFi Connected,[asterisk]
c. Entry Task 2: Notify - Title: High Accuracy Location On, If %Rebooting eq false and %PACTIVE !~ [asterisk],Home WiFi Connected,[asterisk]
d. Entry Task 3: Variable Set %Rebooting to false
e. Exit Task 1: AutoLocation Location - Stopping Location Monitor, Update Type: No Power
f. Exit Task 2: Notify Cancel - Title: High Accuracy Location On
Home WiFi Connected
a. State: Wifi Connected, SSID - enter your home Wifi network name(s)
b. Entry Task 1: AutoLocation Location - Stopping Location Monitor, Update Type: No Power
c. Entry Task 2: Notify Cancel - Title: High Accuracy Location On
d. Entry Task 3: Perform Task: Arrive YourName (this is one of the tasks you created in step 3 above)
e. Exit Task 1: AutoLocation Location - Starting Location Monitor, Interval: 3 seconds, Update Type: High Accuracy
f. Exit Task 2: Notify - Title: High Accuracy Location On
Home
a. State: AutoLocation - Geofence Name: Home - Arrival Boundary, Status: Inside
b. Entry Task: Perform Task : Arrive YourName, If %YourName eq not present
Away
a. State 1: AutoLocation - Geofence Name: Home - Departure Boundary, Status: Outside
b. State 2: Variable Value: %PACTIVE !~ [asterisk],Home WiFi Connected,[asterisk]
c. Entry Task: Perform Task Depart YourName, If %YourName eq present
Device Shutdown
a. Event: Device Shutdown
b. Entry Task: Variable Set %Rebooting to true, If %PACTIVE ~ [asterisk],Near Home,[asterisk]
YourName Variable Set
a. Event: Sharptools - Thing: YourPresenceSensorName, Attribute: presence
b. Entry Task: Variable Set %YourName to %st_attr_value
Detailed setup steps
Create a virtual presence sensor in SmartThings.
a. Open ST IDE in your browser
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.
Pasted image562×801 14.7 KB
Install all three apps on your phone. The rest of the steps below assume that you have the full paid version of the apps.
Authorize SharpTools to access your devices
a. Open App
b. Tap hamburger menu it top left corner
c. Tap Settings
d. Tap Authorize Things. This will take you to the ST IDE Login where you can tell ST which devices SharpTools can access.
IMG_20161229_114034.jpg1440×2560 154 KB
e. Once you have your presence sensor in your list of things, you need to add a subscription so Tasker knows immediately when your presence changes. Find your presence sensor in the list, long press, then select Subscribe to Presence. If your subscription is successful, you will get a little star at the top right corner of the device.
Screenshot_20170509-145406.png1440×2560 152 KB
Set AutoLocation advanced settings so you don’t leave home if you drop internet connection
a. Open the AutoLocation app
b. Go to Advanced, near the bottom of the list
c. Uncheck the Exit Geofences When Connections Lost option
d. I also unchecked Exit Geofences when toggling Geofence monitor, not sure if this is necessary but I don’t want to accidentally set myself as Not Present if I’m messing around with AutoLocation settings
e. I also checked Force Location Monitor to help Geofences…because why not? Seems like it can only help.
Set up your Geofences in AutoLocation app
a. Open App
b. Tap Manage Geofences
c. Tap + at the top of the screen
d. Find your house on the map, tap it to center the geofence on that location
e. Use either the slider on the bottom or tap the orange carrot thingy on the bottom right corner to set the radius. (I used 1500 meters for my “Home - Location Service Boundary”, 400m for my “Home - Departure Boundary”, and 120m for my “Home - Arrival Boundary”, start here and tweak it later to fit your particular needs)
f. Tap accept Geofence at the bottom and give it a name. I used Home - Location Service Boundary, Home - Departure Boundary, and Home - Arrival Boundary.
g. Repeat step 5 to set up your second and third geofences
Create your two variables in Tasker
a. From Tasker, tap the VARS tab
b. At the bottom of the screen, tap the + to add a new variable
c. After the %, type your name.
d. Repeat 6a, 6b, 6c to add your second variable, but change the name to Rebooting in step 6c
e. Tap each variable name to initialize a value. For %YourName, enter either present or not present depending on where you are, then tap the check mark to accept. For %Rebooting, enter false
Screenshot_20170509-145714.png1440×2560 106 KB
Create your first named Task in Tasker (Depart YourName)
a. From Tasker, tap the TASKS tab
b. Tap the + at the bottom of the page to add a new task
c. For New Task Name, enter Depart YourName and tap the check mark
d. Tap the + at the bottom of the screen to add a new action, then tap Task, Wait, change the value to 5 seconds, tap Back to return to the Task Edit screen
e. Tap + again, Plugin, SharpTools, A Thing, Configuration Pencil. When SharpTools opens, select Simulated Presence Sensor from the first field, select the correct sensor from the second field, departed in the third field, then tap Apply. Scroll down and tap the + next to the If to add a restriction. In the left operand, enter PACTIVE, tap the “~” operand and change it to “!~”, then enter [asterisk],Home,[asterisk] in the right operand. Tap back to accept and return to the Task Edit screen
f. Tap + again, Task, Wait, change to 5 seconds, scroll down and tap + next to If to add restriction, set to %PACTIVE !~ [asterisk],Home,[asterisk], then tap back to return to Task Edit screen
g. Tap + again, Task, Perform Task, and type Depart YourName in the name field. Scroll down, tap the + next to the If two times to add two restrictions. Set first restriction to %YourName eq present, second restriction to %PACTIVE !~ [asterisk],Home,[asterisk]. Tap back to return to the Task Edit screen, then back again to return to the main Tasks screen. Tap the check mark at the top of the screen to apply all changes
Screenshot_20170509-145733.png1440×2560 214 KB
Create your second named Task in Tasker (Arrive YourName)
a. From Tasker, tap the TASKS tab
b. Tap the + at the bottom of the page to add a new task
c. For New Task Name, enter Arrive YourName and tap the check mark
e. Tap + to add a new action, Plugin, SharpTools, A Thing, Configuration Pencil. When SharpTools opens, select Simulated Presence Sensor from the first field, select the correct sensor from the second field, arrived in the third field, then tap Apply. Tap back to accept and return to the Task Edit screen
f. Tap + again, Task, Wait, change to 1 seconds, then tap back to return to Task Edit screen
g. Tap + again, Task, Perform Task, and type Arrive YourName in the name field. Scroll down, tap the + next to the If to add a restriction. Set restriction to %YourName eq not present. Tap back to return to the Task Edit screen, then back again to return to the main Tasks screen. Tap the check mark at the top of the screen to apply all changes
2930b39332d8a274797edf8360d5f0014e9f3c6f.png1440×2560 174 KB
Create your Near Home profile
a. From Tasker, tap the PROFILES tab
b. Tap the + at the bottom of the screen to create a new profile, then State, Plugin, AutoLocation, Geofences, Configuration Pencil. Tap Geofence Name, select Home - Location Service Boundary, then tap Status, Inside. Tap the check at the top of the screen to accept, then back
c. Tap New Task, leave name blank and tap the check mark. This will take you to the Task Edit window.
d. Tap + to add a new action, Plugin, AutoLocation, Location, Configuration Pencil. Tap Location Monitor, select Start, tap Update Type, select High Accuracy, tap Interval, enter 3, tap ok. Tap the check mark at the top of the screen to accept. Scroll down to the If section, tap the + twice to add two new restrictions. Set first restriction as %Rebooting eq false, second restrictions as %PACTIVE !~ [asterisk],Home WiFi Connected,[asterisk]. Tap back to accept
e. Tap + to add a second new action, Alert, Notify. Set Title = High Accuracy Location On, add two If restrictions, Set first restriction as %Rebooting eq false, second restrictions as %PACTIVE !~ [asterisk],Home WiFi Connected,[asterisk]. Tap back to accept
f. Tap + to add a third new action, Variables, Variable Set. Name: %Rebooting, To: false. Tap back until you get back to the main Tasker screen, then tap the check mark at the top of the screen to accept changes.
g. Rename the profile - Long press on the profile name (it should be something generic like AutoLocation Geofences Geofences), tap the letter A at the top of the screen, enter Near Home, tap the check mark.
h. Add your Exit tasks - long press on the green arrow under your profile name, then tap Add Exit Task
i. Tap the + to add a new action, Plugin, AutoLocation, Location. Configuration pencil, tap Location Monitor, select Stop, tap Update Type, select No Power. Tap the check to accept, back to go go to Task Edit screen.
j. Tap + again to add a second action. Alert, Notify Cancel, title High Accuracy Location On. Tap back to accept and then again to go back to main Tasker menu
Create your Home WiFi Connected profile
a. From Tasker, tap the PROFILES tab
b. Tap the + at the bottom of the screen to create a new profile, then State, Net, Wifi Connected. Enter your WiFi SSID (you can enter multiples separated by “/”, or select from a list of currently detected networks by tapping the magnifying glass. Tap Back to accept
c. Tap New Task, leave name blank and tap the check mark. This will take you to the Task Edit window.
d. Tap + to add a new action, Plugin, AutoLocation, Location, Configuration Pencil. Tap Location Monitor, select Stop, tap Update Type, select No Power, tap ok. Tap the check mark at the top of the screen to accept. Tap back to accept
e. Tap + to add a second new action, Alert, Notify Cancel. Set Title = High Accuracy Location On. Tap back to accept
f. Tap + to add a third new action, Task, Perform Task. Name: Arrive [yourname]. Tap back until you get back to the main Tasker screen, then tap the check mark at the top of the screen to accept changes.
g. Rename the profile - Long press on the profile name (it should be something generic like Wifi Connected [ssid]), tap the letter A at the top of the screen, enter Home WiFi Connected, tap the check mark.
h. Add your Exit tasks - long press on the green arrow under your profile name, then tap Add Exit Task
i. Tap + to add a new action, Plugin, AutoLocation, Location, Configuration Pencil. Tap Location Monitor, select Start, tap Update Type, select High Accuracy, tap Interval, enter 3, tap ok. Tap the check mark at the top of the screen to accept. Tap back to accept.
j. Tap + again to add a second action. Alert, Notify, title High Accuracy Location On. Tap back to accept and then again to go back to main Tasker menu
Create your Home profile
a. From Tasker, tap the PROFILES tab
b. Tap the + at the bottom of the screen to create a new profile, then State, Plugin, AutoLocation, Geofences, Configuration Pencil. Tap Geofence Name, select Home - Arrival Boundary, then tap Status, Inside. Tap the check at the top of the screen to accept, then back
c. Tap New Task, leave name blank and tap the check mark. This will take you to the Task Edit window.
d. Tap + to add a new action, Task, Perform Task, tap magnifying glass, select Arrive [yourname] task. Tap the check mark at the top of the screen to accept. Scroll down to the If section, tap the + to add a new restriction. Set restriction as %[yourname] eq not present. Tap back to accept, then back until you get to the main Tasker screen.
e. Rename the profile - Long press on the profile name (it should be something generic like AutoLocation Geofences Geofences), tap the letter A at the top of the screen, enter Home, tap the check mark.
Create your Away profile
a. From Tasker, tap the PROFILES tab
b. Tap the + at the bottom of the screen to create a new profile, then State, Plugin, AutoLocation, Geofences, Configuration Pencil. Tap Geofence Name, select Home - Departure Boundary, then tap Status, Outside. Tap the check at the top of the screen to accept, then back
c. Tap New Task, leave name blank and tap the check mark. This will take you to the Task Edit window.
d. Tap + to add a new action, Task, Perform Task, tap magnifying glass, select Depart [yourname] task. Tap the check mark at the top of the screen to accept. Scroll down to the If section, tap the + to add a new restriction. Set restriction as %[yourname] eq present. Tap back to accept, then back until you get to the main Tasker screen.
e. Rename the profile - Long press on the profile name (it should be something generic like AutoLocation Geofences Geofences), tap the letter A at the top of the screen, enter Away, tap the check mark.
f. Add your second profile state: Long-press on the AutoLocation state under the Away task, tap +, tap State, Variables, Variable value, set to %PACTIVE !~ [asterisk],Home WiFi Connected,[asterisk]. Tap back to accept
Screenshot_20170602-100754.png1440×2560 173 KB
Create your Device Shutdown profile
a. From Tasker, tap the PROFILES tab
b. Tap the + at the bottom of the screen to create a new profile, then Event, System, Device Shutdown. Tap back
c. Tap New Task, leave name blank and tap the check mark. This will take you to the Task Edit window.
d. Tap + to add a new action, Variables, Variable Set, Name %Rebooting to true. Scroll down to the If section, tap the + to add a new restriction. Set restriction as %PACTIVE ~ [asterisk],Near Home,[asterisk]. Tap back until you get to the main Tasker screen.
e. Rename the profile - Long press on the profile name, tap the letter A at the top of the screen, enter Device Shutdown, tap the check mark.
Create your YourName Variable Set profile
a. From Tasker, tap the PROFILES tab
b. Tap the + at the bottom of the screen to create a new profile, then Event, Plugin, SharpTools, Thing State, Configuration Pencil. Enter Thing: [your presence sensor name], Attribute: presence, then tap Apply, then back
c. Tap New Task, leave name blank and tap the check mark. This will take you to the Task Edit window.
d. Tap + to add a new action, Variables, Variable Set, set %[yourname] to %st_attr_value. Tap back to accept, then back until you get to the main Tasker screen.
e. Rename the profile - Long press on the profile name, tap the letter A at the top of the screen, enter [yourname] Variable Set, tap the check mark.
Now that you have 6 new profiles, you may not want them all to show in your notifications tray. You can disable this by long-pressing on the profile name, tapping settings, then unchecking the Show in Notification Pulldown box. I did this for all of my profiles except Home.
IMG_20161229_120152.jpg1440×2560 178 KB
IMG_20161229_120052.jpg1440×2560 183 KB
WOW this looks like you really addressed the core issues and running locally on the android phone seems way better than going up ti iftt.
Is this still working as a bulletproof solution, its alot of work so I want to ask before I go down your detailed instructions.
ANy updates or updated instructions. ??
Thanks for the very detailed analysis of the problem and a complete solution design.
QUESTION :
WHy use all the geolocation and geo fencing, ? why not just check say every 15 minutes if your phone is ON your home network and if it is , say PRESENT, and if its not say AWAY.
Thats really all you need for the home to away transition. Is the geo fencing for the away to home arrival ?
Todd_Basche:
QUESTION :
WHy use all the geolocation and geo fencing, ? why not just check say every 15 minutes if your phone is ON your home network and if it is , say PRESENT, and if its not say AWAY.
Thats really all you need for the home to away transition. Is the geo fencing for the away to home arrival ?
The geo fencing is for quick changes to present/away. My siren would be blaring if I didn’t set my presence to Present right when I arrived in the driveway.
For me this has been a real good solution. I am on Android 8.0 though, I do not have experience with it on 8.1 or 9.
1 Like
viguera
(Amauri Viguera)
January 16, 2019, 11:02pm
350
Todd_Basche:
WHy use all the geolocation and geo fencing, ? why not just check say every 15 minutes if your phone is ON your home network and if it is , say PRESENT, and if its not say AWAY.
Thats really all you need for the home to away transition. Is the geo fencing for the away to home arrival ?
Man… You really, really didn’t need to quote that whole post…
With that said, the transition helps IMO, especially when combined with more sensors or presence indicators. Tracking the reboot / connected to WiFi also helps for those times when there are network hiccups or your phone reboots out of the blue.
My setup varies a lot, but I’ve had success with this using a virtual sensor, mobile presence and WebCore. That way I can safely ignore quick changes of a single sensor as hiccups when they go away, or safely assume that presence is correct when they both match.
2 Likes
dkbishop
(dkbishop1@comcast.net)
July 28, 2019, 9:45pm
353
This seems to work really well, when its done right by a novice such as myself lol
I have all the bits in place it seems at last, however i notice that tasker has 3 profiles running at the same time when I am home and connected to wifi. Near Home, Home Wifi Connected (which should be the only one running IIRC), and Home. Is this normal?
Presence detection is done HORRIBLY by smartthings and I just want to say how much i appreciate this working substitution, regardless of the trial and error!
I started using IFTTT to make sure my phone automatically to wifi when I get home if thats relevant in any way.
Any help is very much appreciated!
@destructure00
I’ve been running this setup for some time and it works great. When arriving home in the inner fence my garage door will open within a half a street block but when I leave my wifi to go somewhere it takes about 3 blocks before everything kicks in and closes my garage. Is there a way to narrow that down? If I narrow the fence down that would help my departure but hurt my arrival.
flyize
(TOO FLY FOR A FLY GUY)
August 27, 2019, 2:07pm
355
Can you just set it to close the garage door when you disconnect from wifi?
Dan_Carter
(Dan Carter)
August 27, 2019, 8:02pm
356
What I’m trying to do is have my phone disconnect from my wifi almost as soon as I pull out of my driveway, so that my taks will run. It works great upon arrival but it takes just a little longer when leaving.
destructure00:
Scroll down and tap the + next to the If to add a restriction. In the left operand, enter PACTIVE, tap the “~” operand and change it to “!~”, then enter [asterisk], Home,[asterisk] in the right operand. Tap back to accept and return to the Task Edit screen
Hi Thanks for the excellent instructions.
I have setup everything until here. However, i am stuck now.
Tasker does not provide a field for for tap the “~” operand , it says Equal to, etc.
Can anyone help, please?
Regards
joshua_lyon
(Josh, SharpTools.io Dashboard)
September 5, 2019, 12:26pm
358
!~
is equivalent to "Doesn't match"
Thanks very much for your help.
1 Like
Hi Thanks everone for your help.
I have created everything as explained and the the moment am home so haven"t been able to check the Away Profile.
At the moment Tasker shows 3 Profiles Active: Near Home, Home and Home Wifi Connected. Is it expected to behave like this?
I will check the Away profile tomorrow when i go out tomorrow.
Also at home it is showing me a annoying Toast message “Result : Success!”, is there anyway of removing this?
Please advise.
Regards
MRobi
(Mike)
September 11, 2019, 7:17pm
361
Yes that behavior is expected. Near Home and Home are both showing active because you are inside those geofenced areas. And WiFi connected is self explanatory.
I don’t believe there’s a way to get rid of the “Result: Success!” message, but you’re only noticing it because you’re in testing right now. Odds are good your phone will be in your pocket/cup holder/not in your hand when it displays the message. When I was using tasker for presence I would only notice it once or twice a month.
joshua_lyon
(Josh, SharpTools.io Dashboard)
September 11, 2019, 7:26pm
362
If it’s constantly showing the toast then it means a step was missed or misconfigured and one of the tasks is looping.
Thanks for your message.
I have double-checked everything but can’t find the fault-
Can you guide me some troubleshooting points or to break the script into sections for testing.
Please advise.
Hello,
I’m having issues with this working sporadically. It seems to work a lot better when I’m arriving home than when I’m leaving. I’m curious if there’s a recommendation for the Tasker named tasks setting with collision handling and if this is part of the problem.
When I manually run the tasks they do work, so I’m assuming it’s got to be an issue with autolocation dying in the background?
I’m on Android 10.
diehllane
(Brian Diehl)
October 6, 2019, 2:24pm
365
Make sure they aren’t being hit by Battery Optimization in your settings.
1 Like