joBr99 / nspanel-issue-graveyard

place to move waiting for content issues to and to keep the search a bit cleaned up
0 stars 0 forks source link

[BUG] FlashNextion outputs fine but nothing happens? #28

Closed alexisml closed 1 year ago

alexisml commented 1 year ago

PROBLEM DESCRIPTION

After sending the command I get the expected responses but nothing actually happens in the device. Tried the following commands:

REQUESTED INFORMATION

Console:

15:47:10.870 CMD: FlashNextion http://nspanel.pky.eu/lui-us-p-release.tft
15:47:10.886 MQT: stat/tasmota_EAE3BC/RESULT = {"FlashNextion":"Done"}
15:47:10.925 FLH: host: nspanel.pky.eu, port: 80, get: /lui-us-p-release.tft
15:47:12.141 FLH: Send (High Speed) flash start
15:49:22.874 MQT: tele/tasmota_EAE3BC/STATE = {"Time":"2022-12-23T15:49:22","Uptime":"0T00:05:09","UptimeSec":309,"Heap":117,"SleepMode":"Dynamic","Sleep":0,"LoadAvg":999,"MqttCount":1,"Berry":{"HeapUsed":20,"Objects":234},"POWER1":"OFF","POWER2":"OFF","Wifi":{"AP":1,"SSId":"Things Network","BSSId":"78:45:58:CC:C5:99","Channel":1,"Mode":"11n","RSSI":100,"Signal":-41,"LinkCount":1,"Downtime":"0T00:00:04"}}
15:49:22.916 MQT: tele/tasmota_EAE3BC/SENSOR = {"Time":"2022-12-23T15:49:22","ANALOG":{"Temperature1":30.7},"TempUnit":"C"}
15:52:02.520 CMD: FlashNextion http://nspanel.pky.eu/lovelace-ui/github/nspanel-us-p-latest.tft
15:52:02.534 MQT: stat/tasmota_EAE3BC/RESULT = {"FlashNextion":"Done"}
15:52:02.574 FLH: host: nspanel.pky.eu, port: 80, get: /lovelace-ui/github/nspanel-us-p-latest.tft
15:54:12.856 APP: Serial logging disabled
15:54:22.866 MQT: tele/tasmota_EAE3BC/STATE = {"Time":"2022-12-23T15:54:22","Uptime":"0T00:10:09","UptimeSec":609,"Heap":119,"SleepMode":"Dynamic","Sleep":0,"LoadAvg":999,"MqttCount":1,"Berry":{"HeapUsed":20,"Objects":234},"POWER1":"OFF","POWER2":"OFF","Wifi":{"AP":1,"SSId":"Things Network","BSSId":"78:45:58:CC:C5:99","Channel":1,"Mode":"11n","RSSI":100,"Signal":-43,"LinkCount":1,"Downtime":"0T00:00:04"}}
15:54:22.876 MQT: tele/tasmota_EAE3BC/SENSOR = {"Time":"2022-12-23T15:54:22","ANALOG":{"Temperature1":30.6},"TempUnit":"C"}

Device has access to internet.

EXPECTED BEHAVIOUR

Flashing actually happens.

ADDITIONAL CONTEXT

Tasmota 12.3.1 -- tried downgrading to 12.2.0 but it just gets me to secureboot, restart and back to 12.3.1 --

PANEL / FIRMWARE VERION

NSPanel US-P

joBr99 commented 1 year ago

type weblog 3 in the console and add the more verbose log to this issue, restart tasmota before your next attempt

you can upload/redo the firmware upgrade in the secureboot interface a second time, that should work

alexisml commented 1 year ago

Steps I performed:

  1. weblog 3
  2. Restart
  3. FlashNextion http://nspanel.pky.eu/lui-us-p-release.tft

It now is somehow working...? What? (with a million logs as expected)

I have a second NSPanel with the same behavior, do you want me to try something different in that?

joBr99 commented 1 year ago

hmm, I guess the restart did the trick in this case

alexisml commented 1 year ago

