Screen Off, Wifi Disabled/Screen On Wifi Enabled Manually

Post your questions and help other users.

Moderator: Martin

Post Reply
gcndubuisi
Posts: 14
Joined: 26 Jul 2016 11:45

Screen Off, Wifi Disabled/Screen On Wifi Enabled Manually

Post by gcndubuisi » 13 Jul 2017 00:03

I am presently using the flows below, from Automagic Catalog, to disable my WIFI when stored network SSID is unavailable and manually enable my WIFI when selected network is available.
WiFi automatically off, manually on to save battery
Premium | 09/08/2012
Flow 1 automatically disables the WiFi adapter when the WiFi network is disconnected for more than one minute.
Flow 2 shows a notification in the statusbar to enable the WiFi adapter again. Flow 1 enables Flow 2 when the network disconnects.

I would like to modify flow 1 to automatically disable the WIFI adapter when the screen is off for more than one minute. And flow 2 to show a notification in the statusbar to enable the WIFI adapter again, when screen is on. The WIFI stays on as long as the screen is on.
I would greatly appreciate advise on what to do. Thanks in advance.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Screen Off, Wifi Disabled/Screen On Wifi Enabled Manuall

Post by Martin » 15 Jul 2017 20:16

Hi,

You could do something like this with following flows (untested):

Flow 1
-trigger Display State: Off
-action Sleep 1m
-action Set WiFi State: Off
-action Set Flow State: Enable Flow 3
The first flow waits one minute to turn WiFi off and to show the notification to turn it on again.

Flow 2
-trigger Display State: On
-action Stop Flows: Flow 1
Flow 2 is used to interrupt Flow 1 in case you turn on the display again within one minute.

Flow 3
-trigger Notification on Statusbar Selected...
-action Set WiFi State: On
-action Set Flow State: Disable Flow 3
You could also add another trigger WiFi State Enabled to hide the notification in case you turn WiFi on using another mechanism like a quick settings tile.

Regards,
Martin

Post Reply