Quietcool ES-6000 / ESPHome

This is a project still in progress. I wanted to post to get feedback and help (which I’m sure I’ll need at some point).

I just installed a Quietcool ES-6000 whole house fan. I have the bluetooth controller, but I’m not seeing a good way to integrate with HomeAssistant. Since I finally got my wife hooked to this control system (WAF = 100%), she asked, “is this going to be on the control panel?”

After reviewing a few projects/howtos on this site and on reddit, I decided to go in another direction. The ones I see have a few limitations:

  • one is based on Zwave and I’ve done my best to remove all Zwave in favor of wifi and leave my Zwave network dedicated to my deadbolt locks (got burned by a chatty node in my vacation rental home that had me sending out the maintenance guy twice a week to change the batteries!!)
  • one is based on shelly 2.5. good solution, but i wanted to be able to control on/off and speed (2 speeds on my ES-6000) AND to be able to control with a physical switch as well.
  • one is based on a shelly 1pm AND a shelly 2p – not for me
  • a few are based on the Quietcool wifi controller that is now discontinued

If I were willing to switch to 100% wifi controlled, this would be easier, but having the ability to switch manually is a requirement. But, I can’t just have a mechanical switch parallel to the wifi switch because if you supply power to both the high and low lines simultaneously, your fan stops working permanently.

So, my plan is to leave the QC controller in the box (maybe I’ll sell it on ebay) and make my own controller. The fundamental wiring scheme is:

Fan requires a 120vac power on the black/white lines - AND - fan requires 120vac on EITHER the yellow (high) or the red (low) speed line.

Here is a quick truth table:

Power High Low Result
Off Off Off Off
On Off Off Off
Off On Off Off
On On Off Fan runs at High
Off Off On Off
On Off On Fan runs at Low
Off On On ??
On On On PERMANENT Off

Now, some solutions trust that a couple of single pole relays will handle this – I’m not so trusting (see above for why :slight_smile: ). I want DT relays for the speed so that only one state is physically possible.

So, here is my plan:

one of these (2ch relay with ESPHome/ESP32)
image

one of these (SPDT decora momentary rocker switch)
image

The fan power will be connected to relay channel 1 / NO. The fan speed high (yellow) will be connected to relay channel 2 / NC and fan speed low (red) will be connected to relay channel 2 / NO. This means the fan will default to high unless the relay is energized in which case it will run on low – and there is no chance for both high and low to be powered simultaneously (see above for why :slight_smile: )

The decora switch will be connected to GND on the common side and each pole will be connected to a GPIO on the ESP32. With this setup, I can use the physical switch to control the “controller” – push up and the on/off status changes, push down and the speed changes.

With this setup, I can control everything from HA but also from the switch without having to worry about accidentally powering both high and low simultaneously (see above for why :slight_smile: ) and I don’t have to worry about someone turning it on with the switch then I can’t turn it off with ESPHome. The controller will be in the attic near the fan and a low voltage, three conductor wire will be run inside the wall to the momentary DT rocker. I don’t know how reliable these modules are in terms of needed to be rebooted, but I can also run another conductor so I can reset it without having to go into the attic (maybe I’ll put it on a wall in the closet under all this stuff?)

Additionally, I would like to add some status LEDs to the ESP32 and configure them to reflect fan on/off and high or low speed. I think I can do this from ESPHome without having to write an automation (but I’m open to being corrected if someone knows otherwise).

Thoughts? I just started ordering stuff, so feel free to pokes holes in my plan. These fans are expensive so I don’t want to do anything stupid. I’ll keep this thread updated with progress and I expect I’ll need some help with the ESPHome configuration (mainly to integrate the physical switch and the lights) – I’m hoping I can count on this community!!

Here is the proposed wiring diagram:

I’ll drop LEDs on a couple of GPIOs when I have the module and I can test it. Here is the basic config:

esphome:
  name: HouseFan

esp32:
  board: esp32dev

# LED exposed as binary light
output:
  - platform: gpio
    pin: GPIOXX
    id: fan_led

