Blackymas / NSPanel_HA_Blueprint

This allows you to configure your complete NSPanel via Blueprint with UI and without changing anything in the code
1.4k stars 253 forks source link

Can't update ESPHome from 3.1 to 3.2 (OTA fails) - Connection reset by peer #503

Closed alexisml closed 1 year ago

alexisml commented 1 year ago

I keep getting OTA Error sending data: [Errno 104] Connection reset by peer when trying to update my NSPanels with ESPHome. Note that I updated my blueprint and TFT panel BEFORE esphome (because it failed and I didn't notice).

Things I've tried:

Nothing works, ideas?

NSPanel US version

alexisml commented 1 year ago

I also tried uploading a very dummy esphome binary (no sensors nor anything) and got the same error.

Blackymas commented 1 year ago

Maybe ota password is wrong. Did you have version 3.1.0 installed

alexisml commented 1 year ago

From looking into the yaml files, ota password is and was the same as the wifi password. I set that one as well for my dummy firmware. I didn't try reinstalling 3.1. How can I force esphome to use an older version?

Blackymas commented 1 year ago

no the idea was not to install 3.1 again but we had taken out the ota passowrd during an update and replaced it with the WiFI password.

This could have been a problem now

Blackymas commented 1 year ago

only topic I found was https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/255

alexisml commented 1 year ago

Thanks for the link. I looked into it and they talk about network issues. That's not my case. Both my nspanels have at least 90% "experience" (based on unifi's dashboard). Also, there's no issue triggering TFT upload (which goes OTA as well). I've now downgraded both my blueprint and TFTs to 3.1 and everything is working as it was before. Will give it a try in the next days and report back. If anyone has any ideas, please share :) Thx

bkbartk commented 1 year ago

this looks like an esphome issue rather then this implementation. however https://github.com/esphome/issues/issues/1721#issuecomment-752411056 https://community.home-assistant.io/t/esp-does-not-have-enough-space-to-store-ota-file/131083/5 but this is all esp82XX did you in the past maybe alter the amount of memory?

In any case, I think you need to serial flash.

or build a minimal config(only wifi, ap, webserver, captive), using the correct board, OTA that one, and then try to install the full config.

deejaybeam commented 1 year ago

For me this sound also like an network issue. Wifi experiance may not really give valid results - the device is not a full blown computer and "small" interuptions can cause errors too. An onther idea would be: Are you able to re-install nspanel-esphome.yaml again? Try to disable the existing automation for your panel while updating, maybe it´s flooded from massive sensor-updates?

alexisml commented 1 year ago

Sorry for the delays and thanks for the suggestions.

did you in the past maybe alter the amount of memory?

Not that I'm aware off; but I had nspanel lovelace before moving to the blueprint version.

or build a minimal config(only wifi, ap, webserver, captive), using the correct board, OTA that one, and then try to install the full config.

Tried this, fails as well.

Are you able to re-install nspanel-esphome.yaml again?

You mean forcing th download of the file again? I tried it as well, forced cleaning everything on esphome web. Same results.

Try to disable the existing automation for your panel while updating, maybe it´s flooded from massive sensor-updates?

Did it as well, was one of the first things I tried because I got the an error executing the automation in Home Assistant.

Wifi experiance may not really give valid results - the device is not a full blown computer and "small" interuptions can cause errors too.

I find it hard to believe, the panel is literally 4 meters away from the AP, in line of sight.

Looks like I really need to take the path of serial flashing.

alexisml commented 1 year ago

Update: I flashed both my panels using serial and both are now working with the latest version. Next to try put is if NOW both can be flashed OTA. If that's the case, I suspect the issue was originally flashing with Tasmota (NSPanel Lovelace). Will update after trying.

Blackymas commented 1 year ago

The problem was surely that Lovelace ui was on it before.

Thanks for feedback

alexisml commented 1 year ago

In case anyone finds this when troubleshooting: after installing ESPHome using serial, I was finally able to update OTA. Summary:

  1. First installed Tasmota (lovelace)
  2. Updated to ESPHome OTA (from Tasmota UI) successfully
  3. Tried updating OTA using ESPHome and failed
  4. Fix: flash ESPHome using serial