Blackymas / NSPanel_HA_Blueprint

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

How to change wifi? #1201

Closed kchiem closed 9 months ago

kchiem commented 9 months ago

When I update the secrets wifi_ssid and wifi_password, trying to update the nspanel gives me:

ERROR Error auth result: Error: Authentication invalid. Is the password correct?

edwardtfn commented 9 months ago

This is due to the change of OTA, as wifi password is used for OTA password.

Please take a look at this: https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki/(EN)-Customization#custom-ota-password And this: https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/1177#issuecomment-1778462190

kchiem commented 9 months ago

Ah, that makes sense. Thank you!

But question:

If I use this:

##### My customization - Start #####
# change OTA password, remove after flashing
esphome:
  on_boot:
    - lambda: |-
        id(my_ota).set_auth_password("YourNewOTApassword");
ota:
  password: !secret wifi_password
  id: my_ota
##### My customization - End #####

So that YourNewOTApassword was my new wifi password for the new ssid, would I still need this later when I change the wifi_ssid and wifi_password secrets?

##### My customization - Start #####
# Use my own OTA password
ota:
  password: "YourNewOTApassword"
##### My customization - End #####

I'm thinking no, but thought I'd confirm.

edwardtfn commented 9 months ago

No. After your device adopts the new ota password you don't need that on_boot part anymore. And if you set the new password as your new Wi-Fi password, then you don't need any customization anymore. 😉

kchiem commented 9 months ago

Wifi changed. Thank you for the save!