ITHO Daalderop FAN RF remote with C1101 and ESP8266

As far as i know you do not need the Unit ID with ESPHome. This is my config of itho.yaml in:

esphome:
  name: fancontrol
  platform: ESP8266
  board: nodemcu
  includes: 
    - itho/c1101.h
  libraries: 
    - https://github.com/CoMPaTech/esphome_itho.git

wifi:
  ssid: !secret wifi_name
  password: !secret wifi_password

# Enable logging
logger:

# Enable Home Assistant API
api:
  password: !secret api_password

ota:
  password: !secret ota_password

switch:
- platform: custom
  lambda: |-
    auto fansendlow = new FanSendLow();
    App.register_component(fansendlow);
    return {fansendlow};

  switches:
    name: "FanSendLow"

- platform: custom
  lambda: |-
    auto fansendmedium = new FanSendMedium();
    App.register_component(fansendmedium);
    return {fansendmedium};

  switches:
    name: "FanSendMedium"

- platform: custom
  lambda: |-
    auto fansendhigh = new FanSendHigh();
    App.register_component(fansendhigh);
    return {fansendhigh};

  switches:
    name: "FanSendHigh"

- platform: custom
  lambda: |-
    auto fansendt1 = new FanSendIthoTimer1();
    App.register_component(fansendt1);
    return {fansendt1};

  switches:
    name: "FanSendTimer1"

- platform: custom
  lambda: |-
    auto fansendt2 = new FanSendIthoTimer2();
    App.register_component(fansendt2);
    return {fansendt2};

  switches:
    name: "FanSendTimer2"

- platform: custom
  lambda: |-
    auto fansendt3 = new FanSendIthoTimer3();
    App.register_component(fansendt3);
    return {fansendt3};

  switches:
    name: "FanSendTimer3"

- platform: custom
  lambda: |-
    auto fansendjoin = new FanSendIthoJoin();
    App.register_component(fansendjoin);
    return {fansendjoin};
  switches:
    name: "FanSendJoin"

# Rinse/repeat for the timers
# see outstanding question in c1101.h
# on multiple switches handling

text_sensor:
- platform: custom
  lambda: |-
    auto fanrecv = new FanRecv();
    App.register_component(fanrecv);
    return {fanrecv->fanspeed,fanrecv->fantimer};

  text_sensors:
    - name: "FanSpeed"
    - name: "FanTimer"
1 Like

hi Arnout.

in the yaml of jodur is see the following part

#Set ID from remotes that are used, so you can identify the root of the last State change
  on_boot:
    then:
      - lambda: |-
          Idlist[0]={"69:9a:aa:bb:cc:dd:ee:ff","Badkamer"};
          Idlist[1]={"65:59:aa:bb:cc:dd:ee:ff","Toilet"};
          Idlist[2]={"ID3","ID3"};
          Mydeviceid="MY_ESPHOME";
          id(swfan_low).turn_on(); //This ensures fan is at low-speed at boot

i am wondering if its necessary
@jodur any thoughts?

If you want to represent the right state in homeassistant of the Fan, when it is operated by a existing remote, then you will need them.
If you only control the fan with homeassistant then it is not nessecary.

how can i get the id from the existing remote with esphome.
do i need to have the cc1101 close to existing remote? cause with esphome i did not see any RF info in the log.
I use an esp8266 with cc1101

If you look at the log its will show messages like : Ignored device-id: xx:xx:xx:xx:xx…

If you press a button on your remote it should be listed in the log. No need to be close to the c1101.

Could it be that that I misplaced any of the pin connections, like D2? Cause still I don’t see any rf info in de log file

Make sure you connected the esp8266 as described in :https://github.com/jodur/ESPEASY_Plugin_ITHO

D2 is not used in this schema.

sorry my mistake i mean the GDO2 pin, on which number of the esp8266 nodemcu v3 board should it be connected. now it says 04=D1* with the comment *Note: GDO2 is used as interrupt pin for receiving and is configurable in the plugin.
On the esp8266 v3 its the second pin, but in the document of Arnout his photo shows the 5th pin D4.
its a bit confusing to me, so please help

