Somfy IB / IB+ House Installation wired controlled by esp32/esp8266 D1MINI

In our House are Blinds and Shutters installed - controlled by a Somfy IB / IB+ system. BJ of our House is 2011.
Somfy is the controlling unit for the sunscreens and the rollos - there´s a automatic Wind/Sun and a chronological central Somfy unit installed.
For us it´s working fine but as always there are some improvements to go for:

  1. Steering by Home Assistant
  2. Getting the Sunscreen to anonther level: make the blinds shut more/less according to the anzimuth of the sun automatically
  3. Steering all togehter by home Assistant integrated sensors - to get a better and more automatic sun/blind cover than the automatic ones.

How to go:

  1. Get a esp32 / esp8266 D1Mini
    OIP
    (im using always the mini versions because they better fit in these housings)
  2. Get a esp32 4 chanel Relais module
  3. Have some soldering / low volt wiring / tools by hand
    Now the Funny Part: wiring your 4 Relay Module to esp 32 D1Mini:

Go from Ground to Ground on your ESP8266
Go from VCC to 5V on your ESP8266
Go from IN1 (Relay1) to RX (GPIO3)
Go from IN2 (Relay2) to D2 (GPIO4)
Go from IN3 (Relay3) to D1 (GPIO5)
Go from IN4 (Relay4) to D6 (GPIO12)

Second Part: Wiring your relay module to your Soliris Ib: (in our House this is originally only installed for our Blinds)

grafik

Go from relais module K1 common pin to Soliris IB Steuerleitung Gemeinsamer C
Go from relais moulde K1 normally open pin to Soliris IB Steuerleitung AUF
Go from relais module K2 common pin to Soliris IB Steuerleitung Gemeinsamer C
Go from relais module K2 normally open pin to Soliris IB Steuerleitung AB

Third Part: Wiring your relay module to your Chronis IB L comfort:
(in our House this is originally only installed for our Shutters)

grafik

Go from relais module K3 common pin to Chronis IBLcomfort to Steuerleitung Gemeinsamer C
Go from relais module K3 normally opend pin to Chronis IBLcomfort to Steuerleitung AUF
Go from relais module K4 common pin to Chronis IBLcomfort to Steuerleitung Gemeinsamer C
Go from relais module K4 normally opend pin to Chronis IBLcomfort to
Steuerleitung AB

  1. Install in your Home Assistant ESPHome Card your esp8266 and config it:
esphome:
  name: journamehere
  friendly_name: Rolläden/Jalousien

esp8266:
  board: esp01_1m

# Enable logging

# Enable Home Assistant API
api:
  encryption:
    key: " your encryption here "

ota:


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

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "your ssid here"
    password: "your pw here"
     

captive_portal:

logger: 

binary_sensor:
#
switch:

  - platform: gpio
    pin: 
      number: GPIO3
      inverted: true
    name: "Jalousie öffnen"
    id: open_switch_j
    icon: "mdi:window-shutter-open"
#    on_turn_on:
#    - delay: 0.3s
#    - switch.turn_off: open_switch_j
    internal: true
  - platform: gpio
    pin: 
      number: GPIO4
      inverted: true
    name: "Jalousie schließen"
    id: close_switch_j
    icon: "mdi:window-shutter"
#    on_turn_on:
#    - delay: 0.3s
#    - switch.turn_off: close_switch_j
    internal: true
  - platform: gpio
    pin: 
      number: GPIO5
      inverted: true
    name: "Rolladen öffnen"
    id: open_switch_r
    icon: "mdi:garage-open"
#    on_turn_on:
#    - delay: 0.3s
#    - switch.turn_off: open_switch_r
    internal: true
  - platform: gpio
    pin: 
      number: GPIO12
      inverted: true
    name: "Rolladen schließen"
    id: close_switch_r    
    icon: "mdi:garage"
#    on_turn_on:
#    - delay: 0.3s
#    - switch.turn_off: close_switch_r
    internal: true

