I have been bugging SmartThings for awhile about Mobile Presence. I go through a lot of devices, and I’ve noticed on some it works flawlessly, but on others it is absolutely horrible. I have no idea why, as they all work great with other geofencing apps that just use Google Play Services (same as ST), But, rather than keep complaining I decided to use those other apps that do work fine to fix the issue. This solution also utilizes WiFi presence as a backup method.
This solution utilizes the following
Tasker Note: The only thign I am using Tasker for is to send a trigger SMS to IFTTTT because the method the Trigger app uses only compose sit, it doesn’t automatically send it. It may work differently on other phones.
Now arguably, this can actually all be done with just Tasker. I am using Trigger because it has a much more user friendlier UI and is easier to set the rules up in, it also supports Play Services Geofencing, where as Tasker does, as far as I can tell not. Also, Trigger is not a root app, and if we can find a way to use it to replace tasker then we wouldn’t need root.
Tasker could also be setup to trigger Smartthings instead of IFTTT, and would arguably be more reliable at it. I am just using IFTTTT because I had never used it before and wanted to try it out, and it is also again much more user friendly than Tasker. Also, utilizing IFTTTT would make it possible for this to work on more restricted platforms.
First you want to go into the IDE and create a virtual on/off button. Simply do the following:
*Go to ide.smartthings.com
*Go to Devices
*click “New Device”
*name it anything you like mines “Cory Mobile Presence”
*Device Network ID: N/A
*Type: On/Off Button Tile
Go into your app and create rules that change the mode to away or home based on if this switch is on, or off.
Next configure the following IFTTT recipes
Configure the following to turn the switch off when it receives an SMS signifying that you have left (again no spaces)
Next install Tasker (it is important you install it before Trigger)
next open Tasker, go to menu, Preferences, MISC, and click “Allow External Access” (This allows Trigger to run Tasker tasks)
Back out of that and go to the “Tasks” pane on the Tasker Home screen.
*Click “+” to create a new Task
*name what ever, mine is “Cory is Home”
*Click “+” on the next page
*Click “Phone” and “Send SMS”
*Fill it out to send an SMS to your IFTTT number with the hashtag you chose to signify your home (The IFTTT phone number is shown to you when you configure the recipe)
Then do the same thing for the exit presence recipe
Finally, we setup Trigger with 3 tasks.
First setup a new trigger for “Geofence” pick pick a large circle around your house.
Click next and click “+” scroll down to tasker, and pick your entry task.
Now complete the above again for your exit task.
Finally, Create a new task in Trigger that also flips the virtual mobile presence switch on when you connect to your home wifi as a final fail safe in case the above method flakes out. You could do the same to trigger you as not present when you disconnect from wifi, but this could cause issues with phones that have weak wifi, or phones that turn off wifi to save power when the screen is off…feel free to experiment with this.