Run Pool Pump During Off-Peak Hours

Hello all. I wanted to try to create a Rule Machine schedule for my pool pump to run at off-peak hours according to my power company. I only need it to run around 6-8 hours a day, so having a schedule that would allow me to work around the peak hour times would help save $$. So, two questions:

  1. Is anyone aware of an app that has already been created for something like this? That would probably be the most simple and elegant solution so I don't have to recreate someone's already talented work.

  2. If there isn't an app, has anyone already done this with Rule Machine and can provide some suggestions to get started?

Forgot to add hours, in case anyone has any thoughts:

“peak” hours are listed below. All other hours are considered “off-peak.”

  • Nov. 1 - March 31: Monday through Friday between 6 a.m. to 10 a.m., and 6 p.m. to 10 p.m. excluding Thanksgiving Day, Christmas Day and New Year’s Day
  • April 1 – Oct. 31: Monday through Friday during the hours from noon to 9 p.m., excluding Memorial Day, Independence Day and Labor Day
    Sincerely,
    TT

Not sure you need an extra app for that one. 'Simple Automation Rules' can handle that I think.

What about a KISS solution? Substitute "Aplug" for "pool pump"

For the months, do I setup a variable or some such that would account for what month it is?

Should this post be moved to the Rule Machine board?

Would this run the pump at only the off-peak times?

Not without a trigger.

You could break it out into 2 rules and have your months be triggers, or add the months as triggers to this rule. I am not great with RM, but the new SAR is very easy to use.

Whoops, great point, completely forgot about the triggers.

This rule should work if you add a periodic trigger at 10:31, 17:31, 5:01, 10:01, 21:31, and 23:31 every day.

I do a similar thing with my chlorine pump, but in Node-RED turning on/off a zwave outlet in hubitat. In my case though I make sure and only run it when the main pool pump is on (which is during the day).

Fyi, I used to use this until I moved to a variable speed pool pump.

It runs less in winter than summer.
It turns off automatically when it is manually turned on (special cleaning mode, or adding chemicals)
You can set when it runs.

I had the same plan as you and I started it at 9:05 and ran it 8 hours in the summer and 3 hours in winter.

Hey man, thanks for posting this App of yours as I'm interested in automating my pool pump and so I'll be giving it a go in the next couple of days but noticed that it requires a temperature sensor for some reason. Can you please explain ?
Cheers,

Thank you for the responses so far, here is what I ended up with (this morning, so still has to be tested):

Thoughts? I went with the triggers as @reid.a.baldwin suggested.

@napalmcsr I was using this for the past couple of months, and liked it for the turn off if the pump was turned on manually, and the shortened schedule. The only issue was that I wanted the times to align with the peak/off-peak hours of my utility to save for power.

I haven't checked since installing it to see if it has been updated though for peak/off-peak hours. Did you incorporate those? Thank you for your great work, it has certainly been appreciated.

@njanda it wants the temperature so that it can determine how long to run. If you look at the comment the script wants to have the pump running for 1 hour per 10 degrees of outside temperature, which is a rule-of-thumb for pool pumps.

@JasonJoel I haven't ever seen Node-RED before. Without overgeneralizing, is that more of a graphical scheduler?

Kind of.

Node-red is basically an open source app/platform that can do calculations and integrate with devices of almost any kind/vendor. And it has a pretty easy to use drag/drop graphical interface.

A number of us use node-red exclusively for automation rules instead of RM as it is easier to copy/paste, modify rules, backup rules, see execution flow real-time, and is generally faster than RM too (depending on the hardware you run it on, and rule complexity - the more complex the rule, the larger speed advantage Node-RED has over RM).

That said, absolutely nothing wrong with RM if it is meeting your needs, or you just don't want another piece of software in the mix.

Does it run on the Hubitat or a secondary device (eg - PC, Raspberry Pi)?

Secondary device (VM, Docker container, RPi, Windows, Linux, other).

I don't want to derail this thread, though. Feell free to ask any questions in the node-red thread:
https://community.hubitat.com/t/node-red-nodes-for-hubitat/

Did I make it required, dang it...
I was planning on averaging the temperature as the local pool service said you should run it 1 hour for every 10 degrees, and having that as a control option... I'll go remove that code...

I didn't incorporate that as I only ran for 8 hours in the summer and 3 hours in the winter. If I started at 9:05 pm, then I never ran into peak hours.

Removed the temperature requirement.