Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 6 additions & 21 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,35 +82,23 @@ body:
placeholder: |
# Example YAML configuration
# ...
# yamllint disable rule:line-length
- type: textarea
attributes:
label: ESPHome Logs
render: text
description: >
Access these logs via the **Logs** button on the ESPHome Dashboard. These logs are crucial for diagnosing issues with your device.


Please follow the guidelines below to ensure the logs are comprehensive:

- **Boot Issues**: If the problem occurs during boot, capture the logs from the start of your device to a minute or two after the boot completes.



Look for errors or unusual messages during this period.

- **TFT File Update Issues**: For problems related to TFT file updates,



include logs from the moment you press the **Update TFT Display** button until a few seconds after the device restarts.
Pay attention to any error messages or warnings during the update process.

Look for errors or unusual messages during this period.
- **TFT File Update Issues**: For problems related to TFT file updates, include logs from the moment you press the **Update TFT Display** button
until a few seconds after the device restarts.
Pay attention to any error messages or warnings during the update process.
- **Other Issues**: For other types of problems, include logs that encompass the issue's onset and continue for a short duration thereafter.



This will help in pinpointing the exact moment and nature of the issue.

This will help in pinpointing the exact moment and nature of the issue.

Remember, the more detailed the logs, the easier it is to identify and resolve the problem.

Expand All @@ -121,7 +109,6 @@ body:
description: >
To access Home Assistant logs, navigate to **Settings** > **System** > [**Logs**](https://my.home-assistant.io/redirect/logs/).


When reporting an issue, please focus on providing logs specifically relevant to the problem:

- **NSPanel Blueprint Automation**: If your issue is related to automation using the NSPanel blueprint, include only those logs that directly pertain to this process.
Expand All @@ -130,7 +117,5 @@ body:

- **Relevancy is Key**: To expedite troubleshooting, avoid including logs that are not related to the issue at hand. This helps in focusing on the pertinent information.


Your attention to sharing targeted and relevant log data is greatly appreciated and aids in efficient problem resolution.

...
59 changes: 59 additions & 0 deletions docs/nspanel_blank.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# NSPanel Blank - First TFT Installation

The NSPanel consists of an ESP32 board (the panel itself, controlling the relays, buttons, communications, etc.)
with a Nextion display connected to it.

This Nextion display has an independent controller which also requires a firmware and its settings (the basic layout),
and this is done by a `.tft` file.

When you get your panel from Sonoff, their `tft` file is installed in the Nextion display using a so-called "Reparse mode",
which makes it a bit challenging to replace the `tft` file when using ESPHome.
We highly recommend selecting **NSPanel Blank** as your first upload (this is the default for new installations),
as it is just a fraction of the size of a regular `tft` file and will make the first replacement much easier.

Once the NSPanel's original `tft` is replaced, it is much easier to install a new `tft` with ESPHome,
so you can proceed directly to installing the final file
(e.g., **NSPanel EU**, **NSPanel US**, **NSPanel US Landscape**, or one of the **CJK languages** variants).

Comment thread
coderabbitai[bot] marked this conversation as resolved.
For more details on how to install the first `tft` file, especially if your panel is still displaying the original Sonoff screen,
please refer to the [Troubleshooting TFT transfer](tft_upload.md) guide.

## How to install a different `tft` file?

Go to your device's page (under **Settings** > **Devices & services** > **ESPHome**),
select your **Upload TFT display - Model** and then press **Upload TFT display**.

Comment thread
coderabbitai[bot] marked this conversation as resolved.
![Upload TFT display - Model selector](pics/ha_device_configuration_tft_upload_model_selector.png)

## What to do after installing **NSPanel Blank**?

![Page Blank](pics/page_blank.png)

Once you have successfully installed any of the `tft` files from this project,
the **NSPanel Blank** model shouldn't be necessary anymore and you should be able to always install the final `tft` file directly.

Follow the same steps described above, but now select the correct final regional model
(e.g., **NSPanel EU**, **NSPanel US**, **NSPanel US Landscape**, or one of the **CJK languages** variants)
before pressing **Upload TFT display**.
Double-check this selection to avoid flashing the wrong region.

## Additional Tips and Resources

We have a useful guide for [troubleshooting TFT transfer issues](tft_upload.md).
Please take a look there first.

After troubleshooting, if issues persist, consult the [Issues](https://github.com/edwardtfn/NSPanel-Easy/issues)
and feel free to create a new one asking for more personalized assistance.

Please share as much info as possible, like:

1. A description (or picture) of what is on your screen.
2. Whether you are updating from a previous version of this same project,
coming from another NSPanel customization (if so, which one?),
or customizing for the first time a panel with original Sonoff settings.
3. The ESPHome logs from when your panel starts to the moment the upload fails.
4. A description of what you have already tried.

## Important note

Remember, these steps are a guideline and might vary slightly based on your specific setup and previously installed system.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/pics/page_blank.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 7 additions & 4 deletions esphome/nspanel_esphome_addon_upload_tft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
substitutions:
################## Defaults ##################
nextion_update_base_url: "https://raw.githubusercontent.com/edwardtfn/NSPanel-Easy/"
nextion_update_url: "${nextion_update_base_url}/main/hmi/nspanel_eu.tft"
nextion_update_url: "${nextion_update_base_url}/main/hmi/nspanel_blank.tft"
upload_tft_automatically: true
upload_tft_baud_rate: 115200
upload_tft_wait_ms_after_boot: 300000 # 5min
Expand Down Expand Up @@ -212,8 +212,10 @@ script:

if (idx == 0) {
resolved_url = "${nextion_update_url}";
} else if (idx >= 1 && idx <= 6) {
static const char* const FILENAME_PARTS[] = { "eu", "us", "us_land", "CJK_eu", "CJK_us", "CJK_us_land" };
} else if (idx >= 1 && idx <= 7) {
static const char* const FILENAME_PARTS[] = {
"blank", "eu", "us", "us_land", "CJK_eu", "CJK_us", "CJK_us_land"
};

resolved_url = std::string("${nextion_update_base_url}") +
"v${version}/hmi/nspanel_" +
Expand Down Expand Up @@ -441,13 +443,14 @@ select:
platform: template
options:
- "Use nextion_update_url"
- "NSPanel Blank"
- "NSPanel EU"
- "NSPanel US"
- "NSPanel US Landscape"
- "NSPanel EU (CJK languages)"
- "NSPanel US (CJK languages)"
- "NSPanel US Landscape (CJK languages)"
initial_option: "NSPanel EU"
initial_option: "NSPanel Blank"
optimistic: true
restore_value: true
internal: false
Expand Down
2 changes: 1 addition & 1 deletion hmi/dev/nspanel_CJK_eu_code/boot.txt
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ Text log_body
Opacity : 127
x coordinate : 222
y coordinate : 68
Width : 228
Width : 226
Height : 224
Effect : load
Effect Priority : 0
Expand Down
2 changes: 1 addition & 1 deletion hmi/dev/nspanel_CJK_us_land_code/boot.txt
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ Text log_body
Opacity : 127
x coordinate : 222
y coordinate : 68
Width : 228
Width : 226
Height : 224
Effect : load
Effect Priority : 0
Expand Down
10 changes: 10 additions & 0 deletions hmi/dev/nspanel_blank/Program.s.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Program.s
//The following code is only run once when power on, and is generally used for global variable definition and power on initialization data
int sys0=0
int display_mode=4 // 1 = EU, 2 = US, 3 = US landscape, 4 = blank
int charset=1
dim=100//Configure backlight
recmod=0//Serial data parsing mode:0-Passive mode;1-Active mode
bauds=115200
printh 00 00 00 ff ff ff 88 ff ff ff//Output power on information to serial port
page 0 //Power on start page 0
Loading