This object is in archive! 

How to lock a rule?

Reini shared this question 8 years ago
Need Answer

My rule shall not be called again, until it is finished.

I thought that this would be possible with "JOIN" but it isnt.

My plug keeps on triggering depending on the sceduler (which is set to "every minute") and the waiting time is ignored.


I also tried other values like "120".


Has anyone got an idea, pls?

Files: rule.png

Replies (2)

photo
1

the join block will lock the puzzle after the initial trigger, in this case the scheduler. So it will keep on triggering every 1 minute if that is the repeat procedure you use in the scheduler.


I do not understand why you are having this rule repeat every minute, yet want the 16 minute wait feature. Please explain what you are trying to achieve and hopefully someone can post a reply for you.

photo
1

This is just an example.

I usually do not know how often the rule is being called and how long the rule takes.

I just need to make sure, that the rule cannot be interrupted or restarted.

photo
1

Use a switch or a variable as a "mutex", to prevent the rule from being run if it's already running. Set it to "on"/1 when the rule starts doing its thing, and "off/0" at the end. Test the state before setting it to "on"/1; if it's already on, exit.

photo
1

Something like this?

Calculation with luminace also doenst seem to work, i tried something similiar with power consumption - without sucess.

Can you please tell me why my example never works?

Files: rule.png
photo
1

Well my example doent work. Can you provide a working one please?

photo
photo
1

I think your triggers should be 'simpler' and not check for values. Use ANY when you can in WHEN clauses and test with IFs inside the rule.

Leave a Comment
 
Attach a file