Presets: Specifiying multiple Events in one Preset NOT WORKING

Just realized that you cannot freely combine multiple events to “activate” a provision script via Preset.

You can combine a “negated” event, but not two “random” events. For example, I would like to trigger a same provision script for two events:

  • 2 PERIODIC
  • 6 CONNECTION REQUEST

Specifying this in Events field of a Preset as “2 PERIODIC, 6 CONNECTION REQUEST”, it results in this Preset NOT getting triggered.

What you CAN do, is for example, negate an event, for example “-2 PERIODIC, 6 CONNECTION REQUEST” and Preset will be triggered when event “6 CONNECTION REQUEST” is received.

Looks like, those are “legit” events:
“2 PERIODIC”
“2 PERIODIC,4 VALUE CHANGE”
“6 CONNECTION REQUEST”

And this is NOT a “legit” event:
“2 PERIODIC, 6 CONNECTION REQUEST”

But this one is:
“-2 PERIODIC, 6 CONNECTION REQUEST”

I am still running on 1.2.8, I WAS under impression that in older version this worked… but… I could be wrong… (have currently no older version at hand to re-check).

Any comments?

Is there a way to correctly list multiple events in ONE (1) Preset on which to run a provision script?

Regards,
Robert.

I presume it uses an AND operator.

in your first example I have created two presets for the same provision, one with each event.

unless there’s something I do not know about it, like having redundant presets, it is working for me.

Yep, this is the work-around, using multiple presets for same script.

But I was asking just in case I was missing something… in case this is not working as intended…

LOL, finally re-read gitgub docs under Presets Tab · genieacs/genieacs-gui Wiki · GitHub.

Here it is:
If event names (more than one!) are specified, all must be present. To exclude an event, prepend “-” to the event name.

So, it is by design, and NO, you CAN NOT make your own combination of events under ONE preset. Exception are “negated” events… :slight_smile:

This is exactly how it works. All conditions must be met.

1 Like