Mail Delivery Notification

Guys, I am trying to set up a rule when someone comes to the front porch the sensor picks them up and/or the contact switch on the delivery box is activated when they open the box. Hubitat sends an email/ notification "mail Man"
The above is easy.
Problem is if its me and I go through the front door I do not want to know about the mail man as there was no mail man (or I opened the door that someone rang the bell for)
I have a contact sensor on the front door and would like to cancel the notification "mail man" if the front door was opened within say 30 sec of the porch movement sensor or delivery box activation.
Since the front door could be FIRST to trigger (when leaving the property and will open and close in the expected 30 second time frame I cannot just add a delay and check as this would not see the front door action.
Any help with creating this one line in rule machine would be really appreciated.

Could you set up a virtual switch for the front door.

Rule 1
Trigger - Front Door open
Action - Virtual switch on, wait 30 seconds, virtual switch off

Rule 2

Trigger - Mailbox open
Action - If Virtual Switch on exit rule, else do your notification actions, end-if.

1 Like

Trigger:
Mailbox Sensor Active/Open

Action:
wait X amount of seconds (to allow you to go open the door and cancel the notification)
if {front door contact sensor is open then
exit rule
else
notify on device
end-if}

I'm not sure that'll work @garz. Won't the 'if front door is open then' only be true if it is already in the open position at the precise moment that the wait ends?

If it is closed after that wait, then opens, it'll notify. If he has already opened the door and closed it again during the wait it'll still notify (I think....)

1 Like

Right, needs to be if it was opened in the last X amount of time.

Thanks Guys, I just needed that push in the right direction. I created two virtual switches mainly so I could see what is going on in a dashboard while creating this rule. I used two rules, first captured my triggers and created a timer bringing on a VIR switch, then the main rule had two IF actions. I had to put a delay on the triggers to ensure the door open came first. Maybe a little messy but it's a working model so thank you to all contributors. Johnwill1, thank you so much, I wish I asked earlier for the sake of my sanity.

1 Like

@dave10 Do you have a mail box with a lid? Perhaps a small motion or vibration sensor attached to the lid instead? Would cut down on the false positives.... Just throwing that out there...

1 Like

I use contact sensor in mailboxes

He's already got that. I think (but may be wrong) he wanted to avoid the notification being generated if he'd already been out to check the mail.

Yes, absolutely correct. I have a motion sensor AND a contact on the box lid to catch all mail deliveries. The notifications to the phone and the 4 second bell mean I will get the message soon after the event, limiting time a parcel is "porch pirate friendly" without false alarms.
After a few days I can report all is working well.

1 Like