This object is in archive! 

Doorlock Adavnced Rule

Allan shared this question 8 years ago
Answered

Hi All


Just got this system and want to make my first more advanced Rule and want to ask how you would make it.


Items i use in this rule:


Zwave doorlock (danalock V2)

Zwave door sensor.


I want this to work.


1. when doorlock is unlocked AND door is closed then wait for XX sec then Lock Door (simple Rule)

2. BUT if door opens within the XX sec then doorlock should stay unlocked until door is closed again

and then restart xx sec and lock door.


Hope someone can help me with this :-)


-Allan

Replies (8)

photo
1

Why can i not edit my post when needed, so we have to live with the wrong spelling :-)

photo
1

Hi Allan, the fuction JOIN is there to be used. Simply make the rule you just wrote and put a join before the execution. Join will stop the execution if the state has changed. IE:

when when doorlock is unlocked AND door is closed

join

wait xx sec

lock the door

photo
1

Attila,


Now I'm confused, according to the knowledge base, JOIN function is as follows;


"JOIN - Locks the condition upon triggering state. For instance, if open door triggers a rule, after 10 min you set an action. This will prohibit the rule to start all over upon new trigger if door is re-opened during 10 min."


Which condidering Allan's rule example would be as follows;

1. WHEN door lock is UNLOCKED and door is OPENED then WAIT for X seconds and LOCK door lock (without JOIN). This will allow the rule to reset the timer every time the door is opened.

2. WHEN door lock is UNLOCKED and door is OPENED JOIN then WAIT for X seconds and LOCK door lock (using JOIN). This will lock the lock door regardless if the door is OPEN or CLOSED after the configured time.


Even the word "join" make more sense with the second case, I cannot test the rules right now...

photo
photo
1

Thanks I will try this, it is a shame there is no real documentation about the rule creator.

photo
1

Hi Alberto. I know it confuses me as well, but when I think about what I read before, the execution will be stopped not the triggering. So best is if Allan tests both versions and let us know. At least we all will be educated and this join puzzle mystery will be solved once and for all.

photo
1

Attila,

You got me curious about this whole thing with the JOIN block so I made some tests, it looks like you

were correct. I think the description in the knowledge base is not accurate. I made a rule with two

different variations, one of course without the JOIN block and the second with the JOIN block. Rule consists on sending a push notification when the switch is ON.

My methodology for the test was the following; I created the rule under the scenario 1 (without JOIN), I turned ON the virtual switch and waited until the status in the app refreshed and showed is ON (usually 2 or 3 seconds) then waited one second more and turned OFF the virtual switch, this well under 5 seconds. When the 10 seconds elapsed I still got the message even though the virtual switch was OFF for about 5 seconds (even the status on the app showed OFF).

Scenario 1 (rule without JOIN)

WHEN virtual switch is ANY

IF virtual switch is ON

WAIT 10 secs

SEND MESSAGE


After that I tested with scenario 2 (with a JOIN instruction) and I did the same. I never got a push notification.

Scenario 2 (rule with JOIN)

WHEN virtual switch is ANY

JOIN

IF virtual switch is ON

WAIT 10 seconds

SEND MESSAGE

photo
1

Hi All :-)

I have just made a rule BUT not tested it yet and it may be to much complicated as the rule example Alberto have made. But I will test all versions and see what work in this weekend I hope, just in the middle of a home DIY kitchen project. But since i got my zipato from a week ago i just cant stop playing it is so much better than vera so far!

photo
1

There you go Alberto. Mystery solved...the way people need to think about join rule is exactly the opposite purpose...but now we know how it works and we can make even better rules now...

photo
1

So finally got this to work an advanced lock rule.

1. if the door is unlocked and the door still are closed then the lock will close after xx sec.

2. if the door is unlock and an input is activated then the rule is "paused" until the input is deactivated, and the lock is locked again after xx sec

3. if the door is unlock and door is open the the rule is "paused" until door is closed. and lock is locked again after xx sec

this is a very cool rule engine ZIPATO got!

Leave a Comment
 
Attach a file