25.04.2018, 15:36
Hi
Do it like that.
Resident script with interval as you want. This will decide how fast it will switch on and off from receiving false
BR
Do it like that.
Resident script with interval as you want. This will decide how fast it will switch on and off from receiving false
Code:
1234567891011121314
addr = '0/2/1'
addrVent1 = '6/0/1'
addrVent2 = '6/0/2'
timer = 600
-----------------------------------------------
obj = grp.find(addr)
delta = os.time() - obj.updatetime
if obj and not obj.data and delta < timer then
grp.checkwrite(addrVent1, true)
grp.checkwrite(addrVent2, true)
elseif obj and not obj.data and delta >= timer then
grp.checkwrite(addrVent1, false)
grp.checkwrite(addrVent2, false)
end
------------------------------
Ctrl+F5
Ctrl+F5