Page 1 of 1

Exit type task

Posted: 20 Jul 2015 18:23
by ewill
I am a noob with Automagic (have used tasker for quite a while).

I have a question with an "exit" type task. I know that Automagic does not have exit type tasks in the same way that tasker does.

I have an action that I would execute based upon at least one trigger being active. For example, I would like to disable the lockscreen if any of the following exist:
-One of several wifi addresses
-Car Mode active (value of a variable)
-Meeting in progress (based upon meeting topic)

When any of these become active, I run an action to disable the lockscreen.

Then when none of the trigger conditions are active, I want to run an action to enable the lockscreen.

My question is, what is the best way to determine when none of the triggers are active and then to run my enable lockscreen action. I would prefer not to have to set up a "negative mirror" of all my triggers - are there any other strategies?

Thank you for your assistance.

Re: Exit type task

Posted: 20 Jul 2015 18:38
by Martin
Hi,

You can add three triggers to execute a flow when one of the conditions becomes false.
Another strategy would be to create a flow that checks the three conditions with AND-like connection and execute some actions when all conditions are true but executes some other actions when one of the conditions is false. You can then execute this flow either periodically or when one of the triggers indicates a change in one of the settings.

Regards,
Martin

Re: Exit type task

Posted: 20 Jul 2015 19:05
by ewill
Thank you for the quick response.

It would seem to me that the second alternative would be easier, I would have a single flow to manage (I hope I am correct).

I am trying to understand what you mean by the second. If I have an and like connection, would it trigger an action immediately if one if the items changes? Is there an example of this that I can learn from.

Thanks again,

Evan

Re: Exit type task

Posted: 20 Jul 2015 19:35
by Martin
Hi,

An example could look like this:

Code: Select all

-trigger 'Perdiodic Timer: every 1m (allow device sleep)'
-condition 'WiFI Connected: x,y,z'
--> true: -condition 'Calendar Event: All'
    --> true: -action 'Set Lock PIN/Password: Clear'
    --> false: -action 'Set Lock PIN/Password: Set PIN 1234'
--> false: -action 'Set Lock PIN/Password: Set PIN 1234'
The flow would be executed once every minute and check the two conditions. When both conditions are true, the PIN is cleared. When one of the conditions is false, the PIN is set. The approach with the periodic timer is especially useful when something changes that can not be detected with a trigger but it can cause battery drain if you don't allow the device to sleep.

You could optimize this by replacing the trigger with WiFI Connected: All, WiFI Disconnected: All and Calendar Event: at start and at end. You still have to add a trigger for all events that potentially change the outcome of the condition checks but the triggers can be configure much broader.

Regards,
Martin

Re: Exit type task

Posted: 20 Jul 2015 20:09
by kintrupf
You could try the "SmartUnlock" suite of flows from http://automagic4android.com/forum/view ... f=3&t=3435.
They do exactly what you want with the lockscreen and offer a lot more unlocking states.
However, the SmartLock suite is quite complex and consist of over 40 flows, so it might be difficult to find something ;)

Re: Exit type task

Posted: 20 Jul 2015 20:25
by ewill
Thank you very much. I will try your suggestions.

Re: Exit type task

Posted: 20 Jul 2015 21:24
by ewill
kintrupf wrote:You could try the "SmartUnlock" suite of flows from http://automagic4android.com/forum/view ... f=3&t=3435.
They do exactly what you want with the lockscreen and offer a lot more unlocking states.
However, the SmartLock suite is quite complex and consist of over 40 flows, so it might be difficult to find something ;)
Thank you for your suggestion - and I also saw that flow.

I also noticed that the smart unlock will never actually unlock the phone.

I was wondering whether it would be possible for me to change the flows so that it would actually unlock the phone? I apologize if my request is out of line.

Re: Exit type task

Posted: 21 Jul 2015 06:29
by kintrupf
ewill wrote:
kintrupf wrote: I also noticed that the smart unlock will never actually unlock the phone.

I was wondering whether it would be possible for me to change the flows so that it would actually unlock the phone? I apologize if my request is out of line.
That is intentionally! If the phone would unlock itself someone could steal your phone and just drive to your house and the phone could unlock itself if, for example, a location trigger is set for SmartUnlock.
SmartUnlock is desinged so that you have to unlock your phone less often. So, for example, if you move from home (WiFi) in your car (Bluetooth) to work (Location) your phone stays unlocked.
But of course it might be possible to change that...