Cart 0

Save money and simplify running your pool with Vera automation

Posted by LiveHouse Automation on

Hello Fellow Pool Owners,

I'm sure you're aware of the cost associated with the body of water in your back garden. I've been looking at ways to reduce my power bill, so the pool pump (or pumps if you have a solar pool heater) is often cited as a major consumer of power. A new pool pump was going to cost $700-$1500, and the claims of the amount of money you could save were always based on assumptions and varied greatly. So I decided to use my Vera Z-wave system to measure power use, and figure out how to save some bucks.

Step 1: Measure

This bit was easy. My Saltwater Chlorinator and Filter Pump are controlled by a simple mechanical timer. It requires adjustment throughout the year which is an annoyance I hope to eliminate.

The power outlet on the Chlorinator is where the pump connects. The Chlorinator unit itself plugs into another GPO to get power. So it was a simple matter connecting the plug for the Chlorinator to a Z-wave device with power monitoring capability. I used an Aeotec Smart Switch 6, which gave me visibility on Vera of my power use.


In the advanced properties, there's also a variable tracking total kWh which you can use to calculate the cost of running the pump.

Just a note on the Smart Switch, it's not designed for outdoor use so I put it in a protective enclosure with an extension cord which I picked up at Jaycar.  

Step 2: Analyze

Ok, so we've got an instantaneous power reading and a cumulative total. I pay about 0.27c per kWh, so the pump costs around $0.309/hour to run. So now the question is how long should I run the pump? There's a lot of information on the web for this, so after a bit of research I settled on the following:

  • Summer - 8 hours per day
  • Winter - 4 hours per day
  • Spring/Autumn - 6 hours per day

Of course, if I don't remember to manually change the timer then I'm either wasting power (too much pump time) or perhaps wasting money on chemicals because I'm not running it enough. Another downside of under filtering is the water might become unsuitable to swim in due to chemical imbalances, cloudy water or algal blooms.

Vera can easily handle the pump time control - there's a Z-wave switch already in the right spot.

But I began to wonder if you could have an even simpler and more optimal way to manage the pool run time. What follows is probably an oversimplification of Saltwater Pool Chemistry, but I believe it's sufficient for our purposes. 

Running the pump filters the water and chlorinates it. The run time needs to be sufficient to keep the chlorine levels right - so what are the key things that reduce chlorine in the pool?

  • Sunlight (UV) exposure
  • Temperature
  • Organic material (Dirt, leaves etc)

Obviously the reason we run the pump longer in Summer is because there's more UV light (sun is closer, longer days), Temperature is higher (more daylight, higher intensity, pool heater running), and there's likely more organic material because we're using the pool, more sunlight means more algae and warmer temps encourage bacteria.

Or put simply, there is a positive relationship between pump run time and the number of hours of daylight. More hours of daylight requires more pump run time.

There's no genius here, it's why the recommendations for pump run times vary by season. However, Vera knows the sunrise and sunset times for every day of the year at my location - so why not link pump operation to daylight hours, thereby ensuring the right number of hours on any given day? Now that's bordering on genius!

Before I go further, I'm sure some of you have thought "Hey, you can go even better than that, use a Multisensor 6 to measure UV levels and ambient temperature to adjust run time on overcast or cooler days!". Yes, yes you can. But it's going to require a bit of clever coding and understanding the relationship between UV, Temp and Chlorine much better than I do. But simplistically, run less time on low UV/temp days.

Armed with that knowledge, and the astronomical sunset/sunrise times for Perth for 2016, I was able to do some analysis of 3 methods of managing the timer.

Method 1: Largely ignore the timer, leaving it at 8 hours until you get a big power bill in Winter, adjust it to 4 if you can be bothered going out into the back garden and crawling into the spider infested pump house, then forget to change it back in summer until you realise the water looks awful and you need a major chemical (and capital) injection. This was *hangs head in shame* my previous method.

Method 2: Have Vera adjust the pump time based on season. Or do it manually.

Method 3:  Have Vera dynamically adjust pump time based on sunrise and sunset for that day. 

 Method Hours Cost
Slack Manual Management (8 hours all year) 2928 $904
Slack Manual Management (Winter knee jerk reaction) 2560 $791
Season by Season 2194 $677
Day by Day 2144 $622


Alright! Some Home Automation could potentially save several hundred dollars on my annual electricity costs, even before dropping a stack of cash on a new pump.

A closer look at the two automation methods highlighted an additional benefit to the Day by Day approach that wasn't just related to electricity.


This graph shows the number of hours per day working on the seasonal changes, versus working off sunrise and sunset. Specifically starting 3 hours after sunrise and finishing 3.25 hours before sunset. This gives us a range of 8 hours in summer down to 3.8 hours in winter. You can clearly see the areas in the graph showing where we are running the pump too much (red visible, wasting power) and times where we aren't running the pump enough (blue areas, potentially under chlorinating) if we're just changing the timer with the seasons.

Conclusion: Day by Day timer adjustment costs the least to run, and best matches the pump run time to the environmental factors destroying chlorine. This approach could reduce the amount of additional chemicals (boosters, stabilisers etc) needed, and therefore the cost of chemicals.

Additional conclusion - if you are manually adjusting your timer based on the seasons, then it might be a good idea to shift the dates of changes to better fit the curve on the graph.

Step 3: Implement

Given the Z-wave switch is already in place, this is just a matter of telling Vera how to run a schedule for the pump.

Firstly the mechanical timer on the Chlorinator is set to ON (instead of AUTO), this means the Chlorinator and Pump will run when the Z-wave switch is on, and stop when it's off.

Secondly, configure a schedule. There are a number of ways to achieve this, but my favourite is to use the excellent Program Logic Plugin (PLEG) written by Richard T. Schaefer and available on the Vera App store. It does cost a few dollars to register, but it makes programming Vera so much easier than writing raw code, and it's so much more powerful than Vera's scene editor. Using PLEG, a schedule based on sunset/sunrise is mind bogglingly simple. The logic looks like this:


sPool_Pump Day of Week +03:00:00r 1,2,3,4,5,6,7 None Day of Week -03:15:00t 1,2,3,4,5,6,7



cPool_Pump_On sPool_Pump
cPool_Pump_Off !sPool_Pump


Actions - cPool_Pump_On

Pool Filtration[869] SetTarget newTargetValue=1
VeraAlerts[142] SendAlert Message=Pool Pump On Recipients=aiw15lgd6171


Actions - cPool_Pump_Off

Pool Filtration[869] SetTarget newTargetValue=0
VeraAlerts[142] SendAlert Message=Pump Run Time - {String.format(%4.2f, {((#cPool_Pump_Off - #!cPool_Pump_Off)/3600)} )} Hours Recipients=aiw15lgd6171 


Or in English:

  • Every day of the week turn the pool pump on 3 hours after sunrise and send a push alert to my iPhone.
  • Every day of the week turn the pool pump off 3 hours and 15 minutes before sunset and send a push alert to my iPhone telling me how many hours the pump ran for (to 2 decimal places).

Step 4: Results

It's early days, but the timer system is working perfectly after about a month. I'm seeing the run time of my pump gradually increasing as we go from Winter to Spring. I've had the pool water tested and there's been no negative impact to the water quality. In fact for the first time in 6 years my pool needed no chemical adjustments.

I've also got power use, run time and cost being graphed on a cloud service so I can do some analysis later on if it's worth changing the pool pump to an Eco one. But so far I've spent less than $100 on this solution, and I should save myself $200 this year and every year after.

Plus if I need to manually run the pump or shut it down, I just pull out my smartphone and hit a button.

Time for a beer.

Share this post

← Older Post Newer Post →


  • Great write up. Amazing that an inexpensive item like the aeon smart switch can do for automation.

    I’m starting on my journey now.
    Already have Vera & 2 Yale keypad locks.
    Have purchased 3 x heavy duty aeon switches for spa pump / heater / blower – to automate spa function.

    You have inspired me to get another smart switch for filter / chlorinator/ pump. Hopefully I can integrate like you have.

    Tim on
  • I also use Vera and PELG to manage the swimming pool pump.
    I run the pump depending on the temperature instead. Fot the temperature I use Wunderground Weather Plugin.

    For triggers:
    Name Description
    t_above0degrees Temperature temperature goes above 0 degrees
    t_above18degrees Temperature temperature goes above 18 degrees
    t_above9degrees Temperature temperature goes above 9 degrees
    t_below0degrees Temperature temperature goes below 0 degrees
    t_below18degrees Temperature temperature goes below 18 degrees
    t_below9degrees Temperature temperature goes below 9 degrees
    t_pumpON Whenever the Pump is turned on


    Name On Type On Time On Days Random On Delay Off After Type Off Time Off Days Random Off Delay
    s_8amPool Day of Week 08:00:00 1,2,3,4,5,6,7 None Day of Week 08:05:00 1,2,3,4,5,6,7 None
    s_9amPool Day of Week 09:00:00 1,2,3,4,5,6,7 None Day of Week 09:05:00 1,2,3,4,5,6,7 None


    Name Options Logic Expression
    c_below0degrees t_below0degrees
    c_9amBetween0and9degrees s_9amPool AND t_above0degrees AND t_below9degrees
    c_9amBetween9and18degrees s_9amPool AND t_above9degrees AND t_below18degrees
    c_9amAbove18degrees s_9amPool AND t_above18degrees
    c_8amPumpOFF s_8amPool AND t_pumpON


    Name When Defined Actions
    c_below0degrees Condition is True Immediate – 1
    c_9amBetween0and9degrees Condition is True Immediate – 1; Delay 2:00:00 – 1
    c_9amBetween9and18degrees Condition is True Immediate – 1; Delay 6:00:00 – 1
    c_9amAbove18degrees Condition is True Immediate – 1; Delay 12:00:00 – 1
    c_8amPumpOFF Condition is True Immediate – 1

    So, below zero pump on at all times to prevent damage on pipes. At 8 if it is on it stops it, so at 9 it can check temperature and:
    -If 0 to 9 pump goes on for 2 hours
    -If 9-18 pump goes on for 6 hours
    -Above 18 pump goes on for 12 hours.

    dani on

Leave a comment