Logic Machine Forum
Event Script BUS reset - 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: Event Script BUS reset (/showthread.php?tid=2902)



Event Script BUS reset - Frank68 - 15.10.2020

Hello

I have a problem, I have created various scripts on event for the alarms that send me e-mails and SMS, but in case of bus reset all the messages leave me, how can I delay sending messages in case of bus reset?

Inside the event scripts?

BR


RE: Event Script BUS reset - admin - 15.10.2020

I'm not sure if I understand you correctly. If you want to check if object value is still the same after a short delay then you can use this script:
Code:
value = event.getvalue()

-- alarm triggered
if value == true then
  os.sleep(5)
  value = grp.getvalue(event.dst)

  -- alarm still triggered
  if value == true then
    -- do something here
  end
end