D1 is equal to GPIO5, make sure you connected this to the c1101 pin 6.

for pin-layouts different boards see:https://randomnerdtutorials.com/esp8266-pinout-reference-gpios/

@jodur i’m have trouble implementing your library https://github.com/jodur/ESPHOME-ITHO on my wemos d1. I got it validated, compiled and uploaded it over usb using esphome-flasher. Wemos d1 shows up in my local network.
I reserved an adres on my router. But when i try to add an esphome intergration with internal ip and default port 6053 i get :

Kan geen verbinding maken met ESP. Zorg ervoor dat uw YAML-bestand een regel ‘api:’ bevat.
Dont know if your dutch but it says:
Can not connect to ESP. Make sure that your yaml file contains the rule api:.

If i check the logs in esphome i get
INFO Reading configuration /config/esphome/itho.yaml…
INFO Starting log output from fancontrol.local using esphome API
INFO Connecting to fancontrol.local:6053 (192.168.2.30)
WARNING Initial connection failed. The ESP might not be connected to WiFi yet (Error connecting to 192.168.2.30: [Errno 111] Connection refused). Re-Trying in 1 seconds

I rebooted home assistant, reinstalled the library , reinstalled esphome.

I’m clueless, do you have any idea

Can someone help me ?

Some ESP8266 modules have wifi problems, did you try other examples from Esphome?
Looks like a device specific problem or most likely a Wifi problem.

If compiling and download is succesfull trough usb, then it is not a software issue.

Is the SSID you are using hidden? Then you need to define fastconnect.
see (https://esphome.io/components/wifi.html)

You could also try to define a fixed IP in esphome or play arround with the powersave mode of the wifi.

1 Like

Thanks @Jodur for helping, but sadly i haven’t found the solution yet.
In the log from esphome flasher i get this.

[09:23:32]--------------- CUT HERE FOR EXCEPTION DECODER ---------------
[09:23:32]
[09:23:32] ets Jan  8 2013,rst cause:2, boot mode:(3,6)
[09:23:32]
[09:23:32]load 0x4010f000, len 3584, room 16 
[09:23:32]tail 0
[09:23:32]chksum 0xb0
[09:23:32]csum 0xb0
[09:23:32]v2843a5ac
[09:23:32]~ld
[09:23:32][I][logger:166]: Log initialized
[09:23:32][C][ota:366]: There have been 10 suspected unsuccessful boot attempts.
[09:23:32][E][ota:371]: Boot loop detected. Proceeding to safe mode.

Apperently booting is unsuccessful and it goes into safe mode.
That explains why i do see it in my network, but what is causing it i’m still clueless . If i create a (blank) node using the ESPHome web ui it works without problems.

Here is my code:

esphome:
  name: fancontrol
  platform: ESP8266
  board: d1_mini
  includes: 
    - itho.h
  libraries: 
    - https://github.com/jodur/ITHO-Lib.git
 
 #Set ID from remotes that are used, so you can identify the root of the last State change
  on_boot:
    then:
      - lambda: |-
          Idlist[0]={"69:9a:aa:bb:cc:dd:ee:ff","Badkamer"};
          Idlist[1]={"65:59:aa:bb:cc:dd:ee:ff","Toilet"};
          Idlist[2]={"ID3","ID3"};
          Mydeviceid="MY_ESPHOME";
          id(swfan_low).turn_on(); //This ensures fan is at low-speed at boot
wifi:
  ssid: "blablabla"
  password: "blablabla"
  # Optional manual IP
  manual_ip:
    static_ip: 192.168.2.35
    gateway: 192.168.2.254
    subnet: 255.255.255.0


  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "FALLBACK AP"
    password: "adsh348201"

captive_portal:

# Enable logging
logger:
#  level: VERBOSE #Enable this line to find out the ID of youre remote

# Enable Home Assistant API
api:

ota:

switch:
- platform: custom
  lambda: |-
    auto fansendlow = new FanSendLow();
    App.register_component(fansendlow);
    return {fansendlow};

  switches:
    name: "FanSendLow"
    id: swfan_low

- platform: custom
  lambda: |-
    auto fansendmedium = new FanSendMedium();
    App.register_component(fansendmedium);
    return {fansendmedium};

  switches:
    name: "FanSendMedium"

- platform: custom
  lambda: |-
    auto fansendhigh = new FanSendHigh();
    App.register_component(fansendhigh);
    return {fansendhigh};

  switches:
    name: "FanSendHigh"

- platform: custom
  lambda: |-
    auto fansendt1 = new FanSendIthoTimer1();
    App.register_component(fansendt1);
    return {fansendt1};

  switches:
    name: "FanSendTimer1"

- platform: custom
  lambda: |-
    auto fansendt2 = new FanSendIthoTimer2();
    App.register_component(fansendt2);
    return {fansendt2};

  switches:
    name: "FanSendTimer2"

- platform: custom
  lambda: |-
    auto fansendt3 = new FanSendIthoTimer3();
    App.register_component(fansendt3);
    return {fansendt3};

  switches:
    name: "FanSendTimer3"

- platform: custom
  lambda: |-
    auto fansendjoin = new FanSendIthoJoin();
    App.register_component(fansendjoin);
    return {fansendjoin};
  switches:
    name: "FanSendJoin"

text_sensor:
- platform: custom
  lambda: |-
    auto fanrecv = new FanRecv();
    App.register_component(fanrecv);
    return {fanrecv->fanspeed,fanrecv->fantimer,fanrecv->Lastid};
  text_sensors:
    - name: "fanspeed"
      icon: "mdi:transfer"   
    - name: "fantimer"
      icon: "mdi:timer"  
    - name: "lastid"

Any other suggestions?

Did you erease the flash before flashing the firmware?
Have you tried other examples from esp-home? (for example only a text sensor)
Did you try a other ESP8266 module?

after this i have no other suggestions. Must be a device specific problem.

I feel i bit like i’m chasing my own tail. I manage to flash the ESP8266 NodeMCU with ESP-Easy and connect te C1101. I Disabled l2c GPIO to make room for D1. At this point i got it al working.
After a while when i want to add a device the ESP8266 becomes completely unresponsive and the blue TX led is burning. I have no idea what i can do to make this work. Any chance this has something to do with the wifi issues they have?

I have bought a new one because after i add the Itho fan Device the damn thing seems to get bricked for some reason. I can not get it to work i can only flash it with the Node MCU custom firmware. ESPeasy for some reason just wont work. Does anyone has a clue because i just killed my second ESP8266 by following this manual.

https://docs.google.com/document/d/e/2PACX-1vRoO1TfkUKkyQlgzsmm7XzI3xyUXMBMrqwF6NJXVwQmykP6gMtsJWp-x2vYiHDEwyScqhsPkJHGGYs-/pub

Just pushed a new yaml configuration for HA to match the fan behaviour to the new fan changes that are introduced in HA Core 2021.3.1
https://github.com/jodur/ESPHOME-ITHO

2 Likes

Thank you very much, but still struggling to get it even starting…:frowning:

Keep trying but I keep running in circles. Hopefully one day I will try again

Hi All,

Does someone know how to implement the new FAN MQTT topics into the automation with the existing ESP home image? Or must the plugin in ESP rebuild to handle the new FAN MQTT topics?

Breaking change for last HA version 2021.4

The [fan entity model](https://developers.home-assistant.io/docs/core/entity/fan/) has been changed. This impacts the way the MQTT Fan supports speeds and the following configuration options are deprecated and will be removed in Home Assistant Core 2021.7.0:

* `speed_command_topic`
* `speed_state_topic`
* `state_value_template`
* `speed_list`

Additionally,`preset_modes` and `percentage` are added to replace the legacy model supporting only three speeds `low`, `medium` and `high`. Therefore, `command templates` for `state`, `oscillation`, `preset_mode` and`percentage` are introduced.

Please. if you find a solution for the deprecated parts, share it here :slight_smile: