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.

Set / reset circuit with timer
#7
(12.08.2020, 09:33)admin Wrote: For the timer you need a scheduled script that runs every minute. It check if the object is in ON state and sends off if the object has not been updated in 2 hour time.
Code:
obj = grp.find('0/2/7')
now = os.time() -- current timestamp in seconds
delta = now - obj.updatetime -- last object update relative time

if obj.value and delta > (2 * 60 * 60) then
  obj:write(false)
end

Sorry TS
Thank you this is exactly what i was looking for.
I will use this for occupancy detector, light go on by movement, and go to 20% dimming by no movement for 10 minutes.
But when burgely alarm is on (nobody is in the boulding) light need to turn off.
My question, is it possible to disable a 'scheduled script' by a knx object or do i have to implement it in the script?


Or is it better to open a new topic?
Reply


Messages In This Thread
Set / reset circuit with timer - by tennung - 11.08.2020, 21:30
RE: Set / reset circuit with timer - by admin - 12.08.2020, 09:33
RE: Set / reset circuit with timer - by Dré - 21.03.2021, 11:03
RE: Set / reset circuit with timer - by admin - 25.08.2020, 06:31
RE: Set / reset circuit with timer - by admin - 22.03.2021, 06:33
RE: Set / reset circuit with timer - by Dré - 22.03.2021, 13:30

Forum Jump: