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.

Send email alert when group has been on for 5 minutes
#3
Where does one set the Execution Mode to Last Instance (I'm on a CBUS SHAC so perhaps don't have this option)?

Would the following work on the SHAC - event script name is "'Garage Door Open Too Long Notification" - script gets killed if the sensor returns to value 0


Code:
if (event.getvalue() == 255) then
  log('The garage door has been opened.')
  os.sleep(5*60)
  log('The garage door has been left open for 5 minutes.')
 
end
 
if (event.getvalue() == 0) then
  log('The garage door is closed.')
  item = script.get('Garage Door Open Too Long Notification')
  script.kill(item.id)
end
Reply


Messages In This Thread
RE: Send email alert when group has been on for 5 minutes - by jamesng - 04.04.2025, 08:41

Forum Jump: