G'Day! Complete Newbie Rule Machine question coming in.
I have about 10 Simple Automated Rules and I'm trying to use Rule Machine (again) and am getting frustrated.
I have an Ikea zigbee plug hooked up to an aquarium surface skimmer (a pump). I want it to do two things:
1 - toggle on/off every 15 minutes (so that if a shrimp gets sucked into it, they can escape)
2 - turn completely off for an hour (when the automatic feeder drops in the food, so it also doesn't get sucked into the pump)
I have managed to do the two things separately, but not in one toggle Rule that takes a pause. Help!
Just a word of input. When you start combining a bunch of logic together, your rules get very complex and your run the risk of slow downs and lock ups. KISS is the best way. Separate rules is how I would actually run this automation. What you want to do can be done, but if it's not broken, don't fix it.
The benefit is just that. You know what each rule is hitting on instead of having to go in and troubleshoot when there are problems. Rules are free. And they will process better with simple logic in simple automations wherever possible. And that's where most of my rules are sitting.
yeah that was my concern to You would need to have them run during different times
Or better yet just have your 15 minutes toggle run from 7pm - 6pm and leave 6pm-7pm out of the rule and make sure it ends with the off command and start with on. That should work if feeding time is 6-7 or adjust as needed.
if
time to eat
then drop food
pause rule
else
unpause rule delay 60 minutes
i'm not at home to fire up rule machine, but that's the first thought you can pause rules and then delay turning on in another rule with a cancelable for other conditions
set up a rule to cycle the pump
set up a different rule to drop the food with the call to pause the pump rule. But add a stop the pump in the pause rule to make sure that the pump will always turn off.
set up a different rule to unpause the pump rule if the rule is paused delay 60 minutes. maybe add a turn on the pump as well in this rule. 3 rules
If
time is 00:00
then
turn off pump
pause pump rule
drop food.
end if
if
pump rule is paused
then
turn on pump delayed 60 min {These depend on how you have your pump cycle rule set up}
unpause pump rule delayed 60
end if
This is off of the cuff because I'm not in front of my computer to check the exact options, but you get the idea.
I was also thinking you can use that wait you were talking about, but those make MY head hurt. I'm not fond of the "new" way of doing rules. using waits and ... I HAVE NO PATIENCE Why would I want to wait??
ok how about a different approach. Does this fit the KISS bill? Substitute peanut for Garage plug and make a Virtual switch called "skimmer" Make a RM rule to toggle.
Or, taking a completely different approach, put two smart plugs in series. Have a first rule that toggles one of the smart plugs on/off every 15 minutes, have a second rule that triggers on feeding, turns the other plug off for 1 hour. That decouples the feeding time and time off from the cycling; the pump will only be on when both plugs are on.
Then, building on this, instead have each of the rules trigger a virtual switch, and a third rule triggering on either virtual switch changing, turning the smart plug on if both virtual switches are on, turning it off otherwise. Gives the same result, still decouples the two time periods, allows either to be easily changed, simplifies testing.