I have a NSPanel that I flashed with ESPHome and downloaded custom screen using Christopher videos.
It was working and then I tried another update to the tft and It was weird.
The NSPanel powers on and does not play sound. I can touch the screen and it wakes up and even the dual state button on the screen changes state when i touch it. In Home Assistant I can see the device and the two physical buttons toggle correctly. The brightness slider in HA does not do anything to the screen.
Here is what I get when I try to use the upload tft service.
[21:40:41][D][nextion_upload:169]: Connected
[21:40:41][D][nextion_upload:175]: Requesting URL: http://192.168.0.200:8123/local/FamilyRoom.tft
[21:40:41][D][nextion_upload:209]: Updating Nextion NX4832F035_011C...
[21:40:41][D][nextion_upload:235]: Waiting for upgrade response
[21:40:42][E][uart:015]: Reading from UART timed out at byte 0!
[21:40:42][E][uart:015]: Reading from UART timed out at byte 0!
[21:40:42][E][uart:015]: Reading from UART timed out at byte 0!
[21:40:42][E][uart:015]: Reading from UART timed out at byte 0!
[21:40:42][E][uart:015]: Reading from UART timed out at byte 0!
[21:40:42][E][uart:015]: Reading from UART timed out at byte 0!
[21:40:42][E][uart:015]: Reading from UART timed out at byte 0!
[21:40:42][E][uart:015]: Reading from UART timed out at byte 0!
[21:40:42][E][uart:015]: Reading from UART timed out at byte 0!
[21:40:42][E][uart:015]: Reading from UART timed out at byte 0!
[21:40:43][E][uart:015]: Reading from UART timed out at byte 0!
[21:40:43][E][uart:015]: Reading from UART timed out at byte 0!
[21:40:43][E][uart:015]: Reading from UART timed out at byte 0!
[21:40:43][E][uart:015]: Reading from UART timed out at byte 0!
[21:40:43][E][uart:015]: Reading from UART timed out at byte 0!
[21:40:43][E][uart:015]: Reading from UART timed out at byte 0!
[21:40:43][E][uart:015]: Reading from UART timed out at byte 0!
[21:40:43][E][uart:015]: Reading from UART timed out at byte 0!
[21:40:43][E][uart:015]: Reading from UART timed out at byte 0!
[21:40:43][D][nextion_upload:239]: Upgrade response is 19
[21:40:43][D][nextion_upload:242]: Available 0 : 0x00
[21:40:43][D][nextion_upload:242]: Available 1 : 0x00
[21:40:43][D][nextion_upload:242]: Available 2 : 0x00
[21:40:43][D][nextion_upload:242]: Available 3 : 0x00
[21:40:43][D][nextion_upload:242]: Available 4 : 0x00
[21:40:43][D][nextion_upload:242]: Available 5 : 0x00
[21:40:43][D][nextion_upload:242]: Available 6 : 0x00
[21:40:43][D][nextion_upload:242]: Available 7 : 0x00
[21:40:44][D][nextion_upload:242]: Available 8 : 0x00
[21:40:44][D][nextion_upload:242]: Available 9 : 0x00
[21:40:44][D][nextion_upload:242]: Available 10 : 0x00
[21:40:44][D][nextion_upload:242]: Available 11 : 0x00
[21:40:44][D][nextion_upload:242]: Available 12 : 0x00
[21:40:44][D][nextion_upload:242]: Available 13 : 0x00
[21:40:44][D][nextion_upload:242]: Available 14 : 0x00
[21:40:44][D][nextion_upload:242]: Available 15 : 0x00
[21:40:44][D][nextion_upload:242]: Available 16 : 0x00
[21:40:44][D][nextion_upload:242]: Available 17 : 0x00
[21:40:44][D][nextion_upload:242]: Available 18 : 0x00
[21:40:44][D][nextion_upload:248]: preparation for tft update failed 0 ""
[21:40:44][D][nextion_upload:324]: Restarting Nextion
INFO nspanel-familyroom.local: Error while reading incoming messages: Error while reading data: [Errno 104] Connection reset by peer
INFO Disconnected from ESPHome API for nspanel-familyroom.local
WARNING Disconnected from API
INFO nspanel-familyroom.local: Ping Failed: Error while reading data: [Errno 104] Connection reset by peer
INFO Successfully connected to nspanel-familyroom.local
Okay interesting. My problem is kind of gone for the moment since I removed the retained MQTT messages from the MQTT broker. I will try to do do some experiments on how much more I can add soon. I also got an interesting reply on my youtube video where someone had a theory about using OTA. Pasting the comment here:
āNot really familiar with the nspanel, but your issues at 60% memory usage could be caused by it reserving memory for OTA updates? I know that with ESP32/ESP8266 mcus, only 50% of the memory can be used for firmware if OTA is used?ā
But just to give some numbers on what my setup can handle right now without issues:
Right now I have:
Total platform entries: 79
Platform Nextion: 34
Platform MQTT_subscriptions: 31
Like 2200 lines of code
64,3 % flash memory used
One thing I changed as well was to set all platform entries to internal: true
That seems to stop the esp to initialize every single item as a mqtt component. I thought that would relieve some pressure during the boot. No one of my nextion buttons need to be active on MQTT for example. Itās a lot less happening now during boot at least but itās all just guesses.
I would like to thank @DeanoX for sharing the config, I have mine set as I want but one thing bothers me - itās possible to have thermostat and indoor temp decimal part displayed in original sonoff GUI (panel is flashed with ESPHome already)?
Here is the code in question which seems to be causing the problem. I absolutely do not understand the error, especially since it is a configuration that is supposed to work as it is
Thereās a fairly steep learning curve right now to use these things, itās very much a DIY situation. It may get better over time, but expect to be frustrated and have to spend some time troubleshooting. At best, you can use the examples out there for inspiration and a launching point, but I donāt think weāre at the point where theyāre completely turnkey. (I know some folks have providing that as a goal, and I hope they are successful)
In this case, I just focused on the first part of the error message, ā[unit_of_measurement] is an invalid option for [number.template]ā. Then I went to the documentation: Number Component ā ESPHome
It says there:
unit_of_measurement (Optional, string): Manually set the unit of measurement for the number. Requires Home Assistant Core 2021.12 or newer.
So my first guess is that maybe you donāt have Home Assistant Core 2021.12 or newer.
WOW I would never have found it on my ownā¦ I got my hands back on my homeassistant and indeed I hadnāt done the update. you just saved me a lot of time!! thank you very much it works
It is indeed a difficult learning and there is a lack of documentation, although your videos have helped me a lot you are the only one who has my format by providing a basic model and many people are based on your works. So far no configuration, not even yours which could however work in my us format, does not work.
the yaml is not dependent on the version. its only the tft. you need to install the nextion editor and open his HMI project file in that. then look into how itās tied into the yaml file with picture idās etc.
Iām unsure if you will have to create a new project with the correct screen or if there is a way to swap it within the project, then youāll have to change out the images for your own rescaled ones and move things around. just focus on getting it open in the editor.