LogicMachine Forum
Script Loop - Printable Version

+- LogicMachine 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: Script Loop (/showthread.php?tid=6521)



Script Loop - vladmci - 24.07.2026

I installed the LM APK on a display and connected it to the LogicMachine. I have run into a major problem.
I have three DALI LED luminaires with short addresses A0, A1, and A2. The corresponding KNX switch object addresses are 1/1/1, 1/1/4, and 1/1/7.
I created a virtual KNX object 32/1/1 and attached the following event script to it:
Code:
value = event.getvalue() grp.write('1/1/1', value) grp.write('1/1/4', value) grp.write('1/1/7', value)
In the visualization, I created a standard On/Off control using 32/1/1 as both the Control and Status object.
When I operate this control, it causes complete chaos on the DALI bus. It appears that the event script is executed dozens of times instead of just once. The ON/OFF commands are continuously sent to the three DALI luminaires and they never stop. The only time the commands stop is when the DALI bus eventually seems to lock up.
Have you seen this behavior before?


RE: Script Loop - Daniel - 24.07.2026

You clearly have some loop there and it should not be linked to dali at all. Log the objects also the 32/1/1 and see what is triggering it. In a meantime change the grp.write to grp.checkwrite


RE: Script Loop - vladmci - 24.07.2026

the 32/1/1 is triggered by the visu control. But I verified the event script attached to it from the script window with "run script". In log and error log windows I have nothing. In DALI cockpit-monitor I have the "flood". Also you ca see that the command is sent two times per each iteration. I made a real "installation" for the test. The 32/1/1 group hat the scrip for several luminaries
the script is:

local value = event.getvalue()

grp.checkwrite('1/1/130', value)
grp.checkwrite('1/1/52', value)
grp.checkwrite('1/1/133', value)
grp.checkwrite('1/1/142', value)
grp.checkwrite('1/1/46', value)
grp.checkwrite('1/1/4', value)
grp.checkwrite('1/1/76', value)
grp.checkwrite('1/1/121', value)



DALI log:

DALI16 DAP 5c fe A46 DIRECT ARC POWER 254 (100%) 14:42:52.431 07/24/26
DALI16 DAP 5c fe A46 DIRECT ARC POWER 254 (100%) 14:42:52.465 07/24/26
DALI16 DAP 54 fe A42 DIRECT ARC POWER 254 (100%) 14:42:52.502 07/24/26
DALI16 DAP 1e fe A15 DIRECT ARC POWER 254 (100%) 14:42:52.532 07/24/26
DALI16 DAP 1e fe A15 DIRECT ARC POWER 254 (100%) 14:42:52.569 07/24/26
DALI16 DAP 22 fe A17 DIRECT ARC POWER 254 (100%) 14:42:52.599 07/24/26
DALI16 DAP 02 fe A1 DIRECT ARC POWER 254 (100%) 14:42:52.633 07/24/26
DALI16 DAP 02 fe A1 DIRECT ARC POWER 254 (100%) 14:42:52.667 07/24/26
DALI16 DAP 22 fe A17 DIRECT ARC POWER 254 (100%) 14:42:52.700 07/24/26
DALI16 DAP 30 fe A24 DIRECT ARC POWER 254 (100%) 14:42:52.734 07/24/26
DALI16 DAP 30 fe A24 DIRECT ARC POWER 254 (100%) 14:42:52.768 07/24/26
DALI16 DAP 4e fe A39 DIRECT ARC POWER 254 (100%) 14:42:52.801 07/24/26
DALI16 DAP 4e fe A39 DIRECT ARC POWER 254 (100%) 14:42:52.835 07/24/26
DALI16 DAP 56 fe A43 DIRECT ARC POWER 254 (100%) 14:42:52.868 07/24/26
DALI16 DAP 56 fe A43 DIRECT ARC POWER 254 (100%) 14:42:52.902 07/24/26
DALI16 DAP 54 fe A42 DIRECT ARC POWER 254 (100%) 14:42:52.936 07/24/26
DALI16 DAP 5c fe A46 DIRECT ARC POWER 254 (100%) 14:42:52.969 07/24/26
DALI16 DAP 5c fe A46 DIRECT ARC POWER 254 (100%) 14:42:53.003 07/24/26
DALI16 DAP 54 fe A42 DIRECT ARC POWER 254 (100%) 14:42:53.036 07/24/26
DALI16 DAP 1e fe A15 DIRECT ARC POWER 254 (100%) 14:42:53.070 07/24/26
DALI16 DAP 1e fe A15 DIRECT ARC POWER 254 (100%) 14:42:53.104 07/24/26
DALI16 DAP 22 fe A17 DIRECT ARC POWER 254 (100%) 14:42:53.137 07/24/26
DALI16 DAP 02 fe A1 DIRECT ARC POWER 254 (100%) 14:42:53.171 07/24/26
DALI16 DAP 02 fe A1 DIRECT ARC POWER 254 (100%) 14:42:53.205 07/24/26
DALI16 DAP 22 fe A17 DIRECT ARC POWER 254 (100%) 14:42:53.237 07/24/26
DALI16 DAP 30 fe A24 DIRECT ARC POWER 254 (100%) 14:42:53.270 07/24/26
DALI16 DAP 30 fe A24 DIRECT ARC POWER 254 (100%) 14:42:53.304 07/24/26
DALI16 DAP 4e fe A39 DIRECT ARC POWER 254 (100%) 14:42:53.337 07/24/26
DALI16 DAP 4e fe A39 DIRECT ARC POWER 254 (100%) 14:42:53.371 07/24/26
DALI16 DAP 56 fe A43 DIRECT ARC POWER 254 (100%) 14:42:53.404 07/24/26
DALI16 DAP 56 fe A43 DIRECT ARC POWER 254 (100%) 14:42:53.438 07/24/26
DALI16 DAP 5c fe A46 DIRECT ARC POWER 254 (100%) 14:42:53.472 07/24/26
DALI16 DAP 5c fe A46 DIRECT ARC POWER 254 (100%) 14:42:53.505 07/24/26


RE: Script Loop - Daniel - 24.07.2026

To debug it go to object tab, select log on relevant objects. Trigger the script from visu and drop screenshot from Object logs tab.