Run Pool Pump During Off-Peak Hours

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.

I got around the temperature early on by using DarkSky and pointing at it.

Is there an admin that wouldn't mind moving this to the Rule Machine section? I shouldn't have posted it here.

What you posted above should work. Turn rule logging on and check it.

Thanks. I’ve never heard of that down here in Aus. and it can only be a Fahrenheit thing right ?
Otherwise at 40c the pool would only be on for 4 hours !!

Sweet. Thx again

Yeah, it is Fahrenheit... BTW, if you are Australian. I coded it for the northern hemisphere if you ever want to have the timing vary by season.

1 Like

Ok so I’ll have a crack at swapping the names. That should get it close enough.

Let me know, the numbers in the cases between line 79 and 91 need switching...

1 Like

For anyone who might be interested. I decided I may want to use the off-peak settings for more than just a pool pump, so I created a global variable (number) that is flagged by the off-peak hours instead (just set to 1 to be "off-peak" hours, or 0 to be "peak"), and then the rule that affects the device just looks at the global variable.

It appears to work so far. Here are a couple of screenshots of the global being set and the rule to call it.

Rule to set it:

Rule to call the variable:

Still messing with it, so this may get updated in the event it doesn't work and I am just deluding myself.

1 Like