Making Dumb Ceiling Fans Smart

Apologies if this was answered somewhere. I searched this forum but was not able to find a suitable answer to this question.

I am a new convert. I just found HA last night and I am already impressed and interested in using it to control my home. There is an issue that I found though.

I have five dumb ceiling fans in the house, one of which has a cheep tuya smart conversion from amazon and works via Smart Life. The plan in coming months is to make all these fans ‘Smart’ through conversion. These fans are NOT wired for switch control (aka, I can only switch power off and on to the whole unit from the wall) and I would prefer not to have to pay someone to run wires. So conversion kits are the way to go.

Issue: The one fan controller I have does NOT work with HA. I started the tuya integration and found everything but my fan. After reading some documentation I understand that not all tuya fans are controllable with HA. I also read about tuya convert (which I am willing to try but not hopeful) and am researching that on a different track. My question to all of you is have you guys found a dumb-to-smart fan conversion that works out of the box with HA? I am willing to pay extra to not have to mess with flashing.

Again, if this has been answered then I apologize. I did a search on the forum for fans but the answers were either out of date with links to products that are no longer for sale or advise products that require modifications I don’t trust my shaky fingers to pull off.

I dont know if this fulfills your requirment. You have to see yourself if this is for you or not.
I own a fan’n’lamp with no smart capability. Just a pullcord to turn the fan 0/1/2/3
(+/-) for light on/off
(+/-) for fan on/off

In the wall I have a single switch, with just 2 wires (in NL: black/brown)

What I have done to make this operate smart:
Get a shelly 2.5 and built it inside the base of the ceiling fan.

image
L+N
wall-switch to SW1
fan-LIGHT to 01/L
fan-FAN to 02/L

I replaced the wall-switch with a momantary version, still single-switch version.

The shelly 2.5 is flashable OTA to ESPHome. No USB>serial thing required. I only needed to cut the power afterwards to give it a proper reboot.
First flash it to tasmota, Follow this guide https://github.com/yaourdt/mgos-to-tasmota
Then from tasmota you can upload your ESPHome bin file. You can create it in Home assistant > add-on ESPHome.

With ESPHome, I have programmed my momentairy switch to
1 single short push > toggle light power
1 long push > toggle fan power
This is the ESPHome code I use for that:

substitutions:
  devicename: Your_Device_Name_Here #visible in Home Assistant

esphome:
  name: ${devicename}
  platform: ESP8266
  board: esp01_1m

wifi:
  ssid: "Wifi_SSID"
  password: "Wifi_Password"
  manual_ip:
    static_ip: xxx.xxx.xxx.xxx
    gateway: xxx.xxx.xxx.xxx
    subnet: xxx.xxx.xxx.xxx
  power_save_mode: none
  reboot_timeout: 5min
  
mqtt:
  broker: xxx.xxx.xxx.xxx
  username: "YourMQTTUsernameHere"
  password: "YourMQTTPasswordHere"

logger:

i2c:
  sda: GPIO12
  scl: GPIO14

sensor:
  - platform: ade7953
    voltage:
      name: ${devicename} Voltage
    current_a:
      name: ${devicename} Current B
    current_b:
      name: ${devicename} Current A
    active_power_a:
      name: ${devicename} Active Power B
    active_power_b:
      name: ${devicename} Active Power A
      filters:
        - multiply: -1
    update_interval: 60s

  - platform: ntc
    sensor: temp_resistance_reading
    name: ${devicename} Temperature
    unit_of_measurement: "°C"
    accuracy_decimals: 1
    icon: "mdi:thermometer"
    calibration:
      b_constant: 3350
      reference_resistance: 10kOhm
      reference_temperature: 298.15K
    on_value_range:
      - above: 75
        then:
          - switch.turn_off: shelly_relay_1
          - switch.turn_off: shelly_relay_2
  - platform: resistance
    id: temp_resistance_reading
    sensor: temp_analog_reading
    configuration: DOWNSTREAM
    resistor: 32kOhm
  - platform: adc
    id: temp_analog_reading
    pin: A0

status_led:
  pin:
    number: GPIO0
    inverted: yes

binary_sensor:
  - platform: gpio
    pin: GPIO16
    name: "ade7953 IRQ pin"
    internal: true
  - platform: gpio
    pin:
      number: GPIO13
      inverted: false
    name: "shelly schakelaar"
    on_click:
    - max_length: 450ms
      then:
        - switch.toggle: shelly_relay_1
    - min_length: 500ms
      max_length: 3000ms
      then:
        - switch.toggle: shelly_relay_2
### The 2nd pin/switch is not being used for this switch


switch:
  - platform: restart
    name: ${devicename} restart
    id: restart_switch
  - platform: gpio
    id: shelly_relay_1
    name: ${devicename} Relay1
    pin: GPIO4
    icon: "mdi:electric-switch"
    restore_mode: RESTORE_DEFAULT_OFF
  - platform: gpio
    id: shelly_relay_2
    name: ${devicename} Relay2
    pin: GPIO15
    icon: "mdi:fan"
    restore_mode: RESTORE_DEFAULT_OFF

Now, I can switch the light on/off through HA, I can turn the fan on/off through HA.
I am using MQTT in my case but you could do without. Just remove the MQTT part and add this bit in the code

api:

Reason I choose ESPHome is I can program the behaviour of the switch directly in the device. If wifi is off for some reason, it still operates fully.

2 Likes

Also the itead ifan03 https://www.itead.cc/smart-home/sonoff-ifan03-wifi-ceiling-fan-light-controller.html and https://templates.blakadder.com/sonoff_ifan03.html

Hello @TheAlmightyOS - So which route did you go in the end, to integrate your ceiling fans to HA?

Also, was (or is) any of your ceiling fans controlled by RF signals? If so, I’m also wondering whether a Sonoff 433 RF bridge would work or not.

What momentary switch did you use at the wall?

Busch-Jaeger ,
But any will do