Front door knock (With conditions)

Sorry to post this but I have had a look in the other topics for similar and had no joy with tinkering.

I am looking for a 'Knocked at front door' rule where if acceleration sensed on door sensor it checks the state of the door (closed) and also letterbox as these set off false positives. I want it to delay for a few seconds so if the door is answered it does not bother sending out a notification.

I'm sure the rules I have written look a little silly but this is as far as I have got with it. Any help or direction would be appreciated. Many thanks.

You should have two END-IF statements at the bottom of that. The system will assume them but in some cases if they are missing you may get unexpected results.

To me that looks good is it not working? Turn on logging and see what the logs show.

1 Like

Thanks for the reply, will add another END-IF and see how it goes.

Don't think that's going to do anything specifically here. Just saying if you have multiple IF statements they should have END-IF's. I even use them if it's just one IF as it makes me never forget to do it when it could have an impact. You should have one after the Notify and then one more right after that. So it closes both of your IF conditions.

1 Like

Should i be putting anything underneath the END-IFs?


Here's one of mine.

1 Like

Basically the END-IF is saying that's it for the IF statement that it goes with. And they are nested so if you have:

do something
do something else
END-IF ---- goes with the IF B
END-IF ---- goes with the IF A

1 Like

I'm slowly catching on, thank you so much! Will see how this goes!

Again I don't think the missing END-IF's in this case are going to matter. If it's not working turn on the options for logging and see if that gives you a clue as to what's not working like you want. Post the log here if needed someone can help figure it out.

1 Like