Automatic off timer #
Task #
Turn off a group address if it has been ON for X amount of minutes.
Scheduled script #
Create a scheduled script that runs every minute.
Change addr
and minutes
variables as needed.
addr = '1/1/1'
minutes = 50
obj = grp.find(addr)
delta = os.time() - obj.updatetime
if obj.value and delta > (minutes * 60) then
-- switch 'off' when timer expires
obj:write(false)
end