I have two old devices that have a really weak API password that needs to be updated over-the-air.
When I change the API password and install wirelessly in ESPhome, I get :
“ERROR Error auth result: Error: Authentication invalid. Is the password correct?”
Thanks for the suggestion. But it seems I can only change wifi settings or OTA update. I’m hoping there is a smart way of updating passwords OTA, I cant be the only person with a bad password
Thanks, I have. I’m looking for a way to change the API password - not the OTA password you are referencing. Out of curiosity, I tested if changing the key (my_ota) to (my_api) would work, but it doesn’t.
# Enable logging
logger:
# Enable Home Assistant API
api:
password: !secret esphome_secret
# Over The Air Password (Stops somone on your network accessing files)
ota:
password: !secret esphome_secret
# Wifi Information
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
I hope that I am understanding you. Not sure if it is your “my_api” in your code. I keep my passwords in secrets so it easy to keep track and change everyone if necessary but you can just replace it with your one
# Enable Home Assistant API
api:
password: your_password_here
Then if HA doesn’t pick it up look in integrations and the one you trying to fix. Try the reload (you may have to reboot first) if that doesn’t work try delete it and then re-add it and it should ask for the API password.
It appears the 2023.2 release of Home Assistant may have fixed this for us-- Basically forcing usage of API Encryption (which isn’t a bad thing), and resetting API Password to null. I.e., we can just stop using API pwd, because we’re using the encryption keys instead.
I had been struggling with same thing (how to change API passwords via OTA). But was pleased to see how it was dealt with in 2023.2.