Wifi disconnect/reconnect problems

Post your questions and help other users.

Moderator: Martin

Post Reply
Econdoc
Posts: 153
Joined: 28 May 2016 20:06

Wifi disconnect/reconnect problems

Post by Econdoc » 21 Apr 2018 11:55

I have two triggers in AM, one when I connect to my home WiFi and one when I disconnect from any wifi. My phone has a nasty habit of dropping Wifi connections at home, so when at home it is not unusual for my phone to connect to home WiFi then disconnect and start the disconnect flow. The phone will then reconnect to the home Wifi and start the home flow. Disconnect…reconnect. Home flow and Disconnect flow. Eventually this will settle down, but for a while both flows will be running and changing settings that the other flow changes back.
Does anyone have a suggestion on how to manage this? I have tried various things, but nothing worked

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Wifi disconnect/reconnect problems

Post by Desmanto » 21 Apr 2018 12:15

We are facing exactly the same problem. And I solved it by using time buffer before activating the disconnect flow. Look at my wifi geofencing flow
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Econdoc
Posts: 153
Joined: 28 May 2016 20:06

Re: Wifi disconnect/reconnect problems

Post by Econdoc » 22 Apr 2018 16:21

I am giving your flow a try. Under False Branch, you have this statement. "This flow use AEP Stop" What does that mean? How and where is it implemented?

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Wifi disconnect/reconnect problems

Post by Desmanto » 22 Apr 2018 16:35

Sorry, it should be FEP, Flow Execution Policy, you can read more at my index : viewtopic.php?f=3&t=6985
You can change it at the flow, 3 dot menu > Options, pick the 4th option
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Econdoc
Posts: 153
Joined: 28 May 2016 20:06

Re: Wifi disconnect/reconnect problems

Post by Econdoc » 22 Apr 2018 18:24

The 4th option is Stop. This should be set to stop for BOTH flows? And how big AES was for the each module?
Thanks

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Wifi disconnect/reconnect problems

Post by Desmanto » 23 Apr 2018 02:04

No, Just the first wifi connect/disconnect flow need FEP - Stop. Since I have two triggers there and I want any one of them to cancel out the other. By default, no need to change the FEP if you have no specific usage such as in this flow.

Same for AES, no need to change it if you don't run into Emergency stop. Unless your wifi flapping (disconnect/reconnect) too much in 1 minute. From the true branch, it will take about 5-7 elements, while false only 2 elements (because sleep takes several minutes to complete). So at most per flapping, you need 7-9 element execution. You can have about 6-8 flapping in 1 minute, before triggering the emergency stop. (60)
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Post Reply