Hi, I was wondering if anyone can help. I know this is simple but I can't seem to get my head around what I need in this rule. So I want TTS to Alexa which tells me when someone walks up my driveway using an outside motion sensor. If my front door is open, then I don't want the TTS to sound (contact sensor on the door). So that's no problem. With a basic IF THEN with motion being the trigger. (IF door closed THEN TTS)
However, whilst the door is open I don't want the TTS to sound when the motion sensor continually senses the movement on the driveway. Once again, no problem, it won't because the above IF isn't TRUE.
So ideally I want the rule to only begin working again, when the front door closes and when the folks have left my drive (so a delay on the trigger somehow) or, after x minutes assuming the door was never opened. This is the bit I'm struggling with because as soon as I close my door and motion is detected I get TTS telling me there's motion on the drive from the folks who are leaving or from my wife loading her car.
I'm not sure I can give a complete solution. But one thing that I have done that might be useful in this situation is a virtual switch set to turn off after a certain amount of time.
In my situation I have a temp sensor for the freezer in the garage that notifies me if the freezer gets too warm. But I didn't want to get spammed with notifications every time the freezer temp changes. So the first time the rule runs after the freezer gets too warm, it turns on a virtual switch. That switch is set to turn off after 1 hour using the Basic Rules app.
The rule checks the status of that switch to determine whether or not to send the notification. If the switch if off, the notification sends and then the switch is turned on. If it's already on then it doesn't. That way I only get 1 notification per hour max.
This is the relevant part of the rule.
Thanks for this @mark.cockcroft I understand your example, but as soon as my door closes and my sensor senses motion again, then i think I may get TTS straight away again. After the door closes, I want x time to pass by before the motion triggers the rule. Could you offer any thoughts?
However I don't want the elapsed time to occur on first sensor activation when the door is closed.
Also if the door is never opened, then I don't want any elapsed times, I just want TTS immediately.
Else (if closed )
Delay 1 min
Repeat
Wait for event motion active
TTS
Delay 1 min (buffer to prevent same person setting it off twice on way in and out)
End repeat
End if
You could probably drop trigger of motion as the repeat resets
Now thinks looks like it's on the money @mark.cockcroft . Really appreciate your assistance on this one. I'll keep you posted on progress. Cheers in adavnce
Hi, please see copy of my attached rule which now works perfectly with a 4 minute delay when the door is closed. The trigger is the door changing. Please note, I've temporarily used pushover and Hubitat for notifications just to see if one outperforms the other.