Believe me, I restarted it a ton of times, even power cycled. Second NSPanel steps:

  1. Restart
  2. FlashNextion http://nspanel.pky.eu/lui-us-p-release.tft
  3. -- wait 1 minute --
  4. Nothing
  5. Restart
  6. FlashNextion http://nspanel.pky.eu/lui-us-p-release.tft
  7. -- wait 1 minute again --
  8. Nothing, again
joBr99 commented 1 year ago

please check what the output with weblog 3 is on the second panel

would be also interesting to see if FlashNextionAdv3 http://nspanel.pky.eu/lui-us-p-release.tft works, as this doesn't change the serial speed (but slower due to that)

hirparak commented 1 year ago

I've had the same issue. The restart didn't help

00:00:00.003 HDW: ESP32-D0WD-V3 00:00:00.003 HDW: FoundPSRAM=0 CanUsePSRAM=0 00:00:00.158 UFS: FlashFS mounted with 276 kB free 00:00:00.254 CFG: Loaded from File, Count 26 00:00:00.269 QPC: Count 1 00:00:00.270 CFG: CR 442/699, Busy 0 00:00:00.281 CFG: CR 442/699, Busy 0 00:00:00.284 ROT: Mode 1 00:00:00.608 CFG: No '*.autoconf' file found 00:00:00.616 BRY: Berry initialized, RAM used=4041 bytes 00:00:00.638 BRY: No 'preinit.be' 00:00:00.642 SRC: Restart 00:00:00.649 Project tasmota - NSPanel1 Version 12.2.0(nspanel)-2_0_5(2022-10-17T08:40:00) 00:00:00.651 ETH: No ETH MDC and/or ETH MDIO GPIO defined 00:00:01.210 NXP: Initializing Driver 00:00:01.218 BRY: Successfully loaded 'autoexec.be' 00:00:01.686 WIF: Attempting connection... 00:00:02.180 WIF: Connecting to AP1 Hirpara IOT Channel 1 BSSId 62:22:32:38:F3:4A in mode 11n as tasmota-NSPanel1-0636... 00:00:02.218 WIF: Attempting connection... 00:00:04.220 WIF: Connected 00:00:04.486 HTP: Web server active on tasmota-NSPanel1-0636 with IP address 192.168.50.78 00:00:04.966 RTC: UTC 2022-12-23T15:20:53, DST 2022-03-27T02:00:00, STD 2022-10-30T03:00:00 16:20:53.000 RTC: Synced by NTP 16:20:54.087 HTP: Main Menu 16:20:54.721 MQT: Attempting connection... 16:20:54.751 MQT: Connected 16:20:54.760 MQT: tele/tasmota_NSPanel1/LWT = Online (retained) 16:20:54.764 MQT: cmnd/tasmota_NSPanel1/POWER = 16:20:54.766 MQT: Subscribe to cmnd/tasmota_NSPanel1/# 16:20:54.769 MQT: Subscribe to cmnd/tasmotas/# 16:20:54.771 MQT: Subscribe to cmnd/NSPanel_fb/# 16:20:54.776 MQT: tele/tasmota_NSPanel1/INFO1 = {"Info1":{"Module":"NSPanel","Version":"12.2.0(nspanel)","FallbackTopic":"cmnd/NSPanel_fb/","GroupTopic":"cmnd/tasmotas/"}} 16:20:54.793 MQT: tele/tasmota_NSPanel1/INFO2 = {"Info2":{"WebServerMode":"Admin","Hostname":"tasmota-NSPanel1-0636","IPAddress":"192.168.50.78"}} 16:20:54.816 MQT: tele/tasmota_NSPanel1/INFO3 = {"Info3":{"RestartReason":"Software reset CPU","BootCount":13}} 16:20:54.821 MQT: stat/tasmota_NSPanel1/RESULT = {"POWER1":"OFF"} 16:20:54.824 MQT: stat/tasmota_NSPanel1/POWER1 = OFF 16:20:54.840 MQT: stat/tasmota_NSPanel1/RESULT = {"POWER2":"OFF"} 16:20:54.844 MQT: stat/tasmota_NSPanel1/POWER2 = OFF 16:20:54.855 TFS: File 'autoexec.bat' not found 16:20:55.926 SRC: MQTT 16:20:55.929 CMD: Grp 0, Cmd 'STATUS', Idx 1, Len 1, Pld 1, Data '1' 16:20:55.939 MQT: stat/tasmota_NSPanel1/STATUS1 = {"StatusPRM":{"Baudrate":115200,"SerialConfig":"8N1","GroupTopic":"tasmotas","OtaUrl":"http://ota.tasmota.com/tasmota32/release-12.2.0/tasmota32-nspanel.bin","RestartReason":"Software reset CPU","Uptime":"0T00:00:07","StartupUTC":"2022-12-23T15:20:48","Sleep":0,"CfgHolder":4617,"BootCount":12,"BCResetTime":"2022-12-23T15:39:15","SaveCount":26}} 16:20:55.996 SRC: MQTT 16:20:55.999 CMD: Grp 0, Cmd 'STATUS', Idx 1, Len 2, Pld 11, Data '11' 16:20:56.014 MQT: stat/tasmota_NSPanel1/STATUS11 = {"StatusSTS":{"Time":"2022-12-23T16:20:56","Uptime":"0T00:00:08","UptimeSec":8,"Heap":132,"SleepMode":"Dynamic","Sleep":0,"LoadAvg":235,"MqttCount":1,"Berry":{"HeapUsed":15,"Objects":235},"POWER1":"OFF","POWER2":"OFF","Wifi":{"AP":1,"SSId":"Hirpara IOT","BSSId":"62:22:32:38:F3:4A","Channel":1,"Mode":"11n","RSSI":86,"Signal":-57,"LinkCount":1,"Downtime":"0T00:00:04"}}} 16:20:56.066 SRC: MQTT 16:20:56.069 CMD: Grp 0, Cmd 'STATE', Idx 1, Len 0, Pld -99, Data '' 16:20:56.083 MQT: stat/tasmota_NSPanel1/RESULT = {"Time":"2022-12-23T16:20:56","Uptime":"0T00:00:08","UptimeSec":8,"Heap":134,"SleepMode":"Dynamic","Sleep":0,"LoadAvg":242,"MqttCount":1,"Berry":{"HeapUsed":15,"Objects":235},"POWER1":"OFF","POWER2":"OFF","Wifi":{"AP":1,"SSId":"Hirpara IOT","BSSId":"62:22:32:38:F3:4A","Channel":1,"Mode":"11n","RSSI":84,"Signal":-58,"LinkCount":1,"Downtime":"0T00:00:04"}} 16:20:56.136 SRC: MQTT 16:20:56.139 CMD: Grp 0, Cmd 'STATUS', Idx 1, Len 2, Pld 10, Data '10' 16:20:56.154 MQT: stat/tasmota_NSPanel1/STATUS10 = {"StatusSNS":{"Time":"2022-12-23T16:20:56","ANALOG":{"Temperature1":26.9},"TempUnit":"C"}} 16:20:56.705 QPC: Reset 16:20:58.694 APP: Boot Count 13 16:20:59.495 CFG: Saved, Count 27, Bytes 4096 16:20:59.706 MQT: tele/tasmota_NSPanel1/STATE = {"Time":"2022-12-23T16:20:59","Uptime":"0T00:00:11","UptimeSec":11,"Heap":134,"SleepMode":"Dynamic","Sleep":0,"LoadAvg":317,"MqttCount":1,"Berry":{"HeapUsed":15,"Objects":235},"POWER1":"OFF","POWER2":"OFF","Wifi":{"AP":1,"SSId":"Hirpara IOT","BSSId":"62:22:32:38:F3:4A","Channel":1,"Mode":"11n","RSSI":82,"Signal":-59,"LinkCount":1,"Downtime":"0T00:00:04"}} 16:20:59.755 MQT: tele/tasmota_NSPanel1/SENSOR = {"Time":"2022-12-23T16:20:59","ANALOG":{"Temperature1":27.0},"TempUnit":"C"} 16:22:27.580 HTP: Consoles 16:22:28.564 HTP: Console 16:22:34.739 CMD: FlashNextion http://192.168.50.209:8123/local/nspanel.tft 16:22:34.744 SRC: WebConsole from 192.168.10.105 16:22:34.748 CMD: Grp 0, Cmd 'FLASHNEXTION', Idx 1, Len 44, Pld -99, Data 'http://192.168.50.209:8123/local/nspanel.tft' 16:22:34.765 MQT: stat/tasmota_NSPanel1/RESULT = {"FlashNextion":"Done"} 16:22:34.825 FLH: host: 192.168.50.209, port: 8123, get: /local/nspanel.tft 16:22:34.842 FLH: Connected:true 16:22:34.950 FLH: Retry 2 16:22:35.446 FLH: HTTP Respose is 200 OK or 206 Partial Content 16:22:35.464 FLH: Flash file size: 10249184 16:22:35.471 NXP: Nextion command sent = bytes('4452414B4A485355594447424E434A48474A4B534842444EFFFFFF') 16:22:35.475 NXP: Nextion command sent = bytes('7265636D6F643D30FFFFFF') 16:22:35.482 NXP: Nextion command sent = bytes('7265636D6F643D30FFFFFF') 16:22:35.487 NXP: Nextion command sent = bytes('636F6E6E656374FFFFFF')

joBr99 commented 1 year ago

@hirparak this isn't the same problem, I cannot see any response from the panel in your log, try to reseat the display connector

image

alexisml commented 1 year ago

please check what the output with weblog 3 is on the second panel

would be also interesting to see if FlashNextionAdv3 http://nspanel.pky.eu/lui-us-p-release.tft works, as this doesn't change the serial speed (but slower due to that)

Tried the second one before changing the log level (FlashNextionAdv3 http://nspanel.pky.eu/lui-us-p-release.tft). Nothing happens.

What output do you want me to look for? After triggering the flash?

hirparak commented 1 year ago

I've reseated a few times, and no change. I guess I have somehow killed the display connector. I'll try on the backup one 😔

joBr99 commented 1 year ago

@hirparak you can try tasmota 12.2.0 and it's also possible to send some nextion commands to check if the panel is doing anything; however it looks like your panel isn't responding

joBr99 commented 1 year ago

@alexisml if the flashing doesn't start there won't be much more log than with the default log verbosity, just want to see the respose from the panel

alexisml commented 1 year ago

Ok, steps:

  1. Restart
  2. weblog 3
  3. FlashNextion http://nspanel.pky.eu/lui-us-p-release.tft
16:37:36.006 CMD: weblog 3
16:37:36.014 MQT: stat/tasmota_EAE424/RESULT = {"WebLog":3}
16:37:36.413 CFG: Saved, Count 546, Bytes 4096
16:37:53.998 CMD: FlashNextion http://nspanel.pky.eu/lui-us-p-release.tft
16:37:53.000 SRC: WebConsole from 10.10.0.165
16:37:54.002 CMD: Grp 0, Cmd 'FLASHNEXTION', Idx 1, Len 42, Pld -99, Data 'http://nspanel.pky.eu/lui-us-p-release.tft'
16:37:54.016 MQT: stat/tasmota_EAE424/RESULT = {"FlashNextion":"Done"}
16:37:54.055 FLH: host: nspanel.pky.eu, port: 80, get: /lui-us-p-release.tft
16:37:54.127 WIF: Resolving 'nspanel.pky.eu' (46.232.251.72)
16:37:54.339 FLH: Connected:true
16:37:54.445 FLH: Retry 2
16:37:54.647 FLH: Retry 3
16:37:54.929 FLH: HTTP Respose is 200 OK or 206 Partial Content
16:37:54.931 FLH: Flash file size: 8087812
16:37:54.939 NXP: Nextion command sent = bytes('4452414B4A485355594447424E434A48474A4B534842444EFFFFFF')
16:37:54.942 NXP: Nextion command sent = bytes('7265636D6F643D30FFFFFF')
16:37:54.945 NXP: Nextion command sent = bytes('7265636D6F643D30FFFFFF')
16:37:54.948 NXP: Nextion command sent = bytes('636F6E6E656374FFFFFF')
16:37:55.058 NXP: Received Raw = bytes('636F6D6F6B20322C33303631342D302C4E5834383332463033355F303131432C...')
16:37:55.061 FLH: Send (High Speed) flash start
16:37:55.065 NXP: Nextion command sent = bytes('77686D692D7772697320383038373831322C3932313630302C72657330FFFFFF')

...and nothing happens. Not sure what is going on tbh

joBr99 commented 1 year ago

so, you are getting a respose from the panel 16:37:55.058 NXP: Received Raw = bytes('636F6D6F6B20322C33303631342D302C4E5834383332463033355F303131432C...') -> comok 2,30614-0,NX4832F035_011C,

however the flash init command apparently doesn't do anything - no clue why

try a restart and then FlashNextionAdv3 http://nspanel.pky.eu/lui-us-p-release.tft in case it doesn't work downgrade to tasmota 12.2

alexisml commented 1 year ago

Restarted and triggered, this time it worked. Somehow having the logs in 3 helps (but only after a restart).

To sum up:

  1. Restart
  2. weblog 3
  3. FlashNextion http://nspanel.pky.eu/lui-us-p-release.tft
  4. -- doesn't work --
  5. Restart
  6. -- we are still at weblog 3 --
  7. FlashNextion http://nspanel.pky.eu/lui-us-p-release.tft
  8. -- works --
joBr99 commented 1 year ago

no, clue weblog is a command from tasmota and I've never had such issues until the latest tasmota release, so the only thing I could imagine that it is timeing related and to fast with the new tasmota version ... really no idea

it works toally fine on all of my panels with the newest tasmota version, I will try to add some busy waiting before the flash init command to the panel

joBr99 commented 1 year ago

in case it's a timing issue; this might help

https://github.com/joBr99/nspanel-lovelace-ui/commit/e4a4917932cfb73ff77ffd20f25e188cab5711a1

would be nice if you can

  1. re-enable weblog 2 which is the default
  2. try to reproduce the broken flashnextion
  3. delete autoexec.bec and replace the content of autoexec.be with the lastest content from here: https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/autoexec.be
  4. reboot
  5. retry flashnextion
alexisml commented 1 year ago
  1. Restart (I was already at weblog 2)
  2. FlashNextion http://nspanel.pky.eu/lui-us-p-release.tft
21:56:09.116 MQT: stat/tasmota_EAE3BC/RESULT = {"FlashNextion":"Done"}
21:56:09.154 FLH: host: nspanel.pky.eu, port: 80, get: /lui-us-p-release.tft
21:56:10.407 FLH: Send (High Speed) flash start
21:56:59.149 MQT: stat/tasmota_EAE3BC/RESULT = {"CustomSend":"Done"}
21:57:02.408 FLH: Something has gone wrong flashing display firmware [bytes('8080808080808080000000008080008000808080800080008080008080008000...')]
joBr99 commented 1 year ago

with the unchanged berry driver?

alexisml commented 1 year ago

Yup, I didn't change anything else (other than logs set to 2). I had it working since https://github.com/joBr99/nspanel-issue-graveyard/issues/28

joBr99 commented 1 year ago

okay so it's at least reproducible for you, can you retry with the updated version of the berry driver?

alexisml commented 1 year ago

But isn't this another bug? I was not getting this error before, I was just not getting anything. I can try though.

joBr99 commented 1 year ago

nope, I think the difference is that you've now the lovelace firmware installed (which is sending periodic messages and the stock one isn't)

my guess is that this 80808080 are messages from the panel in 115200 baud, interpreted by the berry driver that already switched to faster baud rate for flashing

alexisml commented 1 year ago
  1. delete autoexec.bec
  2. delete autoexec.be
  3. Upload autoexec.be (downloaded from https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/autoexec.be)
  4. Restart
  5. 00:00:00.633 BRY: Successfully loaded 'autoexec.be'
  6. FlashNextion http://nspanel.pky.eu/lui-us-p-release.tft
  7. Success!
joBr99 commented 1 year ago

okay let's hope that this finally solves the flashing issues with the new tasmota version :)

My guess was/is that the serial commands are sent to fast to the nextion screen with the new tasmota version (due to updated serial lib's and platform core). With weblog 3 tasmota has more to do (sending stuff to the weblog websocket), which theoretically also delays sending thoose serial messages.

alexisml commented 1 year ago

Thanks for your help and hard work with this project!