From b734a3da71eb20b05a47a1a272d0dd3a5c661d64 Mon Sep 17 00:00:00 2001
From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com>
Date: Tue, 5 Dec 2023 18:35:23 +0100
Subject: [PATCH] Updated (EN) Common Issues TFT Upload (markdown)
---
(EN)-Common-Issues-TFT-Upload.md | 43 ++++++++++++++++++++++----------
1 file changed, 30 insertions(+), 13 deletions(-)
diff --git a/(EN)-Common-Issues-TFT-Upload.md b/(EN)-Common-Issues-TFT-Upload.md
index fb15ba9..61972b3 100644
--- a/(EN)-Common-Issues-TFT-Upload.md
+++ b/(EN)-Common-Issues-TFT-Upload.md
@@ -1,47 +1,64 @@
-> ### _**ATTENTION! if you have already installed the version "nspanel-lovelace-ui" from joBr99 on your NSPanel, an intermediate step is necessary - otherwise it is not possible to install this or any other version.**_
->See [(EN) Common Issues | TFT Upload When nspanel lovelace ui has been installed](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki/(EN)-Common-Issues-%7C-TFT-Upload-When-nspanel-lovelace-ui-has-been-installed)
+> #### _**ATTENTION! if you have already installed the version "nspanel-lovelace-ui" from joBr99 on your NSPanel, an intermediate step is necessary - otherwise it is not possible to install this or any other version.**_
+> See [(EN) Common Issues | TFT Upload When nspanel lovelace ui has been installed](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki/(EN)-Common-Issues-%7C-TFT-Upload-When-nspanel-lovelace-ui-has-been-installed)
-> ### _**The previous method of having the NSPanel download the TFT directly from GitHub has been discontinued due to a large number of users experiencing slow or failed downloads. Please make sure you change to locally hosted tft file**_
+> #### _**The previous method of having the NSPanel download the TFT directly from GitHub has been discontinued due to a large number of users experiencing slow or failed downloads. Please make sure you change to locally hosted tft file**_
There are a number of issues that can affect the upload of the TFT upload, these are not issues with the NSPanel HA Blueprint project but seem to be common to Nextion displays and ESPhome. Not all of the below causes affect all users however following instructions in each point have resolved
-
In order of likelihood:
-#### 1. Using a local source (Home Assistant)
+### Using a local source (Home Assistant)
This is our most common cause of issues and is the reason our instructions no longer point to downloading the TFT from GitHub, changing the nextion_update_url to host the TFT file on your home assistant resolves the majority of issues.
See points 2-4 from the [Installation Instructions](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki/(EN)-First-Steps---Installation-and-Setup)
-#### 2. HTTP instead of HTTPS
+### HTTP instead of HTTPS
While HTTPS may work for some users we have seen it cause a number of issues. Change your TFT file hosting and nextion_update_url to use http.
-#### 3. Network issues
+### Network issues
Check there are no issues with your network, bring your NSPanel and router closer together or try rebooting the router.
The issue we have seen with this is _connection refused_ or _connection reset_.
-#### 4. DNS
+### DNS
Related to point 2, please use IP address instead of DNS. e.g. use http://192.168.0.100:8123/local/nspanel.tft instead of http://homeassistant.local:8123/local/nspanel.tft
-#### 5. Check the file size by downloading to your computer
+### Check the file size by downloading to your computer
Use the same url provided to ESPHome into your browser (in your computer), e.g. http://192.168.0.100:8123/local/nspanel_eu.tft, and make sure you can download the file to your computer and the file have the same size as the one from GitHub.
-#### 6. Power cycle your panel
+### Power cycle your panel
Cut the power supply off, wait a bit, and power on again. It usually helps when you already tried many other things.
If your panel is already installed in your wall, you probably can still power cycle using your power relay connected to that room.
-#### 7. Flash your panel again
-Remove all add-ons and non-essential customization, flash your panel again (you can do this over the air/wirelessly), try to update the TFT, add the add-ons and removed customization back and then flash it again.
+### Consider changing the framework
+This project supports both `arduino` (ESPHome default) or `esp-idf` frameworks. Those have totally independently upload TFT engines, so changing the framework may cause a significant change.
+In our experience, `esp-idf` have a better memory management and therefore is more efficient with uploading TFT, however the support to HTTPS is a bit better (although not indicated) with `arduino`.
+You can set the framework you want by adding this to your ESPHome yaml:
+#### ESP-IDF
+```yaml
+esp32:
+ framework:
+ type: esp-idf
+```
+#### Arduino
+```yaml
+esp32:
+ framework:
+ type: arduino
+```
-#### 8. Try an alternative http service. There are many options available for free to run under you local Windows, MAC or Linux machine.
+### Flash your panel again
+Remove all add-ons and non-essential customization, flash your panel again (you can do this over the air/wirelessly, although it is recommended to use serial when changing between frameworks), try to update the TFT, add the add-ons and removed customization back and then flash it again.
+
+
+### Try an alternative http service. There are many options available for free to run under you local Windows, MAC or Linux machine.
Just to name some:
- NGINX
- IIS