![]() |
Conference room with 2 partition walls - 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: Conference room with 2 partition walls (/showthread.php?tid=3362) |
Conference room with 2 partition walls - AndersH - 11.05.2021 I have a conference room with 2 separation walls, one wall someone solved in the forum here but 2 walls ? I took this from the FB Editor in my Wiser for KNX: require('custom.fbeditor20.Control') Switch_room_1 = grp.getvalue('32/1/1') Switch_room_2 = grp.getvalue('32/1/2') Switch_room_3 = grp.getvalue('32/1/3') Partition_wall_1 = grp.getvalue('32/1/7') Partition_wall_2 = grp.getvalue('32/1/8') room1, room2, room3 = fbe_partition_wall_control(Switch_room_1, Switch_room_2, Switch_room_3, Partition_wall_1, Partition_wall_2, 'fb__Test_Vikv__gg__fbe_partition_wall_control__id') if room1 ~= nil then grp.write('32/1/4', room1) end if room2 ~= nil then grp.write('32/1/5', room2) end if room3 ~= nil then grp.write('32/1/6', room3) end It looks like it´s working with 1bit protocol, but how can it be changed to work with 4bit dim or 1byte protocol, and if i simulate that both walls are open it seems that if i use switch 1 for on, i can´t use switch 2 or 3 for off... How could i make this work ? //A RE: Conference room with 2 partition walls - admin - 11.05.2021 There used to be a universal script but I can't find it. Here's a working solution for any data type. Tag all input objects with the same tag and add an event script to it. Change group addresses as needed. You might need to remove two "not" statements before grp.getvalue depending on how open/closed status works. Right now it assumed that true means that the wall is closed. Code: inputs = { '32/1/1', '32/1/2', '32/1/3' } RE: Conference room with 2 partition walls - AndersH - 11.05.2021 Works Very Well.... ![]() Thank You very much for the help... ![]() RE: Conference room with 2 partition walls - mitja.perko - 04.04.2022 Hello, how could one adapt this code to work with 5 partitions? Greetings Mitja RE: Conference room with 2 partition walls - admin - 05.04.2022 Here's a universal solution that should work for any number of partition walls. Modify group addresses in the inputs, sensors and outputs tables as needed. All input objects should have a common tag to which this event script is attached. Code: inputs = { |