Door Vibration sensor alert (Door Knocks)

Hi All,
Although i have a working door bell it seems many delivery people still prefer to knock.
I am going to add a vibration sensor to my front door which i want to feed into my existing door bell notifications. However i want to avoid this trigger if door just opened or closed. I already have contact sensor on the door so what i think i want is.
Vibration sensor activated → Contact sensor unchanged for 3 seconds before and 2 seconds after->alert
i have the vibration sensor on event state node as the start (possibly this is wrong already). But what would i use for the contact sensor check? Its basically unchanged for 5 seconds but including before the first “event state node” which i am unclear how to do?

Many thanks for any pointers.

It’s hard to guess what your sequence looks like but i would probably use a trigger node to stop/block incoming events from knock sensor.

Been playing with these for a while and come up with;
Vibration sensor true for 3 seconds.
Then if door contact is false (closed) send notification.

It captures a knock (and post being delivered which is added unintentional bonus) and is about 90% reliable. However sometimes it still triggers if the door is opened as well. Any ideas how to stop it completely on contact sensor also?

image

I would guess the opening sequence. The initial contact with the door triggers the knock. Then it is the amount of time it takes to turn the lock before the sensor contact is opened. Probably just a slight delay node after the trigger, before the state check.