I’m trying to OTA update an esphome device ESP32, but for somehow all I’m trying fails
wireless:
========================= [SUCCESS] Took 20.36 seconds =========================
INFO Successfully compiled program.
INFO Connecting to 192.168.180.146
INFO Uploading /data/build/garage-voor-light/.pioenvs/garage-voor-light/firmware.bin (1021344 bytes)
Uploading: [==== ] 6%
ERROR Error sending data: [Errno 104] Connection reset by peer
that leaves me with 4 options
garage-voor-light.bin
garage-voor-light-factory.bin
garage-voor-light.bin.gz
garage-voor-light-factory.bin.gz
via the webinterface
both gz and the factory.bin return Update Failed: Wrong Magic Byte
and the other one, lagacy format
causes the network connection to be reset
my device was originally flashed with tasmota, then I updated to ESPHome arduino,
which was fine, I needed to use legacy format then, but now I’m unable to update again.
are there any other ways to OTA flash my device without needing a physical connection?
edit: also when I try to flash back tasmota the connection gets reset.
edit2: I found
probably it’s the same issue,
but I was always able to migrate tasmota to esphome before without any update issues afterwards, I migrated at least 15 devices before.
and now this one, the first one I dared to update which is hidden in a junction box has this issue.
that was my first guess, but the esphome dashboard alsways shows somewhere between 5 to 7%. the esphome logging itself alsways shows 0.1%
with dodgy wifi, I can normally always use the webinterface now I cannot.
I read somewhere that Tasmota changes the partition table which esphome can’t handle well. So that might be the issue and I have to serial flash one time.
I will do that another time because in my garage it’s now 5C and I like it warmer while working on the junction box.
I can’t, I need to enable this button first and therefor I have to flash. but just to be sure I added it to the yaml, so next time I can try.
I highly suggest this. It’s in all my yamls and I even (when possible) have it available on a physical button press (like keep it pressed for 10 seconds).
Other option, do you have a fallback ap configured? They also allow OTA? Maybe worth a try. Also you might want to share your yaml just in case some brain finds a loophole!
this is the base for all my devices, I just added safe_mode so I cannot use that one atm.
but I actually think the issue is with this
most devices I flashed from tasmota to esphome were initially flashed using tasmota 10 or 11.
this device probably was serial flashed using tasmota 12.
which means instead of 2 partiations there is a safeboot partition. I cannot find how esphome works with the partition table exept from that it’s different for arduino and esp-idf
but I actually think esphome OTA update cannot handle this tasmota partition scheme. and therefor it fails.
thnx,
I missed that warning,
I was able to flash esphome form tasmota, but once esphome was on it, OTA never worked again,
so I think that’s it.
luckely I included all base functionality in the initial image.
I wanted to add some onsunrise function to get rid of automations. But I have to plan that for another time.
at least I know what the issue is now.