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

error compiling V4.3.1 from command line #1941

Closed lecrams closed 3 months ago

lecrams commented 3 months ago

TFT Version

4.3.0

ESPHome Version

4.3.1

Blueprint Version

4.3.1

Panel Model

EU

What is the bug?

Compiling from command line using arduino framework gives an error for main: Compiling .pioenvs\nspanel1\src\main.cpp.o .\esp-panel-1.yaml: In lambda function: .\esp-panel-1.yaml:66:86: error: no matching function for call to 'esphome::script::RestartScript<>::execute(const char, int)' In file included from src/esphome.h:74, from src/main.cpp:3: src/esphome\components\script\script.h:75:8: note: candidate: 'void esphome::script::RestartScript::execute(Ts ...) [with Ts = {}]' void execute(Ts... x) override { ^~~ src/esphome\components\script\script.h:75:8: note: candidate expects 0 arguments, 2 provided .\esp-panel-1.yaml:67:82: error: no matching function for call to 'esphome::script::RestartScript<>::execute(const char, int)' In file included from src/esphome.h:74, from src/main.cpp:3: src/esphome\components\script\script.h:75:8: note: candidate: 'void esphome::script::RestartScript::execute(Ts ...) [with Ts = {}]' void execute(Ts... x) override { ^~~ src/esphome\components\script\script.h:75:8: note: candidate expects 0 arguments, 2 provided *** [.pioenvs\nspanel1\src\main.cpp.o] Error 1

Steps to Reproduce

No response

Your Panel's YAML

substitutions:

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

  device_name: "nspanel1" 
  wifi_ssid: "StumpelAP"
  wifi_password: "220112021708111290"
##### CHANGE ME #####

##### DO NOT CHANGE ANYTHING! #####

  nextion_update_url: "http://192.168.178.87:8123/local/nspanel.tft"

##### addon-configuration #####
  ## addon_climate ##
  # addon_climate_heater_relay: "1" # possible values: 1/2

  ##### CHANGE ME END #####

packages:
  remote_package:
    url: https://github.com/Blackymas/NSPanel_HA_Blueprint
    ref: main
    files:
      - nspanel_esphome.yaml # Core package
      # - nspanel_esphome_advanced.yaml # activate advanced (legacy) elements - can be useful for troubleshooting
      # - nspanel_esphome_addon_climate_cool.yaml # activate for local climate (cooling) control
      # - nspanel_esphome_addon_climate_heat.yaml # activate for local climate (heater) control
    refresh: 300s

##### My customization - Start #####

##### My customization - End #####
esphome:
  compile_process_limit: 1

sensor:
  - platform: uptime
    name: "${device_name} Uptime Sensor"

button:
  # Adds a button to put the panel to sleep
  - name: ${device_name} Sleep
    id: force_sleep
    platform: template
    icon: mdi:sleep
    on_press:
      then:
        - logger.log: Button Sleep pressed
        - lambda: |-
            if (id(current_page).state != "screensaver") id(disp1).goto_page("screensaver");

  # Adds a button to wake-up the panel (similar to the existing service)
  - name: ${device_name} Wake-up
    id: force_wake_up
    platform: template
    icon: mdi:alarm
    on_press:
      then:
        - logger.log: Button Wake-up pressed
        - lambda: |-
            if (id(current_page).state == "screensaver") id(disp1).goto_page(id(wakeup_page_name).state.c_str());
            // id(timer_page).execute(id(wakeup_page_name).state.c_str()); // enable this if you want page timeout to be reset
            id(timer_sleep).execute(id(wakeup_page_name).state.c_str(), int(id(timeout_sleep).state));
            id(timer_dim).execute(id(wakeup_page_name).state.c_str(), int(id(timeout_dim).state));

wifi: !include .wifi.yaml

esp32:
  framework:
    type: arduino

ESPHome Logs

No response

Home Assistant Logs

No response

edwardtfn commented 3 months ago

Have you tried cleaning build files? And which version of ESPHome compiler are you using? v4.3.1 requires ESPHome v2024.3.0.

lecrams commented 3 months ago

Yes I did: pip install -U esphome esphome clean .\nspanel.yaml esphome run .\nspanel.yaml

edwardtfn commented 3 months ago

~I could compile it (via command line) with no issues when I've commented out the wifi: !include .wifi.yaml.~ Are you sure the issue isn't on the .wifi.yaml? ESPHome v2024.3.0 have a breaking change on the IP address function, so depending on what you have on that file it could be the issue.

edwardtfn commented 3 months ago

I've said too earlier... I got the same issue here.

lecrams commented 3 months ago

My .wifi.yaml contains: networks:

What is the breaking change then? It is not mentioned in the release note of esphome 4.3.0

edwardtfn commented 3 months ago

Please try this:

substitutions:

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

  device_name: "nspanel1" 
  wifi_ssid: "StumpelAP"
  wifi_password: "220112021708111290"
##### CHANGE ME #####

##### DO NOT CHANGE ANYTHING! #####

  nextion_update_url: "http://192.168.178.87:8123/local/nspanel.tft"

##### addon-configuration #####
  ## addon_climate ##
  # addon_climate_heater_relay: "1" # possible values: 1/2

  ##### CHANGE ME END #####

packages:
  remote_package:
    url: https://github.com/Blackymas/NSPanel_HA_Blueprint
    ref: main
    files:
      - nspanel_esphome.yaml # Core package
      # - nspanel_esphome_advanced.yaml # activate advanced (legacy) elements - can be useful for troubleshooting
      # - nspanel_esphome_addon_climate_cool.yaml # activate for local climate (cooling) control
      # - nspanel_esphome_addon_climate_heat.yaml # activate for local climate (heater) control
    refresh: 300s

##### My customization - Start #####

##### My customization - End #####
esphome:
  compile_process_limit: 1

sensor:
  - platform: uptime
    name: "${device_name} Uptime Sensor"

button:
  # Adds a button to put the panel to sleep
  - name: ${device_name} Sleep
    id: force_sleep
    platform: template
    icon: mdi:sleep
    on_press:
      then:
        - logger.log: Button Sleep pressed
        - lambda: |-
            if (id(current_page).state != "screensaver") id(disp1).goto_page("screensaver");

  # Adds a button to wake-up the panel (similar to the existing service)
  - name: ${device_name} Wake-up
    id: force_wake_up
    platform: template
    icon: mdi:alarm
    on_press:
      then:
        - logger.log: Button Wake-up pressed
        - lambda: |-
            if (id(current_page).state == "screensaver") id(disp1).goto_page(id(wakeup_page_name).state.c_str());
            // id(timer_page).execute(); // enable this if you want page timeout to be reset
            id(timer_sleep).execute();
            id(timer_dim).execute();

wifi: !include .wifi.yaml

esp32:
  framework:
    type: arduino
edwardtfn commented 3 months ago
INFO ESPHome 2024.3.0
INFO Reading configuration nspanel.yaml...
INFO Updating https://github.com/Blackymas/NSPanel_HA_Blueprint@main
INFO Updating https://github.com/Blackymas/NSPanel_HA_Blueprint@main
INFO Updating https://github.com/edwardtfn/esphome@nextion-v431
INFO Updating https://github.com/edwardtfn/esphome@adc-sampling
INFO Detected timezone 'Europe/Berlin'
INFO Generating C++ source...
INFO Compiling app...
Processing nspanel1 (board: esp32dev; framework: arduino; platform: platformio/espressif32@5.4.0)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html
PLATFORM: Espressif 32 (5.4.0) > Espressif ESP32 Dev Module
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
 - framework-arduinoespressif32 @ 3.20005.220925 (2.0.5)
 - tool-esptoolpy @ 1.40400.0 (4.4.0)
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ off, Compatibility ~ soft
Found 33 compatible libraries
Scanning dependencies...
Dependency Graph
|-- WiFi @ 2.0.0
|-- ESPmDNS @ 2.0.0
|-- Update @ 2.0.0
|-- ArduinoJson @ 6.18.5
|-- WiFiClientSecure @ 2.0.0
|-- HTTPClient @ 2.0.0
Building in release mode
Compiling .pioenvs\nspanel1\src\main.cpp.o
Building .pioenvs\nspanel1\bootloader.bin
esptool.py v4.4
Creating esp32 image...
Merged 1 ELF section
Successfully created esp32 image.
Generating partitions .pioenvs\nspanel1\partitions.bin
Compiling .pioenvs\nspanel1\libcf1\WiFi\WiFi.cpp.o
Compiling .pioenvs\nspanel1\libcf1\WiFi\WiFiAP.cpp.o
Compiling .pioenvs\nspanel1\libcf1\WiFi\WiFiClient.cpp.o
Compiling .pioenvs\nspanel1\libcf1\WiFi\WiFiGeneric.cpp.o
Compiling .pioenvs\nspanel1\libcf1\WiFi\WiFiMulti.cpp.o
Compiling .pioenvs\nspanel1\libcf1\WiFi\WiFiSTA.cpp.o
Compiling .pioenvs\nspanel1\libcf1\WiFi\WiFiScan.cpp.o
Compiling .pioenvs\nspanel1\libcf1\WiFi\WiFiServer.cpp.o
Compiling .pioenvs\nspanel1\libcf1\WiFi\WiFiUdp.cpp.o
Archiving .pioenvs\nspanel1\libcf1\libWiFi.a
Compiling .pioenvs\nspanel1\lib85a\ESPmDNS\ESPmDNS.cpp.o
Archiving .pioenvs\nspanel1\lib85a\libESPmDNS.a
Compiling .pioenvs\nspanel1\lib9a6\Update\HttpsOTAUpdate.cpp.o
Compiling .pioenvs\nspanel1\lib9a6\Update\Updater.cpp.o
Archiving .pioenvs\nspanel1\lib9a6\libUpdate.a
Compiling .pioenvs\nspanel1\lib752\WiFiClientSecure\WiFiClientSecure.cpp.o
Compiling .pioenvs\nspanel1\lib752\WiFiClientSecure\esp_crt_bundle.c.o
Compiling .pioenvs\nspanel1\lib752\WiFiClientSecure\ssl_client.cpp.o
Archiving .pioenvs\nspanel1\lib752\libWiFiClientSecure.a
Compiling .pioenvs\nspanel1\lib4f1\HTTPClient\HTTPClient.cpp.o
Archiving .pioenvs\nspanel1\lib4f1\libHTTPClient.a
Compiling .pioenvs\nspanel1\FrameworkArduino\Esp.cpp.o
Compiling .pioenvs\nspanel1\FrameworkArduino\FirmwareMSC.cpp.o
Compiling .pioenvs\nspanel1\FrameworkArduino\FunctionalInterrupt.cpp.o
Compiling .pioenvs\nspanel1\FrameworkArduino\HWCDC.cpp.o
Compiling .pioenvs\nspanel1\FrameworkArduino\HardwareSerial.cpp.o
Compiling .pioenvs\nspanel1\FrameworkArduino\IPAddress.cpp.o
Compiling .pioenvs\nspanel1\FrameworkArduino\IPv6Address.cpp.o
Compiling .pioenvs\nspanel1\FrameworkArduino\MD5Builder.cpp.o
Compiling .pioenvs\nspanel1\FrameworkArduino\Print.cpp.o
Compiling .pioenvs\nspanel1\FrameworkArduino\Stream.cpp.o
Compiling .pioenvs\nspanel1\FrameworkArduino\StreamString.cpp.o
Compiling .pioenvs\nspanel1\FrameworkArduino\Tone.cpp.o
Compiling .pioenvs\nspanel1\FrameworkArduino\USB.cpp.o
Compiling .pioenvs\nspanel1\FrameworkArduino\USBCDC.cpp.o
Compiling .pioenvs\nspanel1\FrameworkArduino\USBMSC.cpp.o
Compiling .pioenvs\nspanel1\FrameworkArduino\WMath.cpp.o
Compiling .pioenvs\nspanel1\FrameworkArduino\WString.cpp.o
Compiling .pioenvs\nspanel1\FrameworkArduino\base64.cpp.o
Compiling .pioenvs\nspanel1\FrameworkArduino\cbuf.cpp.o
Compiling .pioenvs\nspanel1\FrameworkArduino\esp32-hal-adc.c.o
Compiling .pioenvs\nspanel1\FrameworkArduino\esp32-hal-bt.c.o
Compiling .pioenvs\nspanel1\FrameworkArduino\esp32-hal-cpu.c.o
Compiling .pioenvs\nspanel1\FrameworkArduino\esp32-hal-dac.c.o
Compiling .pioenvs\nspanel1\FrameworkArduino\esp32-hal-gpio.c.o
Compiling .pioenvs\nspanel1\FrameworkArduino\esp32-hal-i2c-slave.c.o
Compiling .pioenvs\nspanel1\FrameworkArduino\esp32-hal-i2c.c.o
Compiling .pioenvs\nspanel1\FrameworkArduino\esp32-hal-ledc.c.o
Compiling .pioenvs\nspanel1\FrameworkArduino\esp32-hal-matrix.c.o
Compiling .pioenvs\nspanel1\FrameworkArduino\esp32-hal-misc.c.o
Compiling .pioenvs\nspanel1\FrameworkArduino\esp32-hal-psram.c.o
Compiling .pioenvs\nspanel1\FrameworkArduino\esp32-hal-rgb-led.c.o
Compiling .pioenvs\nspanel1\FrameworkArduino\esp32-hal-rmt.c.o
Compiling .pioenvs\nspanel1\FrameworkArduino\esp32-hal-sigmadelta.c.o
Compiling .pioenvs\nspanel1\FrameworkArduino\esp32-hal-spi.c.o
Compiling .pioenvs\nspanel1\FrameworkArduino\esp32-hal-time.c.o
Compiling .pioenvs\nspanel1\FrameworkArduino\esp32-hal-timer.c.o
Compiling .pioenvs\nspanel1\FrameworkArduino\esp32-hal-tinyusb.c.o
Compiling .pioenvs\nspanel1\FrameworkArduino\esp32-hal-touch.c.o
Compiling .pioenvs\nspanel1\FrameworkArduino\esp32-hal-uart.c.o
Compiling .pioenvs\nspanel1\FrameworkArduino\firmware_msc_fat.c.o
Compiling .pioenvs\nspanel1\FrameworkArduino\libb64\cdecode.c.o
Compiling .pioenvs\nspanel1\FrameworkArduino\libb64\cencode.c.o
Compiling .pioenvs\nspanel1\FrameworkArduino\main.cpp.o
Compiling .pioenvs\nspanel1\FrameworkArduino\stdlib_noniso.c.o
Compiling .pioenvs\nspanel1\FrameworkArduino\wiring_pulse.c.o
Compiling .pioenvs\nspanel1\FrameworkArduino\wiring_shift.c.o
Archiving .pioenvs\nspanel1\libFrameworkArduino.a
Linking .pioenvs\nspanel1\firmware.elf
Retrieving maximum program size .pioenvs\nspanel1\firmware.elf
Checking size .pioenvs\nspanel1\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [=         ]  14.1% (used 46188 bytes from 327680 bytes)
Flash: [=======   ]  71.2% (used 1306665 bytes from 1835008 bytes)
Building .pioenvs\nspanel1\firmware.bin
esptool.py v4.4
Creating esp32 image...
Merged 25 ELF sections
Successfully created esp32 image.
esp32_create_combined_bin([".pioenvs\nspanel1\firmware.bin"], [".pioenvs\nspanel1\firmware.elf"])
esptool.py v4.7.0
Wrote 0x1506b0 bytes to file .esphome\build\nspanel1\.pioenvs\nspanel1/firmware-factory.bin, ready to flash to offset 0x0
========================================================================================= [SUCCESS] Took 175.03 seconds =========================================================================================

*****************************************************************************************************************************************************************************************************************
We found 760.06MB of unnecessary PlatformIO system data (temporary files, unnecessary packages, etc.).
Use `pio system prune --dry-run` to list them or `pio system prune` to save disk space.
INFO Successfully compiled program.
lecrams commented 3 months ago

Yep now builds and burns. Thx for the fast response