Blackymas / NSPanel_HA_Blueprint

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

`Bug` Compiling error for 4.3.8 #2141

Closed karli2000 closed 3 months ago

karli2000 commented 3 months ago

TFT Version

4.3.7

ESPHome Version

2024.5.5

Blueprint Version

4.3.8

Panel Model

EU

What is the bug?

Not able to compile 4.3.8, see ESPHome logs

Steps to Reproduce

Update blueprint in HA Run "Clean Build Files" ins ESPHome Run "Install" in ESPHome

Your Panel's YAML

substitutions:

###### CHANGE ME ######

  device_name: "nspanel"
  wifi_ssid: "***********"
  wifi_password: "***********"

##### CHANGE ME #####

##### DO NOT CHANGE ANYTHING! #####
  nextion_update_url: "https://raw.githubusercontent.com/Blackymas/NSPanel_HA_Blueprint/main/nspanel_eu.tft"

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

ESPHome Logs

INFO ESPHome 2024.5.5 INFO Reading configuration /config/esphome/nspanel.yaml... INFO Detected timezone 'Europe/Vienna' INFO Generating C++ source... INFO Compiling app... Processing nspanel (board: esp32dev; framework: espidf; platform: platformio/espressif32@5.4.0)

Library Manager: Installing bblanchon/ArduinoJson @ 6.18.5 INFO Installing bblanchon/ArduinoJson @ 6.18.5 Unpacking [####################################] 100% Library Manager: ArduinoJson@6.18.5 has been installed! INFO ArduinoJson@6.18.5 has been installed! HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash

Home Assistant Logs

Error is during compiling, no log entry in HA-logs

edwardtfn commented 3 months ago
  • /data/packages/566b10a3/esphome/nspanel_esphome_core.yaml: In lambda function: /data/packages/566b10a3/esphome/nspanel_esphome_core.yaml:2062:16: error: 'class esphome::nextion::Nextion' has no member named 'send_command'; did you mean 'sendcommand'? disp1->send_command("tm_esphome.en=0"); ^~~~ sendcommand

This shouldn't be an issue with ESPHome v2024.5. I'm not at home right now, but when I come back I will try to duplicate it and come back to you.

edwardtfn commented 3 months ago

I could compile with exactly the same yaml you provided and it went all fine. Also using ESPHome v2024.5.5 here.

karli2000 commented 3 months ago

Just tried it again, restarted my whole HA System, even set the ESPHome compile_process_limit (the hardware is a Raspberry PI 4 with 4GB Ram, never had a issue with memory so far during compilation), cleaned all build files and still the same error. Any idea what could be the problem?

kakaki commented 3 months ago

Same problem, can't compile on 2024.5.5, even tried with 2024.6.0 dev still can't.

edwardtfn commented 3 months ago

I don't think this is memory related. Looks like older components files in the cache. I can change the code to use other functions, but that shouldn't be the way. Anyways, I will look at that option when I get home.

Could you please try using arduino and let me know if it compiles (or which error message you have in that case)? Just add this to your yaml:

esp32:
  framework:
    type: arduino
synack666 commented 3 months ago

same here:

INFO ESPHome 2024.5.5 INFO Reading configuration /config/esphome/nspanel.yaml... INFO Updating https://github.com/Blackymas/NSPanel_HA_Blueprint@v4.3.8 INFO Detected timezone 'Europe/Berlin' INFO Generating C++ source... INFO Compiling app... Processing nspanel (board: esp32dev; framework: espidf; platform: platformio/espressif32@5.4.0)

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

edwardtfn commented 3 months ago

This is a different error message. Have you tried cleaning build files?

xenos910 commented 3 months ago

I also encountered a compile failure. In addition to clearing the build, you also need to clean the external components, and then it will compile successfully.

Phalen commented 3 months ago

clearing the build, you also need to clean the external components, had the same issue clearing is allowing it to compile.

edwardtfn commented 3 months ago

I also encountered a compile failure. In addition to clearing the build, you also need to clean the external components, and then it will compile successfully.

How do you clear the components?

synack666 commented 3 months ago

ok, my stupid, with "clean build files" everything is ok

ChaoticAlex commented 3 months ago

Same problem. INFO Configuration is valid and it will cause error when updated. Even after "cleaning build files"

karli2000 commented 3 months ago

tried it with arduino framework, same result, see attached log. Is there any way i can clean the cache files manually?

I don't think this is memory related. Looks like older components files in the cache. I can change the code to use other functions, but that shouldn't be the way. Anyways, I will look at that option when I get home.

Could you please try using arduino and let me know if it compiles (or which error message you have in that case)? Just add this to your yaml:

esp32:
  framework:
    type: arduino

logs_nspanel_run (1).txt

xenos910 commented 3 months ago

I also encountered a compile failure. In addition to clearing the build, you also need to clean the external components, and then it will compile successfully.

How do you clear the components?

delete all files in the "external_components" folder

ChaoticAlex commented 3 months ago

我也遇到编译失败的情况,除了清除build之外,还需要清理外部的组件,然后就可以编译成功了。

如何清除组件?

删除“external_components”文件夹中的所有文件

It work, thx

famviuf commented 3 months ago

I also encountered a compile failure. In addition to clearing the build, you also need to clean the external components, and then it will compile successfully.

How do you clear the components?

delete all files in the "external_components" folder

where can i find the "external_components" folder?

xenos910 commented 3 months ago

I also encountered a compile failure. In addition to clearing the build, you also need to clean the external components, and then it will compile successfully.

How do you clear the components?

delete all files in the "external_components" folder

where can i find the "external_components" folder?

Since I installed ESPHome using Docker, it is easy to locate the folder. If it is installed as a Home Assistant add-on, I guess it should be in '/esphome/'.

MicroFire33 commented 3 months ago

After updating Home Assistant 2024.6.2. Everything works without deleting anything!!!

karli2000 commented 3 months ago

Same for me, after updating Home Assistant to 2024.6.2 it compiles without problems, so you can close this!

Thank your all for the great work, i really love your blueprint!