Pool Pump Automation

Newbie here, hopefully posted in the correct forum.

PROBLEM: I'd like to cycle my pool pump 2 hours on 1 hour off 7 days a week.
What is the best KISS solution? On/Off triggers x 7 days seems ungainly in Basic Rules. I'm using a ZEN17 wired to the control circuit of the pool pump's motor starter.
I could run it for a continuous period with a long off but the pump sometimes loses it's prime and may run dry if left off for a few hours.

Any ideas where to start? I'm a licensed electrical contractor but not an automation programmer.

Thanks for your help

I would use RM. This simple rule would control the turning it on and off. Anytime it is turned on it would run for two hours and turn off for one hour, and then start again.

How you start and stop the pool should probably be another rule. On certain days at certain times, etc. If you make rules to turn it on or off when needed this rule will cycle it.

1 Like

Thank you very much for your help. I'll give it a try and let you know how it works.

I tested this rule inside for a few days with some LED Lts. and it seemed to work fine. Hooked it up to the Pool Pump starter and it seemed to work OK but it randomly stops cycling. I don't see anything in the logs that gives me a clue what's going on.

Here's the log for the app, it should have shut off at 5:46pm but it's still running.
I can't seem to get it to run more than about 12 hours.

between this and my garage door notification I'm going nuts!!

I can stop the pump manually. Stop the "Pool Pump beta" rule. Restart the rule and manually start the pump and it will cycle a seemingly random number of times. There are no other rules starting or stopping the pump.
Here's the log from the relay.

This is from last night. At 12:55.18AM the pump was on but failed to turn off. I don't know what the debug "parse" lines mean but it always stops after the 2503 line.

The rule looks good to me, Maybe a communication issue with the device turning the pool pump on and off. I have an exhaust fan in my crawlspace controlled by a Aeotec smartplug and I have a similar rule controlling it. For whatever reason it will sometimes not receive the on or off command. So I added a loop after each command to verify the device actually turns off or on. In my case I look at the power level, if it doesn't change as expected I send the command again, usually works first time but sometimes it won't shut off until a second command is sent. I also added a routine to monitor if it stays off for an extended period.

1 Like

Thanks for the reply. I'm using a Zooz Zen 17 Relay and it's only about 25' from the hub but that's what I'm thinking, it's just not getting the command. I don't have a good way to monitor the power level but I could monitor a contact on the relay or motor starter. Could you share your code for adding the loop and making sure it's running and resending the command?
My programming skill level is rudimentary at best.

This will repeat 10 times every 30 seconds, sending the command to turn the smartplug on if the power level does not go above 5 Watts. Once it exceeds 5 watts or loops the 10 times it will continue.

In your case you would just look at the relay and see if it responds that it is on or off. You can find this under repat options in RM, repeat while.

After thinking about this, I'm pretty sure it's a communication issue. I put the relay inside the metal motor starter enclosure and it seems the "off" command always fails. I wonder if there is a way to add an external antennae.

25', although not really that far away, from the hub and inside a metal enclosure that could definitely be an issue. Perhaps you can add a repeater device somewhere closer to the pool pump?

I took the metal cover off the starter will test it like that. If it improves I'll order a poly enclosure for it.

I think that has fixed my issue, seems to be cycling correctly now.

On another note, do you know a way to monitor or report the current state of a relay? I would like to close my garage door automatically if its open at 9pm but I haven't figured a way to monitor the tilt sensor. Here's my thread

This is the rule I use for that.

Seems simple enough, I'll give it a try.

Works OK if the Garage Door opens between the desired expression time but if the Garage door is open at 6:00pm then nothing happens at 6:21. I keep hearing that Hubitat is event driven, ie the contact needs to change state between the times but there's got to be a simple way to poll the switch and cause an "event"

I should have mentioned I only wanted mine to start sending notification after sunset.

If mine is opened and stays open outside of the required expression time then nothing happens. At sunset the rule is triggered and if the door is open it starts sending notifications.

If you want it to send notifications anytime the door opens and stays open then just remove the required expression and the time trigger.

Let me try a couple things to see if I can get mine to work.

Thanks for your insight

I'm sitting here at work thinking about RM when I should be doing something else.

If I deleted the required expression so the rule is triggered anytime the garage door is opened could I change the first OR statement to AND "When time is 9:15" Would this send the notifications only after 9:15?

Anytime the rule is triggered it sends notifications as long as the GDO is open.
The trigger determines when it runs. The required expression sets when a rule can trigger.

If you changed the OR to AND, then it would only trigger if the GDO had been open for the required time and it happens at 9:15. So you will probably never trigger the rule.

In my original rule it can only trigger from 30 minutes before sunset till sunrise. So if the door opens outside of that required expression time nothing happens. The rule can not trigger.

If for example, I opened the door at 3:00PM and left the door open and never closed it, then at sunset the rule gets triggered. It does not trigger because the door opened but because the trigger time of sunset occurred. It will trigger at sunset if the door is open or closed. If it is open it will start sending my notifications, if it is closed it does nothing. The GDO is closed so the while loop is false and the rule is exited.

The other trigger, systemstart, will occur anytime the hub is restarted. Again this trigger has nothing to do with the door, it is just a outlier case than could occur. If in my example above opening the door before sunset and leaving it open. If the hub for whatever reason was shutdown and not turned back on until after sunset I would get no notification the door was open. The door is already open and it is past sunset so neither of those two triggers can occur. The restart, however, will trigger the rule and if the door is open it will start sending notifications.

Gotcha, I will give it a try and post back.