This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Support Request on Lua Scripting
#3
This can be optimized further by checking if the device as sent a telegram to a specific group address in the last X minutes. If it did then there's no point in checking the physical address. It's also advisable to add a small delay between each check so the bus is not overloaded.

For table iteration you can use ipairs, then the count loop is not needed (you can also use #addresses to get the table length).
Code:
for _, address in ipairs(addresses) do
  result = knxlib.ping(address)
  if result == false then
    content2 = content2 .. 'Address: ' .. address .. ' - <b>ERROR!</b><br>'
  end
end

See a similar example for the second function: https://forum.logicmachine.net/showthread.php?tid=1967
Reply


Messages In This Thread
RE: Support Request on Lua Scripting - by admin - 13.08.2021, 09:21

Forum Jump: