How to ignore flow when wifi is set ON by user

Post your questions and help other users.

Moderator: Martin

garet
Posts: 13
Joined: 20 Jan 2015 12:48

How to ignore flow when wifi is set ON by user

Post by garet » 20 Jan 2015 12:54

Hello,
It is my first post here. I tried to find an answer to my question but with no success.
I have created a flow regarding wifi. Is there a way to ignore this flow when I have manually set Wifi to ON?
For example: I set wifi to close after 23:00. If I open Wifi manually at 23:05, it will close after 5' following the flow. How can I prevent it?
Thanks!!

kamil_w
Posts: 50
Joined: 22 Oct 2013 19:01

Re: How to ignore flow when wifi is set ON by user

Post by kamil_w » 20 Jan 2015 17:50

You can use global variables.

Action script
condition expression

garet
Posts: 13
Joined: 20 Jan 2015 12:48

Re: How to ignore flow when wifi is set ON by user

Post by garet » 21 Jan 2015 00:11

thanks but I did not understand :shock:

User avatar
MURTUMA
Posts: 697
Joined: 05 Mar 2013 22:43

Re: How to ignore flow when wifi is set ON by user

Post by MURTUMA » 21 Jan 2015 04:34

There's a few possible ways to do that, which depends on your flow. Please, post it here so we can find the most feasible solution.

User avatar
TheBrain1984
Posts: 137
Joined: 07 Aug 2013 08:17
Location: Germany

Re: How to ignore flow when wifi is set ON by user

Post by TheBrain1984 » 21 Jan 2015 06:54

I'll send a few flows that should help in the flow sharing area


garet
Posts: 13
Joined: 20 Jan 2015 12:48

Re: How to ignore flow when wifi is set ON by user

Post by garet » 21 Jan 2015 15:04

@ MURTUMA
I attach my 3 flows. Basically what I need is to find a way to avoid these flows from executing if I activate BT (or MobileData or WiFi) myself. When I shut down BT (or MobileData or WiFi) I want Automagic to assume control and continue controlling the functions

@ TheBrain1984
I selected the link you provide and it imported 3 flows to my Automagic. Also I see (in the Automagic/Widgets page) a widget (Wifi). I don't know what to do with it :(
I'm a total newbie :?
Attachments
flow_WiFi_20150121_153731.xml
(5.52 KiB) Downloaded 818 times
flow_MobileData_copy_20150121_153718.xml
(9.33 KiB) Downloaded 824 times
flow_Bluetooth_copy_20150121_153658.xml
(9.25 KiB) Downloaded 767 times

User avatar
TheBrain1984
Posts: 137
Joined: 07 Aug 2013 08:17
Location: Germany

Re: How to ignore flow when wifi is set ON by user

Post by TheBrain1984 » 21 Jan 2015 15:15

You can place the widget on one of your screens where all the other Android Widgets are (just try to add a new widget). Your phone should ask you from which App the widget should come and you select Automagic. Automagic give you the option of two diffrent kinds of widgets. I don't know the wording in english but it should be something similar to "AM own widget" you choose this one. A popup with all in Automagic self-created widget comes up and you can choose one (in you case that should be just the one you imported). Et voila, the widget is on your screen and you can use it like I discribed it in the flow sharing area.

garet
Posts: 13
Joined: 20 Jan 2015 12:48

Re: How to ignore flow when wifi is set ON by user

Post by garet » 21 Jan 2015 16:35

I installed the widget. When I press it, the color (red/green) changes. However, nothing else happens. WiFi is still controlled by my flow. I can understand this because wifi starts within 5' regardless the color (red/green)

User avatar
TheBrain1984
Posts: 137
Joined: 07 Aug 2013 08:17
Location: Germany

Re: How to ignore flow when wifi is set ON by user

Post by TheBrain1984 » 21 Jan 2015 17:34

garet wrote:I installed the widget. When I press it, the color (red/green) changes. However, nothing else happens. WiFi is still controlled by my flow. I can understand this because wifi starts within 5' regardless the color (red/green)
Did you changed the action that switches your WiFi on/off? Because you have to replace this action with an action that is called "script". In that action is a text-area. You have to put in

Code: Select all

global_set_wlan = 1
to switch it on and

Code: Select all

global_set_wlan = 0
to switch it off.

The WiFi module has a trigger that starts the "module"-flow when the var "global_set_wlan" changes and switch WiFi on or off, but only if the var "global_lock_wlan" is 0 and you change the value of "global_lock_wlan" by pressing the widget.
You also need to initialize a var named "global_low" with a value of 0 (or below). I set this var in my flows to 1 or above if my energy gets lower than 15% and in that case the global_low var don't let you switch on the WiFi (with the WiFi module)

Post Reply