I couldn’t find a piston that would turn on my pool pump and run it for a number of hours based on the high temperature for the day. Since it wasn’t too complicated, I decided to learn a bit more and create my own. By default, the piston will turn on the pool pump at 11:00pm (you can adjust this) and will turn off after X hours (where X is the high temperature from the past 24 hours divided by 10).
Prerequisites:
- Pool pump connected to SmartThings via switch, relay, etc.
- SmartThings Virtual Switch named “Pool Automation”
Configuration:
- Define the StartTime variable. This is when your pool pump will start running. By default it’s 11pm, but it can be changed to whatever time you’d like.
- Define the MinDuration variable. This is the minimum time that you want your pool pump to run on a daily basis. I added this so if you want the pump to run at least 5 hours a day, it will still do that even in the colder parts of the year.
Update (10/1/19): I removed the StopTime variable initial value as that wasn’t allowing the calculated StopTime variable to persist. With the initial value of 7:00:00 AM, the pump was always turning off then, regardless of the outside temperature.