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

TFT Update - Crashes #27

Open
cybertza opened this issue May 25, 2023 · 4 comments
Open

TFT Update - Crashes #27

cybertza opened this issue May 25, 2023 · 4 comments

Comments

@cybertza
Copy link

Hi

I seem to have an issue on the latest ESP home with the latest build of the addon when updaing the tft it seems the heap gets low, and then it crashes the ESP, seems to be reliably when the heap gets lo, this is after a reboot of all devices, so i am unsure why the heap is getting consumed so agressivly and why its not getting cleared, it may be viable to reuse a memory block for this, or use a streaming approach.

ESPHome 2023.5.4
[14:39:53][I][app:102]: ESPHome version 2023.5.4 compiled on May 25 2023, 14:33:27

I have never before had an issue to download firmware to the units, so i assume its either something related to ESPHOME updating to a newer toolchain that may be less "forgiving"?

Any insight will be greatly appreciated.

`
[14:36:05][D][nspanel_lovelace_upload:090]: Uploaded 25.4 %, remaining 6190076 B
[14:36:05][D][nspanel_lovelace_upload:090]: Uploaded 25.4 %, remaining 6185980 B
[14:36:05][D][nspanel_lovelace_upload:090]: Uploaded 25.5 %, remaining 6181884 B
[14:36:05][D][nspanel_lovelace_upload:268]: Heap Size 58084, Bytes left 6181884
[14:36:05][D][nspanel_lovelace_upload:032]: Requesting range: bytes=2113536-2179071
[14:36:16][D][nspanel_lovelace_upload:081]: fetched 65536 bytes
[14:36:16][D][nspanel_lovelace_upload:090]: Uploaded 25.5 %, remaining 6177788 B
[14:36:16][D][nspanel_lovelace_upload:090]: Uploaded 25.6 %, remaining 6173692 B
[14:36:16][D][nspanel_lovelace_upload:090]: Uploaded 25.6 %, remaining 6169596 B
[14:36:16][D][nspanel_lovelace_upload:090]: Uploaded 25.7 %, remaining 6165500 B
[14:36:16][D][nspanel_lovelace_upload:090]: Uploaded 25.7 %, remaining 6161404 B
[14:36:16][D][nspanel_lovelace_upload:090]: Uploaded 25.8 %, remaining 6157308 B
[14:36:16][D][nspanel_lovelace_upload:090]: Uploaded 25.8 %, remaining 6153212 B
[14:36:16][D][nspanel_lovelace_upload:090]: Uploaded 25.9 %, remaining 6149116 B
[14:36:17][D][nspanel_lovelace_upload:090]: Uploaded 25.9 %, remaining 6145020 B
[14:36:17][D][nspanel_lovelace_upload:090]: Uploaded 26.0 %, remaining 6140924 B
[14:36:17][D][nspanel_lovelace_upload:090]: Uploaded 26.0 %, remaining 6136828 B
[14:36:17][D][nspanel_lovelace_upload:090]: Uploaded 26.1 %, remaining 6132732 B
[14:36:17][D][nspanel_lovelace_upload:090]: Uploaded 26.1 %, remaining 6128636 B
[14:36:17][D][nspanel_lovelace_upload:090]: Uploaded 26.2 %, remaining 6124540 B
[14:36:17][D][nspanel_lovelace_upload:090]: Uploaded 26.2 %, remaining 6120444 B
[14:36:17][D][nspanel_lovelace_upload:090]: Uploaded 26.3 %, remaining 6116348 B
[14:36:17][D][nspanel_lovelace_upload:268]: Heap Size 57844, Bytes left 6116348
[14:36:17][D][nspanel_lovelace_upload:032]: Requesting range: bytes=2179072-2244607
WARNING nspanel-bedroom.local: Connection error occurred: [Errno 104] Connection reset by peer

`
Try #lots

`
[14:41:53][D][nspanel_lovelace:119]: Sending: whmi-wris 8295420,921600,1
[14:41:53][C][uart.arduino_esp32:077]: Setting up UART...
[14:41:53][D][nspanel_lovelace_upload:213]: Waiting for upgrade response
[14:41:53][D][nspanel_lovelace_upload:218]: Upgrade response is [05]
[14:41:53][D][nspanel_lovelace_upload:221]: preparation for tft update done
[14:41:53][D][nspanel_lovelace_upload:240]: Allocating buffer size 65536, Heap size is 185600
[14:41:53][D][nspanel_lovelace_upload:257]: Updating tft from "http://172.16.x.x/lui-us-p-release.tft" with a file size of 8295420 using 65536 chunksize, Heap Size 116568
[14:41:53][D][nspanel_lovelace_upload:032]: Requesting range: bytes=0-16383
[14:41:53][D][nspanel_lovelace_upload:081]: fetched 16384 bytes
[14:41:54][D][nspanel_lovelace_upload:090]: Uploaded 0.0 %, remaining 8291324 B
[14:41:59][D][nspanel_lovelace_upload:100]: recv_string [08.00.00.00.00 (5)]
[14:41:59][D][nspanel_lovelace_upload:090]: Uploaded 0.1 %, remaining 8287228 B
[14:41:59][D][nspanel_lovelace_upload:090]: Uploaded 0.1 %, remaining 8283132 B
[14:41:59][D][nspanel_lovelace_upload:090]: Uploaded 0.2 %, remaining 8279036 B
[14:41:59][D][nspanel_lovelace_upload:268]: Heap Size 116052, Bytes left 8279036
[14:41:59][D][nspanel_lovelace_upload:032]: Requesting range: bytes=16384-81919
[14:42:00][D][nspanel_lovelace_upload:081]: fetched 65536 bytes

[14:43:41][D][nspanel_lovelace_upload:268]: Heap Size 61744, Bytes left 3888124
[14:43:41][D][nspanel_lovelace_upload:032]: Requesting range: bytes=4407296-4472831
[14:43:41][D][nspanel_lovelace_upload:081]: fetched 65536 bytes
[14:43:41][D][nspanel_lovelace_upload:090]: Uploaded 53.2 %, remaining 3884028 B
[14:43:41][D][nspanel_lovelace_upload:090]: Uploaded 53.2 %, remaining 3879932 B
[14:43:41][D][nspanel_lovelace_upload:090]: Uploaded 53.3 %, remaining 3875836 B
[14:43:41][D][nspanel_lovelace_upload:090]: Uploaded 53.3 %, remaining 3871740 B
[14:43:41][D][nspanel_lovelace_upload:090]: Uploaded 53.4 %, remaining 3867644 B
[14:43:41][D][nspanel_lovelace_upload:090]: Uploaded 53.4 %, remaining 3863548 B
[14:43:41][D][nspanel_lovelace_upload:090]: Uploaded 53.5 %, remaining 3859452 B
[14:43:42][D][nspanel_lovelace_upload:090]: Uploaded 53.5 %, remaining 3855356 B
[14:43:42][D][nspanel_lovelace_upload:090]: Uploaded 53.6 %, remaining 3851260 B
[14:43:42][D][nspanel_lovelace_upload:090]: Uploaded 53.6 %, remaining 3847164 B
[14:43:42][D][nspanel_lovelace_upload:090]: Uploaded 53.7 %, remaining 3843068 B
[14:43:42][D][nspanel_lovelace_upload:090]: Uploaded 53.7 %, remaining 3838972 B
[14:43:42][D][nspanel_lovelace_upload:090]: Uploaded 53.8 %, remaining 3834876 B
[14:43:42][D][nspanel_lovelace_upload:090]: Uploaded 53.8 %, remaining 3830780 B
[14:43:42][D][nspanel_lovelace_upload:090]: Uploaded 53.9 %, remaining 3826684 B
[14:43:42][D][nspanel_lovelace_upload:090]: Uploaded 53.9 %, remaining 3822588 B
[14:43:42][D][nspanel_lovelace_upload:268]: Heap Size 57784, Bytes left 3822588
[14:43:42][D][nspanel_lovelace_upload:032]: Requesting range: bytes=4472832-4538367
WARNING nspanel-bedroom.local: Connection error occurred: [Errno 104] Connection reset by peer
INFO Processing unexpected disconnect from ESPHome API for nspanel-bedroom.local
WARNING Disconnected from API
INFO Successfully connected to nspanel-bedroom.local
[14:43:59][D][api:102]: Accepted 172.16.x.x
[14:43:59][D][api.connection:959]: Home Assistant 2023.5.4 (172.16.103.x): Connected successfully
[14:44:00][D][nspanel_lovelace:129]: Sending custom command: time14:44
[14:44:06][D][nspanel_lovelace:129]: Sending custom command: timeout~20
`
So for that one the heap took longer to get low, but always when it foes, its done for.

looking forward to some insights

@cybertza
Copy link
Author

So it had me thinking that perhaps the Logger may be the issue, or be eating the memory.

So i commented out the logger, when its commented out, the Upgrade process never starts.

`
logger:
level: WARN

logs:

sensor: WARN

resistance: WARN

text_sensor: WARN

ntc: WARN

`

Made this the log section, and seems to crash at around the same place.

not shure what else i can canabilize out of the config.

but let me remove all the config and see where i end up.

@cybertza
Copy link
Author

Yea so i mar did the counter productive thing and went back onto tasmo for the upgrade, now im having this internal debate if i should just stay on it ;(

@sairon
Copy link
Owner

sairon commented May 29, 2023

Hi @cybertza, I also haven't managed to reproduce your issue. Can you please follow the suggestions from this post and let me know? With my "mostly simple" config the heap stays around ~110 kB during the whole upgrade.

@cybertza
Copy link
Author

Thanks will try, nothing complex in my config no BT, disabled web even, will try again at some point.

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

2 participants