[APP][Pro] Advanced Triggers - Trigger and action cards with eventname for Advanced Flows

Haha, it was not there before, i just implemented it.

Hey Arie, I have no clue what the differences are. It’s too techy :wink:
No hurries!

Just try it with logging and timers, you’ll understand beter :stuck_out_tongue:

  • Execute last one waiting after each [number of] ms.
    Set ms to 2000.
    Start one now, then after 1000, then after 3000.
    Only 2 and 3 will run.
  • Execute at start, then allow execution after each [number of] ms.
    Set ms to 2000.
    Start one now, then after 1000.
    Only 1 will run.
  • Execute at start, then allow execution after each [number of] ms, finish with last one waiting.
    Set ms to 2000.
    Start one now, then after 1000, then after 3000.
    Only 1 and 3 will run.

It is different here for 1 and 3

No
t1 runs, t2 after 2s, t4 after 4s, t5 after 6s, t6 after 8s

OK, only t1 runs.
But why? Why does it do “then after 1000”, and not after 2000? B/c NEXT execution is after 2000? But there is no next execution? … to many Buts Arie.

No,
t1 runs, t2 after 2s, t4 after 4s, t5 after 6s, t6 after 8s

If you have theflowcards in sequence, not if you have them paralel.

If you have flowcards in a row, the one’s that fail (don’t execute) also wait that amount of time before they fail.

Please take a look at the example that i have set for this: Debounce Example

Use this flow to understand how you could use Debounce.

No, it will execute the first one as soon as it gets triggered, and then “close all incomming” triggers, only to open up the possibility to trigger again after 2000ms.

And the next debounce function does the same, only it will make sure that the last incomming trigger always gets triggered.
This could be very handy for not overloading the Set Status Text cards of DC-AVD.
Using the “Execute at start, then allow execution after each [number of] ms, finish with last one waiting.” and setting it to 5000ms for instance, would mean you can just constantly fire the trigger with text, but only really change the status text every 5seconds, always showing the last.

Wait i’ll make an example for it…

____EDIT

@Peter_Kawa Here: Debounce Example for Status Indicator Text Update every 3 seconds

1 Like

There might be a bug, hang on :wink:

Would it be possible to have an option to let a new trigger wait until the current has finished the flow? Like a resource lock.
I have a flow I start with a text and a type to send messages to my phone. If it is triggered from 2 different events at the same time ony one of the messages will be sent.

Yes, this is what debounce is all about.

But let me resolve a bug first, then i will continue the example (message 3 on this topic).
Then, if you have questions, i’ll help you!

Debounce is to not have the flow started too often.
I want all triggers to start the flow, but if a trigger is fired while the flow (triggered by advanced trigger) it must be placed in queue until the currently triggered flow has finished.

Okay, Version 1.4.5 is now live, it fiexes the Debounce option2: Execute at start, then allow execution after each [number of] ms.
It owuld only fire one time and wait for twice the [number of] ms before letting something in, but every time it was beofre the elapse of the first [number of] ms, it owuld reset.
So fire to fast and nothing got fired, except the first!

This is now resolved.

1 Like

Then i don’t get what you mean with the above: Could you share your flow?
Because, why would (if you don’t use debounce) the flow not get executed twice?

Is it Advanced Triggers? If so, that would be a bug i guess.

Please share your flow

It is not a bug, I just asked if this was possible to implement.
I do not have a flow to share.

Example:
Say you have two flows.
Flow1 encapsulates sending a push notis.
Flow2 turns on a surveillance camera and if this fails it calls flow1 with the text “Camera on failed”.
Flow3 is called when temperature in fridge is above -15 and calls flow1 with text “Fridge temp high”.

If flow2 fails simultaniously when flow3 triggers you will have two calls to flow1 more or less simultaniously. If this happens only one of the texts is sent, the last one, as the push-notis card doesn’t have any resource lock.

If you have many flows with call to flow1 this will every now and then happen.

This is where I came to tink of your advanced-trigger app. If flow1 is triggered by this it would be nice with a possibility to enable “resource lock” instead of debounce.

Not sure if it is possible, just a thought.

Hey Gregow,

Yeah, i understand what you want: parallel execution of the Start event cards, but the Triggercards should be fired sequential.

Right? if so, yeah this can be done, sure! This was a very big part of HOOP for which Advanced Triggers is a partial replacement!

Just hang on, i have got some other work to attend to, then i’ll add a “Sequencial Mode”.

Exactly so. Nice!

Is it possible to wait until flow/start-card is finished before executing next trigger in queue?

Did you by any change had H.O.O.P. (Hope) - Homey Object Oriented Programming - Apps - Homey Community Forum before?

Nope, did not.
But a while ago there was a app handling resource lock, but it was not good enough.

Ah, okay.
Well, almost done, just a moment. Testing.

Lol, one more moment. Good thing i tested well…

1 Like