Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not getting the screen to update into either blank or ns_panel #686

Closed
yannick1203 opened this issue Apr 17, 2023 · 7 comments
Closed

Not getting the screen to update into either blank or ns_panel #686

yannick1203 opened this issue Apr 17, 2023 · 7 comments

Comments

@yannick1203
Copy link

yannick1203 commented Apr 17, 2023

Hello,

I failed in getting the "update TFT display" command to work.
Originally I flashed the NS Panel with the NS_Panel.tft, after this the screen started up the regular Sonoff UI and clicking the update TFT display button did not reboot the screen.

After reading some more issues about this, I then tried to flash the blank.tft to the panel from a previous PR as instructions say and tried the same. However it still fails.

Some things I saw:

  • Alot of "Nextion is not connected"
[12:45:48][D][nextion_upload:169]: Connected
[12:45:48][D][nextion_upload:175]: Requesting URL: http://homeassistant.local:8123/local/nspanel_blank.tft
[12:45:48][D][nextion_upload:209]: Updating Nextion NX4832F035_011C...
[12:45:48][D][nextion_upload:235]: Waiting for upgrade response
[12:45:48][E][uart:015]: Reading from UART timed out at byte 0!
[12:45:48][E][uart:015]: Reading from UART timed out at byte 0!
[12:45:48][E][uart:015]: Reading from UART timed out at byte 0!
[12:45:48][E][uart:015]: Reading from UART timed out at byte 0!
[12:45:49][E][uart:015]: Reading from UART timed out at byte 0!
[12:45:49][E][uart:015]: Reading from UART timed out at byte 0!
[12:45:49][E][uart:015]: Reading from UART timed out at byte 0!
[12:45:49][E][uart:015]: Reading from UART timed out at byte 0!
[12:45:49][E][uart:015]: Reading from UART timed out at byte 0!
[12:45:49][E][uart:015]: Reading from UART timed out at byte 0!
[12:45:49][E][uart:015]: Reading from UART timed out at byte 0!
[12:45:49][E][uart:015]: Reading from UART timed out at byte 0!
[12:45:49][E][uart:015]: Reading from UART timed out at byte 0!
[12:45:49][E][uart:015]: Reading from UART timed out at byte 0!
[12:45:50][E][uart:015]: Reading from UART timed out at byte 0!
[12:45:50][E][uart:015]: Reading from UART timed out at byte 0!
[12:45:50][E][uart:015]: Reading from UART timed out at byte 0!
[12:45:50][E][uart:015]: Reading from UART timed out at byte 0!
[12:45:50][E][uart:015]: Reading from UART timed out at byte 0!
[12:45:50][E][uart:015]: Reading from UART timed out at byte 0!
[12:45:50][D][nextion_upload:239]: Upgrade response is  20
[12:45:50][D][nextion_upload:242]: Available 0 : 0x00
[12:45:50][D][nextion_upload:242]: Available 1 : 0x00
[12:45:50][D][nextion_upload:242]: Available 2 : 0x00
[12:45:50][D][nextion_upload:242]: Available 3 : 0x00
[12:45:50][D][nextion_upload:242]: Available 4 : 0x00
[12:45:50][D][nextion_upload:242]: Available 5 : 0x00
[12:45:50][D][nextion_upload:242]: Available 6 : 0x00
[12:45:50][D][nextion_upload:242]: Available 7 : 0x00
[12:45:50][D][nextion_upload:242]: Available 8 : 0x00
[12:45:50][D][nextion_upload:242]: Available 9 : 0x00
[12:45:50][D][nextion_upload:242]: Available 10 : 0x00
[12:45:50][D][nextion_upload:242]: Available 11 : 0x00
[12:45:50][D][nextion_upload:242]: Available 12 : 0x00
[12:45:50][D][nextion_upload:242]: Available 13 : 0x00
[12:45:50][D][nextion_upload:242]: Available 14 : 0x00
[12:45:50][D][nextion_upload:242]: Available 15 : 0x00
[12:45:50][D][nextion_upload:242]: Available 16 : 0x00
[12:45:50][D][nextion_upload:242]: Available 17 : 0x00
[12:45:50][D][nextion_upload:242]: Available 18 : 0x00
[12:45:50][D][nextion_upload:242]: Available 19 : 0x00
[12:45:50][D][nextion_upload:248]: preparation for tft update failed 0 ""
[12:45:50][D][nextion_upload:324]: Restarting Nextion
[12:45:52][D][nextion_upload:327]: Restarting esphome
WARNING ns_panel.local: Connection error occurred: [Errno 104] Connection reset by peer
INFO Processing unexpected disconnect from ESPHome API for ns_panel.local
WARNING Disconnected from API
INFO Successfully connected to ns_panel.local
[12:46:03][D][number:054]: 'ns_panel Display Brightness' - Setting number value
[12:46:03][D][number:113]:   New number value: 100.000000
[12:46:03][D][number:012]: 'ns_panel Display Brightness': Sending state 100.000000
[12:46:03][D][number:054]: 'ns_panel Display Brightness Dimdown' - Setting number value
[12:46:03][D][number:113]:   New number value: 100.000000
[12:46:03][D][number:012]: 'ns_panel Display Brightness Dimdown': Sending state 100.000000
[12:46:04][D][switch:056]: 'ns_panel Nextion inited': Sending state ON
[12:46:05][W][nextion:728]: Received unknown event from nextion: 0x55
[12:46:06][D][switch:017]: 'ns_panel Relay 1 Local Fallback' Turning OFF.
[12:46:06][D][switch:017]: 'ns_panel Relay 2 Local Fallback' Turning OFF.
[12:46:06][D][text_sensor:067]: 'ns_panel Notification Label': Sending state ''
[12:46:06][D][text_sensor:067]: 'ns_panel Notification Text': Sending state ''
[12:46:06][D][switch:017]: 'ns_panel Notification unread' Turning OFF.
[12:46:08][W][nextion:341]: Nextion reported page ID invalid!

This is the configuration yaml:

substitutions:
  device_name: "ns_panel" 
  wifi_ssid: !secret wifi_ssid
  wifi_password: !secret wifi_password

  nextion_update_url: "http://homeassistant.local:8123/local/nspanel_blank.tft"
#  nextion_update_url: "http://192.168.1.127:8123/local/nspaneleu.tft" # URL to local tft File

###### USE THIS ONLY FOR YOUR FIRST TFT UPLOAD, ONCE IT WORKED, REMOVE THOSE LINES ######
external_components:
  - source: github://pr#2956
    components: [nextion]
    refresh: 1h
###############################################################################

packages:
  remote_package:
    url: https://github.com/Blackymas/NSPanel_HA_Blueprint
    ref: main
    files: [nspanel_esphome.yaml]
    refresh: 300s
@edwardtfn
Copy link
Collaborator

edwardtfn commented Apr 17, 2023

http://homeassistant.local:8123/local/nspanel_blank.tft

If you paste this url into your browser (in your computer), can you have the file downloaded to your computer? Is the file size correct?

http://192.168.1.127:8123/local/nspaneleu.tft

What about this url? Can you get the file and it is around 6.18Mb?

@edwardtfn
Copy link
Collaborator

Any update on this?

@yannick1203
Copy link
Author

Hi @edwardtfn ,

I have been tinkering with it and it works now.
The blank screen and nspanel.tft too so I guess I needed to have a little bit more patience after flashing.
I do think the solution was flashing the blank screen first because I waited alot longer on the first flash from the nspanel.tft.

So this issue can be closed (:

@rpallai
Copy link

rpallai commented Jun 2, 2023

@yannick1203 I have exactly the same error log and I can't flash the display.

[09:46:42][D][button:013]: 'nspanel_teszt Update TFT display' Pressed.
[09:46:42][D][binary_sensor:036]: 'nspanel_teszt Nextion display': Sending state OFF
[09:46:42][D][nextion_upload:169]: Connected
[09:46:42][D][nextion_upload:175]: Requesting URL: http://192.168.1.2:8123/local/nspanel_eu.tft
[09:46:43][ 55574][E][WiFiClient.cpp:517] flush(): fail on fd 51, errno: 11, "No more processes"
[09:46:43][D][nextion_upload:209]: Updating Nextion NX4832F035_011C...
[09:46:43][D][nextion_upload:235]: Waiting for upgrade response
[09:46:43][E][uart:015]: Reading from UART timed out at byte 0!
[09:46:43][E][uart:015]: Reading from UART timed out at byte 0!
[09:46:43][E][uart:015]: Reading from UART timed out at byte 0!
[09:46:43][E][uart:015]: Reading from UART timed out at byte 0!
[09:46:43][E][uart:015]: Reading from UART timed out at byte 0!
[09:46:43][E][uart:015]: Reading from UART timed out at byte 0!
[09:46:44][E][uart:015]: Reading from UART timed out at byte 0!
[09:46:44][E][uart:015]: Reading from UART timed out at byte 0!
[09:46:44][E][uart:015]: Reading from UART timed out at byte 0!
[09:46:44][E][uart:015]: Reading from UART timed out at byte 0!
[09:46:44][E][uart:015]: Reading from UART timed out at byte 0!
[09:46:44][E][uart:015]: Reading from UART timed out at byte 0!
[09:46:44][E][uart:015]: Reading from UART timed out at byte 0!
[09:46:44][E][uart:015]: Reading from UART timed out at byte 0!
[09:46:44][E][uart:015]: Reading from UART timed out at byte 0!
[09:46:44][E][uart:015]: Reading from UART timed out at byte 0!
[09:46:45][E][uart:015]: Reading from UART timed out at byte 0!
[09:46:45][E][uart:015]: Reading from UART timed out at byte 0!
[09:46:45][E][uart:015]: Reading from UART timed out at byte 0!
[09:46:45][E][uart:015]: Reading from UART timed out at byte 0!
[09:46:45][D][nextion_upload:239]: Upgrade response is  20
[09:46:45][D][nextion_upload:242]: Available 0 : 0x00
[09:46:45][D][nextion_upload:242]: Available 1 : 0x00
[09:46:45][D][nextion_upload:242]: Available 2 : 0x00
[09:46:45][D][nextion_upload:242]: Available 3 : 0x00
[09:46:45][D][nextion_upload:242]: Available 4 : 0x00
[09:46:45][D][nextion_upload:242]: Available 5 : 0x00
[09:46:45][D][nextion_upload:242]: Available 6 : 0x00
[09:46:45][D][nextion_upload:242]: Available 7 : 0x00
[09:46:45][D][nextion_upload:242]: Available 8 : 0x00
[09:46:45][D][nextion_upload:242]: Available 9 : 0x00
[09:46:45][D][nextion_upload:242]: Available 10 : 0x00
[09:46:45][D][nextion_upload:242]: Available 11 : 0x00
[09:46:45][D][nextion_upload:242]: Available 12 : 0x00
[09:46:45][D][nextion_upload:242]: Available 13 : 0x00
[09:46:45][D][nextion_upload:242]: Available 14 : 0x00
[09:46:45][D][nextion_upload:242]: Available 15 : 0x00
[09:46:45][D][nextion_upload:242]: Available 16 : 0x00
[09:46:45][D][nextion_upload:242]: Available 17 : 0x00
[09:46:45][D][nextion_upload:242]: Available 18 : 0x00
[09:46:45][D][nextion_upload:242]: Available 19 : 0x00
[09:46:45][D][nextion_upload:248]: preparation for tft update failed 0 ""
[09:46:45][D][nextion_upload:310]: Restarting Nextion
[09:46:46][D][nextion_upload:313]: Restarting esphome
[09:46:47][W][wifi_esp32:494]: Event: Disconnected ssid='BFsz8' bssid=C0:06:C3:FE:B7:16 reason='Association Leave'
[09:46:47]ets Jul 29 2019 12:21:46
[09:46:47]
[09:46:47]rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[...normal bootup...]
[09:46:48][E][uart:015]: Reading from UART timed out at byte 0!
[09:46:48][W][nextion:072]: Nextion is not connected! 
^^ and this goes on forever every second..
[~]$ curl -v -o /dev/null http://192.168.1.2:8123/local/nspanel_eu.tft
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 192.168.1.2:8123...
* Connected to 192.168.1.2 (192.168.1.2) port 8123 (#0)
> GET /local/nspanel_eu.tft HTTP/1.1
> Host: 192.168.1.2:8123
> User-Agent: curl/8.0.1
> Accept: */*
> 
< HTTP/1.1 200 OK
< Cache-Control: public, max-age=2678400
< Content-Type: application/octet-stream
< Etag: "17648807e32c8c7b-622564"
< Last-Modified: Thu, 01 Jun 2023 12:15:29 GMT
< Content-Length: 6432100
< Accept-Ranges: bytes
< Date: Fri, 02 Jun 2023 09:56:11 GMT
< Server: Python/3.10 aiohttp/3.8.1
< 
{ [7240 bytes data]
100 6281k  100 6281k    0     0  23.5M      0 --:--:-- --:--:-- --:--:-- 23.5M
* Connection #0 to host 192.168.1.2 left intact

The display shows the original firmware all the time, there is no sign of restart.

What should I do..?

@yannick1203
Copy link
Author

yannick1203 commented Jun 2, 2023

@rpallai did you flash the blank screen first? I would recommend flashing using a local file and not with the Github link.

@rpallai
Copy link

rpallai commented Jun 2, 2023

Blank screen flashing does the same.

BTW connection to the display is only restored by a hard reset:

[10:07:10][C][nextion:117]: Nextion:
[10:07:10][C][nextion:118]:   Device Model:     NX4832F035_011C
[10:07:10][C][nextion:119]:   Firmware Version: 51
[10:07:10][C][nextion:120]:   Serial Number:    1D8D3401836C4773
[10:07:10][C][nextion:121]:   Flash Size:       16777216
[10:07:10][C][nextion:122]:   Wake On Touch:    True

@rpallai
Copy link

rpallai commented Jun 2, 2023

I finally found the solution, see #706 (comment)

@yannick1203 thanks for the reply!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants