ITHO Daalderop FAN RF remote with C1101 and ESP8266

This is what i’ve got so far:

- platform: mqtt
  name: Ecofan
  command_topic: "ITHO/fan/cmd"
  state_topic: "ITHO/fan/State"
  state_value_template: "{% if value|float==0 %}State 0{% endif %}{% if value|float >0 %}State 1{% endif %}"
  payload_off: "State 0"
  payload_on: "State 1"
  preset_modes:
    - 'low'
    - 'medium'
    - 'high'
    - 'full'
  preset_mode_command_topic: "ITHO/fan/cmd"
  preset_mode_command_template: >
    {% if value == 'low' %}
      State 1
    {% elif value == 'medium' %}
      State 2
    {% elif value == 'high' %}
      State 3
    {% elif value == 'full' %}
      State 4
    {% else %}
      State 0
    {% endif %}
  preset_mode_state_topic: "ITHO/fan/State"
  preset_mode_value_template: >
    {% if value_json.fan == low %}
      State 1
    {% elif value_json.fan == medium %}
      State 2
    {% elif value_json.fan == high %}
      State 3
    {% elif value_json.fan == full %}
      State 4
    {% else %}
      State 0
    {% endif %}

Open for improvement/additions.

The speed attribute is not showing so something is still not quiet right…

some progres…

changed the preset_mode_template

  preset_mode_value_template: >
    {% if value == '1' %}
      low
    {% elif value == '2' %}
      medium
    {% elif value == '3' %}
      high
    {% elif value == '4' %}
      full
    {% else %}
      off
    {% endif %}

Standby is still something to work on…

Which is solved by adding ‘off’ to the preset modes

  preset_modes:
    - 'off'
    - 'low'
    - 'medium'
    - 'high'
    - 'full'

So, the code that’s working for me is:

- platform: mqtt
  name: Ecofan
  command_topic: "ITHO/fan/cmd"
  state_topic: "ITHO/fan/State"
  state_value_template: "{% if value|float==0 %}State 0{% endif %}{% if value|float >0 %}State 1{% endif %}"
  payload_off: "State 0"
  payload_on: "State 1"
  preset_modes:
    - 'off'
    - 'low'
    - 'medium'
    - 'high'
    - 'full'
  preset_mode_command_topic: "ITHO/fan/cmd"
  preset_mode_command_template: >
    {% if value == 'low' %}
      State 1
    {% elif value == 'medium' %}
      State 2
    {% elif value == 'high' %}
      State 3
    {% elif value == 'full' %}
      State 4
    {% else %}
      State 0
    {% endif %}
  preset_mode_state_topic: "ITHO/fan/State"
  preset_mode_value_template: >
    {% if value == '1' %}
      low
    {% elif value == '2' %}
      medium
    {% elif value == '3' %}
      high
    {% elif value == '4' %}
      full
    {% else %}
      off
    {% endif %}

A bonus to all this is the ‘full’ mode.

And a bit of fiddeling with the custom button-card gets you this:
fan_row

1 Like

Can you share your custom card config?

sure.

The button_card_templates:

button_card_templates:
  fan-icon-settings:
    show_icon: true
    show_label: false
    show_name: false
    styles:
      card:
        - height: 36px
        - width: 50px
      grid:
        - grid-template-areas: '"i"'
        - grid-template-columnns: auto
      icon:
        - height: 26px
        - width: 26px
    state:
      - value: 'on'
        spin: true

  fan-name-settings:
    show_icon: false
    show_label: false
    show_name: true
    styles:
      card:
        - height: 36px
      grid:
        - grid-template-areas: '"n"'
        - grid-template-columnns: auto
      name:
        - justify-self: start

  fan-speed-settings:
    show_icon: false
    show_name: true
    styles:
      card:
        - height: 35px
        - font-size: 12px
        - width: 35px
        - border: 1px solid white
        - border-radius: 5px
        - text-transform: uppercase
        - background-color: 'var(ha-card-background)'
      icon:
        - icon-size: 14px

  vertical-divider-grey:
    color_type: blank-card
    styles:
      card:
        - width: 3px
        - color: 'var(--primary-color)'

  horizontal-divider-grey:
    color_type: blank-card
    styles:
      card:
        - height: 3px
        - background-color: 'var(ha-card-background)

And the card:

 - type: custom:vertical-stack-in-card
   # title: EcoFan
   cards:
     - type: custom:button-card
       template: horizontal-divider-grey
     - type: horizontal-stack
       cards:
         - type: custom:button-card
           template: fan-icon-settings
           entity: fan.ecofan
           tap_action:
             action: call-service
             service: fan.toggle
             service_data:
               entity_id: fan.ecofan
         - type: custom:button-card
           template: vertical-divider-grey
         - type: custom:button-card
           template: fan-name-settings
           entity: fan.ecofan
           name: Fan
           tap_action:
             action: call-service
             service: fan.toggle
             service_data:
               entity_id: fan.ecofan
         - type: custom:button-card # Low Button
           template: fan-speed-settings
           name: low
           tap_action:
             action: call-service
             service: fan.set_preset_mode
             service_data:
               entity_id: fan.ecofan
               preset_mode: low
           styles:
             card:
               - background-color: >
                   [[[
                     if ((states['fan.ecofan'].attributes.preset_mode === 'low') && (states['fan.ecofan'].state === 'on'))
                       return "#2980b9";
                     return "grey";
                   ]]]
         - type: custom:button-card
           template: vertical-divider-grey
         - type: custom:button-card # Med Button
           template: fan-speed-settings
           name: med
           tap_action:
             action: call-service
             service: fan.set_preset_mode
             service_data:
               entity_id: fan.ecofan
               preset_mode: medium
           styles:
             card:
               - background-color: >
                   [[[
                     if ((states['fan.ecofan'].attributes.preset_mode === 'medium') && (states['fan.ecofan'].state === 'on'))
                       return "#2980b9";
                     return "grey";
                   ]]]
         - type: custom:button-card
           template: vertical-divider-grey
         - type: custom:button-card # High Button
           template: fan-speed-settings
           name: high
           tap_action:
             action: call-service
             service: fan.set_preset_mode
             service_data:
               entity_id: fan.ecofan
               preset_mode: high
           styles:
             card:
               - background-color: >
                   [[[
                     if ((states['fan.ecofan'].attributes.preset_mode === 'high') && (states['fan.ecofan'].state === 'on'))
                       return "#2980b9";
                     return "grey";
                   ]]]
         - type: custom:button-card
           template: vertical-divider-grey
         - type: custom:button-card # Full Button
           template: fan-speed-settings
           name: full
           tap_action:
             action: call-service
             service: fan.set_preset_mode
             service_data:
               entity_id: fan.ecofan
               preset_mode: full
           styles:
             card:
               - background-color: >
                   [[[
                     if ((states['fan.ecofan'].attributes.preset_mode === 'full') && (states['fan.ecofan'].state === 'on'))
                       return "#2980b9";
                     return "grey";
                   ]]]
         - type: custom:button-card
           template: vertical-divider-grey
         - type: custom:button-card # Off Button
           template: fan-speed-settings
           name: 'off'
           # color: white
           tap_action:
             action: call-service
             service: fan.turn_off
             service_data:
               entity_id: fan.ecofan
           styles:
             card:
               - background-color: >
                   [[[
                     if (states['fan.ecofan'].state === 'off') 
                       return "#2980b9";
                     return "grey";
                   ]]]
         - type: custom:button-card
           template: vertical-divider-grey
     - type: custom:button-card
       template: horizontal-divider-grey

Don’t forget the custom:vertical-stack-in-card.

1 Like

Hi Cadster. im struggling to get it back to work. my previous mqtt worked fine. now it stops.
Im trying to get your code into my itho.yaml. but without success. Can you share what i need to recode?

If i copy your code into itho.yaml i get a error code.

Thanks

stangen question did you still use your:

  command_topic: "ITHO/fan/cmd"
  state_topic: "ITHO/fan/State"
  preset_mode_command_topic: "ITHO/fan/cmd" # same as command_topic
  preset_mode_state_topic: "ITHO/fan/State" # same as state_topic

or did you copy one at one … if your topics are different then you need to change that back to old line.
that was my fault in first place…

Good morning. thanks for the reply. I changed the topics and now i am on the good way i think.

What i have now:

sensor:

 - platform: mqtt

   name: Tijd

   state_topic: "ITHO/Fan/Timer"

   value_template: "{{value}}"

   unit_of_measurement: 's'

 - platform: mqtt

   name : Snelheid

   state_topic: "ITHO/Fan/State"

   value_template: >

     {% if value|float==0 %}Standby{% endif %}

     {% if value|float==1 %}Laag{% endif %}

     {% if value|float==2 %}Medium{% endif %}

     {% if value|float==3 %}Hoog{% endif %}

     {% if value|float==4 %}Full{% endif %}

     {% if value|float>=11 %}Hoog(T){% endif %}

fan:
 - platform: mqtt
   command_topic: "ITHO/Fan/cmd"
   state_topic : "ITHO/Fan/State"
   state_value_template: "{% if value|float==0 %}State 0{% endif %}{% if value|float >0 %}State 1{% endif %}"
   payload_off: "State 0"
   payload_on: "State 1"
   preset_modes:
    - 'off'
    - 'low'
    - 'medium'
    - 'high'
    - 'full'
   preset_mode_command_topic: "ITHO/Fan/cmd"
   preset_mode_command_template: >
    {% if value == 'low' %}
      State 1
    {% elif value == 'medium' %}
      State 2
    {% elif value == 'high' %}
      State 3
    {% elif value == 'full' %}
      State 4
    {% else %}
      State 0
    {% endif %}
    preset_mode_state_topic: "ITHO/fan/State"
    preset_mode_value_template: >
    {% if value == '1' %}
      low
    {% elif value == '2' %}
      medium
    {% elif value == '3' %}
      high
    {% elif value == '4' %}
      full
    {% else %}
      off
    {% endif %}
    
   payload_low_speed: "State 1"

   payload_medium_speed: "State 2"
 
   payload_high_speed: "State 3"

   optimistic: "true"

   name: Afzuiging badkamer

   speeds:

     - low

     - medium

     - high


group:

 Ventilator:

   entities:

     - fan.afzuiging_badkamer

     - sensor.Snelheid

     - sensor.Tijd


From this point i have my working HA again. But only i can change the fan speeds etc with the wireless remote from the ecofan it self. I tried to pair the ESP again with the join command but it doesnt connect anymore. Also not when i use the leave command 9999.

So from this point im almost there. Maybe someone has any idea so we can sort this out :slight_smile:

here is my setup

sensor:

- platform: mqtt
  name: "ITHO Speed"
  state_topic: "Servers/itho/fan/state"
  icon: mdi:fan
  value_template: >-
    {% if value|float == 0 %}
      Standby
    {% elif value|float  == 1 %}
      Low
    {% elif value|float  == 2 %}
      Medium
    {% elif value|float  == 3 %}
      High
    {% elif value|float  == 4 %}
      Full
    {% else %}
      High(Timer)
    {% endif %}

- platform: mqtt
  name: "ITHO Tijd"
  icon: mdi:remote
  state_topic: "Servers/itho/fan/timer"
  value_template: "{{ value }}"
  unit_of_measurement: "s"

- platform: mqtt
  name: "ITHO Remote"
  state_topic: "Servers/itho/fan/lastidindex"
  icon: mdi:fan
  value_template: >-
    {% if value|float  == 1 %}
      Kitchen
    {% elif value|float  == 2 %}
      Bathroom
    {% else %}
      none
    {% endif %}

- platform: mqtt
  name: "ITHO Tijd"
  icon: mdi:av-timer
  state_topic: "Servers/itho/fan/timer"
  value_template: "{{ value }}"
  unit_of_measurement: "s"

fan:

- platform: mqtt
  name: "Afzuiging badkamer"
  command_topic: "Servers/itho/fan/cmd" # "ITHO/fan/cmd"
  state_topic: "Servers/itho/fan/state" # "ITHO/fan/State"
  state_value_template: "{% if value|float==0 %}State 0{% endif %}{% if value|float >0 %}State 1{% endif %}"
  payload_off: "State 0"
  payload_on: "State 1"
  preset_modes:
    - "off"
    - "low"
    - "medium"
    - "high"
  preset_mode_command_topic: "Servers/itho/fan/cmd" # "ITHO/fan/cmd"
  preset_mode_command_template: >
    {% if value == 'low' %}
      State 1
    {% elif value == 'medium' %}
      State 2
    {% elif value == 'high' %}
      State 3
    {% else %}
      State 0
    {% endif %}
  preset_mode_state_topic: "Servers/itho/fan/state"
  preset_mode_value_template: >
    {% if value == '1' %}
      low
    {% elif value == '2' %}
      medium
    {% elif value == '3' %}
      high
    {% else %}
      off
    {% endif %}
