Help refining rule

Hi All,

I have this rule meant to notify us when someone knocks on the door instead using the rather obvious doorbell. It's using the xyz functions of a samsung multisensor. It mostly works he way I wand but I get false positives when the door is opened or closed. I've ruled out using the acceleration function as it is sometimes triggered by a knock. How do I reduce or eliminate false triggers?

I'm not sure if this will help, but you could try...

if door sensor and door closed then
wait a few milliseconds
if door is still closed then continue

that might eliminate the false alarms when the door opens

The door closed false alarms is a different kind of challenge … nothing comes to mind for that one.

Here's another scenario that might help with door closed false alarms … more scenario, less sudo code.

Use a global variable, or a virtual input of some type, create a rule that toggles its state when the door opens, and waits a second or two after the door closes to flip it back to its "closed" value. That way, you can use the variable or virtual device in your initial IF of your alert rule, and if the variable hasn't restored yet (i.e., door JUST closed from an open state), the alert won't happen.

It takes two rules to do it, so maybe not completely streamlined, but should eliminate the false alarms.

That is awesome. I'm thinking of using this same multi-sensor for garage door open detection, never thought about this use case.

I'll give that a try.

It seems to work. It's not perfect as the value seems to stick. The other functions are instant.