23 Commits

Author SHA1 Message Date
Edward Firmo
f0661f0a6c Update validate_markdown.yml 2024-01-05 08:57:12 +01:00
Edward Firmo
8f200fbd0a Update validate_markdown.yml 2024-01-05 08:39:18 +01:00
Edward Firmo
195105e1f6 Update validate_markdown.yml 2024-01-05 08:37:47 +01:00
Edward Firmo
0cc4c4fddb Update validate_markdown.yml 2024-01-05 08:36:23 +01:00
Edward Firmo
d099d45eae Update validate_markdown.yml 2024-01-05 08:32:04 +01:00
Edward Firmo
b5115df38e Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2024-01-05 08:26:07 +01:00
Edward Firmo
797698ed4f Update Markdown validations 2024-01-05 08:25:57 +01:00
Edward Firmo
0d4c2a012b Merge pull request #1537 from tikismoke/patch-1
DOC explain relay fallback mode
2024-01-05 07:49:44 +01:00
Edward Firmo
763693c2ca Validate markdown 2024-01-05 07:48:47 +01:00
Edward Firmo
bc6be10462 Update ReleaseNotes.md 2024-01-05 07:32:14 +01:00
Edward Firmo
cbb08dc747 A bit of rewording and adding reference to the issue
Solves #1349
2024-01-05 07:20:03 +01:00
tikismoke
c4c65ebf34 Update customization.md 2024-01-05 05:04:26 +01:00
Edward Firmo
622279c732 Update install.md 2024-01-05 02:44:00 +01:00
Edward Firmo
76738b6c61 Update install.md 2024-01-05 02:43:08 +01:00
Edward Firmo
173fb22fd7 Update install.md 2024-01-05 02:39:42 +01:00
Edward Firmo
8de24eafa1 Update install.md 2024-01-05 02:16:56 +01:00
Edward Firmo
d3388f2f01 Update install.md 2024-01-05 02:16:03 +01:00
Edward Firmo
4416605d85 That is not that important 2024-01-05 01:49:42 +01:00
Edward Firmo
f28f4b59d6 Replacing highlights with blockquotes 2024-01-05 01:47:51 +01:00
Edward Firmo
ded74c787f Migrating highlights to blockquotes 2024-01-05 01:39:23 +01:00
Edward Firmo
3916649e73 Update install.md 2024-01-05 01:21:04 +01:00
Edward Firmo
c293b3b2ec Update install.md 2024-01-05 01:20:05 +01:00
Edward Firmo
ca47631472 Updated intallation instructions (partial) 2024-01-05 00:53:09 +01:00
10 changed files with 270 additions and 228 deletions

View File

@@ -18,4 +18,4 @@ jobs:
steps:
- uses: actions/checkout@v4.1.0
- name: Validate nspanel_blueprint.yaml
run: yamllint -c "./.yamllint/rules.yml" nspanel_blueprint.yaml
run: yamllint -c "./.rules/yamllint.yml" nspanel_blueprint.yaml

View File

@@ -21,21 +21,21 @@ jobs:
steps:
- uses: actions/checkout@v4.1.0
- name: Validate nspanel_esphome.yaml
run: yamllint -c "./.yamllint/rules.yml" nspanel_esphome.yaml
run: yamllint -c "./.rules/yamllint.yml" nspanel_esphome.yaml
- name: Validate nspanel_esphome_core.yaml
run: yamllint -c "./.yamllint/rules.yml" advanced/esphome/nspanel_esphome_core.yaml
run: yamllint -c "./.rules/yamllint.yml" advanced/esphome/nspanel_esphome_core.yaml
- name: Validate nspanel_esphome_addon_upload_tft.yaml
run: yamllint -c "./.yamllint/rules.yml" advanced/esphome/nspanel_esphome_addon_upload_tft.yaml
run: yamllint -c "./.rules/yamllint.yml" advanced/esphome/nspanel_esphome_addon_upload_tft.yaml
- name: Validate nspanel_esphome_advanced.yaml
run: yamllint -c "./.yamllint/rules.yml" advanced/esphome/nspanel_esphome_advanced.yaml
run: yamllint -c "./.rules/yamllint.yml" advanced/esphome/nspanel_esphome_advanced.yaml
- name: Validate nspanel_esphome_addon_climate_base.yaml
run: yamllint -c "./.yamllint/rules.yml" advanced/esphome/nspanel_esphome_addon_climate_base.yaml
run: yamllint -c "./.rules/yamllint.yml" advanced/esphome/nspanel_esphome_addon_climate_base.yaml
- name: Validate nspanel_esphome_addon_climate_cool.yaml
run: yamllint -c "./.yamllint/rules.yml" nspanel_esphome_addon_climate_cool.yaml
run: yamllint -c "./.rules/yamllint.yml" nspanel_esphome_addon_climate_cool.yaml
- name: Validate nspanel_esphome_addon_climate_heat.yaml
run: yamllint -c "./.yamllint/rules.yml" nspanel_esphome_addon_climate_heat.yaml
run: yamllint -c "./.rules/yamllint.yml" nspanel_esphome_addon_climate_heat.yaml
- name: Validate nspanel_esphome_addon_climate_dual.yaml
run: yamllint -c "./.yamllint/rules.yml" nspanel_esphome_addon_climate_dual.yaml
run: yamllint -c "./.rules/yamllint.yml" nspanel_esphome_addon_climate_dual.yaml
build_core:
name: Core

View File

@@ -25,21 +25,21 @@ jobs:
steps:
- uses: actions/checkout@v4.1.0
- name: Validate nspanel_esphome.yaml
run: yamllint -c "./.yamllint/rules.yml" nspanel_esphome.yaml
run: yamllint -c "./.rules/yamllint.yml" nspanel_esphome.yaml
- name: Validate nspanel_esphome_core.yaml
run: yamllint -c "./.yamllint/rules.yml" advanced/esphome/nspanel_esphome_core.yaml
run: yamllint -c "./.rules/yamllint.yml" advanced/esphome/nspanel_esphome_core.yaml
- name: Validate nspanel_esphome_addon_upload_tft.yaml
run: yamllint -c "./.yamllint/rules.yml" advanced/esphome/nspanel_esphome_addon_upload_tft.yaml
run: yamllint -c "./.rules/yamllint.yml" advanced/esphome/nspanel_esphome_addon_upload_tft.yaml
- name: Validate nspanel_esphome_advanced.yaml
run: yamllint -c "./.yamllint/rules.yml" advanced/esphome/nspanel_esphome_advanced.yaml
run: yamllint -c "./.rules/yamllint.yml" advanced/esphome/nspanel_esphome_advanced.yaml
- name: Validate nspanel_esphome_addon_climate_base.yaml
run: yamllint -c "./.yamllint/rules.yml" advanced/esphome/nspanel_esphome_addon_climate_base.yaml
run: yamllint -c "./.rules/yamllint.yml" advanced/esphome/nspanel_esphome_addon_climate_base.yaml
- name: Validate nspanel_esphome_addon_climate_cool.yaml
run: yamllint -c "./.yamllint/rules.yml" nspanel_esphome_addon_climate_cool.yaml
run: yamllint -c "./.rules/yamllint.yml" nspanel_esphome_addon_climate_cool.yaml
- name: Validate nspanel_esphome_addon_climate_heat.yaml
run: yamllint -c "./.yamllint/rules.yml" nspanel_esphome_addon_climate_heat.yaml
run: yamllint -c "./.rules/yamllint.yml" nspanel_esphome_addon_climate_heat.yaml
- name: Validate nspanel_esphome_addon_climate_dual.yaml
run: yamllint -c "./.yamllint/rules.yml" nspanel_esphome_addon_climate_dual.yaml
run: yamllint -c "./.rules/yamllint.yml" nspanel_esphome_addon_climate_dual.yaml
build_core:
name: Core

54
.github/workflows/validate_markdown.yml vendored Normal file
View File

@@ -0,0 +1,54 @@
name: Validate Markdown
on:
pull_request:
push:
workflow_dispatch:
jobs:
markdown-lint-quick:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4.1.0
# https://github.com/marketplace/actions/markdownlint-cli2-action
#- name: Identify changed files
# uses: tj-actions/changed-files@v41
# id: changed-files
# with:
# files: '**/*.md'
# separator: ","
- name: Markdown Lint
uses: DavidAnson/markdownlint-cli2-action@v14
# if: steps.changed-files.outputs.any_changed == 'true'
with:
# globs: ${{ steps.changed-files.outputs.all_changed_files }}
# separator: ","
config: '.rules/custom.markdownlint.jsonc'
markdown-lint-detailed:
runs-on: ubuntu-latest
needs:
- markdown-lint-quick
steps:
- name: Check out code
uses: actions/checkout@v4.1.0
# https://github.com/actionshub/markdownlint
- name: Markdown Lint
uses: actionshub/markdownlint@main
markdown-links:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4.1.0
# https://github.com/gaurav-nelson/github-action-markdown-link-check
- name: Markdown links
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
CHECK_MODIFIED_FILES: yes

View File

@@ -0,0 +1,3 @@
{
"line-length": 200
}

View File

@@ -239,6 +239,7 @@ Discover what's next and what we are working on right now in our [Milestones](ht
## Special thanks to:
- @bluefoxlee - For the CJK fonts and all the support with #1359.
- @Floppe - Fix entity pages labels, #1455
- @tikismoke - Customization guide: Exposing relay fallback switch to Home Assistant, #1537
## Previous releases
- [v4.1.4 - Support to Home Assistant 2023.12.0](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.1.4)

View File

@@ -26,6 +26,7 @@ Table of contents:
- [Logger via UART](#logger-via-uart)
- [Climate custom presets](#climate-custom-presets)
- [Push button / Momentary switch](#push-button--momentary-switch)
- [Expose relay fallback switch](#expose-relay-fallback-switch)
 
 
@@ -531,4 +532,23 @@ binary_sensor:
switch.turn_on: relay_2
on_release:
switch.turn_off: relay_2
```
```
 
### Expose Relay Fallback Switch
You can configure a local fallback relay to integrate with Home Assistant. This is particularly useful for devices like WiFi-connected lights. For instance, you can program it to cut the power to a connected light under certain conditions, directly via a switch.
#### Use Case
One application, as utilized by @tikismoke and detailed in #1349, is in response to fluctuating energy prices. When the energy price is high, an automation can change the fallback mode to cut off the relay. This ensures that the bulb does not consume energy in standby mode. However, it will still function normally with `light.toggle` from the blueprint in all other cases. Local control is reinstated when the power price returns to normal. On the next switch activation, the relay turns `on`, powering up the bulb. Subsequent activations will trigger `light.toggle` from the blueprint, as this functionality is already embedded in the ESPHome YAML code.
> [!NOTE]
> In this scenario, the bulb must be set to turn `on` automatically when power is restored.
```yaml
# Expose relay local control switch to Home Assistant
switch:
- id: !extend relay1_local
internal: false
- id: !extend relay2_local
internal: false
```

View File

@@ -3,309 +3,252 @@ Welcome to this setup guide, a community-driven approach to integrating NSPanel
Whether you're a first-time smart device user or an enthusiast looking to personalize your setup, this guide provides the necessary tools and instructions. Let's embark on creating a smart home that's uniquely yours.
| :exclamation: **Attention** |
|:--|
| Some images or instructions on this guide might be slighly different due to different configurations depending on your ESPHome and Home Assistant implementation or versions. If you find something that is not understandable or needs to be updated, please let us know. You can create an issue reporting this, or fix it yourself and submit a Pull Request to this repository. |
> [!NOTE]
> Some images or instructions on this guide might be slighly different due to different configurations depending on your ESPHome and Home Assistant implementation or versions.<br>
> If you find something that is not understandable or needs to be updated, please let us know. You can create an issue reporting this, or fix it yourself and submit a [Pull Request](/Blackymas/NSPanel_HA_Blueprint/pulls) to this repository.
## Summary
- [Preparation](#preparation)
- [ESPHome Firmware](#esphome-firmware)
- [Preparing the ESPHome Environment](#preparing-the-esphome-environment)
- [Setting Up a Device on ESPHome Dashboard](#setting-up-a-device-on-esphome-dashboard)
- [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)
- [Making Changes Over The Air (OTA)](#making-changes-over-the-air-ota)
- [Updating](#updating)
- [Migrating from Other Custom Firmware](#migrating-from-other-custom-firmware)
- [Upload TFT](#upload-tft)
- [Selecting the Right File](#selecting-the-right-file)
- [Uploading to Nextion](#uploading-to-nextion)
- [Troubleshooting TFT Transfer Issues](#troubleshooting-tft-transfer-issues)
- [Blueprint](#blueprint)
- [Importing the Blueprint](#importing-the-blueprint)
- [Creating an Automation](#creating-an-automation)
- [Editing the Settings in Your Automation](#editing-the-settings-in-your-automation)
- [How to Handle Multiple Panels](#how-to-handle-multiple-panels)
- [Advanced Configuration for ESPHome and Home Assistant Experts](#advanced-configuration-for-esphome-and-home-assistant-experts)
- [Additional Tips and Resources](#additional-tips-and-resources)
------
## Preparation
Start by ensuring you have all the necessary tools and files. This includes your NSPanel device, a stable internet connection, and access to your Home Assistant instance.
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
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.
### Preparing the ESPHome Environment
- 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)
- 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)
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.
### Setup a device on ESPHome Dashboard
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>
![image](pics/ha_esphome_dashboard_new_device_01.png)<br>&nbsp;
3. Select **ESP32** as device type:<br>
![image](pics/ha_esphome_dashboard_new_device_02.png)<br>&nbsp;
4. Click **Skip** button, as we don't want to start the installation yet:<br>
![image](pics/ha_esphome_dashboard_new_device_03.png)<br>&nbsp;
5. Find the entry related to your newly created device in the ESPHome Dashboard and click the button **Edit**.
![image](pics/ha_esphome_dashboard_new_device_04.png)<br>&nbsp;
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).
![image](pics/ha_esphome_dashboard_new_device_05.png)<br>&nbsp;
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>
![image](pics/ha_esphome_dashboard_new_device_05b.png)<br>&nbsp;
- **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).
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.
![New Device Name](pics/ha_esphome_dashboard_new_device_01.png)
3. Select **ESP32** as the device type.
![Select ESP32](pics/ha_esphome_dashboard_new_device_02.png)
4. Click **Skip** as we're not starting the installation yet.
![Skip Installation](pics/ha_esphome_dashboard_new_device_03.png)
5. Locate your newly created device in the ESPHome Dashboard and click **Edit**.
![Edit Device](pics/ha_esphome_dashboard_new_device_04.png)
6. (Optional) For enhanced security, consider copying the `api:` section to a temporary file.
![API Section](pics/ha_esphome_dashboard_new_device_05.png)
7. Note the device name at the beginning of the file under `esphome`.
![Device Name](pics/ha_esphome_dashboard_new_device_05b.png)
8. Clear all existing content and paste the following YAML configuration:
```yaml
substitutions:
###### Settings - You can edit these values ######
# Settings - Editable values
device_name: "YOUR_NSPANEL_NAME"
wifi_ssid: !secret wifi_ssid
wifi_password: !secret wifi_password
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 #####
# heater_relay: "1" # possible values: 1/2 - Used by add-on climate
###### Settings - End #####
# Customization area
##### My customization - Start #####
##### My customization - End #####
###### Do not change area - Start ######
# Core and optional configurations
packages:
remote_package:
url: https://github.com/Blackymas/NSPanel_HA_Blueprint
ref: main
files:
- nspanel_esphome.yaml # Core package
# - advanced/esphome/nspanel_esphome_advanced.yaml # activate advanced (legacy) elements - can be useful for troubleshooting
# - nspanel_esphome_addon_climate_cool.yaml # activate for local climate (cooling) control
# - nspanel_esphome_addon_climate_heat.yaml # activate for local climate (heater) control
# - nspanel_esphome_addon_climate_dual.yaml # activate for local climate (dual) control
# Optional advanced and add-on configurations
# - advanced/esphome/nspanel_esphome_advanced.yaml
# - nspanel_esphome_addon_climate_cool.yaml
# - nspanel_esphome_addon_climate_heat.yaml
# - nspanel_esphome_addon_climate_dual.yaml
refresh: 300s
esp32:
framework:
type: esp-idf
###### Do not change area - End ######
```
![image](pics/ha_esphome_dashboard_new_device_06.png)<br>&nbsp;
![YAML Code](pics/ha_esphome_dashboard_new_device_06.png)
9. Edit the **Settings** area. As your device name, ideally use the same device name you recorder on the step 7:
![image](pics/ha_esphome_dashboard_new_device_06b.png)<br>&nbsp;
9. Modify the **Settings** section with your device name (as noted in step 7) and Wi-Fi details.
![Edit Settings](pics/ha_esphome_dashboard_new_device_06b.png)
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>
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)
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).
11. You can also edit `nextion_update_url` to point to a local copy of the TFT file.<br>
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.
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.
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>
This can be set later, if you want to skip it for now.<br>
![image](pics/ha_esphome_dashboard_new_device_07.png)<br>&nbsp;
12. (Optional) Enhance security with API encryption by adding the copied key from step 6 to the **My Customization** area.
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
| :warning: **WARNING** |
|:--|
| **Make sure your panel's controller module is disconnected from main power during all the work.** If your device is open and plugged directly into the wall, youll be a single touch away from being electrocuted. |
> [!CAUTION]
> **Disconnect your panel's controller module from main power during all work.**
> Operating on an open device that's plugged into the wall puts you at risk of electrocution.
| :warning: **WARNING** |
|:--|
| **You are solely responsible for your own safety.** If you feel something is wrong or are uncomfortable with continuing, stop immediately. |
> [!WARNING]
> **You are solely responsible for your own safety.**
> 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 a clean area when disassembling your device and make sure you don't scratch your device's screen.
- Keep all the parts (screws, cables, etc.) safe.
- 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.
- Maintain a clean work area to prevent damage to your device, especially the screen.
- Keep all small parts, like screws and cables, safely stored.
#### Required Tools:
If you are going to flash your NSPanel with ESPHome for the first time you also may need:
#### Required Tools
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)
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)
4. An appropriated screw driver for unassembling your panel's controller module (touch plate)
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)
4. Appropriate screwdriver to disassemble your panel's controller module (touch plate)
#### Connecting your device via USB-to-Serial TTL interface
Before start unassembling your panel, please take a look at the following material:
#### Connecting Your Device via USB-to-Serial TTL Interface
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)
- @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>>
<<add step by step how to flash the firmware using serial TTL>>
##### Pending: (Pictures of the board & wiring will be added here)
##### 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
##### Pending:
### Making changes Over The Air (OTA)
<< add instructions how to flash wirelessly>>
##### Pending: (add instructions how to flash wirelessly)
### Updating
<< add instructions how to flash wirelessly>>
<< considerations - update all to the same version >>
##### Pending: (add instructions how to flash wirelessly)
##### Pending: (considerations - update all to the same version)
### 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.
#### NSPanel Lovelace UI
If you have already installed on your NSPanel the "nspanel-lovelace-ui" firmware from @joBr99 or from Tasmota, an [intermediate step](lovelace_ui.md) is necessary. Please execute that first before returning here.
#### Other
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
##### Pending:
### Select the right file
##### Pending:
### Uploading to Nextion
##### Pending:
### Troubleshooting TFT transfer issues
We have an useful guide for [troubleshooting TFT transfer issues](tft_upload.md). Please take a look there.
## Blueprint
In this area we will provide guidance on how to import the blueprint from our GitHub repository to your Home Assistant, use that to create a new automation to setup your panel and how to update the blueprint when a new version is available.
This section provides guidance on importing the NSPanel HA Blueprint from our GitHub repository into your Home Assistant, creating a new automation for your panel setup, and updating the blueprint when new versions are available. These processes are straightforward with the latest versions of Home Assistant. If you have any questions or need clarification, please reach out to us.
All these processes are quite easy with the latest versions of Home Assistant, but please come back to us if you have any question or if something isn't very clear.
### Importing the blueprint
Home Assistant makes this step very easy for you. Just click the button bellow and follow it's steps:
### Importing the Blueprint
Importing the blueprint into Home Assistant is a simple process. Just click the button below and follow the steps:
[![Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.](https://my.home-assistant.io/badges/blueprint_import.svg)](https://my.home-assistant.io/redirect/blueprint_import/?blueprint_url=https%3A%2F%2Fgithub.com%2FBlackymas%2FNSPanel_HA_Blueprint%2Fblob%2Fmain%2Fnspanel_blueprint.yaml)
### Creating an automation
Now that Home Assistant is equiped with our Blueprint,
### Selecting the panel
### Creating an Automation
After importing the Blueprint into Home Assistant, create a new automation using these steps:
## How to handle multiple panels
1. Go to **Settings** → **Automations & Scenes** → **Blueprints** in Home Assistant. Alternatively, use the link below.
[![Open your Home Assistant instance and show your blueprints.](https://my.home-assistant.io/badges/blueprints.svg)](https://my.home-assistant.io/redirect/blueprints/)
## Additional info
2. Find the **NSPanel Configuration** Blueprint and click on it.
3. In the Blueprint settings, select your panel in the **NSPanel device** field.
4. Complete the relevant settings and click the **Save** button.
===================================== TO BE REMOVED =====================================
5. Name your automation for easy identification and click **Rename**.<br>
![image](pics/ha_create_automation_rename.png)
⭐ **_Step by Step [Setup Video](https://www.youtube.com/watch?v=jpSTA_ILB8g)_**
> [!TIP]
> For a comprehensive list of panel settings, refer to the [Blueprint Guide](blueprint.md).
### Editing Automation Settings
You can modify your automation anytime to change configurations:
&nbsp;
> _**ATTENTION! if you have already installed the version "nspanel-lovelace-ui" from joBr99 on your NSPanel, an [intermediate step](lovelace_ui.md) is necessary - otherwise it is not possible to install this or any other version.**_
1. In Home Assistant, go to **Settings** → **Automations & Scenes**. Or use the link below.
[![Open your Home Assistant instance and show your automations.](https://my.home-assistant.io/badges/automations.svg)](https://my.home-assistant.io/redirect/automations/)
&nbsp;
> _**NOTE! We are not EN native speakers, there may well be errors in translation or sentence structure. If something is wrong or unclear an "[Issue](/Blackymas/NSPanel_HA_Blueprint/issues)" can be opened. If you want to help us, feel free to propose a change directly in GitHub or please get in contact with us.**_
2. Find your automation in the list and click on it to edit.
&nbsp;
3. After making changes, click **Save**. The new settings will be sent to your panel, usually within seconds. Some changes may require a page reload on the panel to appear.
***
> [!TIP]
> For a comprehensive list of panel settings, refer to the [Blueprint Guide](blueprint.md).
&nbsp;
# Content:
## How to Handle Multiple Panels
For homes with multiple panels:
1. [Short version of the setup of Esphome and Blueprint](install.md#1-short-version-of-the-setup-of-esphome-and-blueprint)
2. [Version "nspanel-lovelace-ui" by joBr99 was previously installed](install.md#2-version-nspanel-lovelace-ui-by-jobr99-was-previously-installed)
3. [Advanced configuration for all ESPHome and Home Assistant professionals](install.md#3-advanced-configuration-for-all-esphome-and-home-assistant-professionals)
4. [Step by Step Configuration and setup of ESPHome and Blueprint](install.md#4-step-by-step-configuration-and-setup-of-esphome-and-blueprint)
1. Repeat the steps in the "Blueprint" section for each panel.
&nbsp;
2. Ensure each panel has a unique entry in the ESPHome Dashboard and in Home Assistant under **Settings** → **Devices & Services** → **ESPHome**.
***
3. Create a separate automation for each panel in Home Assistant.
&nbsp;
> [!IMPORTANT]
> Avoid assigning the same panel to multiple automations. This can cause unexpected behavior and put extra load on Home Assistant and your Wi-Fi network. Currently, Home Assistant does not have a mechanism to prevent this.
## 1. Short version of the setup of Esphome and Blueprint
> _**(for those who already have experience with ESPhome and Home Assistant)**_
## Advanced Configuration for ESPHome and Home Assistant Experts
> [!WARNING]
> Customizations and advanced mode are not supported by this project's team. Use them with caution and only if you have the necessary expertise.
> It is also possible to copy the code from the file _**"nspnael_blueprint.yaml "**_ and paste it into HA.
> You can find instructions for this under [Using Automation Blueprints](https://www.home-assistant.io/docs/automation/using_blueprints/) and [Automation blueprint tutorial](https://www.home-assistant.io/docs/blueprint/tutorial/#create-the-blueprint-file)
Before customizing your system, we encourage you to share any enhancements you make. Consider creating a [Pull Request](/Blackymas/NSPanel_HA_Blueprint/pulls) to the `dev` branch to share your discoveries with the community.
#### 2. You have to download the file **_nspanel_us.tft_** or **_"nspanel_eu.tft"_** from Github
### ESPHome
![Bildschirmfoto 2023-01-23 um 21 31 05](https://user-images.githubusercontent.com/41958506/214144182-e2a5f28e-e96d-4263-8c4b-b7fbcc6658e7.png)
For advanced customization with ESPHome, start with "Customizations." We have a dedicated page for this, and your contributions are welcome: [Customization](customization.md).
To use a local copy of `nspanel_esphome.yaml`, copy the file from GitHub to your local file system and include it in your ESPHome settings as follows:
#### 3. Upload the file to your **_Home Assistant Server_** in the **_www_** folder, see [Home Assistant HTTP](https://www.home-assistant.io/integrations/http/#hosting-files) 'Hosting Files' section for details.
![Bildschirmfoto 2023-01-23 um 21 33 20](https://user-images.githubusercontent.com/41958506/214144729-08fb5d3f-9255-4f57-9c6e-a5e33665e4df.png)
#### 4. In the next step you have to create a new ESP32 device in ESPHome
#### 5. When the new ESP32 device has been created, next click _**"Edit "**_ on the device you have just created to open the web editor. Now the following code must be copied and pasted.
> ❗ _**IMPORTANT!**_ The already existing code in the ESPHome file must be _**"COMPLETELY "**_ deleted and _**"REPLACED "**_ by the code below.
> ❗ _**IMPORTANT!**_ in the block _**"CHANGE ME "**_ all values _**(device_name, wifi_ssid, wifi_password, nextion_update_url )**_ in the _**" "**_ must be replaced by your own values. It is also possible to work here with _**"!secret "**_.
&nbsp;
### CODE:
```yaml
substitutions:
###### CHANGE ME START ######
# Editable settings
device_name: "YOUR_NSPANEL_NAME"
wifi_ssid: !secret wifi_ssid
wifi_password: !secret wifi_password
nextion_update_url: "http://homeassistant.local:8123/local/nspanel_eu.tft"
nextion_blank_url: "http://homeassistant.local:8123/local/nspanel_blank.tft"
##### addon-configuration #####
## addon_climate ##
# addon_climate_heater_relay: "1" # possible values: 1/2
##### CHANGE ME END #####
packages:
remote_package:
url: https://github.com/Blackymas/NSPanel_HA_Blueprint
ref: main
files:
- nspanel_esphome.yaml # Core package
# - advanced/esphome/nspanel_esphome_advanced.yaml # activate advanced (legacy) elements - can be useful for troubleshooting
# - nspanel_esphome_addon_climate_cool.yaml # activate for local climate (cooling) control
# - nspanel_esphome_addon_climate_heat.yaml # activate for local climate (heater) control
# - nspanel_esphome_addon_climate_dual.yaml # activate for local climate (dual) control
refresh: 300s
esp32:
framework:
type: esp-idf
# Add-on configuration
# heater_relay: "1" - possible values: 1/2
##### My customization - Start #####
##### My customization - End #####
```
⚠️ The following TFT files are available and can be replaced in your URL accordingly:
- [`nspanel_eu.tft`](/Blackymas/NSPanel_HA_Blueprint/raw/main/nspanel_eu.tft) (European layout)
- [`nspanel_us.tft`](/Blackymas/NSPanel_HA_Blueprint/raw/main/nspanel_us.tft) (US layout)
- [`nspanel_us_land.tft`](/Blackymas/NSPanel_HA_Blueprint/raw/main/nspanel_us_land.tft) (US layout - landscape orientation)
&nbsp;
#### 6. Now the NSPanel can be flashed with the new ESPHome code.
> How to flash the NSPanel you can see here: [HowTo - Flash NSPanel with ESPhome](https://www.youtube.com/watch?v=jpSTA_ILB8g)
#### 7. After the NSPanel is flashed, you can go to _**"Settings --> Devices & Services --> Add Integration"**_ to add your new device and finish setting it up.
#### 8. In the last step, only the TFT must be uploaded. To do this, open your new device in the ESPHome integration and activate the item _**"Update TFT display "**_ under _**"Configuration"**_. Now the current TFT file is loaded from local Home Assistant Server or GitHub and uploaded to your NSPanel. _**ATTENTION!**_ This process will take up to 30 minutes.
#### 9. Now the setup of ESPHome and NSPanel is completed.
#### 10. Now you can configure your NSPanel via the Blueprint. To do this, go to _**"Settings --> Automations & Scenes --> Templates --> NSPanel Configuration --> CREATE AUTOMATION"**_ and start with the setup of the NSPanel.
> _**NOTE!**_ In the blueprint, the field _**"NSPanel device"**_ is required. Although you can still save the automation without a device selected, it would be unusable without that information.
&nbsp;
&nbsp;
***
&nbsp;
&nbsp;
## 2. Version "nspanel-lovelace-ui" by joBr99 was previously installed
See [(EN) Common Issues | TFT Upload When nspanel lovelace ui has been installed](lovelace_ui.md)
&nbsp;
&nbsp;
***
&nbsp;
&nbsp;
## 3. Advanced configuration for all ESPHome and Home Assistant professionals
> _**ATTENTION!**_ Customizations and advanced mode are not supported by this project's team. Use this with caution and only when you know what you are doing.
Before you start customizing your system, we would like to invite you to share anything nice you achieve. You can always create a new [Pull Request](/Blackymas/NSPanel_HA_Blueprint/pulls) to `dev` branch and this will give a chance for other users with similar challenges to take advantage of your discoveries.
The simpler way to go "advanced" with ESPHome is to use "Customizations". We have a page specifically for that where, again, your contribution is very welcome: [Customization](customization.md)
If you want for some reason use a local copy of `nspanel_esphome.yaml`, you can copy the file from GitHub to you local file system and reference in your ESPHome settings like this:
```yaml
substitutions:
###### CHANGE ME START ######
device_name: office-workstation-panel
wifi_ssid: !secret wifi_ssid
wifi_password: !secret wifi_password
nextion_update_url: "http://homeassistant.local:8123/local/nspanel_eu.tft"
nextion_blank_url: "http://homeassistant.local:8123/local/nspanel_blank.tft"
##### CHANGE ME END #####
packages:
local_package: !include packages/nspanel_esphome.yaml
@@ -313,10 +256,31 @@ packages:
esp32:
framework:
type: esp-idf
```
> Note that a sub-folder was used in the example above in order to avoid that file to be added as an additional device in your ESPHome dashboard. You can also have the file in the same folder, but with it's name starting with `.`, so ESPHome dashboard understands that file should be ignored when listing devices.
> [!NOTE]
> A sub-folder is recommended to prevent the file from being added as an additional device in the ESPHome dashboard. Alternatively, you can name the file starting with `.` to exclude it from the device list.
### Blueprint
The Blueprint file `nspanel_blueprint.yaml` can be installed manually. You can also edit your local copy of the Blueprint, but be aware that reloading the Blueprint from the repository will overwrite local changes.
* Blueprint file _**"nspanel_blueprint.yaml "**_ can also be installed manually.
* There is also the possibility to upload the TFT file _**"nspanel_us.tft "**_ manually. The whole thing can also be combined with a _**"Folder Watcher "**_.
* additionally we provide the HMI files _**"nspanel_xx.HMI "**_ for the Nextion Editor to customize graphics and programming if needed.
### TFT File
All `.HMI` files used in this project are available in our GitHub repository. Modify these files using the [Nextion Editor](https://nextion.tech/nextion-editor/) and create your own `.tft` files for your device.
For guidance on using Nextion, refer to:
- [Nextion Instruction Set](https://nextion.tech/instruction-set)
- [Nextion Editor Guide](https://nextion.tech/editor_guide/)
## Additional Tips and Resources
> [!TIP]
> For troubleshooting TFT transfer issues, consult our [TFT Transfer Troubleshooting Guide](tft_upload.md) first.
If problems persist after troubleshooting, visit the [Issues](/Blackymas/NSPanel_HA_Blueprint/issues) page. Feel free to create a new issue for personalized assistance, providing details such as:
1. A description or picture of what is displayed on your screen.
2. Information on whether you are updating from a previous version of this project, migrating from another NSPanel customization, or customizing a panel with the original Sonoff settings.
3. ESPHome logs from the start of your panel to the point where the upload fails.
4. A description of what you have already tried.
## Important Note
Remember, these instructions serve as a guideline and may vary based on your specific setup and any systems previously installed.

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB