Page 1 of 1

Blockly "wait command"

Posted: Monday 04 May 2020 16:45
by Dave21w
Is there anyway to get blockly to "wait" after performing a task before continuing

Re: Blockly "wait command"

Posted: Monday 04 May 2020 17:04
by waaren
Dave21w wrote: Monday 04 May 2020 16:45 Is there anyway to get blockly to "wait" after performing a task before continuing
I don know of any way in Blockly. Also please note that if you implement a kind of wait in any type of event script (classic Lua, dzVents or Blockly) you block the entire event system as it is single threaded. No other events can be processed by the domoticz Event system during the wait and you might even 'loose' time triggered events.

Re: Blockly "wait command"

Posted: Monday 04 May 2020 17:11
by Dave21w
OK Thanks for info, I'm trying to toggle the state of a switch continually on/off/on.... depending on the state of another switch, before I upgraded to 2020.* the blockly event i had worked fine but now it randomly stops, I suppose I should be looking at using another method but I REALLY struggle with the other scripting options.

Re: Blockly "wait command"

Posted: Friday 08 May 2020 22:42
by wouterlet
You might set a variable or dummy switch to 1 after 30 seconds in you're first Do. Then in you're elseif add variable should be 1 and your other stuff