21.03.2021, 11:03
(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?