Tasker has a nice option build in to check for locations. I found, that this method was not very reliable when no GPS was activated. Here I want to present an idea of location checks only with GSM cell info, no internet connection, WiFi or GPS needed. In my opinion it is the most energy conserving method possible.
Create a new profile, name it
Home GSM for example. As the trigger select
State ->
Phone ->
Cell Near. Press scan and take a walk inside you domesticity. Take your time, your phone scans for near GSM cells and measures there signal strength, this information is used to triangulate your position. When you think you are done, go back and create a new Task, name it
Home On. Inside of it set a new variable %HOME to 1. Exit the newly created profile and add en exit task, name it
Home Off and set the global variable %HOME to 0. You are done. Your profile should look like this:
Profile: Home GSM
State: Cell Near [ Cell Tower / Last Signal:
GSM:1234.56789 / 0
GSM:1234.57719 / 2
Ignore Cells:* ]
Enter: Home On
A1: Variable Set [ Name:%HOME To:1 Do Maths:Off Append:Off ]
Exit: Home Off
A1: Variable Set [ Name:%HOME To:0 Do Maths:Off Append:Off ]
Now we create a second profile, this one will check whether you are home for sure. Create a profile
Check Home, it should be activated when the variable %HOME is set to 1. Create a new task, name it
Check Home, inside of it place a wait for 1 or 2 minutes. After that place an if clause and check, whether the variable %HOME is still set to 1. If so, you are probably at home! To be even more sure, place another wait for 1 minute and afterwards another
if to check if the cells near you match the pattern at your home. Make sure to set the
collision handling of the task to
Abort new Task and the
cool down time to, lets say, 120 seconds in the
Task Properties. Your finished task could look like this:
Profile: Check Home
Priority: 5 CoolDown: 120
Event: Variable Set [ Variable:%HOME Value:1 ]
Enter: Check Home
A1: Wait [ MS:0 Seconds:0 Minutes:1 Hours:0 Days:0 ]
A2: If [ %HOME ~ 1 ]
A3: Variable Set [ Name:%OUTSIDE To:0 Do Maths:Off Append:Off ]
A4: Notify Sound [ Title:Home sweet home! Text: Icon:ipack:iconedenthemeshd:twitter_8 Number:0 Sound File:/system/media/audio/notifications/S_Knock.ogg Priority:3 ]
A5: Perform Task [ Name:WiFi On Stop:Off Priority:5 Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: ]
A6: Perform Task [ Name:LOG write Stop:Off Priority:5 Parameter 1 (%par1):Home Parameter 2 (%par2): Return Value Variable: ]
A7: Mobile Data [ Set:Off ]
A8: Ringer Volume [ Level:5 Display:Off Sound:Off ]
A9: Variable Query [ Title:Start PC? Variable:%pcstart Input Type:Numeric / Integer Default:3665 Background Image:Pictures/Wallpaper/hi_tech_texture-wallpaper-1920x1200.jpg Layout:Question Yes No Timeout (Seconds):60 Show Over Keyguard:On ] If [ %WIFII ~R MyHomeWiFiSSID ]
A10: If [ %pcstart ~ 3665 ]
A11: WoL Wake On Lan Wan Settings[ Configuration:Home Package:com.benfinnigan.wol Name:WoL Wake On Lan Wan Settings]
A12: End If
A3: End If
As you can see I placed various other tasks I want to be run when I come home inside the if clause. For example I get asked to turn my computer on. I used the free app
Wol Wake on Lan Wan from Brobble to do this, as it offers a Tasker plugin. In my actual
Check home profile I placed all the got-home-goodness in a separate task I call within the
Check home task. This way I can place a 15 minutes
wait before asking about booting the computer without interfering with the original
Check home task.
To learn more about Wake-On-Lan Packages and how you can use them to turn your computer on remotely please read one of the numerous guides on the internet, for example the short and nice guide
HowTo Wake-On-Lan from Brobble and the very good article
Access Your Computer Anytime and Save Energy with Wake-on-LAN on lifehacker from Adam Pash.
I hope some of you find this location check method useful and improve there android experience with this trick :) What tasks do you run automatically when you come home? Leave your ideas in the comments!