This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Script with updatable off-delay
#1
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
Reply


Messages In This Thread
Script with updatable off-delay - by klaus407 - 07.01.2026, 21:16

Forum Jump: