This object is in archive! 

How to create one rule to work one output 1 minute per hour

Tiago shared this question 3 years ago
Answered

Hi all


Can you please help me to create a rule with this example :


When in motion dectect is On

Turn on one pump 1 minute

Turn off one pump .

and waiting 1 hour to make work again the pump


The problem is when the motion detect is detect person inside this hour the pump work again.

So i need help to "lock" the rule to work fine, only 1 time per hour and with mutiple motion detect inside this hour.


Regards.

Replies (6)

photo
1

Hi

You should use puzzle Join to "lock" rule.

photo
1

OK I think Dino misunderstood your question. You want that for 1h the pump is not triggered again by a motion. In that case do it like this:


If motion and variable pump !=2 (you have to create this variable before) then switch on pump and set variable pump to 2, wait 60 seconds, switch off pump , wait 3.600s and set variable pump to 1.

photo
1

The variable Pump is set to 2 for one hour and prevents the rule from being restarted. Only after one hour it is set to 1 again and releases the pump again.

photo
1

Do you have any example? To do the correct block pograming?


Thank you for help

photo
2

No problem :-)

/c858a22685cd3c5de159302041742337

photo
1

Hi

from my point of view, puzzle JOIN can be used in this case where rule has to be executed once during 3600 sec. The point of JOIN puzzle is just this case, so you can consider to put JOIN puzzle at the beggining of the rule (instaed of IF puzzle) in order to avoid rule execution until it is finished (after Wait puzzle).

photo
photo
1

Hi Dino

I think this is a misunderstanding. "Join" does exactly the opposite of what Tiago wants. "Join" ensures that if the triggering event occurs again, the rule is aborted and restarted. This is very important if, for example, you use it to control the light.


I have also just created a test rule and it works exactly as expected.

Trigger

Join

Message 1

wait 60sec

Message 2


When I fired the trigger several times under 60sec, I always received message 1, but never message 2. Only when I waited 60 seconds, I received message 2. In Tiago's case, this would cause the trigger to trip the pump over and over again, and that's exactly what he doesn't want.

photo
1

Hi

Here are explained Join puzzle among others:

https://community.zipato.com/topic/use-of-refresh-all-join-and-stop-puzzle-pieces_2


Join doesn't restart rule but blocks it from the triggering while executing.

photo
1

Hello Dino


I followed the link and found exactly what I wrote:

/ad7793e9310114722f2b25a59fdee70f

/de502038ccb010e9c5ee4b806c491176

photo
1

Hi

JOIN= stop all OTHER executions of the same rule. It means if rule has wait puzzle with 3600sec, during this time this rule will not be triggered. In other wordds, if during 3600sec motion is detected, this rule will not be triggered until the rule finished (after 3600 sec).

Please test your rule with JOIN puzzle (instead of IF loop and variable) and see if it works.

photo
1

Hi Dino

OK then we both understood the function the same way. :-) However, Tiago wants to achieve exactly the opposite. He does not want, no matter what, that the rule should be triggered again within 60min. He needs a lock function. The rule may be triggered every 60min only once.

photo
Leave a Comment
 
Attach a file