This object is in archive! 

Rules with Wait sentence not working

Serge Kouthon shared this idea 5 years ago
Under Consideration

Hello,


I have defined the rule attached which should turn off both the light and my sonos player when I enter the bathroom.

The rule work, except that after 2 minutes the music turn off. I tryed to force the music to last more than 2 minutes by adding a wait sentence but the system wouldn't work. I even tryed to dance in front of the sensor in order for the music not to stop. Unfortunately the music would still stop (while I am dancing ) and then start again. Does anybody know a way to help me saving my energy for doing whatever I need to do in the bathroom.

Also can anybody explain what the join sentence is useful for (I thought it would allow the wait sentence to finish it execution but apparently it doesn't).


Thanks,


Regards,

Replies (3)

photo
1

Try put the wait time in the "ELSE" part! Not under IF

photo
1

Yep it works ! Thanks, but care to explain why ?

photo
1

Serge,


In your rule you are commanding the controller to wait 10 minutes after your music has started (motion is detected) and then the execution of the rule is finished without further actions. If your sensor detects NO MOTION your music will stop inmediately.


If I understand correctly you want your music to stop after 10 minutes you left the room, in order to do that the WAIT needs to be on the ELSE condition. IF conditions are triggered when the sensor changes from NO MOTION to MOTION, ELSE conditions are triggered when sensor changes from MOTION to NO MOTION.

photo
photo
1

JOIN is used to allow the rule to stop update values of used sensor while it is executing (usually this is useful together with WAIT conditions only, otherwise the processor will finish the rule a lot faster than the status can change). In your example rule JOIN (after implementing Jacob correction) allows the 600 timer to start counting again every time the sensor changes status to MOTION. If you don't use JOIN in this rule it doesn't matter if you exit the room and then come back before 600 seconds, the music will stop no matter if the sensor detects MOTION again if you step into the room again. Hope I'm clear enough.

photo
1

Crystal clear !

Thanks a lot Alberto

photo
photo
1

aaa

Leave a Comment
 
Attach a file