cover:
  - platform: template
    name: "Jalousie"
    open_action:
      # Cancel any previous action
      - switch.turn_off: close_switch_j
      # Turn the OPEN switch on briefly
      - switch.turn_on: open_switch_j
      - delay: 0.3s
      - switch.turn_off: open_switch_j
    close_action:
      - switch.turn_off: open_switch_j
      - switch.turn_on: close_switch_j
      - delay: 0.3s
      - switch.turn_off: close_switch_j
    stop_action:
      - switch.turn_on: close_switch_j
      - switch.turn_on: open_switch_j
      - delay: 0.3s
      - switch.turn_off: close_switch_j
      - switch.turn_off: open_switch_j
    optimistic: true
    assumed_state: true
    icon: "mdi:blinds-horizontal"
  - platform: template
    name: "Rolladen"
    open_action:
      # Cancel any previous action
      - switch.turn_off: close_switch_r
      # Turn the OPEN switch on briefly
      - switch.turn_on: open_switch_r
      - delay: 0.3s
      - switch.turn_off: open_switch_r
    close_action:
      - switch.turn_off: open_switch_r
      - switch.turn_on: close_switch_r
      - delay: 0.3s
      - switch.turn_off: close_switch_r
    stop_action:
      - switch.turn_on: close_switch_r
      - switch.turn_on: open_switch_r
      - delay: 0.3s
      - switch.turn_off: close_switch_r
      - switch.turn_off: open_switch_r
    optimistic: true
    assumed_state: true    
    icon: "mdi:roller-shade"   

Reboot HA and configure your new Integration ESPHOME Rolläden/Jalousien: You should get a new EntityCard:

grafik

Last Part: (but most Funny) - get your automation done for the automatic angel of your Blinds by azimut and sun standig level:

2 Likes

thanks to @sleepymaxx for the explanations.

I’ve done the same thing with a 2 channel relay (2CH) and a wifi node mcu 8266 (cp2120 driver)

how to connect the pins from the wifi-modul to the relay:

  • Vin (wifi modul) → VCC (relay modul), you need Vin because of the 5V
  • GND (wifi modul) → GND (relay modul)
  • D1 (wifi modul) → IN1 (relay modul)
  • D2 (wifi modul) → IN2 (relay modul)

how to connect the relay modul with the somfy izymo transmitter F-74300:

  • S1 (somfy, green cable) → NO2 (relay modul, normally open)
  • S2 (somfy, yellow cable) → NO1 (relay modul, normally open)
  • COM (somfy, white cable) → COM2 (relay modul)
  • COM2 (relay modul) → COM1 (relay modul) connect these two COM pins together on the relay modul

my yaml config (without wifi config)

switch:
  - platform: gpio
    id: relayup
    icon: "mdi:window-shutter-open"
    name: "Öffnen"
    # D1
    pin: 
      number: GPIO5
      inverted: true 
  - platform: gpio
    id: relaydown
    icon: "mdi:window-shutter"
    name: "Schliessen"
    # D2
    pin: 
      number: GPIO4
      inverted: true

cover:
  - platform: template
    name: "Markise"
    open_action:
      # Cancel any previous action
      - switch.turn_off: relaydown
      # Turn the OPEN switch on briefly
      - switch.turn_on: relayup
      - delay: 1s
      - switch.turn_off: relayup
    close_action:
      - switch.turn_off: relayup
      - switch.turn_on: relaydown
      - delay: 1s
      - switch.turn_off: relaydown
    stop_action:
      - switch.turn_on: relaydown
      - switch.turn_on: relayup
      - delay: 1s
      - switch.turn_off: relaydown
      - switch.turn_off: relayup
    optimistic: true
    assumed_state: true
    icon: "mdi:blinds-horizontal"
1 Like

congratulations

1 Like

redone my whole ESP-Home Configuration due to lack of positioning my Blinds correctly as i need:
i want to steer the whole heigth of my Blinds as well as the angle of shutting. so i got this in ESP HOME:

esphome:
  name: "jalousien"
  friendly_name: Jalousien

esp8266:
  board: esp01_1m

# Enable logging

# Enable Home Assistant API
api:
  encryption:
    key: "xxx.xxx.xxx

ota:

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  fast_connect: off
  power_save_mode: none

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "xxx.xxx.xxx.xxx""
    password: "xxx.xxx.xxx"

captive_portal:

sensor: 
  - platform: wifi_signal
    name: "${friendly_name} wifi_signal"
    update_interval: 60s
    
