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.

scripting knx
#15
Create a scheduled script that runs once every hour.

Use the following settings:
Minute: 0
Hour: *
Day of the month: *
Month of the year: Every month of the year
Day of the week: Every day of the week

Add your test sequence to the end of this script:
Code:
test_enabled = grp.getvalue('32/3/41')
test_freq = grp.getvalue('32/3/40')

if not test_enabled then
  return
end

key = 'prev_test_time'

curr_time = os.time()
prev_time = storage.get(key, 0)
elapsed_hours = math.round((curr_time - prev_time) / 3600)

if elapsed_hours < test_freq then
  return
end

storage.set(key, curr_time)

-- perform test sequence
Reply


Messages In This Thread
scripting knx - by ALEJANDRO - 08.04.2026, 06:28
RE: scripting knx - by admin - 08.04.2026, 06:37
RE: scripting knx - by ALEJANDRO - 08.04.2026, 14:44
RE: scripting knx - by admin - 08.04.2026, 14:47
RE: scripting knx - by ALEJANDRO - 08.04.2026, 14:59
RE: scripting knx - by AEK - 09.04.2026, 06:50
RE: scripting knx - by ALEJANDRO - 09.04.2026, 11:22
RE: scripting knx - by admin - 09.04.2026, 12:19
RE: scripting knx - by ALEJANDRO - 10.04.2026, 08:18
RE: scripting knx - by ALEJANDRO - 13.04.2026, 13:17
RE: scripting knx - by Daniel - 13.04.2026, 13:19
RE: scripting knx - by ALEJANDRO - 13.04.2026, 13:20
RE: scripting knx - by Daniel - 13.04.2026, 13:28
RE: scripting knx - by ALEJANDRO - 13.04.2026, 13:32
RE: scripting knx - by admin - Yesterday, 06:33

Forum Jump: