Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OTA Error sending data: [Errno 104] Connection reset by peer #1721

Closed
Erriez opened this issue Dec 26, 2020 · 10 comments
Closed

OTA Error sending data: [Errno 104] Connection reset by peer #1721

Erriez opened this issue Dec 26, 2020 · 10 comments

Comments

@Erriez
Copy link

Erriez commented Dec 26, 2020

Operating environment/Installation (Hass.io/Docker/pip/etc.):

pip3

ESP (ESP32/ESP8266, Board/Sonoff):

ESP8266 Wemos D1 Mini / NodeMCU

ESPHome version (latest production, beta, dev branch)

Version: 1.15.3

Affected component:

https://esphome.io/components/ota.html

Description of problem:

OTA update results in failure: Error sending data: [Errno 104] Connection reset by peer

Problem-relevant YAML-configuration entries:

esphome:
  name: esp_rf
  platform: ESP8266
  board: nodemcuv2
  #board: d1_mini_lite

wifi:
  ssid: "ssid"
  password: "passwordwith63characters"

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "ESP RF Fallback Hotspot"
    password: "FogrmAnfG0ln"

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:
  password: "password"

ota:
  password: "password"


remote_receiver:
  pin: 
    number: D2
    inverted: True
  dump: all
  idle: 20ms
  buffer_size: 2kb


remote_transmitter:
  pin: D1
  carrier_duty_percent: 50%

switch:
  - platform: template
    name: IR Humax power
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0x00FF
  - platform: template
    name: IR Humax volume up
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0xF807
  - platform: template
    name: IR Humax volume down
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0x02FD
  - platform: template
    name: IR Humax mute
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0x18E7
  - platform: template
    name: IR Humax 1
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0xC03F
  - platform: template
    name: IR Humax 2
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0x20DF
  - platform: template
    name: IR Humax 3
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0xA05F
  - platform: template
    name: IR Humax 4
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0x609F
  - platform: template
    name: IR Humax 5
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0xE01F
  - platform: template
    name: IR Humax 6
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0x10EF
  - platform: template
    name: IR Humax 7
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0x906F
  - platform: template
    name: IR Humax 8
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0x50AF
  - platform: template
    name: IR Humax 9
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0xD02F
  - platform: template
    name: IR Humax 0
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0x30CF
  - platform: template
    name: IR Humax channel up
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0x08F7
  - platform: template
    name: IR Humax channel down
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0xF00F
  - platform: template
    name: IR Humax play
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0x06F9
  - platform: template
    name: IR Humax pause
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0x46B9
  - platform: template
    name: IR Humax stop
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0xC639
  - platform: template
    name: IR Humax record
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0x8679
  - platform: template
    name: IR Humax forward
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0x26D9
  - platform: template
    name: IR Humax rewind
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0xA659
  - platform: template
    name: IR Humax begin
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0x6699
  - platform: template
    name: IR Humax end
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0xE619
  - platform: template
    name: IR Humax left
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0x48B7
  - platform: template
    name: IR Humax right
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0x28D7
  - platform: template
    name: IR Humax up
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0x8877
  - platform: template
    name: IR Humax down
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0xA857
  - platform: template
    name: IR Humax ok
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0xC837
  - platform: template
    name: IR Humax exit
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0x6897
  - platform: template
    name: IR Humax back
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0x827D
  - platform: template
    name: IR Humax menu
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0x708F
  - platform: template
    name: IR Humax media
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0xF609
  - platform: template
    name: IR Humax info
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0xC23D
  - platform: template
    name: IR Humax guide
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0xD827
  - platform: template
    name: IR Humax tv radio
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0xB04F
  - platform: template
    name: IR Humax teletext
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0x7689
  - platform: template
    name: IR Humax red
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0x38C7
  - platform: template
    name: IR Humax green
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0xB847
  - platform: template
    name: IR Humax yellow
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0x58A7
  - platform: template
    name: IR Humax blue
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0x7887
  - platform: template
    name: IR Humax opt plus
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0x42BD
  - platform: template
    name: IR Humax sound
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0xA25D
  - platform: template
    name: IR Humax sub
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0x629D
  - platform: template
    name: IR Humax schedule
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0xB649
  - platform: template
    name: IR Humax list
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0xB24D
  - platform: template
    name: IR Humax book
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0xD629
  - platform: template
    name: IR Humax book plus
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0x56A9
  - platform: template
    name: IR Humax slow
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0x36C9
  - platform: template
    name: IR Humax source
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0x40BF
  - platform: template
    name: IR Humax sleep
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0x32CD
  - platform: template
    name: IR Humax v-format
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0xF20D
  - platform: template
    name: IR Humax wide
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x0008
        command: 0x728D
  - platform: template
    name: Samsung IR power
    turn_on_action:
      remote_transmitter.transmit_samsung:
        data: 0xE0E040BF
  - platform: template
    name: Samsung IR volume down
    turn_on_action:
      remote_transmitter.transmit_samsung:
        data: 0xE0E0D02F
  - platform: template
    name: Samsung IR volume up
    turn_on_action:
      remote_transmitter.transmit_samsung:
        data: 0xE0E0E01F
  - platform: template
    name: Samsung IR HDMI1
    turn_on_action:
      remote_transmitter.transmit_samsung:
        data: 0xE0E09768
  - platform: template
    name: Samsung IR HDMI2
    turn_on_action:
      remote_transmitter.transmit_samsung:
        data: 0xE0E07D82
  - platform: template
    name: Samsung IR HDMI3
    turn_on_action:
      remote_transmitter.transmit_samsung:
        data: 0xE0E043BC

Logs (if applicable):

OTA update over WiFi:

$ esphome esp_rf.yaml run
INFO Reading configuration esp_rf.yaml...
INFO Generating C++ source...
INFO Compiling app...
INFO Running:  platformio run -d esp_rf
Can not remove temporary directory `/home/user/Documents/esphome/esp_rf/.pioenvs`. Please remove it manually to avoid build issues
Processing esp_rf (board: nodemcuv2; framework: arduino; platform: espressif8266@2.6.2)
---------------------------------------------------------------------------------------------------------------------------
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
PACKAGES: 
 - framework-arduinoespressif8266 3.20704.0 (2.7.4) 
 - tool-esptool 1.413.0 (4.13) 
 - tool-esptoolpy 1.20800.0 (2.8.0) 
 - toolchain-xtensa 2.40802.200502 (4.8.2)
Library Manager: Installing Update
Library Manager: Already installed, built-in library
Dependency Graph
|-- <ESPAsyncTCP-esphome> 1.2.3
|   |-- <ESP8266WiFi> 1.0
|-- <ESP8266WiFi> 1.0
|-- <ESP8266mDNS> 1.2
|   |-- <ESP8266WiFi> 1.0
|-- <ESPAsyncWebServer-esphome> 1.2.7
|   |-- <ESPAsyncTCP-esphome> 1.2.3
|   |   |-- <ESP8266WiFi> 1.0
|   |-- <Hash> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <DNSServer> 1.1.1
|   |-- <ESP8266WiFi> 1.0
Compiling .pioenvs/esp_rf/src/main.cpp.o
Linking .pioenvs/esp_rf/firmware.elf
Building .pioenvs/esp_rf/firmware.bin
Retrieving maximum program size .pioenvs/esp_rf/firmware.elf
Checking size .pioenvs/esp_rf/firmware.elf
RAM:   [=====     ]  47.7% (used 39040 bytes from 81920 bytes)
Flash: [====      ]  40.8% (used 425848 bytes from 1044464 bytes)
Creating BIN file ".pioenvs/esp_rf/firmware.bin" using "/home/user/.platformio/packages/framework-arduinoespressif8266/bootloaders/eboot/eboot.elf" and ".pioenvs/esp_rf/firmware.elf"
=============================================== [SUCCESS] Took 3.01 seconds ===============================================
INFO Successfully compiled program.
Found multiple options, please choose one:
  [1] /dev/ttyUSB0 (USB2.0-Serial)
  [2] Over The Air (esp_rf.local)
(number): 2
INFO Resolving IP address of esp_rf.local
INFO  -> 10.0.0.203
INFO Uploading esp_rf/.pioenvs/esp_rf/firmware.bin (430000 bytes)
Uploading: [=====                                                       ] 8% 
ERROR Error sending data: [Errno 104] Connection reset by peer

Logs on USB serial:

$ esphome esp_rf.yaml logs
INFO Reading configuration esp_rf.yaml...
Found multiple options, please choose one:
  [1] /dev/ttyUSB0 (USB2.0-Serial)
  [2] Over The Air (esp_rf.local)
(number): 1
...
[11:45:16][D][ota:072]: Starting OTA Update from 10.0.0.242...
[11:45:16][D][ota:243]: OTA in progress: 0.2%
[11:45:17]
[11:45:17]--------------- CUT HERE FOR EXCEPTION DECODER ---------------
[11:45:17]
[11:45:17]Exception (29):
WARNING Exception type: unknown
[11:45:17]epc1=0x4000df64 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000
[11:45:17]
[11:45:17]>>>stack>>>
WARNING Found stack trace! Trying to decode it
[11:45:17]
[11:45:17]ctx: sys
[11:45:17]sp: 3fffec10 end: 3fffffb0 offset: 0190
[11:45:17]3fffeda0:  00000014 3ffefdd8 00000002 40100a78  
WARNING Decoded 0x40100a78: pvPortZalloc
[11:45:17]3fffedb0:  40240ab3 40104f73 3ffeec18 40240a48  
WARNING Decoded 0x40240ab3: ieee80211_setup_ratetable
WARNING Decoded 0x40104f73: lmacRxDone
WARNING Decoded 0x40240a48: ieee80211_setup_ratetable
[11:45:17]3fffedc0:  00000002 402409ef 00000002 4023fb44  
WARNING Decoded 0x402409ef: ieee80211_phy_init
WARNING Decoded 0x4023fb44: cnx_update_bss_more
[11:45:17]3fffedd0:  4023fb6d 3fffee80 3ffefdd8 00000016  
WARNING Decoded 0x4023fb6d: cnx_update_bss_more
[11:45:17]3fffede0:  4023d5d8 3fffee80 3ffefc84 3ffef664  
WARNING Decoded 0x4023d5d8: scan_parse_beacon
[11:45:17]3fffedf0:  3ffeba8c 3fffee80 3fffee80 00000100  
[11:45:17]3fffee00:  00727464 7fffffff 00002200 00000001  
[11:45:17]3fffee10:  00000001 00004288 3fff0fe8 40217724  
WARNING Decoded 0x40217724: esp8266::MDNSImplementation::MDNSResponder::_parseMessage()
[11:45:17]3fffee20:  4023993d 00000000 00000000 020c3f40  
WARNING Decoded 0x4023993d: ieee80211_parse_beacon
[11:45:17]3fffee30:  ffffffd7 3ffef798 3ffeba9c 3ffefdd8  
[11:45:17]3fffee40:  3ffeec18 00000037 00000000 4023e2d3  
WARNING Decoded 0x4023e2d3: sta_input
[11:45:17]3fffee50:  00000000 3fff199c ffffffd7 00000000  
[11:45:17]3fffee60:  00000000 3ffefdd8 32cf3038 0000000f  
[11:45:17]3fffee70:  0000fac9 00000000 3a5bd8c0 3fff1640  
[11:45:17]3fffee80:  00000000 10310808 00640100 00000042  
[11:45:17]3fffee90:  3ffebab0 000000e0 3ffebac2 3ffebaa4  
[11:45:17]3fffeea0:  3ffebac8 3ffebab0 3ffebab5 3ffebad3  
[11:45:17]3fffeeb0:  00000000 00000000 3ffebb7a 3ffebb25  
[11:45:17]3fffeec0:  3ffebae7 3ffebb03 00000000 00000000  
[11:45:17]3fffeed0:  00000000 00000000 00000037 00000000  
[11:45:17]3fffeee0:  3fff1d94 4023dd42 3ffeec18 3fff199c  
WARNING Decoded 0x4023dd42: sta_input
[11:45:17]3fffeef0:  00000000 3ffefdd8 3ffeec18 3ffeba8c  
[11:45:17]3fffef00:  3ffeba8c 00000108 00000000 00000037  
[11:45:17]3fffef10:  00000000 3ffeba96 402474cb 3ffeec18  
WARNING Decoded 0x402474cb: pp_tx_idle_timeout
[11:45:17]3fffef20:  3ffeba80 3fffdcc0 3ffeb210 3ffeb210  
[11:45:17]3fffef30:  00000080 3ffeec18 00000000 3ffe8524  
[11:45:17]3fffef40:  40246d8b 3fffdab0 00000000 40221720  
WARNING Decoded 0x40246d8b: ppPeocessRxPktHdr
WARNING Decoded 0x40221720: loop_task(ETSEventTag*) at core_esp8266_main.cpp
[11:45:17]3fffef50:  3ffeb210 40000f49 3fffdab0 40000f49  
[11:45:17]3fffef60:  40000e19 00000005 00068fa8 00000000  
[11:45:17]3fffef70:  60000600 aa55aa55 00000096 40105079  
WARNING Decoded 0x40105079: call_user_start_local
[11:45:17]3fffef80:  4010507f 00068fa8 00000000 78616d75  
WARNING Decoded 0x4010507f: call_user_start_local
[11:45:17]3fffef90:  4010000d 20524900 616d7548 656c2078  
WARNING Decoded 0x4010000d: call_user_start
[11:45:17]3fffefa0:  40245c60 3fffef3c 40245c11 3ffff9d8  
WARNING Decoded 0x40245c60: cont_ret at cont.S.o
WARNING Decoded 0x40245c11: cont_continue at cont.S.o
[11:45:17]3fffefb0:  3fffffc0 00000000 00000000 feefeffe  
[11:45:17]3fffefc0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3fffefd0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3fffefe0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3fffeff0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff000:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff010:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff020:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff030:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff040:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff050:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff060:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff070:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff080:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff090:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff0a0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff0b0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff0c0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff0d0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff0e0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff0f0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff100:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff110:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff120:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff130:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff140:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff150:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff160:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff170:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff180:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff190:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff1a0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff1b0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff1c0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff1d0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff1e0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff1f0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff200:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff210:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff220:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff230:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff240:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff250:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff260:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff270:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff280:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff290:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff2a0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff2b0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff2c0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff2d0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff2e0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff2f0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff300:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff310:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff320:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff330:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff340:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff350:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff360:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff370:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff380:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff390:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff3a0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:17]3ffff3b0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff3c0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff3d0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff3e0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff3f0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff400:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff410:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff420:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff430:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff440:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff450:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff460:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff470:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff480:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff490:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff4a0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff4b0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff4c0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff4d0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff4e0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff4f0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff500:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff510:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff520:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff530:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff540:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff550:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff560:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff570:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff580:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff590:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff5a0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff5b0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff5c0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff5d0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff5e0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff5f0:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff600:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff610:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff620:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff630:  feefeffe feefeffe feefeffe feefeffe  
[11:45:18]3ffff640:  00008940 feefeffe feefeffe feefeffe  
[11:45:18]3ffff650:  feefeffe feefeffe feefeffe 3fce7b5b  
[11:45:18]3ffff660:  4022b0b1 0000001c 00000020 40101176  
WARNING Decoded 0x4022b0b1: _Balloc at /home/earle/src/esp-quick-toolchain/repo/newlib/newlib/libc/stdlib/mprec.c:124
WARNING Decoded 0x40101176: malloc
[11:45:18]3ffff670:  feefeffe feefeffe 0000000c 40101cc0  
WARNING Decoded 0x40101cc0: pp_post
[11:45:18]3ffff680:  00008540 4010160a 0000001c 401013c4  
WARNING Decoded 0x4010160a: pp_soft_wdt_feed_local
WARNING Decoded 0x401013c4: calloc
[11:45:18]3ffff690:  00000001 0000001c 0000001c 3fce7b5b  
[11:45:18]3ffff6a0:  4022b0b1 00000018 00000020 40101176  
WARNING Decoded 0x4022b0b1: _Balloc at /home/earle/src/esp-quick-toolchain/repo/newlib/newlib/libc/stdlib/mprec.c:124
WARNING Decoded 0x40101176: malloc
[11:45:18]3ffff6b0:  00000046 3fce7b5b 40000000 4022b7ea  
WARNING Decoded 0x4022b7ea: __d2b at /home/earle/src/esp-quick-toolchain/repo/newlib/newlib/libc/stdlib/mprec.c:786
[11:45:18]3ffff6c0:  401013d2 00000001 00000018 401013c4  
WARNING Decoded 0x401013d2: calloc
WARNING Decoded 0x401013c4: calloc
[11:45:18]3ffff6d0:  3ffff700 00000018 00000018 402223ee  
WARNING Decoded 0x402223ee: _calloc_r
[11:45:18]3ffff6e0:  00000000 0317868c 3ffe8300 4022b0b1  
WARNING Decoded 0x4022b0b1: _Balloc at /home/earle/src/esp-quick-toolchain/repo/newlib/newlib/libc/stdlib/mprec.c:124
[11:45:18]3ffff6f0:  40000000 00000001 3fff9dd5 4022a731  
WARNING Decoded 0x4022a731: _dtoa_r at /home/earle/src/esp-quick-toolchain/repo/newlib/newlib/libc/stdlib/dtoa.c:858
[11:45:18]3ffff700:  ffffffe7 00000017 0000000a 00000000  
[11:45:18]3ffff710:  ffffffff 3ffe8300 00000001 3fffa1d4  
[11:45:18]3ffff720:  84000000 3ce7868c 00000019 00000001  
[11:45:18]3ffff730:  3fff9dd4 00000003 00000001 00000000  
[11:45:18]3ffff740:  00000000 00000001 40247ee7 00000001  
WARNING Decoded 0x40247ee7: pp_attach
[11:45:18]3ffff750:  ffffffff 00000000 3ffeb301 00000008  
[11:45:18]3ffff760:  40247f36 3ffee8f8 3fff199c 00000001  
WARNING Decoded 0x40247f36: pp_attach
[11:45:18]3ffff770:  00000002 00000000 00000020 40100764  
WARNING Decoded 0x40100764: ets_post
[11:45:18]3ffff780:  00000005 00000005 00000002 40101cc0  
WARNING Decoded 0x40101cc0: pp_post
[11:45:18]3ffff790:  3ffeb1b2 40246ff3 3ffee8f8 00000020  
WARNING Decoded 0x40246ff3: ppTxPkt
[11:45:18]3ffff7a0:  00000002 00000000 00000020 40100764  
WARNING Decoded 0x40100764: ets_post
[11:45:18]3ffff7b0:  401020f1 00000002 00000002 40101cc0  
WARNING Decoded 0x401020f1: rcUpdateTxDone
WARNING Decoded 0x40101cc0: pp_post
[11:45:18]3ffff7c0:  00000005 00000000 00000020 40100764  
WARNING Decoded 0x40100764: ets_post
[11:45:18]3ffff7d0:  00000001 40104136 00000005 40101cc0  
WARNING Decoded 0x40104136: lmacRecycleMPDU
WARNING Decoded 0x40101cc0: pp_post
[11:45:18]3ffff7e0:  3ffeb1b5 40104f73 3ffeec18 3fff13fc  
WARNING Decoded 0x40104f73: lmacRxDone
[11:45:18]3ffff7f0:  00000005 00000000 00000020 40100764  
WARNING Decoded 0x40100764: ets_post
[11:45:18]3ffff800:  00007fff 020c6bf5 00000005 40101cc0  
WARNING Decoded 0x40101cc0: pp_post
[11:45:18]3ffff810:  3ffeb1b5 40104f73 3ffeec18 4022e16a  
WARNING Decoded 0x40104f73: lmacRxDone
WARNING Decoded 0x4022e16a: new_linkoutput at /local/users/gauchard/arduino/arduino_esp8266/esp8266-lwip/tools/sdk/lwip2/builder/glue-lwip/lwip-git.c:260
[11:45:18]3ffff820:  40102857 3ffeec18 40102efa 00000100  
WARNING Decoded 0x40102857: rcReachRetryLimit
WARNING Decoded 0x40102efa: wDev_ProcessFiq
[11:45:18]3ffff830:  fffffff0 020c9dfa 3ffef664 40102a38  
WARNING Decoded 0x40102a38: rcReachRetryLimit
[11:45:18]3ffff840:  3ffeba30 00000000 00000000 3fffc278  
[11:45:18]3ffff850:  fffffff0 020c9dfa 40102efa 00000100  
WARNING Decoded 0x40102efa: wDev_ProcessFiq
[11:45:18]3ffff860:  3ffeba30 7fffffff 00002200 00000001  
[11:45:18]3ffff870:  00000001 00000080 00000022 08000000  
[11:45:18]3ffff880:  00000000 00000000 0000001f 40100764  
WARNING Decoded 0x40100764: ets_post
[11:45:18]3ffff890:  3ffeba60 2c9f0300 3fffc228 40105819  
WARNING Decoded 0x40105819: ets_timer_disarm
[11:45:18]3ffff8a0:  4000050c 3fffc200 00000022 00000000  
[11:45:18]3ffff8b0:  400043e6 00000030 00000016 ffffffff  
[11:45:18]3ffff8c0:  400044ab 3fffc718 3ffff9b0 08000000  
[11:45:18]3ffff8d0:  60000200 08000000 08000000 00000000  
[11:45:18]3ffff8e0:  0000ffff 00042035 00002035 00398000  
[11:45:18]3ffff8f0:  00000400 00000260 00000001 00000030  
[11:45:18]3ffff900:  3fffa4b0 3fff915c 3fffa4ac 402356b0  
WARNING Decoded 0x402356b0: ip4_output_if_opt at /local/users/gauchard/arduino/arduino_esp8266/esp8266-lwip/tools/sdk/lwip2/builder/lwip2-src/src/core/ipv4/ip4.c:1577
[11:45:18]3ffff910:  3fff178c 00000000 00000000 00000100  
[11:45:18]3ffff920:  3fffa654 00000100 c280c112 402356d6  
WARNING Decoded 0x402356d6: ip4_output_if at /local/users/gauchard/arduino/arduino_esp8266/esp8266-lwip/tools/sdk/lwip2/builder/lwip2-src/src/core/ipv4/ip4.c:1550
[11:45:18]3ffff930:  3fff178c 00000000 00000000 40235ddb  
WARNING Decoded 0x40235ddb: ip_chksum_pseudo at /local/users/gauchard/arduino/arduino_esp8266/esp8266-lwip/tools/sdk/lwip2/builder/lwip2-src/src/core/inet_chksum.c:395
[11:45:18]3ffff940:  66abb3aa 3fff915c 00000000 40232447  
WARNING Decoded 0x40232447: tcp_output_control_segment at /local/users/gauchard/arduino/arduino_esp8266/esp8266-lwip/tools/sdk/lwip2/builder/lwip2-src/src/core/tcp_out.c:1956
[11:45:18]3ffff950:  00000000 4000444e 00000000 3fffa4ac  
[11:45:18]3ffff960:  00000000 400041bc 60000200 3fffa654  
[11:45:18]3ffff970:  00000100 40004b14 00000100 00397f00  
[11:45:18]3ffff980:  00000100 3fffa554 3fffc718 00398000  
[11:45:18]3ffff990:  00000000 4000444e 40106390 00000100  
WARNING Decoded 0x40106390: spi_flash_write
[11:45:18]3ffff9a0:  00000002 401060ab 00000001 60000200  
WARNING Decoded 0x401060ab: flash_gd25q32c_read_status
[11:45:18]3ffff9b0:  00000000 4000410f 00001001 00000205  
[11:45:18]3ffff9c0:  00000000 00000000 00000001 40100764  
WARNING Decoded 0x40100764: ets_post
[11:45:18]3ffff9d0:  3fffc718 4010633c 3fff10fc 00000000  
WARNING Decoded 0x4010633c: spi_flash_erase_sector
[11:45:18]3ffff9e0:  00000000 00000001 402217d7 3fffefa0  
WARNING Decoded 0x402217d7: yield
[11:45:18]3ffff9f0:  00000000 00000000 00000001 40220015  
WARNING Decoded 0x40220015: UpdaterClass::_writeBuffer()
[11:45:18]3ffffa00:  3ffffe70 2fa52957 3fff10fc 000001a0  
[11:45:18]3ffffa10:  00000160 00000400 3fff10fc 000001a0  
[11:45:18]3ffffa20:  00000260 00000400 3fff10fc 402200e1  
WARNING Decoded 0x402200e1: UpdaterClass::write(unsigned char*, unsigned int)
[11:45:18]3ffffa30:  3ffffa70 00000100 40100852 f916872b  
WARNING Decoded 0x40100852: millis
[11:45:18]3ffffa40:  00000000 0000000a 3fff10fc 3fff10fc  
[11:45:18]3ffffa50:  00005da0 00008392 3ffffa70 40206cd7  
WARNING Decoded 0x40206cd7: esphome::ota::OTAComponent::handle_()
[11:45:18]3ffffa60:  6f6c0570 006c6163 00000000 00000000  
[11:45:18]3ffffa70:  22120cf1 4c223c4c c8d1d83d f8c1e8e1  
[11:45:18]3ffffa80:  40c112b1 0000f00d 22f0c112 6102d4c2  
[11:45:18]3ffffa90:  ff594503 12032102 008010c1 00000000  
[11:45:18]3ffffaa0:  22f0c112 6102d4c2 ff5c8503 12032102  
[11:45:18]3ffffab0:  008010c1 00000000 22f0c112 6102d4c2  
[11:45:18]3ffffac0:  ffd08503 12032102 008010c1 00000000  
[11:45:18]3ffffad0:  3ffea204 4000c268 31fffe21 0228fd51  
[11:45:18]3ffffae0:  02f0c112 fb010361 0000c0ff c1123108  
[11:45:18]3ffffaf0:  00f00d10 3ffe9926 4025d34c 4025d340  
WARNING Decoded 0x4025d34c: chip_v6_unset_chanfreq
WARNING Decoded 0x4025d340: chip_v6_unset_chanfreq
[11:45:18]3ffffb00:  3ffe84e8 4025d32c 4025d318 3ffe84dc  
WARNING Decoded 0x4025d32c: chip_v6_unset_chanfreq
WARNING Decoded 0x4025d318: chip_v6_unset_chanfreq
[11:45:18]3ffffb10:  4025d300 c9e0c112 fff6c161 d9fff751  
WARNING Decoded 0x4025d300: chip_v6_unset_chanfreq
[11:45:18]3ffffb20:  dd0c3d51 b9a04202 6102420c 0461e207  
[11:45:18]3ffffb30:  c50361f2 f2e10824 fff051ff 420c5e68  
[11:45:18]3ffffb40:  a0420c3d 082385ba ee513d68 3d420cff  
[11:45:18]3ffffb50:  bba0420c 68082285 ffec217d 20ffeb51  
[11:45:18]3ffffb60:  0668a066 0c3d420c 45bca042 adf80821  
[11:45:18]3ffffb70:  06869dd8 012d7200 e0002d62 e451a077  
[11:45:18]3ffffb80:  002772ff 0c3d420c 45bea042 dd8b081f  
[11:45:18]3ffffb90:  08e19df7 d861c871 f841e851 20c11231  
[11:45:18]3ffffba0:  0000f00d c9e0c112 d902cd61 d8522851  
[11:45:18]3ffffbb0:  4971096c 69115901 d7037d21 4c3821a2  
[11:45:18]3ffffbc0:  4dc0dd20 68015807 2a217811 050d3d23  
[11:45:18]3ffffbd0:  a2962350 01ad2700 5c380d2d 5c29232a  
[11:45:18]3ffffbe0:  61c87108 c11251d8 00f00d20 42c0c112  
[11:45:18]3ffffbf0:  61520661 08616207 4210c152 860c20c1  
[11:45:18]3ffffc00:  9179f109 01491159 f9852169 12f108ff  
[11:45:18]3ffffc10:  f00d40c1 3ffe992d 3ffe99bc 3ffe999c  
[11:45:18]3ffffc20:  09f0c112 7d046d31 00539605 060883e6  
[11:45:18]3ffffc30:  030c0002 000000c6 4107a032 f751fff7  
[11:45:18]3ffffc40:  1133e0ff 30804430 04488055 58fff231  
[11:45:18]3ffffc50:  fff98505 c1123108 00f00d10 c9e0c112  
[11:45:18]3ffffc60:  f951d961 e9710931 d803fd41 8692c8a2  
[11:45:18]3ffffc70:  2cc00004 203ff020 c2276f05 32cc08cc  
[11:45:18]3ffffc80:  01861e28 d70ced00 520ce79c 61c87108  
[11:45:18]3ffffc90:  41e851d8 c11231f8 00f00d20 c9d0c112  
[11:45:18]3ffffca0:  e902cda1 ed422881 f95c3803 3a04fd71  
[11:45:18]3ffffcb0:  d9b10942 42440b91 94660004 39330b03  
[11:45:18]3ffffcc0:  052c325c 32802230 423200a0 284cd800  
[11:45:18]3ffffcd0:  8cdd5a3c 3d8c2852 1979850d dcc8cc68  
[11:45:18]3ffffce0:  00000786 42cc2628 45201110 367827d5  
[11:45:18]3ffffcf0:  0169062d 0f4d0e3d 07c00d5d 62016800  
[11:45:18]3ffffd00:  96c710c6 c8b108de e891d8a1 1271f881  
[11:45:18]3ffffd10:  f00d30c1 402251e0 0cf0c112 c9310906  
WARNING Decoded 0x402251e0: precache
[11:45:18]3ffffd20:  cd126921 faa12102 2c293c39 69fffa21  
[11:45:18]3ffffd30:  690c294c 596c495c 698c697c 69ac699c  
[11:45:18]3ffffd40:  69cc69bc 1bec69dc 1b3cc524 4c293108  
[11:45:18]3ffffd50:  c11221c8 00f00d10 3fff10b4 3fff1098  
[11:45:18]3ffffd60:  4025d354 38f0c112 0921c932 1602cd31  
WARNING Decoded 0x4025d354: chip_v6_unset_chanfreq
[11:45:18]3ffffd70:  722803d3 260c1226 b2cc0122 06fff721  
[11:45:18]3ffffd80:  00000001 29fff621 082c228c 1c00a052  
[11:45:18]3ffffd90:  7d160cc4 191c8505 22667c28 0c8c2808  
[11:45:18]3ffffda0:  85522813 8c281cc1 1f45030c 00014619  
[11:45:18]3ffffdb0:  c5ffaf22 a0211cd0 ff4e31fa c2ffe951  
[11:45:18]3ffffdc0:  a0420062 85320ca6 310807fb c11221c8  
[11:45:18]3ffffdd0:  00f00d10 3ffe9bef 0cffff61 58524803  
[11:45:18]3ffffde0:  14a45762 741b4258 536a454a 79000552  
[11:45:18]3ffffdf0:  00445252 4366331b 00f00de3 e9d0c112  
[11:45:18]3ffffe00:  3d03ed81 f9a1c904 69015971 d9b10911  
[11:45:18]3ffffe10:  fd02cd91 ffe44504 11680158 0c5c22e7  
[11:45:18]3ffffe20:  2c5c2902 385cd8e2 4fad376c 0c2d82ec  
[11:45:18]3ffffe30:  0f4d0e3d 38ffde85 58c1484c 2de168d1  
[11:45:18]3ffffe40:  ffd6050c f9050c2d 3d0c2dff 5d0f4d0e  
[11:45:18]3ffffe50:  ffe4850d 00000906 2d1b4c48 063d5c29  
[11:45:18]3ffffe60:  2030d4da c0332014 22000338 81233040  
[11:45:18]3ffffe70:  00000000 6f85186f 9f538645 29dfa3df  
[11:45:18]3ffffe80:  00000248 00000000 64376433 65363632  
[11:45:18]3ffffe90:  00008033 00000000 00000000 00000000  
[11:45:18]3ffffea0:  00000000 00000000 00000000 00000000  
[11:45:18]3ffffeb0:  00000000 00000000 00000000 00000000  
[11:45:18]3ffffec0:  00000248 00000000 5a1bed94 6f85186f  
[11:45:18]3ffffed0:  9f538645 29dfa3df 3fff0bc8 4020ea25  
WARNING Decoded 0x4020ea25: esphome::Scheduler::process_to_add()
[11:45:18]3ffffee0:  4024eaa6 00000000 3fff2384 3fff2384  
WARNING Decoded 0x4024eaa6: wifi_get_opmode
[11:45:18]3ffffef0:  3fff25b4 3fff259c 00068fb0 00008392  
[11:45:18]3fffff00:  00000400 4bc6a7f0 00008325 3fff2338  
[11:45:18]3fffff10:  00000000 00000000 4bc6a7f0 3fff259c  
[11:45:18]3fffff20:  3fff9f84 00000002 3fff259c 40206f24  
WARNING Decoded 0x40206f24: esphome::ota::OTAComponent::loop()
[11:45:18]3fffff30:  00000000 00000002 3fff0bc8 40223ef0  
WARNING Decoded 0x40223ef0: esphome::Component::call_loop()
[11:45:18]3fffff40:  3fff9f84 00000002 3fff0bc8 40223f65  
WARNING Decoded 0x40223f65: esphome::Component::call()
[11:45:18]3fffff50:  3fffdad0 00000002 3fff0bc8 4020c52b  
WARNING Decoded 0x4020c52b: esphome::Application::loop()
[11:45:18]3fffff60:  007a1200 2f123997 feefef00 feefeffe  
[11:45:18]3fffff70:  3fff9f8c 3fff5e04 00000032 00000019  
[11:45:18]3fffff80:  00000000 00000000 00000001 3fff1200  
[11:45:18]3fffff90:  3fffdad0 00000000 3fff11c0 4020ee5c  
WARNING Decoded 0x4020ee5c: loop
[11:45:18]3fffffa0:  3fffdad0 00000000 3fff11c0 402218c4  
WARNING Decoded 0x402218c4: loop_wrapper() at core_esp8266_main.cpp
[11:45:18]<<<stack<<<
[11:45:18]
[11:45:18]--------------- CUT HERE FOR EXCEPTION DECODER ---------------
[11:45:18]
[11:45:18] ets Jan  8 2013,rst cause:2, boot mode:(3,6)
[11:45:18]
[11:45:18]load 0x4010f000, len 3584, room 16 
[11:45:18]tail 0
[11:45:18]chksum 0xb0
[11:45:18]csum 0xb0
[11:45:18]v2843a5ac
[11:45:18]~ld
[11:45:18][I][logger:166]: Log initialized

Additional information and things you've tried:

  • The OTA upload error occurs randomly after changing remote_receiver or remote_transmitter in the yaml file.
  • I assume there is sufficient RAM and flash available:
RAM:   [=====     ]  47.7% (used 39040 bytes from 81920 bytes)
Flash: [====      ]  40.8% (used 425848 bytes from 1044464 bytes)
  • Update over USB is stable, but the goal is to upload firmware remotely via WiFi in the field.
  • ESP8266 is close to the WiFi access point.
  • OTA update with remote_receiver and remote_transmitter removed works (when this already flashed)
  • Works with ESP32.
@soostdijck
Copy link

I had the same issue, turns out I had originally flashed with a -fs 1MB instead of the actual 4MB that it has. A manual re-flash using esptool and the correct flash size fixed things for me.

esptool.py --port /dev/tty.usbserial-0001 write_flash -fm keep -fs 4MB 0x0 ~/Downloads/se nsor_test_1.bin

@Erriez
Copy link
Author

Erriez commented Dec 30, 2020

It looks like the application above won't fit in flash or RAM, but there is no error message.
I assume that board: d1_mini_lite automatically configures the flash size, in this case 4MB, right?

@Erriez
Copy link
Author

Erriez commented Dec 31, 2020

WARNING Decoded 0x40100a78: pvPortZalloc so it looks like running out of stack with only a few IR actions.

@agittins
Copy link

agittins commented Jan 1, 2021

I've also been experiencing the symptom of OTA updates stalling with the same error when using just a single remote_receiver module. I'm testing an RF receiver which is a cheap SRX887, which is a superregenerative receiver, meaning that it's always sending pulses through. I find if I tie it's output to ground I can then send OTA updates more reliably (100% reliably if it boots that way, less so if it's only grounded some time after bootup), so my guess is that the interrupt servicing (or polling?) is causing a race / timeout / resource exhaustion condition, particularly during OTA updates.

I'm using a Tuya ESP8266 module, the TYWE3S, RF input on GPIO12.

Perhaps somewhat related, I noticed that there's an "idle" setting which defines the end of a received code block and a filter param for high-passing, but for RF it might be helpful to have a setting for how long we should see a logic low before actively listening for / decoding a code - since we get noise all the time, but we get a quiet mark/sync block when valid carrier is present (depending on protocol, of course). I haven't looked at the code though, so I might be making some invalid assumptions there.

@Erriez
Copy link
Author

Erriez commented Jan 1, 2021

I'm testing an RF receiver which is a cheap SRX887, which is a superregenerative receiver, meaning that it's always sending pulses through

Yes, these RF receivers generates interrupts continuously on the data pin. I've a SRX882 receiver connected with similar behavior. All interrupts must be disabled and allocated memory freed before executing an OTA update, but I'm not sure if this is implemented. I've also stack dumps and endless reboots when removing the receiver and add over 100 RF transmit functions.

I reached the limit of around 50 RF transmit functions with OTA enabled. Adding more (which is required for my application) results in stack overflow or unpredictable behavior because RAM is full. I can add around 25 RF transmits with OTA disabled.

I don't understand why all generated remote_transmitter / remote_receive strings are located in RAM instead of flash. I think the efficiency of the generated code reaches the limit for my application.

@agittins
Copy link

agittins commented Jan 1, 2021

I reached the limit of around 50 RF transmit functions with OTA enabled. Adding more (which is required for my application) results in stack overflow or unpredictable behavior because RAM is full. I can add around 25 RF transmits with OTA disabled.

Would your use-case support having the transmit functions handled inside HA instead of on-device? I'm using the built-in HA event component to send all received codes into HA, which I then handle using nodered. That way the ESP doesn't need to store any remote codes onboard, and I don't need to reflash every time I change my setups. Downside of course is that it then depends on HA being available to work, but I'm OK with that for the services I'm controlling. Here's what I'm using inside of the remote_receiver definition (shows both an IR and the RF ones, I have the IR one commented out currently while I test RF, but it does work):

remote_receiver:
  - id: ir_rx
    pin: 
      number: GPIO5
      inverted: True
      mode: INPUT_PULLUP
    dump: all
    on_nec:
      then:
        - homeassistant.event:
            event: esphome.remote_nec
            data_template:
              address: !lambda 'return x.address;'
              command: !lambda 'return x.command;'
  - id: rf_rx
    pin:
      number: GPIO12
    dump: rc_switch
    tolerance: 70%
    filter: 100us
    idle: 8ms
    buffer_size: 2kb
    on_rc_switch:
      then:
        - homeassistant.event:
            event: esphome.remote_rc_switch
            data_template:
              code: !lambda 'return x.code;'
              protocol: !lambda 'return x.protocol;'

I've got a similar thing setup for TX, but I haven't tested that, yet - let me know if you'd like the (untested) config though.

@Erriez
Copy link
Author

Erriez commented Jan 1, 2021

Thanks for sharing your idea. I understand what you mean and was not aware that this is possible. Currently I defined all RF codes in the ESPHome yaml, so all codes are located inside the ESP8266. I'll give it a try.

@probot-esphome
Copy link

probot-esphome bot commented Jan 8, 2021

ota source
ota issues
ota recent changes
(message by IssueLinks)

@stale
Copy link

stale bot commented May 9, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label May 9, 2021
@stale stale bot closed this as completed May 23, 2021
@agittins
Copy link

This is still an issue, it seems that the interrupts from an RF receiver will hog enough time from the cpu that OTA updates stall.

At a guess, per @Erriez 's note above, esphome should be disabling interrupts from remote_receiver when it commences an OTA update, if it's not already.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants