Turn On WiFi at Home

My route to and from work is populated by open networks from cable providers that require log-in via webpages and unsecured home networks. Whenever I pass them my phone tries to connect, disconnecting me from 3G. Leaving WiFi on all the time means I'm left with constant service interruptions. forgetting to turn on WiFi at at home runs the risk of eating up my data plan. For this reason I turn off WiFi when I'm out and turn it on when I get home. But what if I forget?

With this Tasker profile, my phone now uses cell location data to turn wifi on/off.

Steps:

Turn GPS on (just for now). You don't need to keep it running all the time, but it helps to pinpoint where your location for the context step.

First, go home (the place your wifi router lives).

Profile: WiFi At Home
Context: Location > Net=On, GPS=Off, Radius 500m, Get Fix

Task: At Home
Action: Net > WiFi > On
Task (optional): Alert > Popup > Text "WiFi On"

Task: Leaving Home
Action: Net > WiFi > Off
Task (optional): Alert > Popup > Text "WiFi Off"

Get Fix locates where you currently are on a map so you need to actually be at home for this step.

You have several setting options depending on how much power consumption vs. accuracy. See [html http://tasker.dinglisch.net/userguide/en/loctears.html "Location Without Tears"]. The least accurate (Net=Off, GPS=Off) needs a really large radius. The most accurate (Net=On, GPS=On) will drain your battery faster.

I find Net=On, GPS=Off, Radius 500m to work fine. My phone knows when I'm home.

Tweaks by dragon788

I definitely like the ease of the above setup, but I have one minor change that I use. I frequently have wifi tether running when I'm away from home for my work iPad and other devices to connect to for checking email, but when I get home I have REALLY poor data coverage, so I changed the profile to disable wifi tether and then turn on wifi when I get home. Just turning on the wifi can really make wifi tether mad and has rebooted my phone spontaneously in the past.

First, go home (the place your wifi router lives).

Profile: WiFi At Home
Context: Location > Net=On, GPS=Off, Radius 500m, Get Fix

Task: At Home Tether off
Action: Plugin > Execute > Command ./data/data/com.googlecode.android.wifi.tether/bin/tether stop 1
Action: Net > WiFi > On
Task (optional): Alert > Popup > Text "WiFi On"

Task: Leaving Home
Action: Net > WiFi > Off
Task (optional): Alert > Popup > Text "WiFi Off"

I don't have it enable tethering again when I leave home as that eats a lot of battery even if I'm not actively using it, since iOS devices in particular LOVE to autoconnect and that prevents tether from sleeping. I also haven't figured out if wifi tether when launched via command prompt in tasker still has the ability to cancel tethering after a period of idle (I usually use 15 minutes) so I leave it off and launch it manually from my WidgetLocker lock screen or via an NFC tag when I want to use it.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License