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

Bug After update to 4.3.9 it hangs after reboot #2176

Open
erikklavora opened this issue Jun 27, 2024 · 44 comments
Open

Bug After update to 4.3.9 it hangs after reboot #2176

erikklavora opened this issue Jun 27, 2024 · 44 comments
Labels
Bug Identifies an issue where the system is not functioning as expected. Error: Initializing Panel stuck on Boot page
Milestone

Comments

@erikklavora
Copy link

TFT Version

4.3.9

ESPHome Version

4.3.9

Blueprint Version

4.3.9

Panel Model

EU

What is the bug?

So I updated the panel to the latest fw yesterday over ota (from 4.3.7, espHome 2024.6.3) which went fine but when the panel restarted it was stuck at Please wait Initialising screen. OK so I removed the panel, flashed via cable, reinstalled and it worked. so I tryed to reboot the panel and is stuck again at initialising... The reboot button is displayed on the lower end and I can reboot the device too but it's just stuck. If I re-flash it via cable it works fine... once it's up, I can see the logs and all (well it works), bit hungs after reboot

Steps to Reproduce

No response

Your Panel's YAML

substitutions:
  name: nspanel2
  device_name: NSPanel2
  # wifi_ssid: #!secret wifi_ssid
  wifi_ssid: Jota
  wifi_password: !secret wifi_password

  nextion_update_url: "http://192.168.178.98:8123/local/nspanel_eu.tft"
  nextion_blank_url: "http://192.168.178.98:8123/local/nspanel_blank.tft"

packages:
  remote_package:
    url: https://github.com/Blackymas/NSPanel_HA_Blueprint
    ref: main
    files:
      - nspanel_esphome.yaml # Core package
      - esphome/nspanel_esphome_advanced.yaml # activate advanced (legacy) elements - can be useful for troubleshooting
      # - 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: 1s

esphome:
  name: ${name}

esp32:
  framework:
    type: esp-idf

api:
  encryption:
    key: !secret nspanel_encryption

ota:
  platform: esphome
  password: !secret ota_password

safe_mode:

time:
  - id: !extend time_provider
    platform: sntp
    timezone: Europe/Ljubljana
    servers:
     - 0.pool.ntp.org
     - 1.pool.ntp.org
     - 2.pool.ntp.org

# Text sensors with general information.
text_sensor:
  # Expose ESPHome version as sensor.
  - platform: version
    name: Version
  # Expose WiFi information as sensors.
  - platform: wifi_info
    ip_address:
      name: IP
    ssid:
      name: SSID
    bssid:
      name: BSSID

ESPHome Logs

No response

Home Assistant Logs

No response

@erikklavora erikklavora added the Bug Identifies an issue where the system is not functioning as expected. label Jun 27, 2024
@edwardtfn
Copy link
Collaborator

Have you tried v4.3.7 with ESPHome 2024.6.3? I wanna isolate to know if the issue is on ESPHome or our side.

@erikklavora
Copy link
Author

emm it took me a while to reinstall 4.3.7 (just esphome), blueprint remaining on .9... after reboot it is stuck on initialising again... oh, and I had to install it via cable...

@mikeS7
Copy link

mikeS7 commented Jun 27, 2024

In my case it hangs after reboot or power cutoff. First boot after serial flashing is ok.

@erikklavora
Copy link
Author

In my case it hangs after reboot or power cutoff. First boot after serial flashing is ok.

yeah mine too...

@edwardtfn edwardtfn added the Error: Initializing Panel stuck on Boot page label Jun 27, 2024
@Doughboy68
Copy link

I updated all five of my panels OTA no issue. I am using US panels.
just noticed there is a new ESPHome 2024.6.4 out now.

@erikklavora
Copy link
Author

just updated ESPHome from 2024.6.3 to 2024.6.4, did a clean build, upload via OTA went OK but the display is stuck at initialising again... strange, but the device is pingable which is strange...
The log has nothing usable...

WARNING Can't connect to ESPHome API for nspanel2 @ 192.168.178.59: Error connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address='192.168.178.59', port=6053))]: [Errno 111] Connect call failed ('192.168.178.59', 6053) (SocketAPIError)

@mikeS7
Copy link

mikeS7 commented Jul 1, 2024

Another year ago issue #711

@Doughboy68
Copy link

Could be a network wifi issue. Why don’t you try without the advanced settings - when troubleshooting make your config basic.

@mikeS7
Copy link

mikeS7 commented Jul 5, 2024

It is not network issue. I don't use

