Trigger based on Polling devices within X time period

Is there a way to poll or track the state of devices within an X amount of time?

Essentially what I like to do is:

  • If motion has been detected by sensors A, B or C at any time within 15min of 12am,
  • Then turn off switch Z at 12am.
  • Else wait until front door has been unlocked, turn off switch Z

I built an If, Than, Else rule, but I think I see where it's going to quickly break. If there's no motion at 11:45, then it will immediately go to the else statement.

Thanks!

How about something like this? I used different sensors, etc., since I don't have yours. Where I have a contact sensor you'd have the lock. The ELSE clause handles the case where the sensors were triggered; the IF clause where nothing happened within 15 minutes of the start of the rule.

Here's my suggestions

Trigger Events
Sensor A, Sensor B, Sensor C an motion active - ONLY IF(Time between 11:45 PM and 12:00 AM)
OR
FD Lock is unlocked

Actions to Run
IF (FD Lock is unlocked)THEN
ELSE
    Wait for event: When time is 12:00 AM
END-IF
Off: Switch Z

OK, this seems a little odd but if lock is unlocked between 11:45 and 12:00 I'm assuming you want Switch Z off. So, if unlocked the IF-THEN does nothing but goes to the last action. Otherwise, if any sensor is active then between 11:45 and 12:00 then it waits until 12:00. I don't want the IF-THEN to work off the sensor because if a sensor is active when the door is unlocked it'll still schedule the wait.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.