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

Wireless ESPHhome Update fails, connection reset by peer #46

Open
1 task done
plaetzchen opened this issue Jun 4, 2024 · 2 comments
Open
1 task done

Wireless ESPHhome Update fails, connection reset by peer #46

plaetzchen opened this issue Jun 4, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@plaetzchen
Copy link

Troubleshooting Guide

  • I have followed the steps in the troubleshooting guide and my issue is either not listed or is not solved.

Description

When trying to update with the newest ESPHome version I get an error after upload that says "Connection reset by peer". The update might be installed (since the newest version is showing up in the device log) but HA still wants to install an update. Cleaning the build cache of ESPHome does not help.

Logs

Upsy-Desky:

INFO ESPHome 2024.5.4
INFO Reading configuration /config/esphome/upsy-desky-76db98.yaml...
INFO Starting log output from 10.0.0.94 using esphome API
INFO Successfully connected to upsy-desky-76db98 @ 10.0.0.94 in 0.068s
INFO Successful handshake with upsy-desky-76db98 @ 10.0.0.94 in 0.121s
[09:45:17][I][app:100]: ESPHome version 2024.5.2 compiled on May 21 2024, 11:25:44
[09:45:17][I][app:102]: Project tj_horner.upsy_desky version 2.0.0
[09:45:42][I][standing_desk_height:036]: Starting decoder detection
[09:45:42][I][standing_desk_height:094]: Decoder detection complete. Correct decoder variant: jarvis
[09:45:42][I][standing_desk_height:095]: If you want to make this change permanent, add the following to this sensor's configuration:
[09:46:18][W][component:157]: Component ota set Warning flag: unspecified
[09:46:18][E][component:164]: Component ota set Error flag: unspecified
[09:46:18][W][component:237]: Component ota took a long time for an operation (201 ms).
[09:46:18][W][component:238]: Components should block for at most 30 ms.
[09:46:23][E][component:176]: Component ota cleared Error flag

Build:

INFO ESPHome 2024.5.4
INFO Reading configuration /config/esphome/upsy-desky-76db98.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing upsy-desky-76db98 (board: esp32dev; framework: arduino; platform: platformio/espressif32@5.4.0)
--------------------------------------------------------------------------------
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
Dependency Graph
|-- AsyncTCP-esphome @ 2.1.3
|-- WiFi @ 2.0.0
|-- FS @ 2.0.0
|-- Update @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 3.2.2
|-- DNSServer @ 2.0.0
|-- ESPmDNS @ 2.0.0
|-- noise-c @ 0.1.4
|-- ArduinoJson @ 6.18.5
|-- Improv @ 1.2.3
RAM:   [==        ]  16.3% (used 53456 bytes from 327680 bytes)
Flash: [========= ]  94.5% (used 1733837 bytes from 1835008 bytes)
========================= [SUCCESS] Took 5.69 seconds =========================
INFO Successfully compiled program.
INFO Connecting to 10.0.0.94
INFO Uploading /data/build/upsy-desky-76db98/.pioenvs/upsy-desky-76db98/firmware.bin (1739616 bytes)
ERROR Error binary size: Unknown error from ESP

Which version of the Upsy Desky firmware config are you running?

No response

How do you manage your Upsy Desky's updates?

None

If you're using an ESPHome YAML config, which version of ESPHome are you running?

No response

ESPHome Config

substitutions:
  name: upsy-desky-76db98
  friendly_name: Upsy Desky 76db98
packages:
  tj_horner.upsy_desky: github://tjhorner/upsy-desky/firmware/stock.yaml@v2.0.0
esphome:
  name: ${name}
  name_add_mac_suffix: false
  friendly_name: ${friendly_name}
api:
  encryption:
    key: YesItHasThat


wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
@plaetzchen plaetzchen added the bug Something isn't working label Jun 4, 2024
@35gh
Copy link

35gh commented Jun 6, 2024

Same here, OTA updates stopped working after update in 2.5.0 with similar errors.

I managed after countless retries and resets to update my two Upsy Desky to 2024.5.5. Wireless OTA installations seem to work again since then.

@tjhorner
Copy link
Owner

tjhorner commented Jun 6, 2024

If you are running into this error, I would recommend flashing via the USB-C port on the device. The module used on the board is pretty resource-constrained and the stock firmware has many components that may be unnecessary after first-use. For this reason, it likely runs out of RAM during an OTA flash (without inspecting the logs via USB during an OTA, it's hard to tell).

I recommend "trimming" the firmware by following this guide: https://upsy-desky.tjhorner.dev/docs/advanced/customization/#trimming-the-firmware

Then flash the resulting firmware via USB. From then on, OTAs should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants