Update install.md
This commit is contained in:
145
docs/install.md
145
docs/install.md
@@ -11,7 +11,7 @@ Whether you're a first-time smart device user or an enthusiast looking to person
|
|||||||
|
|
||||||
- [Preparation](#preparation)
|
- [Preparation](#preparation)
|
||||||
- [ESPHome firmware](#esphome-firmware)
|
- [ESPHome firmware](#esphome-firmware)
|
||||||
- [Preparing the ESPHome environment](#preparing-the-esphome-environment)
|
- [Preparing the ESPHome Environment](#preparing-the-esphome-environment)
|
||||||
- [Setup a device on ESPHome Dashboard](#setup-a-device-on-esphome-dashboard)
|
- [Setup a device on ESPHome Dashboard](#setup-a-device-on-esphome-dashboard)
|
||||||
- [Flashing the device for the first time](#flashing-the-device-for-the-first-time)
|
- [Flashing the device for the first time](#flashing-the-device-for-the-first-time)
|
||||||
- [Integrating your panel to Home Assistant](#integrating-your-panel-to-home-assistant)
|
- [Integrating your panel to Home Assistant](#integrating-your-panel-to-home-assistant)
|
||||||
@@ -37,127 +37,123 @@ Start by ensuring you have all the necessary tools and files. This includes your
|
|||||||
|
|
||||||
If flashing it for the first time, please look for additional preparation and tools on the [Flashing the device for the first time](#flashing-the-device-for-the-first-time) section later in this guide.
|
If flashing it for the first time, please look for additional preparation and tools on the [Flashing the device for the first time](#flashing-the-device-for-the-first-time) section later in this guide.
|
||||||
|
|
||||||
## ESPHome firmware
|
## ESPHome Firmware
|
||||||
|
|
||||||
### Preparing the ESPHome environment
|
### Preparing the ESPHome Environment
|
||||||
In order to flash your NSPanel, you need a firmware generated by ESPHome. You can use ESPHome as an add-on in your Home Assistant, installed locally in your computer or any other type of installation. This guide will be based on the ESPHome dashboard which is available in all implementations.
|
|
||||||
|
|
||||||
- For more information on how to install ESPHome as an add-on to your Home Assistant, please refer to this external guide: [Getting Started with ESPHome and Home Assistant](https://esphome.io/guides/getting_started_hassio)
|
To flash your NSPanel, ESPHome firmware is required. ESPHome can be integrated into your setup in various ways, including as a Home Assistant add-on or through a local installation on your computer. This guide is based on using the ESPHome dashboard, which is available in all standard implementations.
|
||||||
- For more information on how to install ESPHome manually in your computer, please refer to this external guide: [Installing ESPHome Manually](https://esphome.io/guides/installing_esphome.html)
|
|
||||||
|
|
||||||
### Setup a device on ESPHome Dashboard
|
- **Installing ESPHome as a Home Assistant Add-On**: For seamless integration with Home Assistant, ESPHome can be installed as an add-on. This method provides an easy-to-navigate interface and direct integration with your Home Assistant setup. For detailed instructions on this installation method, refer to [Getting Started with ESPHome and Home Assistant](https://esphome.io/guides/getting_started_hassio).
|
||||||
Once you have the ESPHome Dashboard available, please follow the steps bellow:
|
|
||||||
1. Click the button **+ New device**
|
|
||||||
2. Add the unique name of your new device in ESPHome:<br>
|
|
||||||
<br>
|
|
||||||
3. Select **ESP32** as device type:<br>
|
|
||||||
<br>
|
|
||||||
4. Click **Skip** button, as we don't want to start the installation yet:<br>
|
|
||||||
<br>
|
|
||||||
5. Find the entry related to your newly created device in the ESPHome Dashboard and click the button **Edit**.
|
|
||||||
<br>
|
|
||||||
6. In the yaml dialog, you might want to copy the `api:` area to another temporary file, just in case. That is not really necessary, but can be used to improve the security in your system (more details later).
|
|
||||||
<br>
|
|
||||||
7. Take note also of the device name in the beginning of the file. Under `esphome`, it is the value for `name` (in this examble, the device name is `my-new-nspanel`, with dashes between the words):<br>
|
|
||||||
<br>
|
|
||||||
|
|
||||||
8. Clear all the content and paste the following:
|
- **Manual Installation of ESPHome**: A manual installation on your computer might be preferred if your Home Assistant's host is resource-limited and struggles with compiling ESPHome projects. Standalone installations on a normal computer typically offer faster and more efficient compiling. This method is ideal if you're working with a system that doesn't support Home Assistant add-ons or if you prefer a separate management environment for your ESPHome devices. Detailed steps for a manual installation can be found in the guide [Installing ESPHome Manually](https://esphome.io/guides/installing_esphome.html).
|
||||||
|
|
||||||
|
### Setting Up a Device on ESPHome Dashboard
|
||||||
|
|
||||||
|
Follow these steps to add a new device in the ESPHome Dashboard:
|
||||||
|
1. Click the **+ New Device** button.
|
||||||
|
2. Enter a unique name for your new ESPHome device.
|
||||||
|

|
||||||
|
3. Select **ESP32** as the device type.
|
||||||
|

|
||||||
|
4. Click **Skip** as we're not starting the installation yet.
|
||||||
|

|
||||||
|
5. Locate your newly created device in the ESPHome Dashboard and click **Edit**.
|
||||||
|

|
||||||
|
6. (Optional) For enhanced security, consider copying the `api:` section to a temporary file.
|
||||||
|

|
||||||
|
7. Note the device name at the beginning of the file under `esphome`.
|
||||||
|

|
||||||
|
|
||||||
|
8. Clear all existing content and paste the following YAML configuration:
|
||||||
```yaml
|
```yaml
|
||||||
substitutions:
|
substitutions:
|
||||||
###### Settings - You can edit these values ######
|
# Settings - Editable values
|
||||||
device_name: "YOUR_NSPANEL_NAME"
|
device_name: "YOUR_NSPANEL_NAME"
|
||||||
wifi_ssid: !secret wifi_ssid
|
wifi_ssid: !secret wifi_ssid
|
||||||
wifi_password: !secret wifi_password
|
wifi_password: !secret wifi_password
|
||||||
|
|
||||||
nextion_update_url: "http://homeassistant.local:8123/local/nspanel_eu.tft"
|
nextion_update_url: "http://homeassistant.local:8123/local/nspanel_eu.tft"
|
||||||
|
# Add-on configuration (if needed)
|
||||||
|
# heater_relay: "1" # possible values: 1/2
|
||||||
|
|
||||||
##### addon-configuration #####
|
# Customization area
|
||||||
# heater_relay: "1" # possible values: 1/2 - Used by add-on climate
|
|
||||||
|
|
||||||
###### Settings - End #####
|
|
||||||
|
|
||||||
##### My customization - Start #####
|
##### My customization - Start #####
|
||||||
##### My customization - End #####
|
##### My customization - End #####
|
||||||
|
|
||||||
###### Do not change area - Start ######
|
# Core and optional configurations
|
||||||
packages:
|
packages:
|
||||||
remote_package:
|
remote_package:
|
||||||
url: https://github.com/Blackymas/NSPanel_HA_Blueprint
|
url: https://github.com/Blackymas/NSPanel_HA_Blueprint
|
||||||
ref: main
|
ref: main
|
||||||
files:
|
files:
|
||||||
- nspanel_esphome.yaml # Core package
|
- nspanel_esphome.yaml # Core package
|
||||||
# - advanced/esphome/nspanel_esphome_advanced.yaml # activate advanced (legacy) elements - can be useful for troubleshooting
|
# Optional advanced and add-on configurations
|
||||||
# - nspanel_esphome_addon_climate_cool.yaml # activate for local climate (cooling) control
|
# - advanced/esphome/nspanel_esphome_advanced.yaml
|
||||||
# - nspanel_esphome_addon_climate_heat.yaml # activate for local climate (heater) control
|
# - nspanel_esphome_addon_climate_cool.yaml
|
||||||
# - nspanel_esphome_addon_climate_dual.yaml # activate for local climate (dual) control
|
# - nspanel_esphome_addon_climate_heat.yaml
|
||||||
|
# - nspanel_esphome_addon_climate_dual.yaml
|
||||||
refresh: 300s
|
refresh: 300s
|
||||||
|
|
||||||
esp32:
|
esp32:
|
||||||
framework:
|
framework:
|
||||||
type: esp-idf
|
type: esp-idf
|
||||||
###### Do not change area - End ######
|
|
||||||
|
|
||||||
```
|
```
|
||||||
<br>
|

|
||||||
|
|
||||||
9. Edit the **Settings** area. As your device name, ideally use the same device name you recorder on the step 7:
|
9. Modify the **Settings** section with your device name (as noted in step 7) and Wi-Fi details.
|
||||||
<br>
|

|
||||||
|
|
||||||
10. For `wifi_ssid` and `wifi_password` you can either replace the existing text by your Wi-Fi credentials or, if you want to keep that information a bit safer (and make easier to share your setting later to help someone or to ask for help), you can leave as it is and edit this later by clicking on the button **Secrets** in the top right area of the ESPHome Dashboard.<br>
|
10. For Wi-Fi credentials, use `!secret` for added security or input them directly. Learn about secrets in ESPHome: [Home Assistant Secrets in ESPHome](https://www.youtube.com/watch?v=eW4vKDeHh7Y).
|
||||||
This is a quite objective video about secrets if you want to see how it works: [YouTube - 3ATIVE VFX Studio - Home Assistant guide: How I use Secrets in ESPHome]( https://www.youtube.com/watch?v=eW4vKDeHh7Y)
|
|
||||||
|
|
||||||
11. You can also edit `nextion_update_url` to point to a local copy of the TFT file.<br>
|
11. Optionally, adjust `nextion_update_url` to the URL of a TFT file hosted on an HTTP or HTTPS server, ensuring that the file is accessible to the NSPanel. This URL will be used by ESPHome to download the TFT file to your panel. For more information on hosting the TFT file and setting up the URL, see the [Upload TFT](#upload-tft) section.
|
||||||
We will come back to this on the [Upload TFT](#upload-tft) section, but it is important to know that you have this option which could be useful if your panel don't have access to the Internet or if you have trouble when uploading the TFT file directly from the GitHub repository.
|
|
||||||
|
|
||||||
12. (optional) You can optionally enable API encryption by adding the key copied on step 6 and adding it to the **My customization** area. This will encrypt the communication between your panel and Home Assistant, which may be important if you will use your panel to transfer sensitive information, like a pin code when disabling an alarm.<br>
|
12. (Optional) Enhance security with API encryption by adding the copied key from step 6 to the **My Customization** area.
|
||||||
This can be set later, if you want to skip it for now.<br>
|
|
||||||
<br>
|
|
||||||
|
|
||||||
13. When all settings are correct, click the button **Save** in the top and close this yaml window.
|
13. After finalizing settings, click **Save** and close the YAML window.
|
||||||
|
|
||||||
Done! Your NSPanel is all set into your ESPHome Dashbord.
|
Your NSPanel is now configured in your ESPHome Dashboard.
|
||||||
|
|
||||||
### Flashing the device for the first time
|
### Flashing the Device for the First Time
|
||||||
|
|
||||||
#### Drive safe
|
#### Drive Safe
|
||||||
|
|
||||||
> [!CAUTION]
|
> :warning: **WARNING**
|
||||||
> **Make sure your panel's controller module is disconnected from main power during all the work.**<br>
|
> **Disconnect your panel's controller module from main power during all work.**
|
||||||
>If your device is open and plugged directly into the wall, you’ll be a single touch away from being electrocuted.
|
> Operating on an open device that's plugged into the wall puts you at risk of electrocution.
|
||||||
|
|
||||||
> [!WARNING]
|
> :warning: **CAUTION**
|
||||||
> **You are solely responsible for your own safety.**<br>
|
> **You are solely responsible for your own safety.**
|
||||||
> If you feel something is wrong or are uncomfortable with continuing, stop immediately.
|
> If you're uncomfortable or if something feels wrong, stop immediately.
|
||||||
|
|
||||||
- Don't use any eletronic component above 3.3VDC. Make sure you TTL adapter is set to 3.3VDC. Any value above this treshold can permanently damage your panel.
|
- Use only electronic components rated for 3.3VDC. Ensure your TTL adapter is set to 3.3VDC. Exceeding this voltage can cause permanent damage to your panel.
|
||||||
- Use a clean area when disassembling your device and make sure you don't scratch your device's screen.
|
- Maintain a clean work area to prevent damage to your device, especially the screen.
|
||||||
- Keep all the parts (screws, cables, etc.) safe.
|
- Keep all small parts, like screws and cables, safely stored.
|
||||||
|
|
||||||
#### Required Tools:
|
#### Required Tools
|
||||||
If you are going to flash your NSPanel with ESPHome for the first time you also may need:
|
For first-time flashing of your NSPanel with ESPHome, you may need:
|
||||||
1. [USB-to-Serial TTL adapter](https://esphome.io/guides/physical_device_connection#usb-serial-adapter)
|
1. [USB-to-Serial TTL adapter](https://esphome.io/guides/physical_device_connection#usb-serial-adapter)
|
||||||
2. [jumper wires](https://esphome.io/guides/physical_device_connection#jumper-wires)
|
2. [Jumper wires](https://esphome.io/guides/physical_device_connection#jumper-wires)
|
||||||
3. [breakable headers (optional)](https://esphome.io/guides/physical_device_connection#pcb-headers)
|
3. [Breakable headers (optional)](https://esphome.io/guides/physical_device_connection#pcb-headers)
|
||||||
4. An appropriated screw driver for unassembling your panel's controller module (touch plate)
|
4. Appropriate screwdriver to disassemble your panel's controller module (touch plate)
|
||||||
|
|
||||||
#### Connecting your device via USB-to-Serial TTL interface
|
#### Connecting Your Device via USB-to-Serial TTL Interface
|
||||||
Before start unassembling your panel, please take a look at the following material:
|
Before disassembling your panel, review the following resources:
|
||||||
- [YouTube - Mark Watt Tech - HOW TO - Setup the SIMPLEST Smart Home Scene Controller](https://www.youtube.com/watch?v=jpSTA_ILB8g&t=323s)
|
- [YouTube - Mark Watt Tech - HOW TO - Setup the SIMPLEST Smart Home Scene Controller](https://www.youtube.com/watch?v=jpSTA_ILB8g&t=323s)
|
||||||
- @blakadder's [Sonoff NSPanel EU Switch in Detail](https://blakadder.com/nspanel-teardown/)
|
- @blakadder's [Sonoff NSPanel EU Switch in Detail](https://blakadder.com/nspanel-teardown/)
|
||||||
- [ESPHome - Physically Connecting to your Device](https://esphome.io/guides/physical_device_connection)
|
- [ESPHome - Physically Connecting to Your Device](https://esphome.io/guides/physical_device_connection)
|
||||||
|
|
||||||
<<add pictures of the board & wiring>>
|
|
||||||
<<add step by step how to generate firmware on ESPHome Dashboard>>
|
##### Pending: (Pictures of the board & wiring will be added here)
|
||||||
<<add step by step how to flash the firmware using serial TTL>>
|
##### Pending: (Steps to generate firmware on ESPHome Dashboard will be added here)
|
||||||
|
##### Pending: (Steps to flash the firmware using serial TTL will be added here)
|
||||||
|
|
||||||
### Integrating your panel to Home Assistant
|
### Integrating your panel to Home Assistant
|
||||||
|
|
||||||
### Making changes Over The Air (OTA)
|
### Making changes Over The Air (OTA)
|
||||||
<< add instructions how to flash wirelessly>>
|
##### Pending: (add instructions how to flash wirelessly)
|
||||||
|
|
||||||
### Updating
|
### Updating
|
||||||
<< add instructions how to flash wirelessly>>
|
##### Pending: (add instructions how to flash wirelessly)
|
||||||
<< considerations - update all to the same version >>
|
##### Pending: (considerations - update all to the same version)
|
||||||
|
|
||||||
### Migrating from other custom firmware
|
### Migrating from other custom firmware
|
||||||
The installation in a NSPanel with Sonoff's original firmware should be straighforward, however, if you have installed some other custom firmware before, you may have additional steps to execute.
|
The installation in a NSPanel with Sonoff's original firmware should be straighforward, however, if you have installed some other custom firmware before, you may have additional steps to execute.
|
||||||
@@ -169,8 +165,11 @@ If you have already installed on your NSPanel the "nspanel-lovelace-ui" firmware
|
|||||||
Please try the standard process and if you find any issue, please [create a new issue](/Blackymas/NSPanel_HA_Blueprint/issues) and inform which custom firmware you have installed before migrating to NSPanel HA Blueprint.
|
Please try the standard process and if you find any issue, please [create a new issue](/Blackymas/NSPanel_HA_Blueprint/issues) and inform which custom firmware you have installed before migrating to NSPanel HA Blueprint.
|
||||||
|
|
||||||
## Upload TFT
|
## Upload TFT
|
||||||
|
##### Pending:
|
||||||
### Select the right file
|
### Select the right file
|
||||||
|
##### Pending:
|
||||||
### Uploading to Nextion
|
### Uploading to Nextion
|
||||||
|
##### Pending:
|
||||||
### Troubleshooting TFT transfer issues
|
### Troubleshooting TFT transfer issues
|
||||||
We have an useful guide for [troubleshooting TFT transfer issues](tft_upload.md). Please take a look there.
|
We have an useful guide for [troubleshooting TFT transfer issues](tft_upload.md). Please take a look there.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user