Door Knock RM4 Rule Feedback

Hello All,

I am trying to get my door knock rule to watch for the door opening within 30 seconds, which would override the speech action, but I fear my Private Boolean is having an issue, it does not seem to reset back to True, any ideas?

Thank You

You have to reset it back to true. If set false, it will remain false until a rule sets it back to true. But i don't see where this is triggering on what you want. This will speak the announcement immediately, not delayed 30 seconds later. You need to have a delayed action in before the announcement in order to get the delay. Then you need to have a cancel in the other part of the rule. I also don't see that you need to use PB at all in this rule. Something like this would work.

Triggers:  Front door changed  
           Front door active

If Front door Open
        Cancel Delayed Actions
Else If Front door active and Front door Closed then
      Delay actions by 30 seconds subject to cancel
      Send announcement

The only issue you are going to have is how you are detecting the door knock. If that also triggers when the door is closed, then you would have to use private boolean to keep the announcement from happening twice.

Ya, that was the issue, the door closing triggers the smartthings multi sensor accelerometer, so I had to use the private boolean to stop the announcement and wait for a knock with no door opening before, which was trickier then at first glance.

Okay...not sure that's going to accomplish what you want either. You said you want to have a 30 second delay before the announcement get sent, correct? You want to set the private boolean to false on the door opening, and then back to true after the door closes. Something like this:

If Front door Open
        Cancel Delayed Actions
        Set PB to False
Else If Front door active and Front door Closed and PB is true then 
      Delay actions by 30 seconds subject to cancel
      Send announcement
Else if door is closed and PB is false
      Set PB to true after delay of a minute.

OK this seems to work, so far :slight_smile:

1 Like

I just thought....if you changed the triggers to Front door contact and acceleration both to CHANGED. You could set the PB back to true when door is closed and acceleration is inactive. More reliable than a timeout.

Ohhhhh....yes...I have not dabbled with the "changed" state yet in any rules, but that is a good point, let me go break this really fast and try it :slight_smile:

You wouldn't need the delay on the set boolean true

Thx again, I owe you a coffee sir :slight_smile:

1 Like

Not at all...happy to help.

Matt, how do you detect someone knocking on the door? Do you really have that many speakers? Are they Google mini speakers? If so, how do you overcome the problem with them going offline?


I have a big house and 12 speakers, and it actually worked yesterday when I was upstairs and did not hear the knock, but my office speaker alerted me.

So far they have not went offline, however I am adding the Nest Hub Max in a week or so which is working towards offline use of Google Home.

Right, but how does the system know when someone is knocking? Are you using an audio detector, vibration sensor, or some other gadget??

See above.

This detects someone knocking? Must be very sensitive.

I didn't know that it did but evidently it does.

Yes, this works well so far for me :slight_smile:

I have another version for this, after i have tested the rule above and it didn't work out for me.

There are more scenarios that could happen:

  1. Someone really knock at the door. (the rule above works for this one)
  2. The sensor is accidentally triggered. You do not want a false warning.
  3. The sensor is triggered when you want to enter or leave the house and the door is locked. Again, this ends with an unnecessary warning.
  4. You have pets in your house and they activate the sensor. Again, no one is at the door and you get the notification. This can be unpleasant, especially if you use your speakers for notifications.

This is what i managed to do so far. It seems to work pretty well in all of the above scenarios.
I use two separate rules because i want to get the notification only if someone knocks twice. This way you get less false alarms. One rule is used as a more complex trigger for the main rule. Once activated it can't be activated again in the next 90 seconds. If i use the sensor as a trigger for the main rule , it runs every time the sensor is activated, and the actions are overlapping so you receive more notifications for one action.

Any advice is welcome

Update: I noticed that after the "Activate Door Knock Rule" is triggered and the private boolean is set to false, then every time the rule is triggered again within 90 seconds, the private boolean is set to true in the ELSE. So i removed it, and it works pretty well. I have to find another way to set the private boolean true for this rule, after a while. It can remain false for whatever reason, and then the rule will stop working.

Or you could avoid having to do all of this and buy a doorbell like the Aeotec Doorbell 6. :slight_smile:

Or that. But i already had the sensor from a Smartthings Starter kit, and i don't have another use for it right now. Besides, i want to use it for the HSM as well so i will leave it on the door.