Pool pump speed control - easy way?

@gazoodle, thank you! I totally agree with you Scope666, this is by far the coolest thing I have done with Home Assistant. Love the community and the support from everyone

1 Like

It’s good to have the temp of your pool water in HA anyway, if you don’t already, there’s lots of ways to do this, but what I did that I’ve been happy with is a SONOFF THR316D Elite + the Sonoff WTS01 water temp sensor. I have the sensor rigged into a drain plug on the pump, but there’s other ways to get it into the path of the water. I use the relay part of this to turn my pool heater on/off instead of using the thermostat built into the heater. (remote control mode, most heaters can do this)

Once you have it in there, it would be trivial to create an automation to turn the pump on when the temp falls below a certain value.

Did a little playing around with the Ambient Temperature Sensor. Added this ESPHome yaml as a new sensor entity:

    name: Pool Pump Ambient Temperature
    address: 7
    page: 0
    scale: 128
    type: custom
    filters:
      - lambda: return x * (9.0/5.0) + 32.0;
    unit_of_measurement: "°F"

Using the Scaling=128 from the documentation, it reads within a couple of degreesF from a separate air temperature sensor I have nearby. Scaling equal to something between 100 and 128 would probably be more accurate. Interestingly, as soon as the motor spins up, the onboard temperature goes up significantly and quickly comes back once RPM=0. So, it appears that this sensor is adequate for triggering a Freeze Mode start but not of much use to monitor anything while the motor is running. There is also a “Temperature inside IGBT Module” sensor (Page 0, Byte 0x12), whatever that is as opposed the the N/A “PCB Temperature” (Page 0, Byte 0x13).
My current Water Temperature monitoring has been done via this rtl_433 based floating thermometer, which has been working pretty well so far:

Some more issues.
I’ve been trying to make a time based automation to turn the pump on at midnight and turn it off 4 hours later.

alias: Pool Pump ON from 0000h to 0400h @2800RPM
description: ""
triggers:
  - trigger: time
    at: "00:00:00"
conditions: []
actions:
  - action: number.set_value
    metadata: {}
    data:
      value: "2800"
    target:
      entity_id: number.centuryvsp_pool_pump_controller_demand_2
  - action: switch.turn_on
    metadata: {}
    data: {}
    target:
      entity_id: switch.centuryvsp_pool_pump_controller_run_2
  - delay:
      hours: 4
      minutes: 0
      seconds: 0
      milliseconds: 0
  - action: switch.turn_off
    metadata: {}
    data: {}
    target:
      entity_id: switch.centuryvsp_pool_pump_controller_run_2
mode: single

It seems as though the automation is turning on the run switch appropriately on time but then the switch is being almost immediately turned off (by the automation, according to the ESPHome log and HA entity history timeline, but not according to the automation trace). Not sure what’s going on. Maybe something with the state not updating fast enough here in CenturyVSPumpRunSwitch.cpp?

        {
            if (state)
            {
                pump_->queue_command_(CenturyPumpCommand::create_run_command(pump_, [=](CenturyVSPump *pump)
                                                                             { this->publish_state(true); }));
            }
            else
            {
                pump_->queue_command_(CenturyPumpCommand::create_stop_command(pump_, [=](CenturyVSPump *pump)
                                                                              { this->publish_state(false); }));
            }

            this->publish_state(state);
            pump_->update();
        }
    }

Eventually, I’d like to put the scheduling directly into ESPHome rather than HA.
Also, how would it be be possible to create pump commands manually, e.g. separate “Stop” and “Run” commands, rather than the Pump Run Button?

Hi Martin, I am trying to do the same with my Intellipro VS. I was able to connect the ESP32 and SHU12 to the pump. All your codes work great. The only thing, not sure if it is by design but if I try to run any of the Programs 1-4 the pump revert to the previous state after 1min. Is your Pentair VSD do the same? Any way to increase the time or do you have any code to increase the 1 minute duration?

Thank you!

Carlos