scripitng - 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: scripitng (/showthread.php?tid=5809) |
scripitng - mariosp - 30.12.2024 Good evening, I would like your help about a event base script. My client wants the lights to flash quickly (turn on and off) whenever a zone is breached. Can someone assist me? RE: scripitng - buuuudzik - 30.12.2024 (30.12.2024, 12:42)mariosp Wrote: Good evening, I would like your help about a event base script. Could you clarify what you mean by “quickly”? How many zones are there? How many can be breached simultaneously? The best solution is using sequencers in KNX modules, which can be triggered by a boolean object. If you plan to send many commands simultaneously over the TP bus, it could, of course, negatively impact the bus’s performance. However, if we are talking about a few zones, sometimes controlled simultaneously, a good solution would be: an event-based script that reacts to a change in the status of a given zone, checks if any zone is active, and then activates/deactivates a resident script. This script toggles the lighting in the respective zone and waits for a set time before toggling again. It could be a good start: Create objects with such names: Light sequence_1_status with tag light_sequencer Light sequence_1_cmd for light control Number 1 is an index of your zone. Of course you can change this name but you need to tweak also the script to use another pattern. Event script run on tag "light_sequencer": Code: if toboolean(event.getvalue()) then Resident script 0s with a name "Light sequencer": Code: if not initialized then |