Could be a network wifi issue. Why don’t you try without the advanced settings - when troubleshooting make your config basic.

It is not a network issue. And I don't use advanced setting. In my case it happened after update with bluetooth proxy enabled. Panel successfully boots after serial flashing with or without bluetooth proxy.

There are no issues on first boot after serial flashing. Panel hangs on reboot or power cutoff.

@ccritix
Copy link

ccritix commented Jul 5, 2024

I don't use bluetooth proxy, and the same. There are no issues on first boot after serial flashing. Panel hangs on reboot or power cutoff.

@Doughboy68
Copy link

Doughboy68 commented Jul 5, 2024

On first boot after serial flashing can you view logs etc over wifi in ESPHome, and nspanel works and is usable in HA after disconnecting serial?

When my panels have issue in past it was mdns issue which I isolated to an older network switch that would block mdns somehow. I also find sometimes I had to reload all yaml in HA after updates or the panel hangs which seems it is having trouble communicating with blueprint.
Do the panels eventually load up a homepage that is mostly blank and missing info if left for a long time?

Can also try renaming the panel temporarily to something else and reflash with serial, and making a fresh blueprint. It could be some configuration that is causing this.

@edwardtfn
Copy link
Collaborator

Hi, my apologies for the late reply here. I've spent the past couple of weeks on moving to a new house and couldn't work at this at all.
I've just turned on my testing panel and then updated it to ESPHome 2024.6.4 (from 2024.6.1) with no issues, which means I cannot duplicate the issue here, so far, and will need as much details as you could share.
I will play a little bit more trying to break it.

@edwardtfn
Copy link
Collaborator

@ccritix and @erikklavora, could you please send a picture of your boot screen when it is hang? I'd like to look for some details there that could give an idea on what is happening...

@edwardtfn
Copy link
Collaborator

edwardtfn commented Jul 5, 2024

Also, on your panel's page under Home Assistant (Settings > Devices & Services > ESPHome), could you please enable the entity "Baud rate" under "Configuration" and make sure it's selection matches the value shown on the top right corner of your display?

image

@mikeS7
Copy link

mikeS7 commented Jul 5, 2024

Also, on your panel's page under Home Assistant (Settings > Devices & Services > ESPHome), could you please enable the entity "Baud rate" under "Configuration" and make sure it's selection matches the value shown on the top right corner of your display?

I'm not at home right now and will return on 2 weeks.
But I checked "Baud rate" setting and it was in sync. Also I was able to flash TFT file on first boot.

@edwardtfn
Copy link
Collaborator

The TFT transfer baud rate can be different to the standard communication baud rate. And TFT transfer have some fallback which are not implemented with the standard communication.

@erikklavora
Copy link
Author

erikklavora commented Jul 5, 2024

Also, on your panel's page under Home Assistant (Settings > Devices & Services > ESPHome), could you please enable the entity "Baud rate" under "Configuration" and make sure it's selection matches the value shown on the top right corner of your display?

I have it enabled but it maches the BR from the panel...
aa

@edwardtfn
Copy link
Collaborator

What do you see in the panel's screen? Is it showing the IP address? Framework? ESPHome version?

@erikklavora
Copy link
Author

Well when it boots I see the IP on top, esp-idf in the right corner. I can try to reboot it but I think that I’ll need to flash it via cable than… will try to update ESPHome to 2024.6.7 first and reflash it via OTA… and than let’s see :)

@edwardtfn
Copy link
Collaborator

Ok. That is really good info.
IP and framework type are printed by ESPHome, the rest is part of the TFT, so now I know the ESPHome is getting connected to Nextion.
Maybe I can prepare a version showing more info in that screen to help us troubleshooting...
I will.look at that.

@erikklavora
Copy link
Author

erikklavora commented Jul 6, 2024

ok, so I updated ESPHome to the latest docker version 2024.6.6, clean built and updated over OTA. And back again... I will have to flash it back via cable...

IMG_7640

@edwardtfn
Copy link
Collaborator

Ok, but then in this case I don't see neither the IP nor framework. Looks like ESPHome is crashing even before connecting to Nextion.

@erikklavora
Copy link
Author

erikklavora commented Jul 6, 2024

Well… yes, but why when flashing via cable it works? With some screens it works (at least the US version ppl said so)… oh, and the Reboot button works, unfortunatelly it just hangs on the same screen…

IMG_7644

@edwardtfn
Copy link
Collaborator

I will test with an EU model to check if any difference...

