Thanks, this just saved my bacon! I did the same thing, created a stub, accidentally pasted the full config over the OTA password. I was actually on the way to trying a dissembler when I saw your post. Sure enough, my OTA password was there! I’m now putting it in my secrets file so that I don’t accidentally overwrite it in the future.
Thank you, this worked for me. I don’t have to open my plug up again
Sorry to resurrect this after a few months. I’m getting the dreaded “ESP requests password, but no password given!”
My HA corrupted at the end of last year and i’ve had to rebuild some esphome configs that didn’t make it into the backups. When I wrote them the first time I didn’t set an ota password, but i’m wondering if home assistant had created one internally?
same problem here! wondering if you’ve solved it in the meantime?
Is this during an OTA update?
Yeah, that’s correct. I’ve got four plugs (which I can’t seem to open, possibly bonded). I’ve never used an ota password because I didn’t realise it was a thing.
And why do you need to update them? Presumably they work.
They do work, but I want to adjust the configuration including update_interval
and tweak the hlw8012
sensor config.
edit: in addition, i’m struggling to connect to the fallback AP. Even though i know the password, and can see the SSID being broadcast. it seems to disconnect immediately. Appears to be the same as “Cannot connect to captive portal / fallback hotspot”, sadly no solution there if we’re unable to flash OTA.
I guess your only solution is a serial connect.
If you read the above posts you will see they want to do this without having to open the case the device resides in. In my case, the ESP device is on a pole 8 feet above the ground and is not easily flash the firmware using a USB cable. The request or question in the OP was how to do using WiFi.
So you forgot your ota password?
I don’t even use an OTA password. But where I live my next-door neighbor is out of my WiFi range.
There is also
web_server:
port: 80
… where you can upload new firmware.
how do you get the ota key out of the bin file
What command are you running? Please stop posting pictures of text.
I just run the command you gave but with my file’s directory path
Ok, so i’ve just retrieved my OTA password from the .bin file.
First of all I want to say that I know anything about the stuff I use, I’m just a stubborn with access to Google (Neither am I a native English speaker, so sorry for any typo or grammatical error)
So first of all it’s downloading Cutter (I downloaded for Linux, so I haven’t tried Mac or Windows’s alternatives, but i guess they’d work the same way)
Then you open your .bin file, you’ll see something like this:
Then you go to “Strings” which is the second option in the bottom menu
In there you’ll look for wifi in the Quick filter
Then you’re going to right click on the second-to-last option and select Show in>Hexdump:
You’ll see something like this:
I’ve highlighted the OTA password and also just before that there’s the fallback wifi network password (it wasn’t useful in my case as I didn’t have captive portal setted up )
Thank you and I hope this is useful for whomever tries to solve this in the future
Live safer! Thank you!
Just recovered the OTA password from a .bin file for a NOUS A1T that I had updated to ESPHome. Copied a bit too much from another .yaml file.
I just did this by mistake as well to a Merkury light bulb. The API key appears to be correct, just not the OTA one. I have the UF2 file that I had used originally, is there a way to use that?
Maybe too late, but it might help somebody.
I made the same mistake, but I’ve found the previously used ota password here:
config > esphome > your-device-name-here > src > main.cpp
I’ve found the line
ota_otacomponent → set_auth_password(“your-ota-password-here”);
And sorry for reopening