Sonoff MiniR4 Extreme Boot Loop

After successfully flashing the MiniR4 and resetting, the device constantly reboots. I am using the default config from the ESPHome Sonoff MiniR4 page. Even if I flash the unit with a blank config it still reboots constantly.

YAML file:

esphome:
  name: sonoff-minir4
  friendly_name: Sonoff MiniR4

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "xxxxxxxxxxxxxx"

ota:
  password: "xxxxxxxxxxxxxxxxx"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Sonoff-Minir4 Fallback Hotspot"
    password: "xxxxxxxxxxx"

captive_portal:

#######################################
# Device specific Config Begins Below #
#######################################

status_led:
  pin:
    number: GPIO19
    inverted: true

output:
  # Physical relay on GPIO
  - platform: gpio
    pin: GPIO26
    id: relay_1

light:
  - platform: binary
    id: light_1
    name: "relay_1"
    icon: mdi:ceiling-light-multiple-outline
    restore_mode: restore_default_off
    output: relay_1

binary_sensor:
  - platform: gpio
    pin: GPIO00
    id: button
    filters:
      - invert:
      - delayed_off: 50ms
    on_press:
      - light.toggle:
          id: light_1

  - platform: gpio
    name: s1
    pin: GPIO27
    id: s1
    filters:
      - invert:
      - delayed_off: 50ms
    on_press:
      then:
        - light.turn_on:
            id: light_1
    on_release:
      then:
        - light.turn_off:
            id: light_1

Logs:

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13132
load:0x40080400,len:3036
entry 0x400805e4
[I][logger:351]: Log initialized
[C][status_led:014]: Setting up Status LED...
[C][ota:473]: There have been 4 suspected unsuccessful boot attempts.
[D][esp32.preferences:114]: Saving 1 preferences to flash...
[D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[I][app:029]: Running through setup()...
[C][light:035]: Setting up light 'relay_1'...
[D][light:036]: 'relay_1' Setting:
[D][light:041]:   Color mode:
[C][wifi:038]: Setting up WiFi...
[C][wifi:051]: Starting WiFi...
[C][wifi:052]:   Local MAC: 08:D1:F9:2D:AC:EC
ets Jul 29 2019 12:21:46
 
1 Like

Hello. I think I had that issue. This happened for me when I was powering the device via USB after I flashed it. If you power it at mains voltage this issue might go away. Seems like it tries to draw more power than the usb can supply as it starts up Wi-Fi.

That was it! I used a bench supply and it’s working fine.