Another Garage Door

I am quite frustrated after trying for long time now on getting my D1mini work as garage door sensor and opener.

SEEKING FOR HELP :slight_smile:

setup:

  • D1mini
  • 1 relais (for sending an impuls to the motor) (motor might also be initiated by a wall-button and mobile switch)
  • 2 reed contacts for giving the end-positions (open, closed)

I was hoping to use COVER with GARAGE and FEEDBACK to allow

  • manual openinging and closing (therefore I used on_press and on_release)
  • HomeAssistant initiated opening and closing
  • status of OPEN, CLOSED, OPENING, CLOSING (and at a timeout: STALLED)

Ths is my code

binary_sensor:
# Sensor an GPIO15 Tor geƶffnet
  - platform: gpio
    pin: 
      number: GPIO15
      inverted: true
    name: "Tor geƶffnet"
    id: gate_open
    internal: true
    disabled_by_default: true
    on_press:
      - binary_sensor.template.publish:
          id: gate_opening
          state: false
      - binary_sensor.template.publish:
          id: gate_closing
          state: false
    on_release:
      - binary_sensor.template.publish:
          id: gate_closing
          state: true

# interner Sensor Tor ƶffnet
  - platform: template
    name: "Tor ƶffnet"
    id: gate_opening
    disabled_by_default: true
    internal: true

# Sensor an GPIO13 Tor geschlossen
  - platform: gpio
    pin: 
      number: GPIO13
      inverted: true
    name: "Tor geschlossen"
    id: gate_closed
    internal: true
    disabled_by_default: true
    on_press:
      - binary_sensor.template.publish:
          id: gate_opening
          state: false
      - binary_sensor.template.publish:
          id: gate_closing
          state: false
    on_release:
      - binary_sensor.template.publish:
          id: gate_opening
          state: true

# interner Sensor Tor schlieƟt
  - platform: template
    name: "Tor schlieƟt"
    id: gate_closing
    disabled_by_default: true
    internal: true
  
#Relais fĆ¼r Garagentorƶffner  
switch:
  - platform: gpio
    pin: GPIO12
    name: "Garagentorƶffner"
    id: garagentoroeffner
    internal: true
    restore_mode: ALWAYS_OFF
    inverted: true
    on_turn_on:
    - delay : 500ms
    - switch.turn_off: garagentoroeffner
 
  - platform: restart
    name: "Garage Reset"
    id: restart_switch
    disabled_by_default: true
    
cover:
  - platform: feedback
    name: "Tor"
    device_class: garage
    has_built_in_endstop: true
    max_duration: 7s

    open_action:
      - switch.turn_on: garagentoroeffner
    open_duration: 5s
    open_endstop: gate_open
    open_sensor: gate_opening

    close_action:
      - switch.turn_on: garagentoroeffner
    close_duration: 5s
    close_endstop: gate_closed
    close_sensor: gate_closing

    stop_action:
      - switch.turn_on: garagentoroeffner

Despite the fact that I am seeing not available sensors (Switch1 and Switch2) and elements (ESPHome-Garage), the behavior is very strange:

  • sensor OPEN permanently set
[00:46:10][D][binary_sensor:036]: 'Tor ƶffnet': Sending state ON
[00:46:10][D][feedback.cover:094]: 'Tor' - Open feedback 'STARTED'.
[00:46:10][D][cover:170]: 'Tor' - Publishing:
[00:46:10][D][cover:173]:   Position: 100%
[00:46:10][D][cover:186]:   Current Operation: OPENING
[00:46:11][D][cover:170]: 'Tor' - Publishing:
[00:46:11][D][cover:173]:   Position: 100%
[00:46:11][D][cover:186]:   Current Operation: OPENING
[00:46:12][D][cover:170]: 'Tor' - Publishing:
[00:46:12][D][cover:173]:   Position: 100%
[00:46:12][D][cover:186]:   Current Operation: OPENING
[00:46:13][D][cover:170]: 'Tor' - Publishing:
[00:46:13][D][cover:173]:   Position: 100%
..........
  • sensor OPEN released
[00:47:51][D][binary_sensor:036]: 'Tor ƶffnet': Sending state OFF
[00:47:51][D][feedback.cover:094]: 'Tor' - Open feedback 'ENDED'.
[00:47:51][D][cover:170]: 'Tor' - Publishing:
[00:47:51][D][cover:173]:   Position: 86%
[00:47:51][D][cover:186]:   Current Operation: IDLE
[00:47:51][D][cover:170]: 'Tor' - Publishing:
[00:47:51][D][cover:173]:   Position: 0%
[00:47:51][D][cover:186]:   Current Operation: IDLE
.........
  • similar behavior when CLOSE sensor is set or released