logger: 

binary_sensor:

external_components:
  - source: github://klaudiusz223/esphome@tilt-cover
    components: [ time_based_tilt ]

switch:
  - platform: gpio
    id: "blind_01_relay_down"
    disabled_by_default: true
    pin:
      number: GPIO4
      mode:
        output: true
      inverted: true

  - platform: gpio
    id: "blind_01_relay_up"
    disabled_by_default: true
    pin:
      number: GPIO3
      mode:
        output: true
      inverted: true

  - platform: gpio
    id: "blind_02_relay_down"
    disabled_by_default: true
    pin:
      number: GPIO12
      mode:
        output: true
      inverted: true

  - platform: gpio
    id: "blind_02_relay_up"
    disabled_by_default: true
    pin:
      number: GPIO5
      mode:
        output: true
      inverted: true

cover:
  - id: cover_01
    platform: time_based_tilt
    name: "Jalousie Sued"
    open_duration: 49700 ms
    close_duration: 48700 ms
    inertia_open_time: 105 ms
    tilt_open_duration: 930 ms
    inertia_close_time:  105 ms
    tilt_close_duration: 900 ms
    interlock_wait_time: 105 ms
    recalibration_time: 1500ms
    assumed_state: true
    close_action:
      - switch.turn_on: blind_01_relay_down
    open_action:
      - switch.turn_on: blind_01_relay_up   
    stop_action:
      - switch.turn_on: blind_01_relay_up
      - switch.turn_on: blind_01_relay_down	 
      - delay: 105 ms
      - switch.turn_off: blind_01_relay_up
      - switch.turn_off: blind_01_relay_down

  - id: cover_02
    platform: time_based_tilt
    name: "Jalousie West"
    open_duration: 49700 ms
    close_duration: 48700 ms
    inertia_open_time: 105 ms
    tilt_open_duration: 930 ms
    inertia_close_time: 105 ms
    tilt_close_duration: 900 ms
    interlock_wait_time: 105 ms
    recalibration_time: 1500ms
    assumed_state: true
    close_action:
      - switch.turn_on: blind_02_relay_down
    open_action:
      - switch.turn_on: blind_02_relay_up
    stop_action:
      - switch.turn_on: blind_02_relay_up
      - switch.turn_on: blind_02_relay_down	 
      - delay: 105 ms
      - switch.turn_off: blind_02_relay_up
      - switch.turn_off: blind_02_relay_down 

The whole overwork and idea belongs to : github://klaudiusz223/esphome@tilt-cover
i only changed the timings of the Jalousies to my needs

due to this overhaul i was able to set up two differnt automations for the passing blinds of my House - one of them goes to the south the other goes to the West…
South:

alias: Jalousie-Süden
description: ""
trigger:
  - platform: numeric_state
    entity_id:
      - sensor.vbc702_s_outside_temperature
    above: 19
    for:
      hours: 0
      minutes: 5
      seconds: 0
condition:
  - condition: sun
    before: sunset
    after: sunrise
  - condition: or
    conditions:
      - condition: state
        entity_id: weather.forecast_langenmaier
        attribute: cloud_coverage
        state: sunny
      - condition: state
        entity_id: weather.forecast_langenmaier
        state: partlycloudy
      - condition: state
        entity_id: weather.forecast_langenmaier
        state: cloudy
  - type: is_value
    condition: device
    device_id: 11b09e741d6b77c28d124b587c9283c3
    entity_id: 86642053d6587b36622f3338b59ac581
    domain: sensor
    above: 130
    below: 270
