I have created a Blind control using NodeMcu and a Cover Card. It works well with a couple of exceptions.
When rebooting the device, it starts moving by itself and can not be controlled until the boot is complete.
Very often, it gets very slow to respond (5-10 seconds). Rebooting the device (power on/off) fixes the problem.
Is there any way to fix these issues?
Here is the code:
esphome:
name: "office-blinds"
esp8266:
board: nodemcuv2
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Esphome-Web-121Cda"
password: "qG2NYb7LSEl6"
captive_portal:
# NOTE: Unplug power to the motors before installing
# Otherwise motors will RUN part way through the install.
# Reed sensors to detect top and bottom limits
binary_sensor:
- platform: gpio
pin:
number: D5
inverted: false
mode:
input: true
pullup: true
id: "open_endstop_binary_sensor"
name: "Blind on top Stop"
device_class: window
- platform: gpio
pin:
number: D6
inverted: false
mode:
input: true
pullup: true
id: close_endstop_binary_sensor
name: "Blind on bottom Stop"
device_class: window
switch:
- platform: gpio
pin: D3
name: "Blinds Open"
id: "open_cover_switch" # Move UP Relay
interlock: &interlock [open_cover_switch, close_cover_switch]
- platform: gpio
pin: D4
interlock: *interlock
name: "Blinds Close"
id: close_cover_switch
cover:
- platform: feedback
name: "Blinds Control"
open_action:
- switch.turn_on: open_cover_switch
open_duration: 23s
open_endstop: open_endstop_binary_sensor
# open_sensor: open_movement_binary_sensor
close_action:
- switch.turn_on: close_cover_switch
close_duration: 20s
close_endstop: close_endstop_binary_sensor
# close_sensor: close_movement_binary_sensor
stop_action:
- switch.turn_off: open_cover_switch
- switch.turn_off: close_cover_switch
type or paste code here