This object is in archive! 

Need help with rule logic

Stefan Schomberg shared this question 8 years ago
Need Answer

Hi there!


I am new to Zipabox. I started to create some easy rules like shutting down heating when windows are opened or giving power to some elektronics when I open my hifi-rack. But now I need help in creating rules - or at least one special rule.


I want to tell my Danalock to lock the door if

a) it's not open and

b) my Fibaro Motion Sensor sees no movement


I tried like in the attached file but then of course it tries to lock the door every 120 secs - even if it's already locked and this is confirmed by a beep...


1. How can I tell Zipabox that it only should do something when a state changes - like door from open to closed.

2. How can I tell Zipabox to follow a rule just once?

3. How can I tell Zipabox to wait untill another trigger apears - like a door is opened?


regards


Stefan from Germany

Replies (3)

photo
1

There are a lot of variable here that I do not know about, such as where is the motion sensor.


But basicaly you want something like this I gather

When your door is closed, wait 120 seconds, see if there is no motion, then lock the door.

photo
1

You are right - but when I do it that easy it tries to lock the door every 2 minutes again. So I am looking for ways to prevent Danalock from doing this - like "lock until door is opened again" or so.

PS: As far as I understand it "join" only prevents the rule to start the 2 mins again because of another movement catched by the sensor within the "first" 2 mins. But it will lock after 2 mins. And it will repeat that - right?

photo
1

Is the idea to lock the door after people has gone in/out?


Maybe this will work:

When doorsensor closed

If danalock.state=open then

wait 120 sec

If motion.state = nomotion then

action lock door

End if

End if


How often does the doorsensor report state when idle? It sounds like it is reporting (too) often, triggering your script all the time.


Also I am not sure if you should have two triggers in your when clause. What is the likelihood of both being triggered the same millisecond? Or am I misunderstanding something here, maybe...

Leave a Comment
 
Attach a file