LogicMachine Forum
Script with updatable off-delay - Printable Version

+- LogicMachine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: Script with updatable off-delay (/showthread.php?tid=6241)



Script with updatable off-delay - klaus407 - 07.01.2026

Good evening

I'm totally new to scripting, and this is my first post.
I have made a little script to trigger a KNX GA in function of two conditions, with an off-delay of 180s. If a new "true" telegram arrives before the 180s are over, I want the delay to start again. I have searched but didn't find an answer.
This is the script so far:

Code:
value_1 = grp.getvalue ('2/0/4')
value_2 = grp.getvalue ('2/0/6')

if value_1 == true and value_2 == true then
    grp.write ('2/0/7', true)
  elseif value_1 == false or value_2 == false then
  os.sleep(180)
  grp.write ('2/0/7', false)
  end
Thanks in advance
Klaus


RE: Script with updatable off-delay - Daniel - 08.01.2026

Event script has execution mode, set it to last instance only.