Trigger with Constraint

JA-Translator

Moderator
Anyone, could you give me a logical explanation?

My understanding is:

A Trigger with a Constant can be fired only when the constraint meets a requirement (condition).

See the sample screenshot.

In my understanding,
when I enable Wifi during WiFi is disabled, the Trigger should be fired.

However, Actually,
The case is different against what I expected.

Only case 1 works successfully.
Case 2 doesn't happen.

Why is that so?
I am a little confused.


Screenshot_20230328_035344.png

I am fine with either one, but
I just want to have a reasonable answer that I can understand (be convinced).

I am using
Version 5.32.4 Beta
 
Last edited:

Endercraft

Moderator (& bug finder :D)
I think the explanation is that the WiFi enabled trigger triggers when WiFi is fully enabled, hence... WiFi is enabled 😀
The second case just contradicts itself. Imagine it like rolling a dice, and :
When the given number is 4, if the given number is 2 then uninstall MacroDroid. Except
When the given number is 4
is the WiFi enabled trigger,
if the given number is 2
is the WiFi disabled constraint, and
then uninstall MacroDroid (never ever do that 😢)
is your popup action.

I think you can see the problem here.
 

Dm114

Well-known member
Anyone, could you give me a logical explanation?

My understanding is:

A Trigger with a Constant can be fired only when the constraint meets a requirement (condition).

See the sample screenshot.

In my understanding,
when I enable Wifi during WiFi is disabled, the Trigger should be fired.

However, Actually,
The case is different against what I expected.

Only case 1 works successfully.
Case 2 doesn't happen.

Why is that so?
I am a little confused.


View attachment 5065

I am fine with either one, but
I just want to have a reasonable answer that I can understand (be convinced).

I am using
Version 5.32.4 Beta
Endercraft's explanation is right: when Wifi trigger fires, Wifi is already in the state decribed by the trigger (On or Off).
 

JA-Translator

Moderator
@Endercraft
> the WiFi enabled trigger triggers when WiFi is fully enabled

Yes, I understand.
The dice story... Sorry i can't be so sure.
Anyway, now I understand.
😁

@Dm114
> Wifi is already in the state

That's very clear. "State"!
:D

You guys, Thank you for your help.
All clear.


What I understand is:

Many Events are happening and MD detects the Wifi event and takes it as a trigger, then run the macro (the Trigger is fired).
At the time when MD received the event, the WIFI state is already enabled, which meets the constraint.

I am feeling fresh!
(y)🌟🌈
 

OscariBot

Active member
To me I think the very simple explanation to this is that Macrodroid give priority to your trigger first before checking for constrain else the opposite will happen.

I just decided to review the system log to see what actually happened.
 

dhj49er

Well-known member
I realise the OP was probably using WiFi enable as an example of his uncertainty regarding constraints on triggers.
However, I thought the following might be useful, perhaps to newer users of MD.
I use wifi enable as an action, never as a trigger.
I use WiFi connected and WiFi disconnected as triggers.
There is usually at least a few seconds delay from enabling WiFi to WiFi connecting. I have found that different phones have taken from 2 secs to 10 sec to connect.
This is time that MD can use to execute more actions!
Moving in and out of WiFi coverage happens frequently eg entering or leaving home or work and I believe the macros handling these events need to run efficiently.
 
Top