ok. then i understood the documentation wrong.. so sorter delay will cancel all longer delays...
and indeed i can see that this is working in a test script.
My origional problem appears to be something else...
First i tought the issue is with decimals... afterSec(2.5). But that is indeed also working fine.
even a chain like afterSec(2.2) | afterSec(2.7) | afterSec(3.1) or something like that works in my test setup.
i found that my silent() is not working. I have a blinds (roller shutter) dummy device. A dummy switch. And 2 dzvents scripts. first script is triggered by dummy switch. Second script is triggered by the blinds.
script for dummy switch looks like below. The other script is more complex, but if it is executed it conflicts with the dummy switch script. That is fine, but it should not be executed... For testing purpose i removed evrything inside that complex script and only place a log at the top of that script. Looks like the silent() is not respected. because that log statement is executed.
I also tried to place the silent after the afterSec() statement. same issue.
Code: Select all
return {
on = {
devices = {
"SwitchTest"
}
},
logging = {
level = domoticz.LOG_DEBUG
},
execute = function(domoticz, device)
local rollerShutter = domoticz.devices("RollerShutter")
rollerShutter.setLevel(1).silent().afterSec(1)
rollerShutter.setLevel(2).silent().afterSec(3.1)
rollerShutter.setLevel(3).silent().afterSec(3.6)
rollerShutter.setLevel(4).silent().afterSec(4.2)
rollerShutter.setLevel(5).silent().afterSec(4.7)
rollerShutter.setLevel(10).silent().afterSec(9.5)
rollerShutter.setLevel(20).silent().afterSec(20)
end
}
Code: Select all
return {
on = {
devices = {
"RollerShutter"
}
},
logging = {
level = domoticz.LOG_DEBUG
},
execute = function(domoticz, device)
domoticz.log("This script should not have been triggerd by dummy switch (script)");
end
}