Compare commits
2 Commits
04ea3398f9
...
00d8cc9c94
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
00d8cc9c94 | ||
|
|
cb4edd2a0f |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -12,4 +12,4 @@ Nextion2Text.*
|
|||||||
# Ignore dev folder
|
# Ignore dev folder
|
||||||
#dev
|
#dev
|
||||||
|
|
||||||
nspanel_esphome_prebuilt.yaml
|
#nspanel_esphome_prebuilt.yaml
|
||||||
|
|||||||
2
advanced/.gitignore
vendored
2
advanced/.gitignore
vendored
@@ -12,4 +12,4 @@ Nextion2Text.*
|
|||||||
# Ignore dev folder
|
# Ignore dev folder
|
||||||
dev
|
dev
|
||||||
|
|
||||||
nspanel_esphome_prebuilt.yaml
|
#nspanel_esphome_prebuilt.yaml
|
||||||
|
|||||||
61
advanced/esphome/nspanel_esphome_prebuilt.yaml
Normal file
61
advanced/esphome/nspanel_esphome_prebuilt.yaml
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
#####################################################################################################
|
||||||
|
##### NSPANEL ESPHOME created by Blackymas - https://github.com/Blackymas/NSPanel_HA_Blueprint #####
|
||||||
|
##### ESPHOME PRE-BUILT #####
|
||||||
|
##### PLEASE only make changes if it is necessary and also the required knowledge is available. #####
|
||||||
|
##### For normal use with the Blueprint, no changes are necessary. #####
|
||||||
|
#####################################################################################################
|
||||||
|
---
|
||||||
|
substitutions:
|
||||||
|
device_name: nspanel
|
||||||
|
wifi_ssid: nspanel
|
||||||
|
wifi_password: NSPanel_Blueprint
|
||||||
|
nextion_update_url: "http://github.com/Blackymas/NSPanel_HA_Blueprint/raw/main/nspanel_blank.tft"
|
||||||
|
pre_built: "true"
|
||||||
|
|
||||||
|
packages:
|
||||||
|
core_package: !include ./nspanel_esphome_core.yaml # Core package
|
||||||
|
upload_tft_package: !include ./nspanel_esphome_addon_upload_tft.yaml # Core package
|
||||||
|
|
||||||
|
button:
|
||||||
|
- id: !remove tft_update
|
||||||
|
|
||||||
|
- platform: factory_reset
|
||||||
|
name: Factory reset
|
||||||
|
disabled_by_default: true
|
||||||
|
internal: false
|
||||||
|
|
||||||
|
# In combination with the `ap` this allows the user
|
||||||
|
# to provision wifi credentials to the device.
|
||||||
|
captive_portal:
|
||||||
|
|
||||||
|
dashboard_import:
|
||||||
|
package_import_url: github://Blackymas/NSPanel_HA_Blueprint/advanced/esphome/nspanel_esphome_prebuilt.yaml # Must be updated
|
||||||
|
import_full_config: false
|
||||||
|
|
||||||
|
esp32:
|
||||||
|
framework:
|
||||||
|
type: esp-idf
|
||||||
|
|
||||||
|
# Sets up Bluetooth LE (Only on ESP32) to allow the user
|
||||||
|
# to provision wifi credentials to the device.
|
||||||
|
esp32_improv:
|
||||||
|
authorizer: none
|
||||||
|
|
||||||
|
esphome:
|
||||||
|
name_add_mac_suffix: true
|
||||||
|
project:
|
||||||
|
name: esphome.NSPanel_HA_Blueprint
|
||||||
|
version: "${version}"
|
||||||
|
|
||||||
|
# Sets up the improv via serial client for Wi-Fi provisioning
|
||||||
|
improv_serial:
|
||||||
|
|
||||||
|
logger:
|
||||||
|
baud_rate: 115200
|
||||||
|
|
||||||
|
ota:
|
||||||
|
password: ""
|
||||||
|
|
||||||
|
wifi:
|
||||||
|
ap: {}
|
||||||
|
power_save_mode: LIGHT # To make it compatible with BLE
|
||||||
@@ -17,7 +17,7 @@ Below are the topics covered in this document, each with relevant tips and solut
|
|||||||
1. [Call a page directly](#Call-a-page-directly)
|
1. [Call a page directly](#Call-a-page-directly)
|
||||||
1. [Play RTTTL Sound](#play-rtttl-sound)
|
1. [Play RTTTL Sound](#play-rtttl-sound)
|
||||||
1. [Start automations via Input_Boolean](#Start-automations-via-input_boolean)
|
1. [Start automations via Input_Boolean](#Start-automations-via-input_boolean)
|
||||||
|
1. [Updating Wi-Fi and OTA passwords in ESPHome with this project](#updating-wi-fi-and-ota-passwords-in-esphome-with-this-project)
|
||||||
|
|
||||||
## How to create "issues" when I have a problem
|
## How to create "issues" when I have a problem
|
||||||
|
|
||||||
@@ -244,3 +244,54 @@ https://www.home-assistant.io/integrations/input_boolean/-HowTo
|
|||||||
Now add the created Input_Boolean as a trigger in the desired automation under State:-HowTo---Alle-wichtigen-Dinge-die-man-wissen-sollte.assets/Toggle2.PNG)
|
Now add the created Input_Boolean as a trigger in the desired automation under State:-HowTo---Alle-wichtigen-Dinge-die-man-wissen-sollte.assets/Toggle2.PNG)
|
||||||
|
|
||||||
In the last step, assign the trigger to a button in the Panel Config:-HowTo---Alle-wichtigen-Dinge-die-man-wissen-sollte.assets/Toggle3.PNG)
|
In the last step, assign the trigger to a button in the Panel Config:-HowTo---Alle-wichtigen-Dinge-die-man-wissen-sollte.assets/Toggle3.PNG)
|
||||||
|
|
||||||
|
## Updating Wi-Fi and OTA Passwords in ESPHome with This Project
|
||||||
|
|
||||||
|
#### Overview
|
||||||
|
When you update your Wi-Fi password in a device with firmware from our project, it's important to remember that the `wifi_password` substitution is used for both Wi-Fi and OTA updates (and a few more places that are not relevant now). Failing to update both simultaneously can lead to connection issues.
|
||||||
|
|
||||||
|
#### Step-by-Step Guide
|
||||||
|
|
||||||
|
1. **Prepare Your Device for Update**
|
||||||
|
- Ensure your device is connected to your computer and is accessible via your current Wi-Fi network.
|
||||||
|
|
||||||
|
2. **Update OTA Password First**
|
||||||
|
- Open your panel's YAML.
|
||||||
|
- Add the following in the customization area:
|
||||||
|
```yaml
|
||||||
|
esphome:
|
||||||
|
on_boot:
|
||||||
|
- priority: 600
|
||||||
|
then:
|
||||||
|
- lambda: |-
|
||||||
|
id(my_ota).set_auth_password("Your new Wi-Fi password");
|
||||||
|
ota:
|
||||||
|
password: "Your current Wi-Fi password"
|
||||||
|
id: my_ota
|
||||||
|
```
|
||||||
|
- Flash your device. It will use the current password for this flash and will inform your device to start using the new password for the next OTA.
|
||||||
|
- When your device starts, **remove the lines above**.
|
||||||
|
- Find the `wifi_password` key in the `substitutions` area (usually at the beginning of the file) and change it to your new Wi-Fi password.
|
||||||
|
- Flash your device again with the updated YAML. It will use the current Wi-Fi to connect to your device and the new Wi-Fi password as the OTA password, then will inform your device to connect to the Wi-Fi with the new password.
|
||||||
|
|
||||||
|
3. **Update Wi-Fi Password in Your Access Point**
|
||||||
|
|
||||||
|
#### Important Notes
|
||||||
|
- The device will still be using the old Wi-Fi password for this update. If you've already changed your Wi-Fi network password, this step will fail.
|
||||||
|
- **Troubleshooting: Unable to Connect via Wi-Fi**
|
||||||
|
- If your device cannot connect to Wi-Fi due to a password change, you will need to flash the device via a serial connection.
|
||||||
|
- Connect your device to your computer using a USB-to-Serial adapter.
|
||||||
|
- Use the ESPHome flasher tool to upload the new configuration.
|
||||||
|
- In this case, don't worry about the OTA password, as it's not required when flashing via serial.
|
||||||
|
|
||||||
|
#### Verify the Update
|
||||||
|
- Once the new configuration is uploaded, your device should automatically connect to your Wi-Fi network with the new password.
|
||||||
|
- Verify that OTA updates are working with the new password.
|
||||||
|
|
||||||
|
#### Additional Tips
|
||||||
|
- **Backup Your Configuration:** Always keep a backup of your ESPHome configuration files.
|
||||||
|
- **Network Accessibility:** Ensure your device remains within your Wi-Fi network's range during the update process.
|
||||||
|
- **Serial Flashing:** Familiarize yourself with the process of flashing via serial, as it's a reliable fallback method.
|
||||||
|
|
||||||
|
#### Conclusion
|
||||||
|
By carefully updating both your Wi-Fi and OTA passwords in your ESPHome configuration, you can avoid connection issues. Remember to always back up your configuration and be prepared to use a serial connection if Wi-Fi connectivity is lost.
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user