Flow gets disabled [solved]

Post your questions and help other users.

Moderator: Martin

Post Reply
Glatzi
Posts: 7
Joined: 31 Aug 2018 13:01

Flow gets disabled [solved]

Post by Glatzi » 07 Sep 2018 10:52

Hi there,

I'm evaluating the actual EAP 1.36.0 DEV version as a Tasker replacement & I'm quite happy how Automagic works! :D
I've got a Danalock & I've used Tasker as a replacement for the original Danalock app because the geofence function consumes quite a lot of battery juice under Oreo 8.1.

I've created a flow which checks every 30 seconds if I'm connected to a cell tower near of our house. If this is the case serveral actions are triggered.
A few variables get checked & if some conditions are true I'm sure that I'm at home & the lock can be unlocked.

The flow gets disabled by Automagic & I'm not sure why? To check that I'm near my house I'm checking if Wifi is connected. If this is not the case, I wait 2s & call the flow again.
I've already increased the actions to 600 per minute but the flow does not work correct. I've attached the flow & the log. The error only appears when the cell tower connected condition
is true.

Any help is appreciated.
Attachments
flow_Zuhause_Status_prüfen_20180907_123523.xml
(18.41 KiB) Downloaded 844 times
log_mail.txt
(27.63 KiB) Downloaded 767 times
Last edited by Glatzi on 14 Sep 2018 07:27, edited 1 time in total.

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

Re: Flow gets disabled

Post by Desmanto » 07 Sep 2018 17:20

You are using a infinite loop logic in the flow. Thus a single execution can end up with multiple copy of the running flow, exhausting the element execution per minute and reach the Automagic Emergency Stop (default 60) just within 5 seconds. Adjusting AES to 600 doesn't help, since the multiple copy will cascade fast enough to exhaust that too. When the flow is disabled already, action execute flow will result in error.

For location geofencing, you can see my flow at my index, section Geofencing. I am using wifi, but you can change it to cell tower trigger too (Phone Cell GSM/CDMA). It is better to use a event based trigger to trigger the entrance/exit state, rather than periodic timer trigger.
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.

Glatzi
Posts: 7
Joined: 31 Aug 2018 13:01

Re: Flow gets disabled

Post by Glatzi » 10 Sep 2018 06:54

Desmanto wrote:You are using a infinite loop logic in the flow. Thus a single execution can end up with multiple copy of the running flow, exhausting the element execution per minute and reach the Automagic Emergency Stop (default 60) just within 5 seconds. Adjusting AES to 600 doesn't help, since the multiple copy will cascade fast enough to exhaust that too. When the flow is disabled already, action execute flow will result in error.

For location geofencing, you can see my flow at my index, section Geofencing. I am using wifi, but you can change it to cell tower trigger too (Phone Cell GSM/CDMA). It is better to use a event based trigger to trigger the entrance/exit state, rather than periodic timer trigger.
Thanks for your reply. But there is an option in the flow that a new instance will be destroyed if already one instance is running? So in my understanding no other instance should be launched then? I'll have a look at your geofence solution too!

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

Re: Flow gets disabled

Post by Desmanto » 11 Sep 2018 10:55

Glatzi wrote: Thanks for your reply. But there is an option in the flow that a new instance will be destroyed if already one instance is running? So in my understanding no other instance should be launched then? I'll have a look at your geofence solution too!
Yes, there are several FEP option you can choose, "Stop" is the one you need if you need to "destroy" the existing instance. Look at my index, search for Flow execution policy

To loop in the same flow, don't use execute flow. Simply connect the last action in the flow back to the first action after the initializing the variable. I have a similar speech flow that require to loop in the same flow, and I reconnect the last element to the 5th action for the Input Speech; thus looping the voice command.
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.

Glatzi
Posts: 7
Joined: 31 Aug 2018 13:01

Re: Flow gets disabled [solved]

Post by Glatzi » 14 Sep 2018 07:29

Thanks for the hint. I've implemented & adapted your flow & it is working fine allthough I'm only using WLAN for the geofencing smartlock function!

yxd0018
Posts: 85
Joined: 05 Dec 2018 15:14

Re: Flow gets disabled [solved]

Post by yxd0018 » 10 Mar 2019 13:30

When your flow got disabled by emergency stop, do you get log and timestamp updated? Mine show empty log file and not sure timestamp is correct.my flow doesn't have infinite loop.

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

Re: Flow gets disabled [solved]

Post by Desmanto » 11 Mar 2019 14:43

Just tried, with AES set to 1 and execute flow with 2 elements. Flow stopped with notification "interrupting and disabling flow". Tap it will bring to the flow. Check at 3 dot menu > log > error "Emergency stop count reached, disabling flow and current flow execution", including its timestamp.
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