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

Not able to update tft file #684

Closed
haynsee opened this issue Apr 15, 2023 · 16 comments · Fixed by #675
Closed

Not able to update tft file #684

haynsee opened this issue Apr 15, 2023 · 16 comments · Fixed by #675
Labels
Bug Identifies an issue where the system is not functioning as expected.

Comments

@haynsee
Copy link

haynsee commented Apr 15, 2023

I have loaded the NSpanel with esp and it is showing in my integrations.
When i went to go to update the tft nothing happens on the nspanel screen.
I was expecting a toggle button from the setup guide but it's a "press" ( pic added).
Can anyone tell me if i can force the update and if so how?
I'm quite new to this kind of stuff so any help would be greatful.
Screenshot 2023-04-15 at 22 55 56

@edwardtfn
Copy link
Collaborator

I was expecting a toggle button from the setup guide but it's a "press" ( pic added).

That was a switch before, but now it is a button ("Press"), so nothing wrong with your system.

If you don't mind, please share your ESPHome yaml. Just make sure to remove any private info like wifi credentials before sharing.

We have seen other people with similar issue and looks like using an older version of the screen's library helps with this first time upload...
Take a look at this post: #641 (comment)

@Anzic23
Copy link

Anzic23 commented Apr 16, 2023

I spent a lot of hours trying to load nspanel_us.tft. Nothing helped. I even installed a separate server with nginx (and when I entered this address in the browser, the file was downloaded). The only thing that helped was connecting "using an older version of the screen's library." But now I have a problem, every time I restart HA I get the message "loading" on the panel. I have to edit the automation with Blueprint, after this action - the data appears.

@edwardtfn
Copy link
Collaborator

edwardtfn commented Apr 16, 2023

  1. Which versions (TFT, ESPHome and Blueprint) are you using?
  2. Anything in the Home Assistant logs?
  3. Could you please share the automation yaml used to set the Blueprint? Please remove any sensitive information before sharing.
  4. Which panel version are you using, EU or US?

@Anzic23
Copy link

Anzic23 commented Apr 16, 2023

  1. The latest available on Github. TFT - 3.2.2, as I understand it. ESPHome - v2023.3.2. Blueprint - Version: v.3.2.2.
  2. I do not see any errors in the Home Assistant log.
alias: "!NSPanel"
description: ""
use_blueprint:
  path: Blackymas/nspanel_blueprint.yaml
  input:
    language: RUS
    nspanel_name: nspanelus
    weather_entity: weather.home_assistant
    qrcode_enabled: true
    qrcode_label: Wi-Fi
    qrcode_value: WIFI:T:WPA;S:mywifiname;P:mypass;;
    left_button_entity: light.wb_mr6c_164_k6_light
    left_button_name: Точки
    right_button_entity: light.wb_mr6c_164_k5_light
    right_button_name: Люстры
    button_page01_label: Ванная
    entity01: automation.vannaia_liustra
    delay: 15
    home_value01: sensor.anzor_steps
    chip01: light.wb_mr6c_172_k3_light

  1. US

@edwardtfn
Copy link
Collaborator

edwardtfn commented Apr 16, 2023

  1. Changing the automation is the only way to get out of that mode? What if you click some of the hardware buttons in the panel, or swipe to next page, or restart the panel using the button on the device page in Home Assistant?
  2. Does this problem happens every time HA restarts or is just sometimes? Have you ever had that (recently) but no connected to HA restarting?
  3. Which weather integration are you using?
    I'm trying to find the root cause so we can think about a fix.

@Anzic23
Copy link

Anzic23 commented Apr 16, 2023

  1. Yes, only changing the automation helps to 'revive' the panel. Swipes to the sides switch pages, but the same 'loading' inscription appears on them. Reloading the panel also does not help.
  2. Every time
  3. Home assistant Forecast (standard integration)
    Now I have changed the yaml file to the "standard" one. I flashed the panel with an empty tft file, and then flashed it with the nspanel_us.tft file. This seemed to partially help. After the "loading" message appears, if you swipe to the side and back, then the panel "comes to life".
    Only changing the automation helps

@wzbart
Copy link

wzbart commented Apr 16, 2023

HI guys. I'm having same issue here. Struggling to upload tft file. I even tried to flash my nspanel with earlier version of nspanel_esphome.yaml with no luck.

This is what I can see in my esp device logs:
[19:10:09][D][button:013]: 'nspanelgarage Update TFT display' Pressed.
[19:10:09][D][nextion_upload:169]: Connected
[19:10:09][D][nextion_upload:175]: Requesting URL: http://192.168.68.79:1180/nspanel_eu.tft
[19:10:09][E][nextion_upload:205]: Failed to get file size
[19:10:09][D][nextion_upload:324]: Restarting Nextion
WARNING nspanelgarage.local: Connection error occurred: [Errno 104] Connection reset by peer
INFO Processing unexpected disconnect from ESPHome API for nspanelgarage.local
WARNING Disconnected from API
INFO Successfully connected to nspanelgarage.local

I'm out of ideas. I have flashed my panel about 20 times today, trying local tft files, local blank tft, nothing works ... I will really appreciate any help.

@deejaybeam
Copy link
Collaborator

[19:10:09][E][nextion_upload:205]: Failed to get file size means that this url is not valid - are you sure about the port 1180?
In other words: with this url the file can´t be donwloaded...

@wzbart
Copy link

wzbart commented Apr 16, 2023

Yes. I'm able to download a file using that url in any web browser. I'm getting same error regardless of using local server or GitHub

@edwardtfn
Copy link
Collaborator

edwardtfn commented Apr 16, 2023

Try to upload nspanel_blank.tft first. It's way smaller and will make easier to identify issues.
When you have that one installed (and a totally white screen in your panel) then you should try nspanel_eu.tft.

And.olease let us know if you have the same issue when uploading nspanel_blank.tft.

@wzbart
Copy link

wzbart commented Apr 16, 2023

I did, with no luck again.

[21:19:01][D][nextion_upload:175]: Requesting URL: http://192.168.68.79:1180/nspanel_blank.tft
[21:19:01][E][nextion_upload:205]: Failed to get file size
[21:19:01][D][nextion_upload:324]: Restarting Nextion
WARNING nspanelgarage.local: Connection error occurred: [Errno 104] Connection reset by peer
INFO Processing unexpected disconnect from ESPHome API for nspanelgarage.local
WARNING Disconnected from API
INFO Successfully connected to nspanelgarage.local

@edwardtfn
Copy link
Collaborator

Why don't you try to setup another Web server or maybe use the one from Home Assistant.
Your server might be supporby your browsers, but looks like it isn't giving a response in a way your panel could understand.

@wzbart
Copy link

wzbart commented Apr 17, 2023

Why don't you try to setup another Web server or maybe use the one from Home Assistant. Your server might be supporby your browsers, but looks like it isn't giving a response in a way your panel could understand.

Yes. Different web server did a trick. I have setup apache just to get proper web server to download a single file ... and it worked. Then, I flashed my ns panel again with full tft file for eu and it went flawlessly. Thanks a lot @edwardtfn :)
The web server I used before was an app recommended by any other user with same issue. Simple web server without installation on Win machine .... now I see how much difference such a small detail can make

@Darkstar-74
Copy link

Hello,
I also have an issue to upload a tft file to the Display. I have installled the latest ESPhome 2023.4.1 and the latest blueprint. While I can set the relais of my NSPanel and also get the status of the physical buttons correctly I am not able to upload any tft file to the display (also not a small "blank" one). When pressing the "update tft" button it seems the main program restarts (e.g. relais fall off) but on the screen of the TFT nothing happens. The homeassistant log shows "tftkitchen @ 192.168.178.197: Connection error occurred: [Errno 104] Connection reset by peer".
When entering the chossen nextion-update-url (in www folder of HA inatllation) in a browser the download starts, so it seems to be reachable.
I already tried with changing to http instead of https by inactivating the corrosponding entries in the config but without sucesss.
The Wifi connection is rather good (-43dB) and e.g. an OTA update of the main Software works fine.
I also tried to reduce the baud rate from 115200 to 9600 but also without positive result.

One thing I am also wondering, but not sure if it is related to the problem is that if I do an install wirelessly evertyhing seems to work fine but when it's changing to log after everything is finished there is many loggings like that: [E][uart:015]: Reading from UART timed out at byte 0! [15:08:36][W][nextion:072]: Nextion is not connected! [15:08:37]

As I am not really a Software expert ;-) any help would really be appreciated as the project looks really great and I really want to get it up and running.

BR
Marcus

@Anzic23
Copy link

Anzic23 commented Apr 24, 2023

@Darkstar-74 Try adding these lines to your ESPhome config:

external_components:
  - source: github://pr#2956
    components: [nextion]
    refresh: 1h

After that, I managed to update the tft file. As soon as the update works at least once, you can delete these lines, and the file update proceeds in a regular way.

@Darkstar-74
Copy link

@Anzic23 : Thanks a lot! Seems it works. It is updating now and shows progress on the TFT. As I have SSL enabled it will take some (real long) time until I will know if also the result is O.k.

BR
Marcus

@edwardtfn edwardtfn linked a pull request Apr 25, 2023 that will close this issue
@edwardtfn edwardtfn added the Bug Identifies an issue where the system is not functioning as expected. label Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Identifies an issue where the system is not functioning as expected.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants