Blackymas / NSPanel_HA_Blueprint

This allows you to configure your complete NSPanel via Blueprint with UI and without changing anything in the code
1.43k stars 259 forks source link

How to Upload tft file for NSPanel_HA_Blueprint with Tasmota #993

Closed Ma-Maison-Intelligente closed 1 year ago

Ma-Maison-Intelligente commented 1 year ago

Hi all,

In the issue TFT Upload Fehler #177 you mention a solution by using Tasmota.

Having the same problem to upload nspanel_eu.tft file I tryed the differents solutions and unfortunately only the upload of nspanel_blank.tft seams working (I have well a white screen at the end).

When I try to upload nspanel_eu.tft, upload start normally during some seconds and become really slow. 2 times I wait more than 10 hours to achive 100% but at the end I have an error message.

I tryed the "Exit reparse button but nothing happend

I tryed also the 2 solutions by additing the folowing code in the nspanel.yaml file.

USE THIS ONLY FOR YOUR FIRST TFT UPLOAD, ONCE IT WORKED, REMOVE THESE LINES external_components:

external_components:

The last solution I see in page #177 is by using Tasmota.

Unfortunately I don't know how to proceed exactly. Someone can explain in detail (step by step) how to upload the tft with Tasmota ?

Thank you for your help.


My current nspanel.yaml is

substitutions:

CHANGE ME START

device_name: "nspanel" wifi_ssid: !secret wifi_ssid wifi_password: !secret wifi_password

nextion_update_url: "https://192.168.XX.XX:XXX/local/nspanel_blank.tft" # URL to local tft File

nextion_update_url: "https://192.168.XX.XX:XXX/local/nspanel_eu.tft" # URL to local tft File

nextion_update_url: "https://raw.githubusercontent.com/Blackymas/NSPanel_HA_Blueprint/main/nspanel_us.tft" # URL to Github

OTA (Over the air updates) password. Add to your secrets.yaml

ota: safe_mode: true password: !secret ota_password

CHANGE ME END
USE THIS ONLY FOR YOUR FIRST TFT UPLOAD, ONCE IT WORKED, REMOVE THESE LINES

external_components:

- source: github://pr#5016

components: [nextion]

refresh: 1h

or

external_components:

- source: github://pr#2956

components: [nextion]

refresh: 1h

###############################################################################

DO NOT CHANGE ANYTHING!

packages:

download esphome code from Github

remote_package: url: https://github.com/Blackymas/NSPanel_HA_Blueprint ref: main files: [nspanel_esphome.yaml] refresh: 300s

DO NOT CHANGE ANYTHING!

MWT NSPanel

(based on marcfagers original work https://github.com/marcfager/nspanel-mf)


I can download the files to my computer using the same url https://192.168.XX.XX:XXX/local/nspanel_eu.tft


So at this time I have well a white screen in my NSPanel but when I change the 2 lines like below and press the button "Update TFT display", tft upload start and block.

nextion_update_url: "https://192.168.XX.XX:XXX/local/nspanel_blank.tft" # URL to local tft File

nextion_update_url: "https://192.168.XX.XX:XXX/local/nspanel_eu.tft" # URL to local tft File

When I install this code, ESPHome Logs are

INFO ESPHome 2023.8.2 INFO Reading configuration /config/esphome/nspanel.yaml... WARNING GPIO4 is a Strapping PIN and should be avoided. Attaching external pullup/down resistors to strapping pins can cause unexpected failures. See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins INFO Generating C++ source... INFO Compiling app... Processing nspanel (board: esp32dev; framework: arduino; platform: platformio/espressif32@5.4.0)

HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash

INFO Waiting for result... INFO OTA successful INFO Successfully uploaded program. INFO Starting log output from nspanel.local using esphome API INFO Successfully connected to nspanel.local [14:32:28][I][app:102]: ESPHome version 2023.8.2 compiled on Aug 23 2023, 14:30:45

[14:32:28][C][wifi:379]: Local MAC: XXXXXX [14:32:28][C][wifi:380]: SSID: [redacted] [14:32:28][C][wifi:381]: IP Address: 192.168.XX.XX [14:32:28][C][wifi:383]: BSSID: [redacted]

[14:32:28][C][wifi:386]: Signal strength: -24 dB ▂▄▆█ [14:32:28][C][wifi:390]: Channel: 11 [14:32:28][C][wifi:391]: Subnet: 255.255.255.0 [14:32:28][C][wifi:392]: Gateway: 192.168.XX.XX [14:32:28][C][wifi:393]: DNS1: 192.168.XX.XX [14:32:28][C][wifi:394]: DNS2: 0.0.0.0

[14:32:28][C][logger:302]: Level: DEBUG [14:32:28][C][logger:303]: Log Baud Rate: 0 [14:32:28][C][logger:305]: Hardware UART: UART0 [14:32:28][C][uart.arduino_esp32:124]: UART Bus 0: [14:32:28][C][uart.arduino_esp32:125]: TX Pin: GPIO16 [14:32:28][C][uart.arduino_esp32:126]: RX Pin: GPIO17 [14:32:28][C][uart.arduino_esp32:128]: RX Buffer Size: 256 [14:32:28][C][uart.arduino_esp32:130]: Baud Rate: 115200 baud [14:32:28][C][uart.arduino_esp32:131]: Data Bits: 8 [14:32:28][C][uart.arduino_esp32:132]: Parity: NONE [14:32:28][C][uart.arduino_esp32:133]: Stop bits: 1 [14:32:28][C][ledc.output:164]: LEDC Output: [14:32:28][C][ledc.output:165]: Pin GPIO21 [14:32:28][C][ledc.output:166]: LEDC Channel: 0 [14:32:28][C][ledc.output:167]: PWM Frequency: 1000.0 Hz [14:32:28][C][ledc.output:168]: Bit depth: 16 [14:32:28][C][template.binary_sensor:028]: Template Binary Sensor 'nspanel Nextion display' [14:32:28][C][template.binary_sensor:028]: Device Class: 'connectivity' [14:32:28][C][uptime.sensor:031]: Uptime Sensor 'nspanel uptime' [14:32:28][C][uptime.sensor:031]: Device Class: 'duration' [14:32:28][C][uptime.sensor:031]: State Class: 'total_increasing' [14:32:28][C][uptime.sensor:031]: Unit of Measurement: 's' [14:32:28][C][uptime.sensor:031]: Accuracy Decimals: 0

[14:32:28][C][template.text_sensor:020]: Template Sensor 'nspanel Notification Label' [14:32:28][C][template.text_sensor:020]: Template Sensor 'nspanel Notification Text' [14:32:28][C][template.text_sensor:020]: Template Sensor 'nspanel Settings Entity' [14:32:28][C][switch.gpio:068]: GPIO Switch 'nspanel Relay 1' [14:32:28][C][switch.gpio:091]: Restore Mode: restore defaults to OFF [14:32:28][C][switch.gpio:031]: Pin: GPIO22 [14:32:28][C][switch.gpio:068]: GPIO Switch 'nspanel Relay 2' [14:32:28][C][switch.gpio:091]: Restore Mode: restore defaults to OFF [14:32:28][C][switch.gpio:031]: Pin: GPIO19 [14:32:28][C][switch.gpio:068]: GPIO Switch 'nspanel Screen Power' [14:32:28][C][switch.gpio:091]: Restore Mode: always ON [14:32:28][C][switch.gpio:031]: Pin: GPIO4 [14:32:28][C][template.number:050]: Template Number 'nspanel Display Brightness' [14:32:28][C][template.number:050]: Unit of Measurement: '%' [14:32:28][C][template.number:051]: Optimistic: YES [14:32:28][C][template.number:052]: Update Interval: 60.0s [14:32:28][C][template.number:050]: Template Number 'nspanel Display Brightness Dimdown' [14:32:28][C][template.number:050]: Unit of Measurement: '%' [14:32:28][C][template.number:051]: Optimistic: YES [14:32:28][C][template.number:052]: Update Interval: 60.0s [14:32:28][C][template.number:050]: Template Number 'nspanel Temperature Correction' [14:32:28][C][template.number:050]: Unit of Measurement: '°C' [14:32:28][C][template.number:051]: Optimistic: YES [14:32:28][C][template.number:052]: Update Interval: 60.0s [14:32:28][C][template.number:050]: Template Number 'nspanel Page Timeout' [14:32:28][C][template.number:051]: Optimistic: YES [14:32:28][C][template.number:052]: Update Interval: 60.0s [14:32:29][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'nspanel Left Button' [14:32:29][C][gpio.binary_sensor:016]: Pin: GPIO14 [14:32:29][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'nspanel Right Button' [14:32:29][C][gpio.binary_sensor:016]: Pin: GPIO27 [14:32:29][C][template.switch:068]: Template Switch 'nspanel Notification unread' [14:32:29][C][template.switch:091]: Restore Mode: restore defaults to OFF [14:32:29][C][template.switch:057]: Optimistic: YES [14:32:29][C][template.switch:068]: Template Switch 'nspanel Notification sound' [14:32:29][C][template.switch:091]: Restore Mode: restore defaults to OFF [14:32:29][C][template.switch:057]: Optimistic: YES [14:32:29][C][template.switch:068]: Template Switch 'nspanel Confirmation Message' [14:32:29][C][template.switch:091]: Restore Mode: restore defaults to OFF [14:32:29][C][template.switch:057]: Optimistic: YES [14:32:29][C][template.switch:068]: Template Switch 'nspanel Sleep mode' [14:32:29][C][template.switch:079]: Device Class: 'switch' [14:32:29][C][template.switch:091]: Restore Mode: restore defaults to OFF [14:32:29][C][template.switch:057]: Optimistic: NO [14:32:29][C][template.switch:068]: Template Switch 'nspanel Relay 1 Local Fallback' [14:32:29][C][template.switch:091]: Restore Mode: restore defaults to OFF [14:32:29][C][template.switch:057]: Optimistic: YES [14:32:29][C][template.switch:068]: Template Switch 'nspanel Relay 2 Local Fallback' [14:32:29][C][template.switch:091]: Restore Mode: restore defaults to OFF [14:32:29][C][template.switch:057]: Optimistic: YES

[14:32:29][C][restart.button:017]: Restart Button 'nspanel Restart' [14:32:29][C][status:034]: Status Binary Sensor 'nspanel Status' [14:32:29][C][status:034]: Device Class: 'connectivity' [14:32:29][C][adc:094]: ADC Sensor 'ntc_source' [14:32:29][C][adc:094]: Device Class: 'voltage' [14:32:29][C][adc:094]: State Class: 'measurement' [14:32:29][C][adc:094]: Unit of Measurement: 'V' [14:32:29][C][adc:094]: Accuracy Decimals: 2 [14:32:29][C][adc:104]: Pin: GPIO38 [14:32:29][C][adc:119]: Attenuation: 11db [14:32:29][C][adc:133]: Update Interval: 60.0s [14:32:29][C][resistance:010]: Resistance Sensor 'resistance_sensor' [14:32:29][C][resistance:010]: State Class: 'measurement' [14:32:29][C][resistance:010]: Unit of Measurement: 'Ω' [14:32:29][C][resistance:010]: Accuracy Decimals: 1

[14:32:29][C][resistance:011]: Configuration: DOWNSTREAM [14:32:29][C][resistance:012]: Resistor: 11200.00Ω [14:32:29][C][resistance:013]: Reference Voltage: 3.3V [14:32:29][D][main:915]: Nextion start - Set display brigntess [14:32:29][D][number:054]: 'nspanel Display Brightness' - Setting number value [14:32:29][D][number:113]: New number value: 100.000000 [14:32:29][D][number:012]: 'nspanel Display Brightness': Sending state 100.000000 [14:32:29][D][main:916]: Nextion start - Set display dim brightness [14:32:29][D][number:054]: 'nspanel Display Brightness Dimdown' - Setting number value [14:32:29][D][number:113]: New number value: 10.000000 [14:32:29][D][number:012]: 'nspanel Display Brightness Dimdown': Sending state 10.000000 [14:32:29][D][main:920]: Nextion start - Update settings page [14:32:29][D][main:927]: Sleep mode - Turn off [14:32:29][W][nextion:396]: Nextion reported variable name invalid! [14:32:29][W][nextion:396]: Nextion reported variable name invalid! [14:32:29][W][nextion:396]: Nextion reported variable name invalid! [14:32:29][W][nextion:396]: Nextion reported variable name invalid! [14:32:29][W][nextion:396]: Nextion reported variable name invalid! [14:32:29][W][nextion:396]: Nextion reported variable name invalid! [14:32:29][W][nextion:396]: Nextion reported variable name invalid! [14:32:29][W][nextion:396]: Nextion reported variable name invalid! [14:32:29][C][version.text_sensor:021]: Version Text Sensor 'nspanel ESPhome Version'

[14:32:29][C][nextion:118]: Device Model: NX4832F035_011C [14:32:29][C][nextion:119]: Firmware Version: 72 [14:32:29][C][nextion:120]: Serial Number: 45B03401FC2D3E78 [14:32:29][C][nextion:121]: Flash Size: 16777216 [14:32:29][C][nextion:122]: Wake On Touch: True [14:32:29][C][ntc:014]: NTC Sensor 'nspanel Temperature' [14:32:29][C][ntc:014]: Device Class: 'temperature' [14:32:29][C][ntc:014]: State Class: 'measurement' [14:32:29][C][ntc:014]: Unit of Measurement: '°C' [14:32:29][C][ntc:014]: Accuracy Decimals: 1 [14:32:30][C][captive_portal:088]: Captive Portal: [14:32:30][C][web_server:161]: Web Server: [14:32:30][C][web_server:162]: Address: nspanel.local:80

[14:32:30][C][mdns:113]: Hostname: nspanel [14:32:30][C][ota:093]: Over-The-Air Updates: [14:32:30][C][ota:094]: Address: nspanel.local:3232 [14:32:30][C][ota:097]: Using Password. [14:32:30][C][api:138]: API Server: [14:32:30][C][api:139]: Address: nspanel.local:6053 [14:32:30][C][api:143]: Using noise encryption: NO [14:32:30][C][wifi_info:009]: WifiInfo IPAddress 'nspanel IP' [14:32:30][C][wifi_info:011]: WifiInfo SSID 'nspanel SSID' [14:32:30][C][wifi_info:012]: WifiInfo BSSID 'nspanel BSSID' [14:32:30][C][wifi_signal.sensor:009]: WiFi Signal 'nspanel RSSI' [14:32:30][C][wifi_signal.sensor:009]: Device Class: 'signal_strength' [14:32:30][C][wifi_signal.sensor:009]: State Class: 'measurement' [14:32:30][C][wifi_signal.sensor:009]: Unit of Measurement: 'dBm' [14:32:30][C][wifi_signal.sensor:009]: Accuracy Decimals: 0 [14:32:30][D][main:806]: Nextion start - Inform Home Assistant display is ready [14:32:30][D][binary_sensor:036]: 'nspanel Nextion display': Sending state ON [14:32:30][D][main:811]: Nextion start - Done! [14:32:30][D][api:102]: Accepted 192.168.1.47 [14:32:30][D][api.connection:1031]: Home Assistant 2023.3.5 (192.168.1.47): Connected successfully [14:32:33][W][nextion:396]: Nextion reported variable name invalid! [14:32:33][D][switch:012]: 'nspanel Relay 1 Local Fallback' Turning ON. [14:32:33][D][switch:016]: 'nspanel Relay 2 Local Fallback' Turning OFF. [14:32:33][D][text_sensor:064]: 'nspanel Notification Label': Sending state '' [14:32:34][D][text_sensor:064]: 'nspanel Notification Text': Sending state '' [14:32:34][D][switch:016]: 'nspanel Notification unread' Turning OFF. [14:32:35][W][nextion:396]: Nextion reported variable name invalid! [14:32:36][W][nextion:396]: Nextion reported variable name invalid! [14:32:36][W][nextion:396]: Nextion reported variable name invalid! [14:32:36][W][nextion:396]: Nextion reported variable name invalid! [14:32:36][W][nextion:341]: Nextion reported page ID invalid! [14:33:00][W][nextion:396]: Nextion reported variable name invalid! [14:33:00][D][sensor:094]: 'ntc_source': Sending state 1.48100 V with 2 decimals of accuracy [14:33:00][D][resistance:039]: 'resistance_sensor' - Resistance 9118.9Ω [14:33:00][D][sensor:094]: 'resistance_sensor': Sending state 9118.85645 Ω with 1 decimals of accuracy [14:33:00][D][ntc:026]: 'nspanel Temperature' - Temperature: 27.1°C [14:33:00][D][sensor:094]: 'nspanel Temperature': Sending state 27.09039 °C with 1 decimals of accuracy [14:33:00][W][nextion:396]: Nextion reported variable name invalid! [14:33:00][W][nextion:396]: Nextion reported variable name invalid! [14:33:00][W][nextion:396]: Nextion reported variable name invalid! [14:33:07][D][sensor:094]: 'nspanel uptime': Sending state 46.22900 s with 0 decimals of accuracy [14:33:16][D][esp32.preferences:114]: Saving 2 preferences to flash... [14:33:16][D][esp32.preferences:143]: Saving 2 preferences to flash: 2 cached, 0 written, 0 failed [14:33:27][D][sensor:094]: 'nspanel RSSI': Sending state -22.00000 dBm with 0 decimals of accuracy [14:33:27][W][nextion:396]: Nextion reported variable name invalid! [14:34:00][D][sensor:094]: 'ntc_source': Sending state 1.48000 V with 2 decimals of accuracy [14:34:00][D][resistance:039]: 'resistance_sensor' - Resistance 9107.7Ω [14:34:00][D][sensor:094]: 'resistance_sensor': Sending state 9107.69238 Ω with 1 decimals of accuracy [14:34:00][D][ntc:026]: 'nspanel Temperature' - Temperature: 27.1°C [14:34:00][D][sensor:094]: 'nspanel Temperature': Sending state 27.11835 °C with 1 decimals of accuracy [14:34:00][W][nextion:396]: Nextion reported variable name invalid! [14:34:00][W][nextion:396]: Nextion reported variable name invalid! [14:34:00][W][nextion:396]: Nextion reported variable name invalid! [14:34:00][W][nextion:396]: Nextion reported variable name invalid! [14:34:07][D][sensor:094]: 'nspanel uptime': Sending state 106.22600 s with 0 decimals of accuracy [14:34:27][D][sensor:094]: 'nspanel RSSI': Sending state -22.00000 dBm with 0 decimals of accuracy [14:34:27][W][nextion:396]: Nextion reported variable name invalid! [14:35:00][W][nextion:396]: Nextion reported variable name invalid! [14:35:00][D][sensor:094]: 'ntc_source': Sending state 1.48800 V with 2 decimals of accuracy [14:35:00][D][resistance:039]: 'resistance_sensor' - Resistance 9197.4Ω [14:35:00][D][sensor:094]: 'resistance_sensor': Sending state 9197.35156 Ω with 1 decimals of accuracy [14:35:00][D][ntc:026]: 'nspanel Temperature' - Temperature: 26.9°C [14:35:00][D][sensor:094]: 'nspanel Temperature': Sending state 26.89492 °C with 1 decimals of accuracy [14:35:00][W][nextion:396]: Nextion reported variable name invalid! [14:35:00][W][nextion:396]: Nextion reported variable name invalid! [14:35:00][W][nextion:396]: Nextion reported variable name invalid! [14:35:07][D][sensor:094]: 'nspanel uptime': Sending state 166.22900 s with 0 decimals of accuracy [14:35:21][I][ota:113]: Boot seems successful, resetting boot loop counter. [14:35:21][D][esp32.preferences:114]: Saving 1 preferences to flash... [14:35:21][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed [14:35:27][D][sensor:094]: 'nspanel RSSI': Sending state -21.00000 dBm with 0 decimals of accuracy [14:35:27][W][nextion:396]: Nextion reported variable name invalid! [14:36:00][D][sensor:094]: 'ntc_source': Sending state 1.49500 V with 2 decimals of accuracy [14:36:00][D][resistance:039]: 'resistance_sensor' - Resistance 9276.5Ω [14:36:00][D][sensor:094]: 'resistance_sensor': Sending state 9276.45508 Ω with 1 decimals of accuracy [14:36:00][D][ntc:026]: 'nspanel Temperature' - Temperature: 26.7°C [14:36:00][D][sensor:094]: 'nspanel Temperature': Sending state 26.69986 °C with 1 decimals of accuracy [14:36:00][W][nextion:396]: Nextion reported variable name invalid! [14:36:00][W][nextion:396]: Nextion reported variable name invalid! [14:36:00][W][nextion:396]: Nextion reported variable name invalid! [14:36:00][W][nextion:396]: Nextion reported variable name invalid! [14:36:07][D][sensor:094]: 'nspanel uptime': Sending state 226.22600 s with 0 decimals of accuracy [14:36:27][D][sensor:094]: 'nspanel RSSI': Sending state -23.00000 dBm with 0 decimals of accuracy [14:36:27][W][nextion:396]: Nextion reported variable name invalid!


No logs in Home assistant concerning ESP or NSPanel

The log in ESPHome when I press the button to upload TFT are

INFO ESPHome 2023.8.2 INFO Reading configuration /config/esphome/nspanel.yaml... INFO Updating https://github.com/Blackymas/NSPanel_HA_Blueprint@main WARNING GPIO4 is a Strapping PIN and should be avoided. Attaching external pullup/down resistors to strapping pins can cause unexpected failures. See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins INFO Starting log output from nspanel.local using esphome API INFO Successfully connected to nspanel.local [14:42:37][I][app:102]: ESPHome version 2023.8.2 compiled on Aug 23 2023, 14:30:45

[14:42:37][C][wifi:379]: Local MAC: XX:XX:XX... [14:42:37][C][wifi:380]: SSID: [redacted] [14:42:37][C][wifi:381]: IP Address: 192.168.XX:XX [14:42:37][C][wifi:383]: BSSID: [redacted]

[14:42:37][C][wifi:386]: Signal strength: -24 dB ▂▄▆█ [14:42:37][C][wifi:390]: Channel: 11 [14:42:37][C][wifi:391]: Subnet: 255.255.255.0 [14:42:37][C][wifi:392]: Gateway: 192.168.XX.XX [14:42:37][C][wifi:393]: DNS1: 192.168.XX.XX [14:42:37][C][wifi:394]: DNS2: 0.0.0.0

[14:42:37][C][logger:302]: Level: DEBUG [14:42:37][C][logger:303]: Log Baud Rate: 0 [14:42:37][C][logger:305]: Hardware UART: UART0 [14:42:37][C][uart.arduino_esp32:124]: UART Bus 0: [14:42:37][C][uart.arduino_esp32:125]: TX Pin: GPIO16 [14:42:37][C][uart.arduino_esp32:126]: RX Pin: GPIO17 [14:42:37][C][uart.arduino_esp32:128]: RX Buffer Size: 256 [14:42:37][C][uart.arduino_esp32:130]: Baud Rate: 115200 baud [14:42:37][C][uart.arduino_esp32:131]: Data Bits: 8 [14:42:37][C][uart.arduino_esp32:132]: Parity: NONE [14:42:37][C][uart.arduino_esp32:133]: Stop bits: 1 [14:42:37][C][ledc.output:164]: LEDC Output: [14:42:37][C][ledc.output:165]: Pin GPIO21 [14:42:37][C][ledc.output:166]: LEDC Channel: 0 [14:42:37][C][ledc.output:167]: PWM Frequency: 1000.0 Hz [14:42:37][C][ledc.output:168]: Bit depth: 16 [14:42:37][C][template.binary_sensor:028]: Template Binary Sensor 'nspanel Nextion display' [14:42:37][C][template.binary_sensor:028]: Device Class: 'connectivity' [14:42:37][C][uptime.sensor:031]: Uptime Sensor 'nspanel uptime' [14:42:37][C][uptime.sensor:031]: Device Class: 'duration' [14:42:37][C][uptime.sensor:031]: State Class: 'total_increasing' [14:42:37][C][uptime.sensor:031]: Unit of Measurement: 's' [14:42:37][C][uptime.sensor:031]: Accuracy Decimals: 0

[14:42:37][C][template.text_sensor:020]: Template Sensor 'nspanel Notification Label' [14:42:37][C][template.text_sensor:020]: Template Sensor 'nspanel Notification Text' [14:42:37][C][template.text_sensor:020]: Template Sensor 'nspanel Settings Entity' [14:42:37][C][switch.gpio:068]: GPIO Switch 'nspanel Relay 1' [14:42:37][C][switch.gpio:091]: Restore Mode: restore defaults to OFF [14:42:37][C][switch.gpio:031]: Pin: GPIO22 [14:42:37][C][switch.gpio:068]: GPIO Switch 'nspanel Relay 2' [14:42:37][C][switch.gpio:091]: Restore Mode: restore defaults to OFF [14:42:37][C][switch.gpio:031]: Pin: GPIO19 [14:42:37][C][switch.gpio:068]: GPIO Switch 'nspanel Screen Power' [14:42:37][C][switch.gpio:091]: Restore Mode: always ON [14:42:37][C][switch.gpio:031]: Pin: GPIO4 [14:42:37][C][template.number:050]: Template Number 'nspanel Display Brightness' [14:42:37][C][template.number:050]: Unit of Measurement: '%' [14:42:37][C][template.number:051]: Optimistic: YES [14:42:37][C][template.number:052]: Update Interval: 60.0s [14:42:37][C][template.number:050]: Template Number 'nspanel Display Brightness Dimdown' [14:42:37][C][template.number:050]: Unit of Measurement: '%' [14:42:37][C][template.number:051]: Optimistic: YES [14:42:37][C][template.number:052]: Update Interval: 60.0s [14:42:37][C][template.number:050]: Template Number 'nspanel Temperature Correction' [14:42:37][C][template.number:050]: Unit of Measurement: '°C' [14:42:37][C][template.number:051]: Optimistic: YES [14:42:37][C][template.number:052]: Update Interval: 60.0s [14:42:37][C][template.number:050]: Template Number 'nspanel Page Timeout' [14:42:37][C][template.number:051]: Optimistic: YES [14:42:37][C][template.number:052]: Update Interval: 60.0s [14:42:37][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'nspanel Left Button' [14:42:37][C][gpio.binary_sensor:016]: Pin: GPIO14 [14:42:37][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'nspanel Right Button' [14:42:37][C][gpio.binary_sensor:016]: Pin: GPIO27 [14:42:38][C][template.switch:068]: Template Switch 'nspanel Notification unread' [14:42:38][C][template.switch:091]: Restore Mode: restore defaults to OFF [14:42:38][C][template.switch:057]: Optimistic: YES [14:42:38][C][template.switch:068]: Template Switch 'nspanel Notification sound' [14:42:38][C][template.switch:091]: Restore Mode: restore defaults to OFF [14:42:38][C][template.switch:057]: Optimistic: YES [14:42:38][C][template.switch:068]: Template Switch 'nspanel Confirmation Message' [14:42:38][C][template.switch:091]: Restore Mode: restore defaults to OFF [14:42:38][C][template.switch:057]: Optimistic: YES [14:42:38][C][template.switch:068]: Template Switch 'nspanel Sleep mode' [14:42:38][C][template.switch:079]: Device Class: 'switch' [14:42:38][C][template.switch:091]: Restore Mode: restore defaults to OFF [14:42:38][C][template.switch:057]: Optimistic: NO [14:42:38][C][template.switch:068]: Template Switch 'nspanel Relay 1 Local Fallback' [14:42:38][C][template.switch:091]: Restore Mode: restore defaults to OFF [14:42:38][C][template.switch:057]: Optimistic: YES [14:42:38][C][template.switch:068]: Template Switch 'nspanel Relay 2 Local Fallback' [14:42:38][C][template.switch:091]: Restore Mode: restore defaults to OFF [14:42:38][C][template.switch:057]: Optimistic: YES

[14:42:38][C][restart.button:017]: Restart Button 'nspanel Restart' [14:42:38][C][status:034]: Status Binary Sensor 'nspanel Status' [14:42:38][C][status:034]: Device Class: 'connectivity' [14:42:38][C][adc:094]: ADC Sensor 'ntc_source' [14:42:38][C][adc:094]: Device Class: 'voltage' [14:42:38][C][adc:094]: State Class: 'measurement' [14:42:38][C][adc:094]: Unit of Measurement: 'V' [14:42:38][C][adc:094]: Accuracy Decimals: 2 [14:42:38][C][adc:104]: Pin: GPIO38 [14:42:38][C][adc:119]: Attenuation: 11db [14:42:38][C][adc:133]: Update Interval: 60.0s [14:42:38][C][resistance:010]: Resistance Sensor 'resistance_sensor' [14:42:38][C][resistance:010]: State Class: 'measurement' [14:42:38][C][resistance:010]: Unit of Measurement: 'Ω' [14:42:38][C][resistance:010]: Accuracy Decimals: 1

[14:42:38][C][resistance:011]: Configuration: DOWNSTREAM [14:42:38][C][resistance:012]: Resistor: 11200.00Ω [14:42:38][C][resistance:013]: Reference Voltage: 3.3V [14:42:38][C][version.text_sensor:021]: Version Text Sensor 'nspanel ESPhome Version'

[14:42:38][C][nextion:118]: Device Model: NX4832F035_011C [14:42:38][C][nextion:119]: Firmware Version: 72 [14:42:38][C][nextion:120]: Serial Number: 4---------E78 [14:42:38][C][nextion:121]: Flash Size: 16777216 [14:42:38][C][nextion:122]: Wake On Touch: True [14:42:38][C][ntc:014]: NTC Sensor 'nspanel Temperature' [14:42:38][C][ntc:014]: Device Class: 'temperature' [14:42:38][C][ntc:014]: State Class: 'measurement' [14:42:38][C][ntc:014]: Unit of Measurement: '°C' [14:42:38][C][ntc:014]: Accuracy Decimals: 1 [14:42:38][C][captive_portal:088]: Captive Portal: [14:42:38][C][web_server:161]: Web Server: [14:42:38][C][web_server:162]: Address: nspanel.local:80

[14:42:38][C][mdns:113]: Hostname: nspanel [14:42:38][C][ota:093]: Over-The-Air Updates: [14:42:38][C][ota:094]: Address: nspanel.local:3232 [14:42:38][C][ota:097]: Using Password. [14:42:38][C][api:138]: API Server: [14:42:38][C][api:139]: Address: nspanel.local:6053 [14:42:38][C][api:143]: Using noise encryption: NO [14:42:38][C][wifi_info:009]: WifiInfo IPAddress 'nspanel IP' [14:42:38][C][wifi_info:011]: WifiInfo SSID 'nspanel SSID' [14:42:38][C][wifi_info:012]: WifiInfo BSSID 'nspanel BSSID' [14:42:38][C][wifi_signal.sensor:009]: WiFi Signal 'nspanel RSSI' [14:42:38][C][wifi_signal.sensor:009]: Device Class: 'signal_strength' [14:42:38][C][wifi_signal.sensor:009]: State Class: 'measurement' [14:42:38][C][wifi_signal.sensor:009]: Unit of Measurement: 'dBm' [14:42:38][C][wifi_signal.sensor:009]: Accuracy Decimals: 0 [14:42:41][D][button:010]: 'nspanel Update TFT display' Pressed. [14:42:41][D][binary_sensor:036]: 'nspanel Nextion display': Sending state OFF

[14:42:41][D][nextion_upload:175]: Requesting URL: https://192.168.XX.XX:XX/local/nspanel_eu.tft [14:42:45][D][nextion_upload:209]: Updating Nextion NX4832F035_011C... [14:42:45][D][nextion_upload:235]: Waiting for upgrade response [14:42:45][E][uart:015]: Reading from UART timed out at byte 0! [14:42:45][E][uart:015]: Reading from UART timed out at byte 0! [14:42:45][E][uart:015]: Reading from UART timed out at byte 0! [14:42:45][D][nextion_upload:239]: Upgrade response is 4 [14:42:45][D][nextion_upload:242]: Available 0 : 0x00 [14:42:45][D][nextion_upload:242]: Available 1 : 0x00 [14:42:45][D][nextion_upload:242]: Available 2 : 0x00 [14:42:45][D][nextion_upload:242]: Available 3 : 0x05 [14:42:45][D][nextion_upload:246]: preparation for tft update done [14:42:45][D][nextion_upload:274]: Allocating buffer size 65536, Heap size is 130100 [14:42:45][D][nextion_upload:291]: Updating tft from "https://192.168.XX.XX:XX/local/nspanel_eu.tft" with a file size of 6551964 using 65536 chunksize, Heap Size 64520 [14:42:45][D][nextion_upload:048]: Requesting range: bytes=0-16383 [14:42:47][E][uart:015]: Reading from UART timed out at byte 0! [14:42:47][E][uart:015]: Reading from UART timed out at byte 0! [14:42:47][E][uart:015]: Reading from UART timed out at byte 0! [14:42:47][E][uart:015]: Reading from UART timed out at byte 0! [14:42:47][E][uart:015]: Reading from UART timed out at byte 0! [14:42:47][E][uart:015]: Reading from UART timed out at byte 0! [14:42:47][E][uart:015]: Reading from UART timed out at byte 0! [14:42:47][E][uart:015]: Reading from UART timed out at byte 0! [14:42:47][E][uart:015]: Reading from UART timed out at byte 0! [14:42:47][E][uart:015]: Reading from UART timed out at byte 0! [14:42:48][E][uart:015]: Reading from UART timed out at byte 0! [14:42:48][E][uart:015]: Reading from UART timed out at byte 0! [14:42:48][E][uart:015]: Reading from UART timed out at byte 0! [14:42:48][E][uart:015]: Reading from UART timed out at byte 0! [14:42:48][E][uart:015]: Reading from UART timed out at byte 0! [14:42:48][E][uart:015]: Reading from UART timed out at byte 0! [14:42:48][E][uart:015]: Reading from UART timed out at byte 0! [14:42:48][E][uart:015]: Reading from UART timed out at byte 0! [14:42:48][E][uart:015]: Reading from UART timed out at byte 0! [14:42:49][E][uart:015]: Reading from UART timed out at byte 0! [14:42:50][D][nextion_upload:302]: Heap Size 70264, Bytes left 6535580 [14:42:50][D][nextion_upload:048]: Requesting range: bytes=16384-81919 [14:42:56][D][nextion_upload:302]: Heap Size 67884, Bytes left 6470044 [14:42:56][D][nextion_upload:048]: Requesting range: bytes=81920-147455 [14:43:02][D][nextion_upload:302]: Heap Size 65524, Bytes left 6404508 [14:43:02][D][nextion_upload:048]: Requesting range: bytes=147456-212991 [14:43:09][D][nextion_upload:302]: Heap Size 65520, Bytes left 6338972 [14:43:09][D][nextion_upload:048]: Requesting range: bytes=212992-278527 [14:43:16][D][nextion_upload:302]: Heap Size 63156, Bytes left 6273436 [14:43:16][D][nextion_upload:048]: Requesting range: bytes=278528-344063 WARNING nspanel.local: Connection error occurred: [Errno 104] Connection reset by peer INFO Processing unexpected disconnect from ESPHome API for nspanel.local WARNING Disconnected from API INFO Successfully connected to nspanel.local [14:44:14][E][uart:015]: Reading from UART timed out at byte 0! [14:44:14][W][nextion:072]: Nextion is not connected! [14:44:14][W][component:204]: Component nextion.display took a long time for an operation (0.11 s). [14:44:14][W][component:205]: Components should block for at most 20-30ms. [14:44:15][E][uart:015]: Reading from UART timed out at byte 0! [14:44:15][W][nextion:072]: Nextion is not connected! [14:44:15][W][component:204]: Component nextion.display took a long time for an operation (0.11 s). [14:44:15][W][component:205]: Components should block for at most 20-30ms. [14:44:16][E][uart:015]: Reading from UART timed out at byte 0! [14:44:16][W][nextion:072]: Nextion is not connected! [14:44:16][W][component:204]: Component nextion.display took a long time for an operation (0.11 s). [14:44:16][W][component:205]: Components should block for at most 20-30ms. [14:44:16][E][uart:015]: Reading from UART timed out at byte 0! .....

screen of the NSPanel is frozen, I can see the progression bar and the golowing texts

USART Update... 115200 SIZE: 6551964 writing DATA... 4% 286720

The value change slowly become 4% 290816 at 14:49:30 become 4% 319488 at 15:00:00

Ma-Maison-Intelligente commented 1 year ago

I check again HA logs and find thisone that match with the log of ESPHome

Logger: aioesphomeapi.connection Source: runner.py:179 First occurred: 14:43:50 (1 occurrences) Last logged: 14:43:50

nspanel @ 192.168.1.46: Connection error occurred: [Errno 104] Connection reset by peer

edwardtfn commented 1 year ago

You can cancel this slow transfer. It will fail at the end anyways. I see you are using httpS for transferring the file... Don't you have a http (without S) server to try this? Nextion devices are know for having issues with httpS.

edwardtfn commented 1 year ago

About your ESPHome yaml, it's not very readable, but I see you have refences to external_components. You can remove all those references as your panel is not in reparse mode anymore.

edwardtfn commented 1 year ago

And I would suggest you to try nspanel_blank.tft first. Once you can successfully transfer that one (you will see a QR code in your screen), then you try nspanel_eu.tft, which is much bigger.

Ma-Maison-Intelligente commented 1 year ago

Edwardtfn

were is located the new nspanel_blank.tft file in github ? I can see the nspanel_eu.tft in the root but not the blank

edwardtfn commented 1 year ago

Under custom_configuration folder:

https://github.com/Blackymas/NSPanel_HA_Blueprint/blob/main/custom_configuration/nspanel_blank.tft

Ma-Maison-Intelligente commented 1 year ago

OK I uploade the correct nspanel_blank.tft file I well install it in my NSPanel and see the QRCode

I upload again le last version of nspanel_eu avalable on the root of the Github I try to upload it and it block at 2%

ESPHome Logs

[17:42:42][D][button:010]: 'nspanel Update TFT display' Pressed. [17:42:42][D][binary_sensor:036]: 'nspanel Nextion display': Sending state OFF

[17:42:42][D][nextion_upload:175]: Requesting URL: https://192.168XX.XX:XX/local/nspanel_eu.tft [17:42:45][D][nextion_upload:209]: Updating Nextion NX4832F035_011C... [17:42:46][D][nextion_upload:235]: Waiting for upgrade response [17:42:46][E][uart:015]: Reading from UART timed out at byte 0! [17:42:46][E][uart:015]: Reading from UART timed out at byte 0! [17:42:46][E][uart:015]: Reading from UART timed out at byte 0! [17:42:46][D][nextion_upload:239]: Upgrade response is 4 [17:42:46][D][nextion_upload:242]: Available 0 : 0x00 [17:42:46][D][nextion_upload:242]: Available 1 : 0x00 [17:42:46][D][nextion_upload:242]: Available 2 : 0x00 [17:42:46][D][nextion_upload:242]: Available 3 : 0x05 [17:42:46][D][nextion_upload:246]: preparation for tft update done [17:42:46][D][nextion_upload:274]: Allocating buffer size 65536, Heap size is 125284 [17:42:46][D][nextion_upload:291]: Updating tft from "https://192.168.1.47:8123/local/nspanel_eu.tft" with a file size of 6551964 using 65536 chunksize, Heap Size 59712 [17:42:46][D][nextion_upload:048]: Requesting range: bytes=0-16383 [17:42:47][E][uart:015]: Reading from UART timed out at byte 0! [17:42:47][E][uart:015]: Reading from UART timed out at byte 0! [17:42:47][E][uart:015]: Reading from UART timed out at byte 0! [17:42:47][E][uart:015]: Reading from UART timed out at byte 0! [17:42:48][E][uart:015]: Reading from UART timed out at byte 0! [17:42:48][E][uart:015]: Reading from UART timed out at byte 0! [17:42:48][E][uart:015]: Reading from UART timed out at byte 0! [17:42:48][E][uart:015]: Reading from UART timed out at byte 0! [17:42:48][E][uart:015]: Reading from UART timed out at byte 0! [17:42:48][E][uart:015]: Reading from UART timed out at byte 0! [17:42:48][E][uart:015]: Reading from UART timed out at byte 0! [17:42:48][E][uart:015]: Reading from UART timed out at byte 0! [17:42:48][E][uart:015]: Reading from UART timed out at byte 0! [17:42:49][E][uart:015]: Reading from UART timed out at byte 0! [17:42:49][E][uart:015]: Reading from UART timed out at byte 0! [17:42:49][E][uart:015]: Reading from UART timed out at byte 0! [17:42:49][E][uart:015]: Reading from UART timed out at byte 0! [17:42:49][E][uart:015]: Reading from UART timed out at byte 0! [17:42:49][E][uart:015]: Reading from UART timed out at byte 0! [17:42:49][E][uart:015]: Reading from UART timed out at byte 0! [17:42:50][D][nextion_upload:302]: Heap Size 65464, Bytes left 6535580 [17:42:50][D][nextion_upload:048]: Requesting range: bytes=16384-81919 [17:42:57][D][nextion_upload:302]: Heap Size 65464, Bytes left 6470044 [17:42:57][D][nextion_upload:048]: Requesting range: bytes=81920-147455 [17:43:04][D][nextion_upload:302]: Heap Size 63100, Bytes left 6404508 [17:43:04][D][nextion_upload:048]: Requesting range: bytes=147456-212991 WARNING nspanel.local: Connection error occurred: [Errno 104] Connection reset by peer INFO Processing unexpected disconnect from ESPHome API for nspanel.local WARNING Disconnected from API INFO Successfully connected to nspanel.local [17:43:24][E][uart:015]: Reading from UART timed out at byte 0! [17:43:24][W][nextion:072]: Nextion is not connected! [17:43:24][W][component:204]: Component nextion.display took a long time for an operation (0.11 s). [17:43:24][W][component:205]: Components should block for at most 20-30ms. [17:43:25][E][uart:015]: Reading from UART timed out at byte 0! [17:43:25][W][nextion:072]: Nextion is not connected! [17:43:25][W][component:204]: Component nextion.display took a long time for an operation (0.11 s). [17:43:25][W][component:205]: Components should block for at most 20-30ms. .....

I switch off and switch on the NSPanel and without putting again the blank tft I just try to upload again eu tft. It first upload quickly something and restart loading something else but block at 0%

ESPHome logs

[17:51:44][D][button:010]: 'nspanel Update TFT display' Pressed. [17:51:44][D][binary_sensor:036]: 'nspanel Nextion display': Sending state OFF

[17:51:44][D][nextion_upload:175]: Requesting URL: https://192.168.XX.XX:XX/local/nspanel_eu.tft [17:51:47][D][nextion_upload:209]: Updating Nextion NX4832F035_011C... [17:51:48][D][nextion_upload:235]: Waiting for upgrade response [17:51:48][E][uart:015]: Reading from UART timed out at byte 0! [17:51:48][E][uart:015]: Reading from UART timed out at byte 0! [17:51:48][E][uart:015]: Reading from UART timed out at byte 0! [17:51:48][D][nextion_upload:239]: Upgrade response is 4 [17:51:48][D][nextion_upload:242]: Available 0 : 0x00 [17:51:48][D][nextion_upload:242]: Available 1 : 0x00 [17:51:48][D][nextion_upload:242]: Available 2 : 0x00 [17:51:48][D][nextion_upload:242]: Available 3 : 0x05 [17:51:48][D][nextion_upload:246]: preparation for tft update done [17:51:48][D][nextion_upload:274]: Allocating buffer size 65536, Heap size is 127744 [17:51:48][D][nextion_upload:291]: Updating tft from "https://192.168.XX.XX:XX/local/nspanel_eu.tft" with a file size of 6551964 using 65536 chunksize, Heap Size 62192 [17:51:48][D][nextion_upload:048]: Requesting range: bytes=0-16383 [17:51:49][E][uart:015]: Reading from UART timed out at byte 0! [17:51:49][E][uart:015]: Reading from UART timed out at byte 0! [17:51:49][E][uart:015]: Reading from UART timed out at byte 0! [17:51:49][E][uart:015]: Reading from UART timed out at byte 0! [17:51:49][E][uart:015]: Reading from UART timed out at byte 0! [17:51:50][E][uart:015]: Reading from UART timed out at byte 0! [17:51:50][E][uart:015]: Reading from UART timed out at byte 0! [17:51:50][E][uart:015]: Reading from UART timed out at byte 0! [17:51:50][E][uart:015]: Reading from UART timed out at byte 0! [17:51:50][E][uart:015]: Reading from UART timed out at byte 0! [17:51:50][E][uart:015]: Reading from UART timed out at byte 0! [17:51:50][E][uart:015]: Reading from UART timed out at byte 0! [17:51:50][E][uart:015]: Reading from UART timed out at byte 0! [17:51:50][E][uart:015]: Reading from UART timed out at byte 0! [17:51:50][E][uart:015]: Reading from UART timed out at byte 0! [17:51:51][E][uart:015]: Reading from UART timed out at byte 0! [17:51:51][E][uart:015]: Reading from UART timed out at byte 0! [17:51:51][E][uart:015]: Reading from UART timed out at byte 0! [17:51:51][E][uart:015]: Reading from UART timed out at byte 0! [17:51:51][E][uart:015]: Reading from UART timed out at byte 0! [17:51:51][D][nextion_upload:121]: Nextion reported new range 134744072 [17:51:51][D][nextion_upload:302]: Heap Size 62052, Bytes left -128192108 [17:51:51][D][nextion_upload:304]: Successfully updated Nextion! [17:51:51][D][nextion_upload:310]: Restarting Nextion [17:51:53][D][nextion_upload:313]: Restarting esphome WARNING nspanel.local: Connection error occurred: [Errno 104] Connection reset by peer INFO Processing unexpected disconnect from ESPHome API for nspanel.local WARNING Disconnected from API INFO Successfully connected to nspanel.local [17:52:08][E][uart:015]: Reading from UART timed out at byte 0! [17:52:08][W][nextion:072]: Nextion is not connected! [17:52:08][W][component:204]: Component nextion.display took a long time for an operation (0.11 s). [17:52:08][W][component:205]: Components should block for at most 20-30ms. [17:52:09][E][uart:015]: Reading from UART timed out at byte 0! [17:52:09][W][nextion:072]: Nextion is not connected! [17:52:09][W][component:204]: Component nextion.display took a long time for an operation (0.11 s). [17:52:09][W][component:205]: Components should block for at most 20-30ms. .....

edwardtfn commented 1 year ago

Have you tried using http instead of httpS?

Ma-Maison-Intelligente commented 1 year ago

When I try to download the file from HomeAssistant to my computer using httpS://my_homeAssistantIP:XX/local/nspanel_eu.tft it works. when I do the same without the S http://my_homeAssistantIP:XX/local/nspanel_eu.tft it didn't works. Cette page ne fonctionne pas 192.168.XX:XX n'a envoyé aucune donnée. ERR_EMPTY_RESPONSE

edwardtfn commented 1 year ago

Can't you setup another http server? Or perhaps trying to use the GitHub url directly in your panel.

Https can be an issue with Nextion.

Anyways, if you wanna go Tasmota, after installing it, you can follow this guide to upload the TFT. Just replace the url to use the one where your TFT is. Again, the guide uses http, and not https, so I don't think it will be better than using ESPHome (as you are already exited reparse mode), but it is up to you.

edwardtfn commented 1 year ago

You can also try using serial transfer to TFT as described in this post: https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/166#issue-1524561202

Ma-Maison-Intelligente commented 1 year ago

Hi all and sorry for my late answer due to internet connection issue.

I finally solve the issue by using http link (instead of httpS) to upload the tft file. Thank you to edwardtfn for his help.

I was in https due to the fact that I'm using DuckDNS. So to be able to have https from outside and http loccaly I install correctly in HomeAssistant the addon NGINX and that it.

edwardtfn commented 1 year ago

Great to hear that. Thanks for sharing your solution.

mvonh commented 1 year ago

I had exactly the same issue, and because I was able to install the blank.tft I didn’t think to try via http and not https. Most folks are running https, perhaps a stronger warning to use http for this step would help others thanks (blew about 4h trying to get this to work)