One trigger fires twice?

hendis

Member
Hi, eveyone! I'm running MD Pro on Android 12.

I'm seeing something strange here that I've never seen before. I have one macro that has one trigger. When the trigger fires, it causes what appears to be two simultaneous invocations of the macro. I will end up with two entries in the user log, and two separate instances of the macro in the system log. I could be wrong, but that doesn't seem to be right.

If this behavior is a feature and not a bug, I'd like to arrange things so that I only get one notification and one instance of the macro running. Unfortunately, I don't think I quite know how to do this. So, any ideas are welcome. I have already tried using a variable, and also a "macro not invoked" constraint. Ultimately, neither worked.

As always, thanks in advance to anyone who can weigh in on this situation.

hendis
 

dhj49er

Well-known member
Hi, eveyone! I'm running MD Pro on Android 12.

I'm seeing something strange here that I've never seen before. I have one macro that has one trigger. When the trigger fires, it causes what appears to be two simultaneous invocations of the macro. I will end up with two entries in the user log, and two separate instances of the macro in the system log. I could be wrong, but that doesn't seem to be right.

If this behavior is a feature and not a bug, I'd like to arrange things so that I only get one notification and one instance of the macro running. Unfortunately, I don't think I quite know how to do this. So, any ideas are welcome. I have already tried using a variable, and also a "macro not invoked" constraint. Ultimately, neither worked.

As always, thanks in advance to anyone who can weigh in on this situation.

hendis
What do you mean by two simultaneous invocations of the macro?
In the system log:-
Is there 1 or 2 triggers?
Is each invocation separate from the other or are the actions from the 2 invocations interleaved?

On a few triggers I have had a macro run twice in quick succession. If this is your case, add a constraint to the trigger not invoked this macro with time of 1 or 2 seconds. This will prevent the trigger from firing a second time.
 

MacroDroidDev

Administrator
Staff member
This is very light on specific details, but typically you should certainly not see a double invocation of any trigger. However in some cases your phone may actually broadcast two identical events and MacroDroid simply reacts to them as they come in. This can be quite common for Notifications where a single notification can actually create 2 or more broadcast events.

The easiest solution to avoid such situations is the one suggest be @dhj49er and add a macro last invoked constraint.
 
Top