ESPHome

ESPHome: Customization on the Garage Door Opener

How to customize your Konnected Garage Door Opener with Konnected's ESPHome packages

This article applies to the Garage Door Opener running ESPHome firmware.

Plug-and-Play with Home Assistant Using Konnected's ESPHome Firmware

Konnected's pre-built firmware for our Garage Door Opener lets you quickly automate your garage door opener with Home Assistant with the most common simple setup. The optical laser sensor is used to detect the open garage, and the DOOR relay toggles it. A 5-second audible and visual warning is built-in.

When you adopt a Konnected Garage Door Opener into your ESPHome config, the default configuration looks like this:

substitutions:
name: garage-door-xxxxxx
packages:
  konnected.garage-door-esp8266: github://konnected-io/konnected-esphome/garage-door-esp8266.yaml@master
esphome:
  name: ${name}
  name_add_mac_suffix: false
api:
  encryption:
  key: UNIQUE_GENERATED_KEY_FOR_HOME_ASSISTANT
wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

The package konnected-esphome/garage-door-esp8266.yaml hosted on GitHub is Konnected's open-source default package of Garage Door Opener firmware configurations with in-line comments to help you understand what each package does.

Changing Garage Door Opener Settings

Most settings can be adjusted by overriding variables in the substitutions section of your config.

Changing the Garage Door Relay Duration

By default, the relay to trigger the garage door closes for 300ms (0.3 seconds). To change this:

substitutions:
  name: garage-door-xxxxxx
 garage_door_opener_momentary_duration: 500ms

Changing the Warning Duration

By default, a 5-second audible and visual warning occurs before the garage door closes.

substitutions:
  name: garage-door-xxxxxx
 garage_door_close_warning_duration: 10s

Changing the Optical Laser Range Sensor Margin of Error

By default, the device allows for a +/- 0.1m (10cm) margin of error when seeing if the open garage door is visible at the calibrated distance. Adjust this (in meters):

substitutions:
  name: garage-door-xxxxxx
 open_garage_door_distance_margin_of_error: "0.15"

Customizing the Wired Sensor Input

The wired sensor input is enabled via packages/garage-door-wired-sensor.yaml and sets up an internal binary sensor with id garage_door_input. Since release 2023.11.2 the wired input is exposed by default to Home Assistant as a binary_sensor with the unique ID wired_input. It can be customized to function in many ways:

Use the Wired Input for a PIR Motion Sensor

Don't need a wired garage door sensor? Add a 360-degree PIR Motion Sensor in the garage instead!

binary_sensor:
- id: !extend garage_door_input
name: Garage Motion
internal: false
device_class: motion

Extended Configuration for Customizing Packages

To customize the firmware, you can pick and choose from the packages that you want. To do this, follow the link above to the default package on GithHub, and copy and paste the contents of that file into your ESPHome config, replacing everything except your substitutions section, like this (comments removed for brevity):

substitutions:
  name: garage-door-xxxxxx
packages:
  remote_package:
    url: http://github.com/konnected-io/konnected-esphome
  ref: master
    files:
      - packages/garage-door-esp8266-base.yaml
    - packages/garage-door-cover-range.yaml
    - packages/garage-door-wired-sensor.yaml
    - packages/vl53l0x-range-sensor.yaml
    - packages/garage-door-opener-button.yaml
    - packages/switch.yaml
    - packages/warning-led.yaml
    - packages/warning-beep.yaml
    - packages/wifi.yaml
    - packages/status-led.yaml
esphome:
  name: ${name}
  name_add_mac_suffix: false
api:
  encryption:
    key: UNIQUE_GENERATED_KEY_FOR_HOME_ASSISTANT
wifi:
  ssid: !secret wifi_ssid
password: !secret wifi_password
web_server:
logger:
ota:

Using a Wired Sensor with the Optical Range Sensor

To add a wired sensor in addition to the optical laser range sensor to know if the garage is open or closed, replace the cover pcakge with packages/garage-door-cover-wired-and-range.yaml.

This package combines the states of both sensors, showing the garage door as open when either sensor shows open, and closed when both sensors show closed.

substitutions:
  name: garage-door-xxxxxx
packages:
  remote_package:
    url: http://github.com/konnected-io/konnected-esphome
    ref: master
    files:
      - packages/garage-door-esp8266-base.yaml
    - packages/garage-door-cover-wired-and-range.yaml
      - packages/garage-door-wired-sensor.yaml
    - packages/vl53l0x-range-sensor.yaml
      - packages/garage-door-opener-button.yaml
      - packages/switch.yaml
      - packages/warning-led.yaml
      - packages/warning-beep.yaml
      - packages/wifi.yaml
      - packages/status-led.yaml
esphome:
  name: ${name}
  name_add_mac_suffix: false
api:
  encryption:
    key: UNIQUE_GENERATED_KEY_FOR_HOME_ASSISTANT
wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
web_server:
logger:
ota:

Using a Wired Sensor Instead of Optical Range Sensor

To rely on the wired sensor instead of the optical laser range sensor to know if the garage is open or closed, replace the cover package with packages/garage-door-cover-wired.yaml.

To disable the range sensor completely, you can remove or comment out the vl53l0x-range-sensor.yaml

substitutions:
  name: garage-door-xxxxxx
packages:
  remote_package:
    url: http://github.com/konnected-io/konnected-esphome
    ref: master
    files:
      - packages/garage-door-esp8266-base.yaml
    - packages/garage-door-cover-wired.yaml
      - packages/garage-door-wired-sensor.yaml
    # - packages/vl53l0x-range-sensor.yaml
      - packages/garage-door-opener-button.yaml
      - packages/switch.yaml
      - packages/warning-led.yaml
      - packages/warning-beep.yaml
      - packages/wifi.yaml
      - packages/status-led.yaml
esphome:
  name: ${name}
  name_add_mac_suffix: false
api:
  encryption:
    key: UNIQUE_GENERATED_KEY_FOR_HOME_ASSISTANT
wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
web_server:
logger:
ota:

WiFi connectivity

Some users can experience issues with WiFi connectivity. We suggest modifying the wifi configuration in your ESPHome firmware and giving it a specific BSSID of the access point you want it to connect to. Like this:

wifi:
networks:
- ssid: MyNetwork
- password: mypass
- bssid: AB:CD:EF:01:23:45

The above should force it to only connect to the access point with the given BSSID.