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

Trigger and action cards with eventname for Advanced Flows.

Very lightweight app for adding multiple triggers with tags on a single flow, by adding a event name.
The flow can be triggered using optional arguments.
Just create a trigger (When), type the name and select it, then select it in the actioncard (Then).
You can also create an actioncard (Then) first, type and select a name, and then select it in the trigger (When).
(sometimes you will need to save the flow before the name becomes available in the cards.)

Triggers can be overloadable, meaning, you can select and trigger a When card with 10 arguments from a Then card with just 1 argument.

Click here for an in-depth explaination of the Debounce function.
Debounce can be set on triggers (When cards): meaning you can manage how many times and in what way flows get executed within a certain periode.

  • Execute last one waiting after each [number of] ms.
  • Execute at start, then allow execution after each [number of] ms.
  • Execute at start, then allow execution after each [number of] ms, finish with last one waiting.

(Please note the extra delays during testing in Advanced Flows.)

These cards execute almost instantly, as suppose to the default Start-A-Flow cards half a second delay.

If you have any suggestions for the App, just let me know!

If you like the app, please leave a rating in the Store: Advanced Triggers App voor Homey | Homey


Apps:

Donations or Sponsorship

1 Like

Version 1.3.1 is Live.
Advanced Triggers - Live Version | Homey

Added Debounce to triggers!

Debounce can be set on triggers (When cards): meaning you can manage how many times and in what way flows get executed within a certain periode.

  • Execute last one waiting after each [number of] ms.
  • Execute at start, then allow execution after each [number of] ms.
  • Execute at start, then allow execution after each [number of] ms, finish with last one waiting.





Version 1.2.3 is Live.
Advanced Triggers - Live Version | Homey

You can now also enter a name into the actioncard (Then) and then select it in the triggercard (When).

4 new trigger- and actioncards have been addded:

  • With optional 1 text, 1 number and 1 yes/no
  • With optional 3 texts, 3 numbers and 3 yes/no’s
  • With optional 5 texts, 5 numbers and 5 yes/no’s
  • With optional 10 texts, 10 numbers and 10 yes/no’s

Added overloading to the Triggers. Meaning, you can select and trigger a When card with 10 arguments from a Then card with just 1 argument.



Attention: Version 1.1.0 has the original 1.0.0 cards deprecated, for improved future development.
If you have the first version triggercard, the new 1-argument-per-type card will not show the original triggercard.
Just replace the triggercard with the new triggercard.

1 Like

Debounce explained in-depth

Here we will explain the purpose, functioning-of and how-to use the Advanced Triggers Debounce functionality.

Purpose

Debounce let’s you put limits on how many times a certain event, in this case a trigger, gets executed.

Debounce is used a lott for limiting the retrieving of results from input, for example, a textbox that shows a list based on the value typed.
Usually, a textbox like that, or a filter textbox, don’t refresh the results (selectlist for example) on every key pressed on the keyboard.
Mostly the have a simple debounce of f.i. 300 milliseconds.
Meaning that, when you start to type, it will only ask the results every 300ms with the, then, last value.

So, let’s say you enter a word of 10 characters (lets use characters as example). If you type that word in 400ms, it will request the results/list twice: once after 300ms, with f.i. “charact” and again after 400ms now with the full word “characters”.

This helps to save a lott of resources and not bottle-neck your whole system by requesting useless results that are no longer needed.
The results for “c”, “ch”, “cha”, “char”, etc, are not needed.

Functioning-of

Advanced Triggers’ Debounce has three options:

  • Execute last one waiting after each [number of] ms.
    This one is used in the example in the Purpose section.
    After each [number of] ms, the flow will get executed with the last requested trigger and tokens.

  • Execute at start, then allow execution after each [number of] ms.
    As soon as a trigger gets requested to execute, it will.
    But all next requests to the trigger are not executed, if the are requested within the [number of] ms.
    Only after that amount of time can the trigger be requested and will it executed again, once, to then block again for that amount of time.

  • Execute at start, then allow execution after each [number of] ms, finish with last one waiting.
    The same as above, but after the [number of] ms, if (a) trigger(s) was requested within that amount of time, it will, after that amount of time, execute the last one waiting.
    This means that, you can’t/shouldn’t use the Start [event] flowcards sequential for these kind of debounce triggers.
    All trigger requests within in the blocked time, will be put on hold.
    Only after another trigger is requested, will another on-hold be returned as not-executed.
    Or, after the [number of] ms has elapsed, will the last one (the only one waiting, because the rest before it get’s dropped) be executed.

How-to use

In the Share Your Device! templates, i have placed an example on how-to use the debounce with an AVD.
In the The Flow Exchange(r) templates, i have also placed a Debounce Example.

Here is the basic idea:

When you execute this in the FlowEditor(!), you will see: Test 1, Test 2, Test 5 and Test 6.

----- to be continued ----

Last one reserved.

Hi Arie, nice initiative. Does it differ from Event Bus?

Its easier to use in Advanced Flows and it creates dropdowns for easier use.
But most important, it allows all argumenttypes, so it can be used for loops within flows for easier variables-in-scope assignment without the need for the use of Logic Variables.
Especially the use of upto 10x3 arguments can be usefull.

Also, it has Debounce.

And i plan to add more to it.

1 Like

Very helpfull!
Thanks!
Will definately use this when I rebuild my wakeup light flows (snoozing) into advanced ones.

Where can i donwload it ?
Its not in de app store Homey
or i want it to fast :wink:

It is: :slight_smile:

1 Like

Thank you. I searched with the search bar but it didn’t come up. Also searched by different names.

Maybe search in the app store is periodically indexed?

Hi Arie, I would like to optionally pass more than one variable of a type. For example 10 text, number, boolean.

What do you think?

Hi Arie.

It might be a stupid question - But could you show some examples. I’m not sure I understand the way it work - Where do you define the triggers.

Sorry if it’s a stupid question - but would love to have multible arguments to my flows.

An example of what I need.

I’m working on a generic log flow that logs and raises notifications, right now i send a string to the flow and then do a javascript split to have multible arguments into the flow. Can this app do the same ?

Exactly, that is a usecase for my feature request:

Working on it right now.

2 Likes

But Joka- Can you give me an example how to use it now - I don’t know what you pass to the WHEN parameter.

image

I’m honest, I see the potential of the app but for these usecases I use the flow+variables cards of advanced flows right now. But with the option to pass more than one variables of a type (multiple variables) it is much more powerful.

As I understand it works like that:
In the then card you define a trigger (name) and the variables (tags) + values you want to use.
In the when card you can use these triggers and the values as tags in the following then cards.

1 Like

Thanks a mill. Couldn’t find the “key” to use it :slight_smile:

Hey @Joka, @Jens.Hummelmose and @Peter_Kawa,

The App is updated, and 1.1.0 is available for testing.
I have added 3 triggercards and actioncards: one with 1 argument of each type, one with 5 of each and 10 of each type.
I have deprecated the original first trigger- and actioncard, for future development. So the 1-argument-per-type-cards are new.

(This is the link to the Test version.)

3 Likes

Hi Arie, works for like charm and thx for the lightspeed implementation of multitype!

One question from a user point of view. Doesn’t it make more sense to define the trigger itself in the when card as in the then card. And use the browser of the trigger-name in the when card. Because I start with the when card and I know at this point the type of variable/value, so it would be nice if I’m able to fill in the trigger/name there.

Found a bug:

image

when card, click trigger-name, select the empty browser field, the trigger field will disappear.