Announcement

Collapse
No announcement yet.

Polling device status after notification

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Polling device status after notification

    I have a couple Ecolink Tilt sensors, and have a notification email sent if either of the sensors status is open for 5 minutes. I would like another email sent once the sensors status returns to closed, but I'm not seeing how.

    Has anyone done something similar, that might be able to help me out?

    HS3/Raspberry PI


    #2
    Originally posted by toonr View Post
    I have a couple Ecolink Tilt sensors, and have a notification email sent if either of the sensors status is open for 5 minutes. I would like another email sent once the sensors status returns to closed, but I'm not seeing how.

    Has anyone done something similar, that might be able to help me out?

    HS3/Raspberry PI

    There are two ways you could do this. If you want to be notified whenever the door is closed then it would simply be:

    IF the door sensor changes and becomes closed
    Then send email

    I am assuming you would only want the email confirming that the door was closed after receiving the email that it has been left open for 5 minutes. For that you would need a timer.

    Below are 4 events that would do what you want. The third event could be changed to send an email more than once by changing the trigger and setting a "Cannot Re-Run For:" under the event options. I attached a screenshot for that option as well.
    1. Start the timer when the door is opened
    2. Reset the timer if door is closed before 5 minutes
    3. Send an email if door is left open for 5 minutes
    4. Send an email if door is closed after having been open for more than 5 minutes and reset the timer.
    Attached Files
    Last edited by randy; March 24, 2016, 08:45 PM.
    HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

    Comment


      #3
      Thank you!

      Comment


        #4
        Thank you

        Works perfectly! The timer stops and resets were the bits I was missing.
        The Option to not run I hadn't thought of. Thanks again!

        Comment


          #5
          Originally posted by toonr View Post
          Works perfectly! The timer stops and resets were the bits I was missing.
          The Option to not run I hadn't thought of. Thanks again!
          The "Cannot Re-Run For:" is useful and is also very important, without it you would get an email about every second after the door was open for more than 5 minutes. Something to remember any time you have an ambiguous trigger such as a "a timer's value is more than", a "counter has exceeded this" or a device "has been for at least". The counter trigger is the least dangerous because it will only trigger when the counter's value changes.
          HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

          Comment

          Working...
          X