Stuff I find interesting

ITHO Home-Assistant integration

I use this github repo from CoMPaTech to configure ESPHome.
Sometimes you need to update some parts after EPSHome is updated.

You will need an ESP8266 and a CC1101. You can find these on google.

My config looks like:

esphome:
  name: 02-fan-itho
  friendly_name: 02_fan-itho
  libraries:
    - SPI
    - Ticker

esp8266:
  board: esp01_1m

external_components:
  - source: 
      type: git
      url: https://github.com/CoMPaTech/esphome_ct
      ref: dev2
    # refresh: 3600s # only set this briefly otherwise it just refreshes daily, see https://esphome.io/components/external_components#external-components-refresh for setting refresh too low

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  manual_ip:
    static_ip: ip
    gateway: gateway
    subnet: 255.255.255.0
    dns1: dns

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Itho-Esp Fallback Hotspot"
    password: 

captive_portal:

# Enable logging
logger:

fan:
  - platform: "cc1101"
    speed_count: 3
    name: "Mechanical Fan"
    data_pin: 5
    map_off_to_zero: True
    id: mech_fan

button:
  - platform: template
    name: "Send join command"
    on_press:
      then:
        - lambda: |-
            ((cc1101fan::CC1101Fan*)(&id(mech_fan)))->send_other_command(0);
  - platform: template
    name: "Run Timer for 10 Minutes"
    on_press:
      then:
        - lambda: |-
            ((cc1101fan::CC1101Fan*)(&id(mech_fan)))->send_other_command(1);
  - platform: template
    name: "Run Timer for 20 Minutes"
    on_press:
      then:
        - lambda: |-
            ((cc1101fan::CC1101Fan*)(&id(mech_fan)))->send_other_command(2);
  - platform: template
    name: "Run Timer for 30 Minutes"
    on_press:
      then:
        - lambda: |-
            ((cc1101fan::CC1101Fan*)(&id(mech_fan)))->send_other_command(3);

I added a directory in config/esphome where i added the itho.h file.

Wirering

CC11010 NODEMCU
Vcc 3v3
GND GND
Mosi D7
SCLK D5
Miso D6
Gdo0 D1
CSN D8

CC11010.png
NodeMCUv3.0-pinout.webp

Connecting ESP to ITHO fan

  1. Disconnect the ITHO fan from power and reconnect it again.
  2. Toggle the SendFanJoin in Home-Assistant.

You should now be able to control the fan.

There is also a way to find the mac address of your wall switch but i can't seem to remember how I did this. I think I had to change the debug level so I could see when I pressed the wall switch in the logs from the ESP.