I have a pool sump pump that I am looking to run for 10 minutes at a time every 2-3 hours for a 24 hour period. Not sure if it’s capable, but I tried looking at rule machine, but couldn’t figure out a way to do it. Is there a smart app available that can do what I am look for? Or do I need custom code.
You can do it with Rule Machine, it’s just not super obvious how to do it.
Are you wanting it to run continuously, every 2 - 3 hours, for 10 minutes?
If so, you can use a Rule to do this in Rule Machine, like this:
Condition: Private Boolean is true
Rule: Private Boolean is true
Actions for True: On: pump; delayed off 10 minutes: pump; private Boolean false delay 2-3 hours
Actions for False: On: pump; delayed off 10 minutes: pump; private Boolean true delay 2-3 hours
What this will do is that at the moment you install it, it will turn on the pump for 10 minutes. Then, 2-3 hours later as you select, it will repeat. And it will go on repeating like this forever, or until ST has a broken schedule (which happens). It is easy to recover from a broken schedule, and just about any method you choose to do this automation will be prone to the same problem.
Oh cool, thanks Bruce. Yeah that is exactly what I want to do. The next question is can I tie it to a switch and have it stop the cycle after a 24 hour period?
Normally my pump runs once a day for 10 minutes, which I also have set via rule machine. However, during heavy rains, I would like to hit a virtual switch and have it run for 10 minutes continually throughout the day as stated above. My eventual plan is to buy neatmo and configure that switch to trigger when it rains, maybe with the rain gauge if it works with smartthings. But for now, I settle for a manual switch :).
Sure. I’m not going to hold your hand, but you can figure this out. You can disable the rule with a switch (real or virtual), if that helps. It all depends on exactly what automation and control mechanisms you want. If you get stuck, there are many around here to help out.
Is there a "Cycle On-Off every x min:secs for z mins:secs" SmartApp?
Okay, so apparently I don’t understand this stuff very well…lol. I setup the rule exactly as you suggested. I also added…switch to disable rule, picked my virtual switch, and selected disabled when off.
I then created a new trigger.
Trigger Event: Virtual Switch on
Action: Rule Action: The rule you suggested; Delayed off 1440 minutes: virtual switch
I thought this would run the rule when I turned the switch on and turn the switch off and disable the rule after 24 hours. However, turning it on does nothing.
Okay, so played around with it a lot more and got the rule to activate via the virtual switch, but can’t get the pump to turn off when the switch is disabled, let alone disabling the whole thing after 24 hours. So I am stuck again…lol.
Here is the new conditional trigger I came up with to activate the rule…
Event - virtual trigger on
Condition - virtual trigger on
True - Rule Actions: Pool Aux Pump Cycle Rule
False - Off: Pool Aux Pump
With these settings I thought the virtual switch would do the following…
Virtual Switch ON - Start the pool pump cycle rule (run pump for 10 min every 2 hours)
Virtual Switch OFF - Disable pool pump cycle rule (have virtual switch set to disable the rule under pool cycle rule settings) and turn the pump off if it was already enabled by the rule.
The on part works, but the off does not. At least the part with the pump shutting off if it’s already enabled by the rule.
Try asking in the Rule Machine peer assistance thread. There are lots of people there who will be happy to help With the details.
The off part can’t work because your trigger is
On. So off doesn’t do anything.
Just use a rule instead, with everything the same, that will work. When the trigger turns on, that makes the rule true, when it turns off, that makes the rule false.
So just lose the event, and it will work. Here’s a funny one for you: If you remove the Trigger Event that you have, and then hit Done and Done to finish the Rule, then, when you re-open it it should magically show up as a Rule, even though it used to be a Conditional Trigger.
Oh how I wish I would have known that before now!
Thanks JD, I’ll have to remember that one for the future!
Hallelujah Bruce! That did the trick. Seems to be working now. Just need to do a full 24 hour test to be sure. Supposed to get some rain this week, so perfect time to try it out. Now to spend some time pouring through the peer assistance thread and see if I can learn a thing or two. Thanks again for your help!
How did it work?
You are replying to a thread that is three years old, and a lot has changed in that time.
The rule machine smartapp is no longer available, and the author has moved on to a different home automation company where he is a partner (hubitat).
These days most people would use webcore for the same function. See the following FAQ. (The topic title is a clickable link):
LOL thanks I actually couldn’t find rule machine and was just watching a video on webcore.
Thanks for your reply U r Awesome