action:
  - service: cover.open_cover
    metadata: {}
    data: {}
    target:
      entity_id: cover.jalousien_jalousie_sued
  - delay:
      hours: 0
      minutes: 1
      seconds: 0
      milliseconds: 0
  - choose:
      - conditions:
          - condition: time
            before: "13:00:00"
        sequence:
          - service: cover.close_cover
            metadata: {}
            data: {}
            target:
              entity_id: cover.jalousien_jalousie_sued
          - delay:
              hours: 0
              minutes: 0
              seconds: 52
              milliseconds: 0
          - service: cover.stop_cover
            metadata: {}
            data: {}
            target:
              entity_id: cover.jalousien_jalousie_sued
          - delay:
              hours: 0
              minutes: 0
              seconds: 1
              milliseconds: 0
      - conditions:
          - condition: time
            after: "13:00:00"
        sequence:
          - service: cover.close_cover
            metadata: {}
            data: {}
            target:
              entity_id: cover.jalousien_jalousie_sued
          - delay:
              hours: 0
              minutes: 0
              seconds: 36
              milliseconds: 0
          - service: cover.stop_cover
            metadata: {}
            data: {}
            target:
              entity_id: cover.jalousien_jalousie_sued
          - delay:
              hours: 0
              minutes: 0
              seconds: 1
              milliseconds: 0
  - choose:
      - conditions:
          - type: is_value
            condition: device
            device_id: 11b09e741d6b77c28d124b587c9283c3
            entity_id: 83dcfe7101aa5dfb32d415cc5aded269
            domain: sensor
            above: 35
            below: 100
        sequence:
          - service: cover.set_cover_tilt_position
            metadata: {}
            data:
              tilt_position: 100
            target:
              entity_id:
                - cover.jalousien_jalousie_sued
      - conditions:
          - type: is_value
            condition: device
            device_id: 11b09e741d6b77c28d124b587c9283c3
            entity_id: 83dcfe7101aa5dfb32d415cc5aded269
            domain: sensor
            below: 35
            above: 25
        sequence:
          - service: cover.set_cover_tilt_position
            metadata: {}
            data:
              tilt_position: 80
            target:
              entity_id: cover.jalousien_jalousie_sued
      - conditions:
          - type: is_value
            condition: device
            device_id: 11b09e741d6b77c28d124b587c9283c3
            entity_id: 83dcfe7101aa5dfb32d415cc5aded269
            domain: sensor
            below: 25
            above: 15
        sequence:
          - service: cover.set_cover_tilt_position
            metadata: {}
            data:
              tilt_position: 60
            target:
              entity_id: cover.jalousien_jalousie_sued
      - conditions:
          - type: is_value
            condition: device
            device_id: 11b09e741d6b77c28d124b587c9283c3
            entity_id: 83dcfe7101aa5dfb32d415cc5aded269
            domain: sensor
            below: 15
            above: -15
        sequence:
          - service: cover.set_cover_tilt_position
            metadata: {}
            data:
              tilt_position: 40
            target:
              entity_id: cover.jalousien_jalousie_sued
    enabled: true
  - repeat:
      sequence:
        - delay:
            hours: 0
            minutes: 15
            seconds: 0
            milliseconds: 0
        - choose:
            - conditions:
                - condition: or
                  conditions:
                    - condition: numeric_state
                      entity_id: sensor.vbc702_s_outside_temperature
                      above: 30
                    - condition: numeric_state
                      entity_id: sensor.wasseruhr_esp_temperature_inside
                      above: 25
              sequence:
                - service: cover.close_cover
                  metadata: {}
                  data: {}
                  target:
                    entity_id:
                      - cover.jalousien_jalousie_sued
                - delay:
                    hours: 0
                    minutes: 0
                    seconds: 48
                    milliseconds: 0
                - service: cover.stop_cover
                  metadata: {}
                  data: {}
                  target:
                    entity_id: cover.jalousien_jalousie_sued
            - conditions:
                - type: is_value
                  condition: device
                  device_id: 11b09e741d6b77c28d124b587c9283c3
                  entity_id: 83dcfe7101aa5dfb32d415cc5aded269
                  domain: sensor
                  above: 35
                  below: 100
              sequence:
                - service: cover.open_cover_tilt
                  target:
                    entity_id:
                      - cover.jalousien_jalousie_sued
                  data: {}
            - conditions:
                - type: is_value
                  condition: device
                  device_id: 11b09e741d6b77c28d124b587c9283c3
                  entity_id: 83dcfe7101aa5dfb32d415cc5aded269
                  domain: sensor
                  below: 35
                  above: 25
              sequence:
                - service: cover.set_cover_tilt_position
                  metadata: {}
                  data:
                    tilt_position: 80
                  target:
                    entity_id: cover.jalousien_jalousie_sued
            - conditions:
                - type: is_value
                  condition: device
                  device_id: 11b09e741d6b77c28d124b587c9283c3
                  entity_id: 83dcfe7101aa5dfb32d415cc5aded269
                  domain: sensor
                  below: 25
                  above: 15
              sequence:
                - service: cover.set_cover_tilt_position
                  metadata: {}
                  data:
                    tilt_position: 60
                  target:
                    entity_id: cover.jalousien_jalousie_sued
            - conditions:
                - type: is_value
                  condition: device
                  device_id: 11b09e741d6b77c28d124b587c9283c3
                  entity_id: 83dcfe7101aa5dfb32d415cc5aded269
                  domain: sensor
                  below: 15
                  above: -15
              sequence:
                - service: cover.set_cover_tilt_position
                  metadata: {}
                  data:
                    tilt_position: 40
                  target:
                    entity_id: cover.jalousien_jalousie_sued
          enabled: true
      until:
        - condition: or
          conditions:
            - type: is_value
              condition: device
              device_id: 11b09e741d6b77c28d124b587c9283c3
              entity_id: 86642053d6587b36622f3338b59ac581
              domain: sensor
              above: 280
            - condition: numeric_state
              entity_id: sensor.vbc702_s_outside_temperature
              below: 18.5
  - service: cover.open_cover
    metadata: {}
    data: {}
    target:
      entity_id: cover.jalousien_jalousie_sued
  - delay:
      hours: 0
      minutes: 0
      seconds: 49
      milliseconds: 0
  - service: cover.stop_cover
    metadata: {}
    data: {}
    target:
      entity_id: cover.jalousien_jalousie_sued
mode: single

West:

alias: Jalousie-Westen
description: ""
trigger:
  - platform: numeric_state
    entity_id:
      - sensor.vbc702_s_outside_temperature
    above: 19
    for:
      hours: 0
      minutes: 10
      seconds: 0
condition:
  - condition: sun
    before: sunset
    after: sunrise
  - condition: or
    conditions:
      - condition: state
        entity_id: weather.forecast_langenmaier
        attribute: cloud_coverage
        state: sunny
      - condition: state
        entity_id: weather.forecast_langenmaier
        state: partlycloudy
      - condition: state
        entity_id: weather.forecast_langenmaier
        state: cloudy
  - type: is_value
    condition: device
    device_id: 11b09e741d6b77c28d124b587c9283c3
    entity_id: 86642053d6587b36622f3338b59ac581
    domain: sensor
    above: 175
    below: 307
action:
  - service: cover.open_cover
    metadata: {}
    data: {}
    target:
      entity_id: cover.jalousien_jalousie_west
  - delay:
      hours: 0
      minutes: 1
      seconds: 0
      milliseconds: 0
  - service: cover.close_cover
    metadata: {}
    data: {}
    target:
      entity_id:
        - cover.jalousien_jalousie_west
  - delay:
      hours: 0
      minutes: 0
      seconds: 52
      milliseconds: 0
  - service: cover.stop_cover
    metadata: {}
    data: {}
    target:
      entity_id: cover.jalousien_jalousie_west
  - delay:
      hours: 0
      minutes: 0
      seconds: 1
      milliseconds: 0
  - choose:
      - conditions:
          - type: is_value
            condition: device
            device_id: 11b09e741d6b77c28d124b587c9283c3
            entity_id: 83dcfe7101aa5dfb32d415cc5aded269
            domain: sensor
            above: 35
            below: 100
        sequence:
          - service: cover.set_cover_tilt_position
            metadata: {}
            data:
              tilt_position: 100
            target:
              entity_id: cover.jalousien_jalousie_west
      - conditions:
          - type: is_value
            condition: device
            device_id: 11b09e741d6b77c28d124b587c9283c3
            entity_id: 83dcfe7101aa5dfb32d415cc5aded269
            domain: sensor
            below: 35
            above: 25
        sequence:
          - service: cover.set_cover_tilt_position
            metadata: {}
            data:
              tilt_position: 80
            target:
              entity_id: cover.jalousien_jalousie_west
      - conditions:
          - type: is_value
            condition: device
            device_id: 11b09e741d6b77c28d124b587c9283c3
            entity_id: 83dcfe7101aa5dfb32d415cc5aded269
            domain: sensor
            below: 25
            above: 15
        sequence:
          - service: cover.set_cover_tilt_position
            metadata: {}
            data:
              tilt_position: 60
            target:
              entity_id: cover.jalousien_jalousie_west
      - conditions:
          - type: is_value
            condition: device
            device_id: 11b09e741d6b77c28d124b587c9283c3
            entity_id: 83dcfe7101aa5dfb32d415cc5aded269
            domain: sensor
            below: 15
            above: -15
        sequence:
          - service: cover.set_cover_tilt_position
            metadata: {}
            data:
              tilt_position: 40
            target:
              entity_id: cover.jalousien_jalousie_west
    enabled: true
  - repeat:
      sequence:
        - delay:
            hours: 0
            minutes: 15
            seconds: 0
            milliseconds: 0
        - choose:
            - conditions:
                - condition: or
                  conditions:
                    - condition: numeric_state
                      entity_id: sensor.vbc702_s_outside_temperature
                      above: 30
                    - condition: numeric_state
                      entity_id: sensor.wasseruhr_esp_temperature_inside
                      above: 25
              sequence:
                - service: cover.close_cover
                  metadata: {}
                  data: {}
                  target:
                    entity_id: cover.jalousien_jalousie_west
                - delay:
                    hours: 0
                    minutes: 0
                    seconds: 48
                    milliseconds: 0
                - service: cover.stop_cover
                  metadata: {}
                  data: {}
                  target:
                    entity_id: cover.jalousien_jalousie_west
            - conditions:
                - type: is_value
                  condition: device
                  device_id: 11b09e741d6b77c28d124b587c9283c3
                  entity_id: 83dcfe7101aa5dfb32d415cc5aded269
                  domain: sensor
                  above: 35
                  below: 100
              sequence:
                - service: cover.set_cover_tilt_position
                  metadata: {}
                  data:
                    tilt_position: 100
                  target:
                    entity_id: cover.jalousien_jalousie_west
            - conditions:
                - type: is_value
                  condition: device
                  device_id: 11b09e741d6b77c28d124b587c9283c3
                  entity_id: 83dcfe7101aa5dfb32d415cc5aded269
                  domain: sensor
                  below: 35
                  above: 25
              sequence:
                - service: cover.set_cover_tilt_position
                  metadata: {}
                  data:
                    tilt_position: 80
                  target:
                    entity_id: cover.jalousien_jalousie_west
            - conditions:
                - type: is_value
                  condition: device
                  device_id: 11b09e741d6b77c28d124b587c9283c3
                  entity_id: 83dcfe7101aa5dfb32d415cc5aded269
                  domain: sensor
                  below: 25
                  above: 15
              sequence:
                - service: cover.set_cover_tilt_position
                  metadata: {}
                  data:
                    tilt_position: 60
                  target:
                    entity_id: cover.jalousien_jalousie_west
            - conditions:
                - type: is_value
                  condition: device
                  device_id: 11b09e741d6b77c28d124b587c9283c3
                  entity_id: 83dcfe7101aa5dfb32d415cc5aded269
                  domain: sensor
                  below: 15
                  above: -15
              sequence:
                - service: cover.set_cover_tilt_position
                  metadata: {}
                  data:
                    tilt_position: 40
                  target:
                    entity_id: cover.jalousien_jalousie_west
          enabled: true
      until:
        - condition: or
          conditions:
            - condition: sun
              before: sunset
              after: sunset
              after_offset: "5"
            - condition: numeric_state
              entity_id: sensor.vbc702_s_outside_temperature
              below: 18.5
  - service: cover.open_cover
    metadata: {}
    data: {}
    target:
      entity_id: cover.jalousien_jalousie_west
  - delay:
      hours: 0
      minutes: 0
      seconds: 50
      milliseconds: 0
  - service: cover.stop_cover
    metadata: {}
    data: {}
    target:
      entity_id: cover.jalousien_jalousie_west
mode: single

With this setup i´m able to automatically steer the south/west Blinds accordingly to Sun Anzimuth/Elevation/Temperature Outside/Inside /the Radiation level /the amount of Light inside the House/ my Weather Forecast and so on… Also with the new Programming of my ESP HOME device im able to steer furthermore the percentage of closing/opening as well as the angle of the shading blinds.