Logic Machine Forum
Send LM object value to the KNX bus every hour - 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: Send LM object value to the KNX bus every hour (/showthread.php?tid=1878)



Send LM object value to the KNX bus every hour - Kai-Roger - 30.01.2019

Hi.

I have 18 temperature object values in LM that i want to send to the KNX bus every hour (to update touchpanels). What's the best way to do this ? Do i have to set up a resident script with 60 min sleep? In that case, does anyone know how this code should be written?

BR
Kai-Roger


RE: Send LM object value to the KNX bus every hour - admin - 30.01.2019

You should use a scheduled script for such large intervals. You can tag all objects that needs re-send action and use this script:

Code:
objects = grp.tag('resend')
for _, object in ipairs(objects) do
  grp.write(object.address, object.value)
  sleep(0.1)
end



RE: Send LM object value to the KNX bus every hour - Kai-Roger - 30.01.2019

(30.01.2019, 12:00)admin Wrote: You should use a scheduled script for such large intervals. You can tag all objects that needs re-send action and use this script:

Code:
objects = grp.tag('resend')
for _, object in ipairs(objects) do
 grp.write(object.address, object.value)
 sleep(0.1)
end

Thanks (: