Hi All,
I’m pretty new to ESPHome and am working on an ESP32 / ESPHome garage door opener with open and close reed switches and a relay. Everything is working on the test bench, but I am seeing random ‘STOP’ triggers when controlling from home assistant device control screen with the percentage open / closed screen (position mode). e.g.
When opening or closing the door using this screen, I see random ‘STOP’ triggers. e.g.
[11:30:33][D][cover:186]: Current Operation: OPENING
[11:30:33][D][cover:170]: ‘Single Garage’ - Publishing:
[11:30:33][D][cover:173]: Position: 70%
[11:30:33][D][cover:186]: Current Operation: IDLE
[11:30:33][D][feedback.cover:385]: ‘Single Garage’ - Firing ‘STOP’ trigger.
If I switch to the button mode, I don’t see these issues and the door opens / closes / stops as exptected.
YAML code:
esphome:
name: garage_single
on_boot:
priority: 100
then:
if:
condition:
binary_sensor.is_on: closed_reed_switch
then:
- text_sensor.template.publish:
id: template_text
state: "Closed"
else:
- text_sensor.template.publish:
id: template_text
state: "Not closed"
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
password: ""
ota:
- platform: esphome
password: ""
wifi:
ssid: "******"
password: "*******"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Garage single fallback Hotspot"
password: "**********"
captive_portal:
switch:
- platform: gpio
pin: GPIO26
name: "Garage Door relay"
id: door_relay
internal: true
on_turn_on:
- delay: 250ms
- switch.turn_off: door_relay
sensor:
- platform: wifi_signal
name: "WiFi Signal"
update_interval: 60s
- platform: uptime
type: seconds
name: Uptime Sensor
update_interval: 30s
cover:
- platform: feedback
name: "Single Garage"
id: single_garage
has_built_in_endstop: true
open_action:
- switch.toggle: door_relay
- text_sensor.template.publish:
id: template_text
state: "Opening"
open_duration: 0.5min
open_endstop: open_reed_switch
close_action:
- switch.toggle: door_relay
- text_sensor.template.publish:
id: template_text
state: "Closing"
close_duration: 0.5min
close_endstop: closed_reed_switch
stop_action:
- switch.toggle: door_relay
- text_sensor.template.publish:
id: template_text
state: "Stopped/Idle"
binary_sensor:
- platform: gpio
pin:
number: GPIO25
mode: INPUT_PULLUP
inverted: true
id: closed_reed_switch
name: "closed reed"
on_state:
if:
condition:
binary_sensor.is_on: closed_reed_switch
then:
- text_sensor.template.publish:
id: template_text
state: "Closed"
else:
- text_sensor.template.publish:
id: template_text
state: "Partially open"
- platform: gpio
pin:
number: GPIO27
mode: INPUT_PULLUP
inverted: true
id: open_reed_switch
name: "open reed"
on_state:
if:
condition:
binary_sensor.is_on: open_reed_switch
then:
- text_sensor.template.publish:
id: template_text
state: "Open"
else:
- text_sensor.template.publish:
id: template_text
state: "Partially open"
text_sensor:
- platform: template
name: "Door State"
id: template_text
Can anyone give me some pointers as to what might be going on here?
Thanks