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.

Light scenes KNX
#9
Create a resident script with sleep time set to 0 and set the script name to light scene
Code:
step = 10
delay = 0.2

addrs = { '32/1/15', '32/1/16', '32/1/17' }

for _, addr in ipairs(addrs) do
  for value = 0, 100, step do
    grp.write(addr, value, dt.scale)
    os.sleep(delay)
  end
end

for i = #addrs, 1, -1 do
    addr = addrs[ i ]

  for value = (100 - step), 0, -step do
    grp.write(addr, value, dt.scale)
    os.sleep(delay)
  end  
end

Then you can create an event script (1-bit object) which can be used to turn the scene on and off:
Code:
value = event.getvalue()
if value then
  script.enable('light scene')
else
  script.disable('light scene')
end
Reply


Messages In This Thread
Light scenes KNX - by lf96player - 25.08.2021, 08:28
RE: Light scenes KNX - by Daniel - 25.08.2021, 08:29
RE: Light scenes KNX - by lf96player - 25.08.2021, 08:49
RE: Light scenes KNX - by admin - 25.08.2021, 09:26
RE: Light scenes KNX - by khalil - 25.08.2021, 09:36
RE: Light scenes KNX - by lf96player - 25.08.2021, 22:37
RE: Light scenes KNX - by admin - 25.08.2021, 09:39
RE: Light scenes KNX - by khalil - 25.08.2021, 09:44
RE: Light scenes KNX - by admin - 27.08.2021, 07:37
RE: Light scenes KNX - by victor.back - 12.03.2022, 21:17
RE: Light scenes KNX - by admin - 15.03.2022, 09:09

Forum Jump: