NSPanel, esphome and can't download TFT display

Hi,

I was fascinated by NSPanel from Sonoff and the idea to have 2 buttons and a mini display to show some information. Lighter than a tablet (with update/maintenance). The idea was perfect.

At the end, each update is a total nightmare. between 3 to 7 days, my 3 panels doesn’t work and show what any IT people is afraid : the bluescreen and the nspanel who loop busy to reboot …

I follow Blackymas blueprint setup and I try all options that it seems correct.
Btw, it can work easily (4.3.39 to 4.3.42) but after don’t (4.3.42 to 202510.0)

I have no logical explanation

I proceed to

  • reimport blueprint
  • copy nspanel_us.tft and nspanel_blank.tft in home assistant.
  • I update the module
  • clean all
  • install one by one

and now the nightmare begin because nothing is logical. Some device can work as a charm immediately (let’s say a couple of hours…) and other don’t

the diagnostic card show this

Nextion display:     Connected
Version Blueprint:     202510.0
Version ESPHome:     202510.0
Version TFT:     Unknown

the yaml is

api:
  encryption:
    key: "Yeahthereisakey"
  
substitutions:
  ###### CHANGE ME START ######
  device_name: "nschparents"
  wifi_ssid: !secret wifi_ssid
  wifi_password: !secret wifi_password

  nextion_update_url: "https://w.x.y.z:8123/local/nspanel_us.tft"
  ##nextion_update_url: "https://homeassistant.local:8123/local/nspanel_us.tft"
  nextion_blank_url: "https://w.x.y.z: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
    refresh: 300s
logger:
  level: DEBUG
esp32:
  framework:
    type: esp-idf
    
##### My customization - Start #####
wifi:
  # ...
  manual_ip:
    # Set this to the IP of the ESP
    static_ip: w.x.y.z.
    # Set this to the IP address of the router. Often ends with .1
    gateway: w.x.y.a
    # The subnet of the network. 255.255.255.0 works for most home networks.
    subnet: 255.255.255.0
    dns1: 1.1.1.2
    dns2: 1.0.0.2
##### My customization - End #####

Homeassistant is HAOS debian image virtualized with KVM through OpenMediaVault

I can ping and reach the nspanel, home assistant. I can do name resolution. All seems correct

But

If I choose TFT display “NS Panel US” for me, It wil ltry to download the tft from github

log

[15:41:24.203][D][switch:020]: ‘Nextion display - Power’ Turning ON.
[15:41:24.207][D][switch:063]: ‘Nextion display - Power’: Sending state ON
[15:41:24.414][D][nspanel.addon.upload_tft:121]: Starting TFT upload…
[15:41:24.419][D][nextion.upload.idf:154]: TFT upload requested
[15:41:24.426][D][nextion.upload.idf:155]: Exit reparse: YES
[15:41:24.427][D][nextion.upload.idf:156]: URL: https://raw.githubusercontent.com/Blackymas/NSPanel_HA_Blueprint/v202510.0/hmi/nspanel_us.tft
[15:41:24.432][D][nextion.upload.idf:171]: Exit reparse mode
[15:41:24.443][D][nextion.upload.idf:185]: Baud rate: 115200
[15:41:25.172][D][nextion.upload.idf:232]: TFT size: 7622920 bytes
[15:41:25.173][D][nextion.upload.idf:245]: Uploading
[15:41:30.681][D][nextion.upload.idf:282]: Upload resp: 0 B
[15:41:30.682][E][nextion.upload.idf:290]: Upload prep failed 0 ‘’
[15:41:30.686][D][nextion.upload.idf:291]: Close HTTP
[15:41:30.699][E][nextion.upload:020]: Upload failed
[15:41:30.700][W][component:453]: script took a long time for an operation (6289 ms)
[15:41:30.709][W][component:456]: Components should block for at most 30 ms
[15:41:30.786][W][component:453]: api took a long time for an operation (6303 ms)
[15:41:30.786][W][component:456]: Components should block for at most 30 ms
[15:41:30.786][D][nspanel.addon.upload_tft:305]: Attempt #1 at 115200 bps returned: FAILED
[15:41:30.786][I][addon_upload_tft.script.upload_tft_attempt:306]: Restarting ESPHome

Ok, let’s try locally, I choose “nextion_update_url”. Btw, I can use the URL and download immediately the tft file from my desktop but I remove Firewall/Internet/DNS stuff.

[15:44:48.430][D][main:295]: Attempting to upload TFT
[15:44:48.436][D][nspanel.addon.upload_tft:296]: Attempt #1 at 115200 bps
[15:44:48.706][W][nextion:091]: Not connected
[15:44:49.212][W][nextion:091]: Not connected
[15:44:49.446][D][nspanel.addon.upload_tft:114]: Waiting for empty UART and Nextion queues
[15:44:49.726][W][nextion:091]: Not connected
[15:44:50.109][D][switch:020]: ‘Nextion display - Power’ Turning ON.
[15:44:50.109][D][switch:063]: ‘Nextion display - Power’: Sending state ON
[15:44:50.261][W][nextion:091]: Not connected
[15:44:50.757][W][nextion:091]: Not connected
[15:44:51.303][W][nextion:091]: Not connected
[15:44:51.468][D][nspanel.addon.upload_tft:121]: Starting TFT upload…
[15:44:51.472][D][nextion.upload.idf:154]: TFT upload requested
[15:44:51.473][D][nextion.upload.idf:155]: Exit reparse: YES
[15:44:51.473][D][nextion.upload.idf:156]: URL: https://w.x.y.z:8123/local/nspanel_us.tft
[15:44:51.477][D][nextion.upload.idf:171]: Exit reparse mode
[15:44:51.477][D][nextion.upload.idf:185]: Baud rate: 115200
[15:44:52.668][D][nextion.upload.idf:232]: TFT size: 7622920 bytes
[15:44:52.669][D][nextion.upload.idf:245]: Uploading
[15:44:58.172][D][nextion.upload.idf:282]: Upload resp: 0 B
[15:44:58.179][E][nextion.upload.idf:290]: Upload prep failed 0 ‘’
[15:44:58.180][D][nextion.upload.idf:291]: Close HTTP
[15:44:58.197][E][nextion.upload:020]: Upload failed
[15:44:58.197][W][component:453]: script took a long time for an operation (6742 ms)
[15:44:58.197][W][component:456]: Components should block for at most 30 ms
[15:44:58.209][W][component:453]: api took a long time for an operation (6751 ms)
[15:44:58.233][W][component:456]: Components should block for at most 30 ms
[15:44:58.233][D][nspanel.addon.upload_tft:305]: Attempt #1 at 115200 bps returned: FAILED
[15:44:58.233][I][addon_upload_tft.script.upload_tft_attempt:306]: Restarting ESPHome
[15:44:58.234][I][app:219]: Rebooting safely
[15:44:58.249][D][esp32.preferences:149]: Writing 2 items: 1 cached, 1 written, 0 failed
INFO Processing expected disconnect from ESPHome API for nschparents @ 192.168.68.31
WARNING Disconnected from API

To resume:

  • no logical explanation
  • log aren’t very verbose even in debug
  • no clue
  • update break without reason

Any idea before I smack it with my best hammer?

Thanks in advance if you read and specially if you have an idea

They tend to have a lack of memory issue…
Check in the post for that blueprint to see how they dealt with it.

Otherwise Try this but read the the last post from Edward (the Author) near the bottom of the thread.

I am not much of a precise help for a solution, this was 2+ y ago and I did mess a lot with the esp and tft so maybe (hopefully) your case is less complex.

+1 for @Sir_Goodenough

I remember to have had issues with the baud-rate, may want to lower this.

If you modified the tft then start with a smaller one, i.e. return to the one that was working before. With me similar issues after I accidentally added a larger picture as background. At one point I was only able to upload via cabled connection to the screen itself, reloaded a the default TFT and started from scratch…

Hi,

thanks for your information. I tried several baudrate through the web interface but it changes nothing. the logfile indicate anytime I want to download the tft “change baudrate to 115200”

After reading this usefull link, I was searching for network issue (I read a bunch of thread everywhere about this) BUT when he mentions memory issue, it pops in my head.

Whatever I do (install wirelessely or through USB connected), when I start the device, Is see the TFT version. (4.3.34 or whatever), the TFT doesn’t change or was erased. SO, it keeps in memory the old version and maybe the system is unable to download a new version due to lack of space in memory.

I change my local file “nspanel_us.tft” with “nspanel_blank.tft” ( +7M vs 700k).
Success, a black screen comes with a QR code in it.

I revert and …


[08:58:23.679][D][nextion.upload.idf:102]: Upload: 0.70% (7569672 left, heap: 166016+1992536)
[08:58:24.141][D][nextion.upload.idf:102]: Upload: 0.75% (7565576 left, heap: 166016+1976376)
[08:58:24.514][D][nextion.upload.idf:102]: Upload: 0.81% (7561480 left, heap: 166016+1976376)
[08:58:24.885][D][nextion.upload.idf:102]: Upload: 0.86% (7557384 left, heap: 166016+1976376)
[08:58:25.279][D][nextion.upload.idf:102]: Upload: 0.91% (7553288 left, heap: 166016+1993248)
[08:58:25.716][D][nextion.upload.idf:102]: Upload: 0.97% (7549192 left, heap: 166016+1976376)
[08:58:26.102][D][nextion.upload.idf:102]: Upload: 1.02% (7545096 left, heap: 166016+1976376)
[08:58:26.504][D][nextion.upload.idf:102]: Upload: 1.07% (7541000 left, heap: 166016+1976376)
[08:58:26.869][D][nextion.upload.idf:102]: Upload: 1.13% (7536904 left, heap: 166016+1993248)
[08:58:27.313][D][nextion.upload.idf:102]: Upload: 1.18% (7532808 left, heap: 166016+1976376)
[08:58:27.700][D][nextion.upload.idf:102]: Upload: 1.24% (7528712 left, heap: 166016+1976376)
[08:58:28.082][D][nextion.upload.idf:102]: Upload: 1.29% (7524616 left, heap: 166016+1976376)
[08:58:28.467][D][nextion.upload.idf:102]: Upload: 1.34% (7520520 left, heap: 166016+1993248)
[08:58:28.905][D][nextion.upload.idf:102]: Upload: 1.40% (7516424 left, heap: 166016+1976376)
[08:58:29.287][D][nextion.upload.idf:102]: Upload: 1.45% (7512328 left, heap: 166016+1976376)
[08:58:29.672][D][nextion.upload.idf:102]: Upload: 1.50% (7508232 left, heap: 166016+1976376)
[08:58:30.061][D][nextion.upload.idf:102]: Upload: 1.56% (7504136 left, heap: 166016+1993248)
[08:58:30.490][D][nextion.upload.idf:102]: Upload: 1.61% (7500040 left, heap: 166016+1976364)
[08:58:30.874][D][n

I crossed my fingers and my toes and it works.

Wipe out and reinstall. Like good old time of DOS/Windows :smiley:

Thanks for your help.