What is the order of runing provision scripts?
Let’s assume that I have three presets with three different provision scripts for ‘1 BOOT’ event. Each of these scripts looks like:
log("Script (#1/2/3)")
There aren’t any preconditions filters set.
Do they start same time (well almost same time)?
Is there a way to run one script after other? I thought that weights in presets can be used for it, but this post (How to run 2 provisions - #3 by akcoder) clarified that.
I must admit the weight documentation is lacking and I never been sure exactly of how it work but akcoder is probably one of the most credible member of this forum so is statement is probably right. https://docs.genieacs.com/en/latest/provisions.html
Her what Zaid once wrote me if it can help.
As for weight, presets with higher weight value takes precedence over presets with lower values.
Not to sound conceited, but there is no probably about it . Weight on presets is used to handle conflicts with competing changes. This information comes straight from @zaidka.
To the best of my knowledge, there is no way out of the box to accomplish running script 1, then 2, then 3. You can use tags and preset filters to accomplish this though.
It’s easier to manage small scripts, than one large script with many conditions. I’ve tried approach with tags and preset filters, and i’ve come to problem, that on one inform / event by CPE, many scripts from presets are started while imo only one should.