Newbie Rule Machine - Toggle Switch Set-up

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.


Having two rules is not a bad thing. Unless your saying they conflict. I often use multiple rules when I cannot get the logic right.

@april.brandt no fair you type too fast :laughing:


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.

1 Like

won't the toggle rule will overwrite the shutdown during meal time? I'm worried that 15 minutes after the shutdown, the pump will toggle back on.

set a condition to account for that

you can pause a rule for 1 hour if the food drops then re-enstate

I'm not at all worried about KISS. I couldn't find a way to START/END the toggle rule.

Ugh. My brain is hurting right now!!

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.

time to eat
then drop food
pause rule
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

you just pause the pump rule when the food drops

Okay. I am going to step away for a while and come back to it later. Thanks

1 Like

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

time is 00:00
turn off pump
pause pump rule
drop food.
end if

pump rule is paused
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.

1 Like

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??


Cuz good things come to those who do? :wink:

1 Like

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.

Simple Automation

Rule Machine

2 simple rules.

KISS approved??

EDIT: of-course "toggle" leaves it up to the device to be off/on, but that could be tweaked. the one above gives move accurate control of the state

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.

1 Like

Haha. This, I understand.

KISS maybe. I will try it.

So I sat on this and didn't do anything. Today, I had to rescue two shrimp out of the skimmer!!