Blackymas / NSPanel_HA_Blueprint

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

nextion display disconnected, Relays working fine #1095

Closed scuba-si closed 11 months ago

scuba-si commented 1 year ago

Hi All,

I'm hoping this is a user error :)

I have gone through the instructions, which I can follow well, except I have to manually download the .bin file and then upload using https://web.esphome.io/ as I do not have my home assistant on https. MACOS Safari / Chrome used.

The units (I have tried 2 nspanel EU) will communicate with HA once reflashed, but I cannot seem to get the screen tft to update away from the sonoff one, I am using the current (4 day old) version of the nspanel_eu.tft and I have it hosted on my HA in the www/ folder.

Here is the contents of my yaml that goes into ESPHOME:

`substitutions:

CHANGE ME START

device_name: "nspanelblack3" wifi_ssid: "REDACTED" wifi_password: "REDACTED"

nextion_update_url: "http://192.168.1.239:8123/local/nspanel_eu.tft"

nextion_update_url: "https://github.com/Blackymas/NSPanel_HA_Blueprint/raw/main/custom_configuration/nspanel_blank.tft"

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

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

external_components:

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! #####`

If I keep the 'USE ONLY FOR YOUR FIRST TFT UPLOAD' section I get an error when creating the bin file:

`INFO ESPHome 2023.8.3 INFO Reading configuration /config/esphome/nspanelblack3.yaml... INFO Detected timezone 'Europe/London' 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 Failed config

display.nextion: [source /config/esphome/.esphome/packages/566b10a3/nspanel_esphome.yaml:1666] id: disp1 platform: nextion uart_id: tf_uart tft_url: http://192.168.1.239:8123/local/nspanel_eu.tft

[on_page] is an invalid option for [display.nextion]. Did you mean [on_wake]? on_page:

So in the end I have proceeded without that section and got myself to where I am now, Nextion Display Disconnected. Can anyone help??

Should I be looking at tasmota?

Under Diagnostics for the device I have the following:

Diagnostic

API uptime 11 minutes ago Device uptime 11 minutes ago Nextion display Disconnected RSSI -53 dBm Status Connected

edwardtfn commented 1 year ago

Can you download the file to your computer when using this url?

http://192.168.1.239:8123/local/nspanel_eu.tft

edwardtfn commented 1 year ago

And is the file the right size?

edwardtfn commented 1 year ago

You have tried pr#2956... I would recommend the one from our wiki instead: https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki/(EN)-Common-Issues-TFT-Upload#10-use-an-older-nextion-library-for-esphome

If that isn't working, there are lots of other tips in this page.

Please let me know if you progress...

scuba-si commented 1 year ago

You have tried pr#2956... I would recommend the one from our wiki instead: https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki/(EN)-Common-Issues-TFT-Upload#10-use-an-older-nextion-library-for-esphome

If that isn't working, there are lots of other tips in this page.

Please let me know if you progress...

Thank you, the file was the correct size. Whilst waiting I played around with tasmota, and have now got as far as the QR code on the screen, so I think I'm back on track and currently trying to follow your comments in another thread for getting something on the screen before my wife kills me.

For a newb / non-coder I found the tasmota route was way easier:

https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/685#issuecomment-1524787174

edwardtfn commented 1 year ago

have now got as far as the QR code on the screen

Great! So those pr# and exit reparse are not needed anymore... Just upload the final TFT.

For a newb / non-coder I found the tasmota route was way easier

Indeed. My feeling is that ESPHome team didn't spend that much attention to Nextion so we have to continously try those "alternative methods" to compensate it. 😩

scuba-si commented 1 year ago

Ha, well I think I just bricked it. System Data Error after attempting to upload the larger tft.

edwardtfn commented 1 year ago

I don't think it is bricked. Try to power cycle, or just flash it again... Transfer nspanel_blank.tft... It normally gets it back to life. I got that message myself a couple of times, as I'm always installing different things on my tests, and my panels are all working fine now.

DiggaTS commented 1 year ago

Hey,

i have the same problemes with 4 nspanels...

[13:12:22][D][nextion_upload:302]: Heap Size 61296, Bytes left 6050112 [13:12:22][D][nextion_upload:048]: Requesting range: bytes=1392640-1458175 WARNING nspanelpaul.local: Connection error occurred: [Errno 104] Connection reset by peer INFO Processing unexpected disconnect from ESPHome API for nspanelpaul.local WARNING Disconnected from API

please help ;-)

edwardtfn commented 1 year ago

We are working in a better solution on #1117, but meanwhile my only suggestion is to try again. Looks like for some reason (maybe a weak or busy WiFi?) your panel is disconnecting from Home Assistant and ESPHome cannot handle that nicely. 😩

edwardtfn commented 1 year ago

Another thing you can try is to revert your ESPHome back to v3.4.1 and try to transfer the TFT before upgrading ESPHome to v4.0. Looks like that code was taking a bit less memory... To revert to v3.4.1, change in your yaml, on the remote_package area, from ref: main to ref: v3.4.1.

DiggaTS commented 1 year ago

Argh ... Same Problem. I have also tryed to downgrade to 3.4.1 (ESP and TFT) After a failed upgrade try - same error but @26% and not 16%!

I will try to make a new device in esphome. I think there are to less memory on this device

edwardtfn commented 1 year ago

But have you tried that latest code from #1117?

DiggaTS commented 1 year ago

I have tryed to upload the tft 3 times... and now it works ... it stops by 80% 2 times ... It is not good but it is a workaround. ;-)

Thanks for the support and the better NSPanel in home assistant! 1117

deejaybeam commented 1 year ago

@DiggaTS have you done this with the new nspanel_esphome_upload_tft.yaml file?

DiggaTS commented 1 year ago

Yes i have done this with the code sniped from the last post from 1117

After the upload i have din my normal yaml file ..

` substitutions:

CHANGE ME START

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

nextion_update_url: "http://homeassistant.local:8123/local/nspanel_us_land.tft" nextion_update_blank_url: "http://homeassistant.local:8123/local/nspanel_blank.tft"

CHANGE ME END

packages: remote_package: url: https://github.com/Blackymas/NSPanel_HA_Blueprint ref: tft-transfer files:

- nspanel_esphome.yaml # Core package

  - nspanel_esphome_upload_tft.yaml # Use only if you have issues with TFT transfer
refresh: 300s`
edwardtfn commented 11 months ago

@scuba-si, is this still an issue with the latest release or should we close this?