2 Likes

Thanks for sharing. i have made some changes on my code and now its working ( after powerless making of the ESP module ). so now i can also change speeds from HA. And thanks for the addon in remote ( now i can see which remote i am using or control by HA ).

One thing i want to add is the ‘remote’ option automatic. This option makes the Itho go higher based on Rh. This option enables the medium. I think this is missing from the code of @jodur ?

I hope someone can help me. I’m busy trying to use the version off @jodur in ESPHOME. But i can’t get a join with my Itho box. Also don’t see any error in the logs.
Only thing i did see, when i do a OTA, i get a error (Error1) with uploading the bin file. And when i disconnect pin D1, i can upload.

I have a other nodemcu with cc1101, with espeasy that is working fine with my ithobox. But i would have all my boards in ESPHOME.

i have ESPHOME installed. but since i had some OTA issues and errors i just did the ITHO outside ESPHOME. but good question. its good to have it in ESPHOME instead of outside. sry i cant help you on this

1 Like

@Alfagek , It is a know problem that the interrupts causes issues with a OTA. The workarround is indeed disconnecting the interrupt pin or disable the interupt trough a software change in the esp version. I know there is a change request from someone who implemented a software switch to disable the interrupts. I am waiting for ESP home to implement a OTA event trigger, so whe can disable the interrupt during OTA. For now the workarrounf for updating is a USB/COM upload or disconnecting the interrupt pin when using OTA.

1 Like

@jodur , thanks for the explanation.

Other question I have, how can I debug why I can’t pair with my itho box. In the logs i see “join on” “join off” when I use the join switch. But it doesn’t pair with the itho.

With a other nodemcu I have it working with espeasy and a old version from Sten vollebrecht

Working great, thanks

Regarding a patch for OTA for the ESP-home version, this seems to be on the way. A developers already posted a pull request to implement this.

see: https://github.com/esphome/feature-requests/issues/973#issuecomment-828636490

I switched from ESPeasy to ESPhome today. I can control my fan from within Home Assisant. Next thing is to add the remote ID so I can also see the changes when I use my remote. Can someone point me in the right direction of getting the ID? I lost it when I reflashed my old ESPeasy firmware. Thx!

Has anyone been able to pair it with an ITHO DemandFlow system?

I was Surprised to see that the manual was updated with new code, thanks for that!!

however if i copy paste it in my itho.yaml my config check gives this error:

expected a dictionary for dictionary value @ data['packages']['itho']

And thats the most weird Fault code i have seen in some time, probably a Coding or spacing error, but i dont know where to look. You guys have an idea? the old one worked fine.


 - platform: mqtt

 name: Ecofan

 command_topic: "ITHO/Fan/cmd"

 state_topic : "ITHO/Fan/State"

 state_value_template: "{% if value|float==0 %}State 0{% endif %}{% if value|float >0 %}State 1{% endif %}"

 payload_on: "State 1"

 payload_off: "State 0"

 optimistic: true

 preset_modes:

     - "off"     

     - "low"

     - "medium"

     - "high"

     - "full"

 preset_mode_command_topic: "ITHO/Fan/cmd"

 preset_mode_command_template: >

    {% if value == 'low' %}

    State 1

    {% elif value == 'medium' %}

    State 2

    {% elif value == 'high' %}

    State 3

    {% elif value == 'full' %}

    State 4

    {% else %}

    State 0

    {% endif %}

 preset_mode_state_topic: "ITHO/Fan/State"

 preset_mode_value_template: >

    {% if value_json.fan == low %}

    State 1

    {% elif value_json.fan == medium %}

    State 2

    {% elif value_json.fan == high %}

    State 3

    {% elif value_json.fan == full %}

    State 4

    {% else %}

    State 0

    {% endif %}

I’m was having the same problem. I changed the logger to:

logger:
  level: VERBOSE

In espHome.
This will show the ignored device ids in the log from the esp device.

1 Like