Have to reboot the board often

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

Maybe it moves on boot because D4 is high at boot? ESP8266 Pinout Reference: Which GPIO pins should you use? | Random Nerd Tutorials

I will try changing it to D1, D2 from D3,D4 and see what happens.

1 Like

Changing to the D1, D2 pins fixed the reboot run away.
Now I have to see if the occasional slow response persists, which it probably will. I don’t see this fixing that problem. One step at a time :slight_smile:

No suggestions there sorry, except monitoring logs.

The slow response could be caused by not having power_save_mode: none and manual_ip configured under the wifi section in your yaml.

Both of these are optional and should lead to faster response times according to the ESPhome docs.
I’m using both those options and never had an issue with delayed responses on my water heater which barely has any wifi signal strength

I saw that the power_save_mode: is supposed to default to none. But I just added it in case. I have the IP set to manual in my router. I do that with ever device, so I did not change that. Time will tell.