sleep/delaying actions
Posted: Wednesday 04 September 2019 12:33
Hi,
I'm trying to move from bash scripts to DZVents.. One of my bash script is opening a movie screen to a specific length, but the only way I have is to send a command (to a domoticz switch, type Venetian Blinds EU) for starting "opening" the screen and then send another command to stop the opening after 12.5 seconds (not 12s, not 13s...). It does work well in bash with a sleep(12.5) command.
How could I do that in DZvents ? I saw the command like "afterSec" , but can it use decimal values ?
If the name of my device is Screen, is the best way as follows ?
Also, another quick question about the repeatAfterSec(X,Y) command: is the Y the number of occurences after the initial one, or after ?
I ask that because when I used that in a script, I used this:
and if Number=1, the button seems activated twice.. laways one more. This doesn't seem in line with what I had understood from the documentation on wiki.
br,
Ricorico94
I'm trying to move from bash scripts to DZVents.. One of my bash script is opening a movie screen to a specific length, but the only way I have is to send a command (to a domoticz switch, type Venetian Blinds EU) for starting "opening" the screen and then send another command to stop the opening after 12.5 seconds (not 12s, not 13s...). It does work well in bash with a sleep(12.5) command.
How could I do that in DZvents ? I saw the command like "afterSec" , but can it use decimal values ?
If the name of my device is Screen, is the best way as follows ?
Code: Select all
domoticz.devices('Screen').open
domoticz.devices('Screen').stop.afterSec(12.5)Also, another quick question about the repeatAfterSec(X,Y) command: is the Y the number of occurences after the initial one, or after ?
I ask that because when I used that in a script, I used this:
Code: Select all
domoticz.devices('MyButton').switchOn().repeatAfterSec(1, Number)br,
Ricorico94