Blockly "wait command"

Moderator: leecollings

Post Reply
Dave21w
Posts: 399
Joined: Sunday 29 November 2015 21:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: UK
Contact:

Blockly "wait command"

Post by Dave21w »

Is there anyway to get blockly to "wait" after performing a task before continuing
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Blockly "wait command"

Post 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.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Dave21w
Posts: 399
Joined: Sunday 29 November 2015 21:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: UK
Contact:

Re: Blockly "wait command"

Post 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.
wouterlet
Posts: 109
Joined: Tuesday 02 October 2018 20:52
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Blockly "wait command"

Post 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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest