NSPanel ESP stuck in boot after adding working component

Hi!

I’m having issues with my NSPanel. It basically just gets stuck in boot with the screen flashing after adding a new component. It’s like I’ve reached some kind of limit on how much code it can handle. If I add the component that makes it not boot and remove which ever other component it starts booting again. The code compiles and uploads with about 65% of the FLASH, 13% on RAM used so that shouldn’t be a problem? My feeling is that the code is too much to handle during boot but that’s just me guessing without knowing at all how it works. I will post my code and see if anyone has something wise too say. Maybe it’s super obvious that I’m trying to do too much with this thing. I just tried my thoughts about how to use it and was glad when it worked but really sad when it all of a sudden reached this limit a long way into the project. What are the common issues when being able to compile and upload but getting stuck in boot? I still have contact with it over WIFI after I upload the code that gets it stuck in boot. Nothing is seen in the log though after the non-working code has been uploaded.

The code is mostly Nextion buttons and MQTT components to be able to control all my smart home devices. Why there’s big code blocks on some buttons is because I mainly only use one page and use code to rewrite that page content, buttons and values.

Tried to paste the code here but that was too much apparently. It’s about 2000 lines of code but I uploaded it on github.

https://github.com/lillaeriika/NSPanel/blob/e46cc9e148060ce204f4572648f6ad4f8c7123a7/nspanel.yaml

Any help very much appreciated so I can continue finishing my revolutionary wall switch…

Page not found at that url.

Sorry, I managed to upload passwords and stuff which wasn’t that smart. :grinning_face_with_smiling_eyes: Updated the url now.

Hi @kabelochkaffe
I have the same problem as you have. I reached this “limit” also, and I’m in the middle of my project, with only around 60% of my entities implemented. Did you find an explanation or a fix?
What I observed is that it’s a limitation of some kind in the number of sensors (sensor, binary_sensor, text_sensor) that the esphome can have regardless of the source, home assistant or nextion. That’s my guess. I have 18 sensors, 14 binary sensors, and another 31 text_sensors in esphome of the nspanel. I hope that I’m not misleading you, but this is my first guess. Now I will try to add another sensor to see which one triggers the “limit”. Yes, the screen flashes and the logging info is stuck at
WARNING Can't connect to ESPHome API for nspanel.local: Error resolving IP address: [Errno -2] Name or service not known INFO Trying to reconnect to nspanel.local in the background
When I remove just one sensor, after this line the nspanel is receiving data…
The ESPHome version is 3.5.0, the HA version is 2022.3.5

I have had a similar experience when I started to update based on marcfager’s solution … at some point it stopped working . I could not progress for many hours. In the end I started from scratch and added bit-by-bit the sensors, finding out that it previously contained sensors not covered with HA and I had overlooked. The curious thing is that when loading marc’s HMI/yaml… unaltered/ootb and where almost all sensors did not map my HA setup … there were no issues at all.
I contacted the ESPHome discord people and they proposed to get the log, requiring you need to re-wire the whole thing…since I started from scratch and this worked…did not do this but this may be your only option to find out what is frustrating it.

1 Like

I encountered the exact same issue!!
I opened a bug report. Feel free to add your experience there.
Reguardless, I will link my bug issue to this forum thread.

Same for me :frowning: i update your issue.