# Relays exposed as switches
switch:
  - platform: gpio
    pin: GPIO16
    id: relay_1
    name: FanControl
    on_turn_on:
      then:
        - output.turn_on: fan_led
    on_turn_off:
      then:
        - output.turn_off: fan_led
  - platform: gpio
    pin: GPIO17
    id: relay_2
    name: SpeedControl

# Input from switches
binary_sensor:
  - platform: gpio
    pin: GPIO32
    name: FanToggle
    filters:
      - delayed_on: 20ms
  - platform: gpio
    pin: GPIO35
    name: SpeedToggle
    filters:
      - delayed_on: 20ms

Mind you, I’ve not actually tried this code yet and I’m pretty new to ESPHome, but I’m thinking it might work… I might even add a second LED to on/flash/off for showing the speed, but that’s a little above my paygrade at the moment.

Decided to ditch the external LEDs – unless I can find a way to integrate them into the wall switch, they’re not much use to me.

Here is the prototype:
image

and the code:

switch:
  - platform: gpio
    pin: GPIO16
    id: relay_1
    name: FanControl
  - platform: gpio
    pin: GPIO17
    id: relay_2
    name: SpeedControl

binary_sensor:
  - platform: gpio
    device_class: power
    name: FanToggle
    pin:
      number: GPIO14
      mode:
        input: true
        pullup: true
    filters:
      - delayed_off: 100ms
    on_press:
      then:
        switch.toggle: relay_1
    internal: true
  - platform: gpio
    device_class: power
    name: SpeedToggle
    pin:
      number: GPIO12
      mode:
        input: true
        pullup: true
    filters:
      - delayed_off: 100ms
    on_press:
      then:
        switch.toggle: relay_2
    internal: true

An single press on the switch in the up direction toggles the fan on/off state and a single press in the down direction toggles the speed high/low. I’ll probably simplify the names and maybe set the boot state to both relays off, but this code is otherwise ready to go!!

One quick question for the community: I added “internal: true” after I added the node to my dashboard. Now the “FanToggle” item is still there but listed as “Unavailable.” How do I get rid of this?

Here is the build so far:

I put two cable glands in the bottom of a black project case. one will hold a normal power cord and the other will hold a 6 conductor 16AWG cable bunch (though I only need 5 conductors). I also mounted a temperature sensor on top because why the heck not? This way I can see the attic temperature and humidity as well.

I also added a clear cover and a tiny 700ma/5V power supply in the case. An external stereo plug will connect the decora paddle switch for physical control as well. Because I’m running AC and DC in the same case, I cut a nice shield to keep the currents separate.

Waiting for my 6 conductor bunch to arrive and I’ll finish the wiring and provide some updated pictures.

Here is the new code to handle the SHTC3 temp/humidity sensor. It also has some minor renaming to the inputs.

switch:
  - platform: gpio
    pin: GPIO16
    id: relay_1
    name: On/Off
    on_turn_on:
      then:
        - output.turn_on: led_1
    on_turn_off:
      then:
        - output.turn_off: led_1
  - platform: gpio
    pin: GPIO17
    id: relay_2
    name: Speed

output:
  - platform: gpio
    pin: GPIO26
    id: led_1

binary_sensor:
  - platform: gpio
    device_class: power
    name: FanToggle
    pin:
      number: GPIO14
      mode:
        input: true
        pullup: true
    filters:
      - delayed_off: 100ms
    on_press:
      then:
        switch.toggle: relay_1
    internal: true
  - platform: gpio
    device_class: power
    name: SpeedToggle
    pin:
      number: GPIO12
      mode:
        input: true
        pullup: true
    filters:
      - delayed_off: 100ms
    on_press:
      then:
        switch.toggle: relay_2
    internal: true

i2c:
  sda: GPIO21
  scl: GPIO22
  scan: true
  id: bus_a

sensor:
  - platform: shtcx
    temperature:
      name: "Attic Temperature"
    humidity:
      name: "Attic Humidity"
    address: 0x70
    update_interval: 60s