Skip to content

ESP32 Home variant based on hardware design. #4

@brontide

Description

@brontide

I know this is likely a dead project but wanted to share my YAML for others that want to be inspired.

Using your hardware design as a jumping off point the following yaml should work with ESP32 Home after the appropriate GPIOs are changes to suit your specific build. This is a more modern platform that is updated and can communicate directly with HA rather than via mqtt with OTA updates. The only outstanding issue is determining the appropriate filters for the analog voltage.

## Spa side remote emulator for Pentair intellitouch 
## systems.
## Eric Warnke 2025

## Heavily inspired by https://github.com/thehookup/PoolMCU and reimplemented in
## Esp32 Home

esphome:
  name: esphome-web-564850
  friendly_name: PoolPump
  min_version: 2025.5.0
  name_add_mac_suffix: false

## Use the built-in LED as a test
light:
  - platform: binary
    name: "Test LED"
    output: light_output

output:
  - id: light_output
    platform: gpio
    pin: GPIO2

## Connect to LED via 10k to ground to sense the blinking LED on 
## the spa-side remote on a 4 second sample
## Under 10% = POOL / not blinking
## Over 90% = Spa heated
## otherwise = Spa heating
sensor:
  - platform: duty_cycle
    pin: GPIO35
    update_interval: 4s
    id: blink_duty
## Voltage for Temp, still need to figure out the mapping
  - platform: adc
    pin: GPIO36
    id: raw_voltage
    name: "Raw Voltage"
    samples: 10
    update_interval: 10s

## Convert the blink_duty to a text state for consumption
## by Home Assistant
text_sensor:
  - platform: template
    name: "Spa State"
    update_interval: 8s
    lambda: |-
      if (id(blink_duty).state < 10) {
        return {"POOL"};
      } else if (id(blink_duty).state > 90) {
        return {"SPA AT TEMP"};
      } else {
        return {"SPA HEATING"};
      }

## Spa side remote buttons these toggle on the momentary switches below
## comment out any buttons you do not have
button:
  - platform: template
    name: "Spa Toggle"
    icon: "mdi:water-thermometer"
    on_press:
    - switch.turn_on: spa
  - platform: template
    name: "Lights Toggle"
    icon: "mdi:car-parking-lights"
    on_press:
    - switch.turn_on: lights
  - platform: template
    name: "Blower Toggle"
    icon: "mdi:fan-plus"
    on_press:
    - switch.turn_on: blower
#  - platform: template
#    name: "Cleaner Toggle"
#    icon: "mdi:robot-vacuum"
#    on_press:
#    - switch.turn_on: cleaner

## These are the montary toggles connected via pc817
## 220k Ohm current limiting resistor inline with pins 1 or 2
switch:
  - platform: gpio
    pin: GPIO32
    id: spa
    on_turn_on:
    - delay: 100ms
    - switch.turn_off: spa
  - platform: gpio
    pin: GPIO33
    id: lights
    on_turn_on:
    - delay: 100ms
    - switch.turn_off: lights
  - platform: gpio
    pin: GPIO25
    id: blower
    on_turn_on:
    - delay: 100ms
    - switch.turn_off: blower
#  - platform: gpio
#    pin: GPIO26
#    id: cleaner
#    on_turn_on:
#    - delay: 100ms
#    - switch.turn_off: cleaner

esp32:
  board: esp32dev
  framework:
    type: esp-idf

# Enable logging
logger:

# Enable Home Assistant API
api:

# Allow Over-The-Air updates
ota:
- platform: esphome

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  ap:
    ssid: "Spa Side Remote fallback AP"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions