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
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