But anyway, ESPHome v2024.6 came with a rebuilt OTA engine and this issue is probably related to that. In top of that, we are in the limit of the memory usage, so probably a combination of those things are breaking in specific situation.
Unfortunately it's quite hard to come with a solution when I cannot duplicate it here... But I have some things to try and will also find.a.way to display logs in the display.

@borbea
Copy link

borbea commented Jul 7, 2024

Hello, I have exactly same issue as others but I have US version.
I am updating from 2023.9.3 to latest 2024.6.6. The OTA update works nicely, my NSPanel works fine after it.
Screenshot 2024-07-07 at 21 56 52

However if after the update I restart the panel or use option 'Update TFT Display' the panel will end up stuck to initializing screen same as @erikklavora screenshot. Additional thing I noticed is that the NSPanel version gets restored to old version (2023.9.3 in my case) after the restart.
Screenshot 2024-07-07 at 21 17 33
Also to make panel work again, I again run the update via ESPHome and I end up in same situation as before, panel works until restart.

I checked BaudRate and it mathes.

@Doughboy68
Copy link

@borbea that is not the same issue. There is other info about this. You have to reflash once using serial due to way esp-idf partitions otherwise you experience this issue.

@edwardtfn
Copy link
Collaborator

@borbea, as @Doughboy68 mentioned, the issue your are reporting is related to this one:

The suggestion is to flash via serial, however if yiu cannot do this right now, you can Enforce Arduino framework, then flash it OTA, as mentioned in that other issue.

@edwardtfn edwardtfn added this to the v4.3.10 milestone Jul 8, 2024
@ccritix
Copy link

ccritix commented Jul 10, 2024

How "you can Enforce Arduino framework, then flash it OTA, as mentioned in that other issue." ?
What issue number?

@edwardtfn
Copy link
Collaborator

edwardtfn commented Jul 11, 2024

Add this to your panel's yaml:

esp32:
  framework:
    type: arduino

edwardtfn added a commit that referenced this issue Jul 11, 2024
Helps troubleshooting #2176
edwardtfn added a commit that referenced this issue Jul 11, 2024
edwardtfn added a commit that referenced this issue Jul 11, 2024
This was removed due to a bug on ESPHome 2024.6.0, however, as it was fixed later, I'm reverting back.
Hopefully this helps with #2176, #2168 and #2155
@edwardtfn
Copy link
Collaborator

Anyone brave enough to give dev a try? 😄

@ccritix
Copy link

ccritix commented Jul 12, 2024

I will try. 😁
How can I see the log file?

image

@ccritix
Copy link

ccritix commented Jul 12, 2024

17207631650448811089009753618974
I am connected to it (on the IP set by me in the config):
image
And it remains so. From time to time, it restarts.

@edwardtfn
Copy link
Collaborator

Mmmm... I wasn't expecting this issue... I will take a look right now.

@ccritix
Copy link

ccritix commented Jul 12, 2024

Maybe this will help you
image

@edwardtfn
Copy link
Collaborator

What it says about baud rate in your logs?

@ccritix
Copy link

ccritix commented Jul 12, 2024

After Update TFT display, it started.
How can I see the log file?

@ccritix
Copy link

ccritix commented Jul 12, 2024

As far as I can tell, it stays at that screen and does not start when nextion is not connected. When it connects, it starts without problems.
At least that's what I saw.

@edwardtfn
Copy link
Collaborator

edwardtfn commented Jul 12, 2024

I mean the same log screen you shared above. In some points you will see some entries related to baud rate.

IMG_6839
IMG_6840

@ccritix
Copy link

ccritix commented Jul 12, 2024

image

@edwardtfn
Copy link
Collaborator

Ok, but the display is connected at this time, right? Do you have any error now?

@ccritix
Copy link

ccritix commented Jul 12, 2024

No, i don't have error now...it's working now

@mikeS7
Copy link

mikeS7 commented Jul 12, 2024

No, i don't have error now...it's working now

Could you please perform several reboots and power cutoff

@edwardtfn
Copy link
Collaborator

I've tried this... several reboots, power cutoff (I've connected my panel to a smart plug now), played with network quality, etc. and couldn't duplicate the issues you guys are reporting. 😞
But I've made some changes on the code to improve robustness, so maybe this is not gonna break anyways.
Still trying...

@ccritix
Copy link

ccritix commented Jul 12, 2024

I also tried a few restarts, power cutoff... I see that it starts... At one point it had a pause... as if it didn't want to start... then it started.
20240712_102201

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Identifies an issue where the system is not functioning as expected. Error: Initializing Panel stuck on Boot page
Projects
None yet
Development

No branches or pull requests

6 participants