Rule Machine - IF condition within repeated actions

I have been playing around with the Rule Machine and I think I got most of it figured out, but I can't seem to implement this rule that I want to implement -

When a water sensor detects water -

  • Send an SMS message ("Water detected")
  • Repeat these steps every 10 minutes -
    • If water sensor is wet, sound a siren for 2 seconds
    • If water sensor is dry, send an SMS message ("Dry now")

I seem to be going in circles trying to do this as a triggered rule. How do I set up that "IF" condition within the repeated action ?

I am a Java programmer and I would just like to code it, but I can't seem to get my arms around creating the "User App". Can someone point me in the right direction? Some simple intro to writing the code would be greatly appreciated.

Doable with a standard rule rather than a triggered rule. Make sure you select the "Stop on truth change" option when setting up the repeat.

image

1 Like

Thank you ! But, what I am missing here is the delay before the "Actions for False". I want to wait for 10 minutes before sending out the "dry" message. I think I may be able to do it by chaining with another rule and adding a delay there. But, that is making my set up complicated.

You can add a 10 minute delay to the false action in this rule.

Thank you. I will live with that for now. But, I think I have to get into coding this. Too late in the evening to think now. Thanks, again.

1 Like

If all you need is the delay on sending the message, you can add the delay in the RM false actions, like @destructure00 indicated. No coding needed for that.

1 Like

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