RM Actions, Time Between question

Want my well pump to turn on for only 20min a day if certain requirements are met.

So do the highlighted between times mean; 12:00:00 to 12:20:00, 12:01 to 12:19, or 12:00:01 to 12:19:59? What I don't want is 12:00:01 to 12:20:59, although I think it will work as is just don't want pump to turn off then turn back on and run another 20min.

Some quick testing reveals that "Time between 12:00 and 12:20" becomes true at 12:00 and false at 12:20, meaning 12:19:59.999 or so is, indeed, the last moment at which it will be true.

There are a couple things you could do with your rule if you only want it to cycle on and off once in some amount of time. It looks like there's a lot going on in your rule, but in general, one thing I think you could do to simplify is:

  • trigger based only on what you want to turn it on with (to start your actions in motion)
  • instead of an IF THEN/ELSE structure in your rule, use a "Wait for events" or similar in your rule for whatever you want to turn it off based on
  • consider the use of a required expression, which will prevent triggering when false (keep in mind that a re-trigger will cancel waits and start the actions over) -- or, at the very least, you could exploit this feature in a way similar to:
    • required expression of Private Boolean is true
    • set Private Boolean false first thing in your actions
    • set it true so many minutes later, possibly towards the end of your rule -- making it eligible to be triggered again

These aren't specific suggestions for your rule, just general patterns that may help. If you want more targeted advice, I might try sharing a plain-English description of what you want your rule to do, and someone can likely suggest something more specific that could help. Good luck!

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.