Page 1 of 1

Tasker User --> Automagic Questions

Posted: 24 Jan 2018 13:13
by chrisonline
I am currently migrating my Tasker Profiles/Taks to Automagic.

The conecpt of Tasker and Automagic are a little bit different.
The main difference for me is the use of "Profiles" and the state "active"/"not active".

So I need help from some Automagic professionals how I can do this in Automagic.

Tasker triggers a Profile and this Profile have the state "active" and stays "active" as long as the "trigger/condition" is true.

In Automagic this is different because the "Flow" runs and have no "active" state.
After run of the Flow the Flow is stopped/not running or active anymore.
Also there are no "Exit Task" like in Tasker if the "Trigger/Condition" is not true anymore.

One example where I have this problem:
Profile Car --> Trigger Bluetooth connected to car
Profile Work --> Location arriving to my work address
Profile Home --> Location arriving to my home address

Because of the Tasker states "active"/"not active" I have build this rule in Tasker:
Profile Work --> Trigger "Location is my work location" AND Condition "Profile Car is not active"

So the Profile Work does not get active until my phone looses the connection to my car.
Once it looses the connection the Profile Work gets active because it will check the condition again.

How can I solve this with Automagic?

Here is my current Flows:
Flow Work --> Trigger: Arriving at my work address - Condition: Not connected to my cars bluetooth
Flow Car --> Trigger: Connected to my cars bluetooth

The same situation in Automagic behaves differently because the "Condition" of the "Flow Work" does not get checked again after my phone looses the bluetooth connection.

In Tasker the Profile gets active because the second trigger/condition "Profile Car is not active" is now true and the location is still "Work".

Re: Tasker User --> Automagic Questions

Posted: 24 Jan 2018 15:54
by StrayCat
Hi.

In Automagic you can have a profile deactivated by default and activate/deactivate/execute it from another profile.

And, in addition, with Automagic you can set multiple triggers to a profile to match many conditions.

Not long time ago I wanted to take Tasker again but returned back to Automagic just for this.

Regards.

Re: Tasker User --> Automagic Questions

Posted: 24 Jan 2018 16:54
by Desmanto
Hi Chris,

Welcome on board. I am ex tasker user too, so feel free to ask about the comparison of the different concept. :)
I have actually type a long comparison on the difference between tasker and automagic. But i still haven't finish all the screenshot yet, so can't publish yet. Here are the part of the profile vs Trigger and Condition in automagic, and about the exit task.

Profile > Event = Trigger
Profile > State = Condition
Event is Something that happen instanly, while State is something that stay in a certan condition for a period of time. You can rephrase the wording for Event = When, State = While. So something that happen for split moment such “When time reach 08:00”; will be an Event, as it we only reach 08:00 at a split moment. But “While time range 08:00 – 17:00” is a condition, since it cover a longer period of time.

This Event and State are probably the confusing part if you move from tasker to automagic. In tasker, you can create a profile with event and state together as the "Trigger". While in automagic you can only use "event" as the trigger, but "state" must be checked using condition. The concept is actually the same. Tasker simply hide what happens underhood.

For example you want something like, when phone is charged, phone is not in active call state, announce the battery percentage. In tasker this will be
Profile : State > Power > Power > Source AC
Profile : Event > Phone > Phone Idle
Task : Action > Alert > Say : %BATT

But in Automagic,
Trigger : Power Source : Connected (AC Adapter)
Condition : Call State : Idle
Action (true) : Speech Output : {battery_level}

As you can see, tasker use 2 profiles and the logic is AND. Means only when both profiles are true, then it will be executed. While in Automagic, it is the event of power connected trigger the flow. Then it will check if call state : idle, if true, then execute action speech. Automagic also has Condition Power Connected, to check state. While the trigger version check for event.

In tasker, State Power can behave like state but also can behave as event, depends on what other profile it pairs to. Other tasker profile also behave in similiar way, Application, Day, Location, Time; all of them can behave as event or state, depends on the other profile. If alone, it will behave as event. Pair with other event based, it will behave as state. Pair with other state based, it will behave as event or state, depends which one triggered first (based on power consumption). While in Automagic, the separation is very clear. Triggers always react to event, conditions always check for state. There are several triggers also have the pair in conditions (such as Power Connected above), and can be paired to create a similiar logic like in tasker. For me, I prefer Automagic for its clear distinction between event and state.
Exit Task
In each tasker profile, we can set a entry task and exit task. Exit task will be executed when the profile is evaluated not to true anymore. This is possible because some tasker event can act just like state. But some event/state will disable the exit task. Automagic doesn't have exit task, as all triggers only react to event. To create a similiar logic, we use trigger with the opposite of the entry task. So if the trigger is App Task Started, the "exit task" trigger is App Task Ended. These two triggers can be in different flow, or can be combine into single flow to behave just like tasker profile.

Now to your case. It is quite difficult sometimes to switch, because we have tasker mindset before. And we can't simply uninstall those mindset too. :( The two conditions are not actually conditions, both of them are "events"! Because you want :
- When you enter the work location (use when, not while), check for
- When disconnected from the car (also when, not while), execute all work actions.
Tasker hide these underhood as it can treat "event" as "state". While behind the scene, it also do almost similar things as explained below.

In Automagic, all triggers (which react to events) behave as OR logic. If both triggers need to be AND logic, we should create two flows. The first event that should happen first, need to enable the second flow.
In this case, you want to check the location first. Only if the location is correct (at work), then check for "event" that the phone disconnected from the car. So

Flow 1
Trigger : Location
Action : Set Flow State : Flow 2 - Enable

Flow 2
Trigger : Bluetooth Device Disconnected - Car
Action : all set of your action for work. (set to vibrate, lower volume, auto brightness, etc).
Action : after all finish, Set Flow State : Flow 2 - Disable.

Only Flow 1 need to be enabled all the time. When you arrived at somewhere else outside of office, you leave the car and disconnected, Flow 2 won't be triggered, as it is disabled. Flow 2 will be only enabled and active when you enter the location of your work. It will wait until disconnected from car, it will execute all the work related action and disable itself again.

Hope this help. If this is easy to understand, I will put these wording to my documentation at the multi trigger behaviour. If not, let me know which part is confusing.
You can also read more at my index, especially the Automagic concept part, to see more example of different concept.

Regards,
Desmanto

Re: Tasker User --> Automagic Questions

Posted: 25 Jan 2018 08:22
by chrisonline
@StryCat:
Thanks for the info.

@Desmanto:
Thanks for the detailed infos and the tip.
The missing piece was the Flow enable/disbale feature for me.

I have now solved it this way:
Flow Car --> First Trigger --> Bluetooth Trigger connected --> Action "Deactivate Flow Home and Work" and do the other stuff
Flow Car --> Second Trigger --> Bluetooth Trigger disconnected --> Action "Enable Flow Home and Work"

Now if I am in the Car and connected to bluetooth the Flows "Home and Work" are disabled.
Once I disconnect from the bluetooth of my car the "Home and Work" are again enabled and will be checked.
If I am at "Home" the Flow Home starts now!! Perfect.

Re: Tasker User --> Automagic Questions

Posted: 25 Jan 2018 14:56
by Desmanto
Oh, It seems my answer are too long and not direct :) It is the Set Flow State action that you need.
BTW, just for additional info, we also have condition to check the flow is active or not; and running or not; in condition Flow Enabled and Flow Executing.

Re: Tasker User --> Automagic Questions

Posted: 25 Jan 2018 15:23
by chrisonline
Yeah I know.
I have already solved. You have missunderstood me.

All is perfect your post was also perfect.

Thanks!