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.

not working script with timer
#6
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
Code:
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
BR
------------------------------
Ctrl+F5
Reply


Messages In This Thread
not working script with timer - by AlexLV - 24.04.2018, 18:15
RE: not working script with timer - by admin - 25.04.2018, 06:40
RE: not working script with timer - by AlexLV - 25.04.2018, 14:48
RE: not working script with timer - by admin - 25.04.2018, 15:13
RE: not working script with timer - by AlexLV - 25.04.2018, 15:21
RE: not working script with timer - by Daniel - 25.04.2018, 15:36
RE: not working script with timer - by AlexLV - 25.04.2018, 16:22

Forum Jump: