This object is in archive! 
Doorlock Adavnced Rule
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
No connection
Real-time notifications may not work
Why can i not edit my post when needed, so we have to live with the wrong spelling :-)
Why can i not edit my post when needed, so we have to live with the wrong spelling :-)
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
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
Thanks I will try this, it is a shame there is no real documentation about the rule creator.
Thanks I will try this, it is a shame there is no real documentation about the rule creator.
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.
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.
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
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
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!
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!
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...
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...
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!
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!
Replies have been locked on this page!