Automatically switch off WiFi if there is no connection for a certain period of time.
This Tasker recipe is to automate the switching off of your WiFi setting when there are no WiFi connection for a period of time. Basically there are 2 profile to set. The first profile to provide a variable to flag if the WiFi is connected or not. The 2nd profile is to start the timer when WiFi is disconnected. After a given period of time if the WiFi does not reconnect, WiFi will be switched off.
I created this Tasker recipe to save some battery on my Samsung Galaxy Nexus when the WiFi is on but no connection.
Note: you cannot import this file into Tasker. Use this as a guide to create your own profiles.
Check if WiFi is connected
Profile: Check if WiFi is connected
State: Wifi Connected [ SSID:* MAC:* IP:* ]
Enter: Anon
State: Wifi Connected [ SSID:* MAC:* IP:* ]
Enter: Anon
<Set the variable to flag for WiFi connection>
A1: Variable Set [ Name:%Wificonn To:On Do Maths:Off Append:Off ]
A1: Variable Set [ Name:%Wificonn To:On Do Maths:Off Append:Off ]
Exit: Anon
<Set the variable to flag for no WiFi connection>
A1: Variable Set [ Name:%Wificonn To:Off Do Maths:Off Append:Off ]
A1: Variable Set [ Name:%Wificonn To:Off Do Maths:Off Append:Off ]
WiFi timer
Profile: WiFi timer
State: Variable Value [ Name:%WIFI Op:Matches Value:on ]
State: Not Wifi Connected [ SSID:* MAC:* IP:* ]
Enter: Anon
State: Variable Value [ Name:%WIFI Op:Matches Value:on ]
State: Not Wifi Connected [ SSID:* MAC:* IP:* ]
Enter: Anon
<This is how much time to wait for WiFi reconnection. Change the period to your liking>
A1: Wait [ MS:0 Seconds:59 Minutes:0 Hours:0 Days:0 ]
<Check if WiFi still connected. Sometimes WiFi connection drops and may reconnect.>
A2: WiFi [ Set:Off ] If [ %Wificonn ~ Off ]
A1: Wait [ MS:0 Seconds:59 Minutes:0 Hours:0 Days:0 ]
<Check if WiFi still connected. Sometimes WiFi connection drops and may reconnect.>
A2: WiFi [ Set:Off ] If [ %Wificonn ~ Off ]
Exit: Anon
<this is for the exit task to totally switch off WiFi>
A1: WiFi [ Set:Off ] If [ %Wificonn ~ Off ]
<this is for the exit task to totally switch off WiFi>
A1: WiFi [ Set:Off ] If [ %Wificonn ~ Off ]
These instructions are not very well written for someone who has just installed tasker. There should be a few more details in the steps. Similar to this: http://tasker.wikidot.com/autosyncwifionly
ReplyDeleteHowever, the wikidot does not have the steps to turn off WiFi after x amount of time, which would be nice to have.