Blackymas / NSPanel_HA_Blueprint

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

Blank screen after power cycle #2004

Closed Ede2016 closed 2 months ago

Ede2016 commented 2 months ago

TFT Version

4.3.1

ESPHome Version

4.3.1

Blueprint Version

4.3.1

Panel Model

US (Landscape)

What is the bug?

When I use Install to install on my NSPanel I see the start screen and then the home screen. I can swipe and use the one button which I configured already.

Then, when I power the NSPanel off and then on again, the screen is blank and stays blank. I can ping the NSPanel successfully, I can see a log, but the screen stays blank.

If I repeat the procedure with "Install" it starts again and all works. But with a power cycle I have the same problem again.

Steps to Reproduce

When I use Install I see the following screens on the NSPanel:

IMG_20240401_173305

IMG_20240401_173310

IMG_20240401_173337

All works. Then I switch off the power and a few seconds later I switch it on again. The screen is blank and stays blank. Nothing happens if I touch the screen or press a button.

Your Panel's YAML

substitutions:
  # Settings - Editable values
  device_name: "esphome-web-7d0be0"
  friendly_name: "NSPanelBedroomWall"
  wifi_ssid: !secret wifi_ssid
  wifi_password: !secret wifi_password
  nextion_update_url: "http://homeassistant.local:8123/local/nspanel_eu.tft"  # Optional
  # Add-on configuration (if needed)
  # heater_relay: "1"  # Possible values: "1" or "2"

# Customization area
##### My customization - Start #####
##### My customization - End #####

# Core and optional configurations
packages:
  remote_package:
    url: https://github.com/Blackymas/NSPanel_HA_Blueprint
    ref: main
    files:
      - nspanel_esphome.yaml # Basic package
      # Optional advanced and add-on configurations
      # - esphome/nspanel_esphome_advanced.yaml
      # - nspanel_esphome_addon_climate_cool.yaml
      # - nspanel_esphome_addon_climate_heat.yaml
      # - nspanel_esphome_addon_climate_dual.yaml
    refresh: 300s

ESPHome Logs

INFO Successfully connected to esphome-web-7d0be0 @ 192.168.20.216 in 1.080s INFO Successful handshake with esphome-web-7d0be0 @ 192.168.20.216 in 0.094s [18:11:52][I][app:102]: ESPHome version 2024.3.1 compiled on Mar 29 2024, 15:07:11 [18:11:52][I][app:104]: Project esphome.web version 1.0

[18:11:52][C][wifi:408]: Local MAC: 44:17:93:7D:0B:E0 [18:11:52][C][wifi:413]: SSID: [redacted] [18:11:52][C][wifi:416]: IP Address: 192.168.20.216 [18:11:52][C][wifi:420]: BSSID: [redacted]

[18:11:52][C][wifi:423]: Signal strength: -68 dB ▂▄▆█ [18:11:52][C][wifi:427]: Channel: 6 [18:11:52][C][wifi:428]: Subnet: 255.255.255.0 [18:11:52][C][wifi:429]: Gateway: 192.168.20.1 [18:11:52][C][wifi:430]: DNS1: 192.168.20.1 [18:11:52][C][wifi:431]: DNS2: 192.168.20.1

[18:11:52][C][logger:167]: Level: DEBUG [18:11:52][C][esp32_ble:374]: ESP32 BLE: [18:11:52][C][esp32_ble:376]: MAC address: 44:17:93:7D:0B:E2 [18:11:52][C][esp32_ble:377]: IO Capability: none [18:11:52][C][esp32_ble_server:200]: ESP32 BLE Server: [18:11:52][C][esp32_improv.component:261]: ESP32 Improv: [18:11:53][C][captive_portal:088]: Captive Portal: [18:11:53][C][web_server:169]: Web Server: [18:11:53][C][web_server:170]: Address: esphome-web-7d0be0.local:80

[18:11:53][C][mdns:116]: Hostname: esphome-web-7d0be0 [18:11:53][C][ota:096]: Over-The-Air Updates: [18:11:53][C][ota:097]: Address: esphome-web-7d0be0.local:3232 [18:11:53][C][ota:103]: OTA version: 2. [18:11:53][C][api:139]: API Server: [18:11:53][C][api:140]: Address: esphome-web-7d0be0.local:6053 [18:11:53][C][api:144]: Using noise encryption: NO [18:11:53][C][improv_serial:032]: Improv Serial: [18:11:53][D][api:102]: Accepted 192.168.20.213 [18:11:53][D][api.connection:1159]: Home Assistant 2024.3.3 (192.168.20.213): Connected successfully

Home Assistant Logs

The IP address from this NSPanel is 192.168.20.216, see screenshot. This is currently the only NSPanel in my network. Other ESPHome devices are LED controllers

Logger: aioesphomeapi.connection Source: runner.py:188 First occurred: March 25, 2024 at 11:43:13 AM (25 occurrences) Last logged: 6:11:42 PM

esphome-web-7d0be0 @ 192.168.20.220: Connection error occurred: Ping response not received after 90.0 seconds esphome-web-7d0be0 @ 192.168.20.215: Connection error occurred: Ping response not received after 90.0 seconds esphome-web-7d0be0 @ 192.168.20.216: Connection error occurred: [Errno 104] Connection reset by peer esphome-web-7d0be0 @ 192.168.20.216: Connection error occurred: Ping response not received after 90.0 seconds esphome-web-7d0be0 @ 192.168.20.216: Connection error occurred: esphome-web-7d0be0 @ 192.168.20.216: Connection lost

Logger: aioesphomeapi.reconnect_logic Source: runner.py:188 First occurred: March 24, 2024 at 2:54:32 PM (20 occurrences) Last logged: 6:11:42 PM

Can't connect to ESPHome API for esphome-web-7d0be0 @ 192.168.20.220: Error connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address='192.168.20.220', port=6053))]: [Errno 113] Connect call failed ('192.168.20.220', 6053) (SocketAPIError) Can't connect to ESPHome API for esphome-web-7d0be0 @ 192.168.20.215: Error connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address='192.168.20.215', port=6053))]: [Errno 113] Connect call failed ('192.168.20.215', 6053) (SocketAPIError) Can't connect to ESPHome API for esphome-test2 @ 192.168.20.212: Error connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address='192.168.20.212', port=6053))]: [Errno 111] Connect call failed ('192.168.20.212', 6053) (SocketAPIError) Can't connect to ESPHome API for esphome-web-7d0be0 @ 192.168.20.216: Error connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address='192.168.20.216', port=6053))]: [Errno 111] Connect call failed ('192.168.20.216', 6053) (SocketAPIError) Can't connect to ESPHome API for esphome-web-7d0be0 @ 192.168.20.216: Error connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address='192.168.20.216', port=6053))]: [Errno 113] Connect call failed ('192.168.20.216', 6053) (SocketAPIError)

edwardtfn commented 2 months ago

Have you tried the steps from this guide? https://github.com/Blackymas/NSPanel_HA_Blueprint/blob/main/docs/error_initializing.md

Ede2016 commented 2 months ago

Have you tried the steps from this guide? https://github.com/Blackymas/NSPanel_HA_Blueprint/blob/main/docs/error_initializing.md

I see the following warning after the power cycle:

WARNING Can't connect to ESPHome API for esphome-web-7d0be0 @ 192.168.20.102: Error connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address='192.168.20.102', port=6053))]: [Errno 113] Connect call failed ('192.168.20.102', 6053) (SocketAPIError)

INFO Trying to connect to esphome-web-7d0be0 @ 192.168.20.102 in the background

Thanks for the link. Now I tried that but until now no success. But it seems I get nearer to the problem(s). There seems to be a mix-up with IP addresses. Now I set a fixed IP address. Now I see another error with a mismatch of the blueprint.

Error

I think the best is I reset everything and start from scratch. No big problem. That is my first NSPanel and it's time to learn. I will continue working on that tomorrow. I will report here how it works after I do it again from scratch.

edwardtfn commented 2 months ago

Could you please try to update all the components to v4.3.2 and let me know if the issue persists?

Ede2016 commented 2 months ago

I updated to 4.3.2 like suggested above And I updated Home Assistant to 2024.4

I just tried a new panel and I have another error. I work according to this document: https://github.com/Blackymas/NSPanel_HA_Blueprint/blob/main/docs/install.md Section 8. Clear all existing content and paste the following YAML configuration:

When I paste that I see the following error indicator in line 16: Error 16

And when I press Install I see this error. Failed Config

When I changed the substitutes to my correct values I still have the same problem. Yesterday, with the previous versions, this error did not happen.

I can't continue from here until that new problem is solved. It would be great if you have a suggestion. I am still new to HA.

edwardtfn commented 2 months ago

It is an indentation thing.

Please use this one as a reference. The one in the manuals is already fixed.

substitutions:
  # Settings - Editable values
  device_name: "YOUR_NSPANEL_NAME"
  friendly_name: "Your panel's friendly name"
  wifi_ssid: !secret wifi_ssid
  wifi_password: !secret wifi_password
  nextion_update_url: "http://homeassistant.local:8123/local/nspanel_eu.tft"  # Optional
  # Add-on configuration (if needed)
  # heater_relay: "1"  # Possible values: "1" or "2"

# Customization area
##### My customization - Start #####
##### My customization - End #####

# Core and optional configurations
packages:
  remote_package:
    url: https://github.com/Blackymas/NSPanel_HA_Blueprint
    ref: main
    refresh: 300s
    files:
      - nspanel_esphome.yaml # Basic package
      # Optional advanced and add-on configurations
      # - esphome/nspanel_esphome_advanced.yaml
      # - nspanel_esphome_addon_climate_cool.yaml
      # - nspanel_esphome_addon_climate_heat.yaml
      # - nspanel_esphome_addon_climate_dual.yaml
Ede2016 commented 2 months ago

Thanks, I tried what you posted, but unfortunately now there is again another problem. Now I can save it and when I press Install it takes a long time and at the end I see the following:

INFO Successfully compiled program. INFO Connecting to 192.168.20.216 INFO Uploading /data/build/nspanelkitchendoor/.pioenvs/nspanelkitchendoor/firmware.bin (1134288 bytes) ERROR Error auth result: Error: Authentication invalid. Is the password correct?

I did not change any passwords since yesterday and yesterday all worked fine.

Maybe there is still a problem in above. When I paste it the "substitutions:" in the first line shows sometimes a red error line under the first letter, s. Maybe there is another indentation thing. Sorry for the hassle. I tried it two times and the authentication error persist. I confirmed the SSID and password on other devices. They are correct.

edwardtfn commented 2 months ago

Well, this is due to your panel being flashed with a different OTA password as the one you are using now. This project uses the Wi-Fi password as OTA password, so if you have changed your Wi-Fi password since the last successful flash, this will explain this issue and if you still know the old password, you can try to add this customization:

ota:
  password: your_old_password

If that works, you can change the OTA following this guide: https://github.com/Blackymas/NSPanel_HA_Blueprint/blob/main/docs/customization.md#custom-ota-password

If you don't have the OTA password used to flash it, then I'm afraid you will have to flash it via cable, as that overwrite the OTA password protection. 😞

Ede2016 commented 2 months ago

Thanks I didn't change any passwords. I just flashed the device with an FTDI adapter. That worked. And then I would flash it again wireless. Then I still had problems with the wrong TFT screen. Now I just followed the following: https://github.com/Blackymas/NSPanel_HA_Blueprint/blob/main/docs/tft_upload.md

And typing this message the TFT update worked and if shows the correct picture on the panel. Great. And, even better news, now I switched if off and on again, and after a minute or so it shows the correct interface. Now it seems everything works.

Thanks for your help. Now I will continue with two more panels.

Maybe last question: Is the problem with the password related to the new version? Will you solve that problem? I guess otherwise everybody will have to install over wire.

edwardtfn commented 2 months ago

Maybe last question: Is the problem with the password related to the new version? Will you solve that problem? I guess otherwise everybody will have to install over wire.

No. We haven't changed anything related to this and so far you are the first one reporting this issue. 😞