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
#6
(16.08.2021, 07:39)admin Wrote: Use this:
Code:
devices = {
  { address = '1.1.1', motion = '2/1/1' },
  { address = '1.1.2', motion = '2/1/2' },
}

content = ''

for _, dev in ipairs(devices) do
  result = knxlib.ping(dev.address)
  if result == false then
    content = content .. 'Motion Detector - Address: ' .. dev.address .. ' - <b>IS OFFLINE!</b><br>'
    grp.checkwrite(dev.motion, false)
  end

  os.sleep(0.5)
end

if content ~= '' then
  res, err = mail('123456@gmail.com', 'KNX Installation Fault', content)
end

Thank you admin. Great support as always. Smile
Reply


Messages In This Thread
RE: Support Request on Lua Scripting - by manos@dynamitec - 17.08.2021, 08:59

Forum Jump: