Logic Machine Forum
If Window = 1 then - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: If Window = 1 then (/showthread.php?tid=1928)



If Window = 1 then - lenze90 - 22.02.2019

Hi Guys, 

I don't get it with eventbased script. I want to trigger only when the KNX object is set to 1. But it is not triggered when it is set to 0. I can't find a way to do this in the settings. 

If window is opened (not if it is closed) and front door is opened, then xyz....

Can you helf me with this configuration? 

Thanks 
Lenze


RE: If Window = 1 then - Daniel - 22.02.2019

Hi
Tag your door and window object and then create event based script triggered by this tag then make script like that

Code:
window = grp.getvalue('window object')
door = grp.getvalue('door object')


if (window and door) then
 --dosomething()
end



RE: If Window = 1 then - lenze90 - 22.02.2019

(22.02.2019, 14:52)Daniel. Wrote: Hi
Tag your door and window object and then create event based script triggered by this tag then make script like that

Code:
window = grp.getvalue('window object')
door = grp.getvalue('door object')


if (window and door) then
 --dosomething()
end


thank you Daniel for your quick feedback. 

I just wonder which KNX group address I use for the trigger? 

so the trigger would also start the script when the door is closed. But the If does not execute anything. 

Is this the basic procedure with the logic machine?


RE: If Window = 1 then - Daniel - 22.02.2019

(22.02.2019, 14:58)lenze90 Wrote:
(22.02.2019, 14:52)Daniel. Wrote: Hi
Tag your door and window object and then create event based script triggered by this tag then make script like that

Code:
window = grp.getvalue('window object')
door = grp.getvalue('door object')


if (window and door) then
 --dosomething()
end


thank you Daniel for your quick feedback. 

I just wonder which KNX group address I use for the trigger? 

so the trigger would also start the script when the door is closed. But the If does not execute anything. 

Is this the basic procedure with the logic machine?
Not KNX group only the TAG I asked you to create. This way script will run each time when window or the door group will receive telegram.


RE: If Window = 1 then - lenze90 - 22.02.2019

but I have to specify a group address when I create an event script? Or what do you mean by TAG?


RE: If Window = 1 then - Daniel - 22.02.2019

Do it like that
https://www.screencast.com/t/O92BvSwo2


RE: If Window = 1 then - lenze90 - 22.02.2019

(22.02.2019, 16:21)Daniel. Wrote: Do it like that
https://www.screencast.com/t/O92BvSwo2


Daniel. Thank you so much! :-)


RE: If Window = 1 then - gtsamis - 22.02.2019

(22.02.2019, 16:21)Daniel. Wrote: Do it like that
https://www.screencast.com/t/O92BvSwo2


You nailed it  Big Grin