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.

did i create a loop
#1
I have a question,
it looks like i create a loop.
Now i will understand if my thoughts about this are correct, and what is the best way to solve this?


I have 1 script, that's start run by a tag 'Play_Knocks'.
Is it true, this script run in a loop, because i ask a read on the same groupadress who has the tag who start this script?
I think I can't use 'value = event.getvalue()' because, i have two different logics who can start the sounds


Code:
PIR_salvage = grp.read('14/0/58')            --this got the tag 'Play_Knocks'
Door_salvage = grp.read('14/0/57')

garden_door  = grp.read('14/0/42')
PIR_livingroom = grp.read('14/0/28')            --this got the tag 'Play_Knocks'

sound_released  = grp.read('32/1/21')


if     PIR_salvage == true
        and Door_salvage == true
        and sound_released == true
        then grp.write('32/1/22', true)    --'Play Sound Knock on Wiser'
        
elseif
        PIR_livingroom == true
        and garden_door == true
        and sound_released == true
        then grp.write('32/1/22', true)    --'Play Sound Knock on Wiser'
        
        end
Reply


Messages In This Thread
did i create a loop - by Dré - 24.03.2022, 14:45
RE: did i create a loop - by admin - 24.03.2022, 14:50
RE: did i create a loop - by Dré - 24.03.2022, 15:04
RE: did i create a loop - by admin - 24.03.2022, 15:16
RE: did i create a loop - by Dré - 24.03.2022, 16:07
RE: did i create a loop - by Dré - 26.03.2022, 10:07
RE: did i create a loop - by admin - 25.03.2022, 07:39
RE: did i create a loop - by Dré - 25.03.2022, 15:05
RE: did i create a loop - by admin - 25.03.2022, 17:44
RE: did i create a loop - by admin - 26.03.2022, 10:21
RE: did i create a loop - by Dré - 26.03.2022, 10:31

Forum Jump: