ESPHome compilation fails

Hi, I have not upgraded my HA/ESPhome for some time. Compilation of yaml config fails. I tried to simplify the config as much as possible but still get errors. Was there anybody in similar situation?

config file:

esphome:
  name: kam

esp8266:
  board: nodemcuv2
  restore_from_flash: true
  framework:
    version: 2.7.4
        
wifi:
  ssid: "Mydlinka"
  password: "secretpassword"
  manual_ip:
    gateway: 192.168.88.1
    subnet: 255.255.255.0
    static_ip: 192.168.88.84


captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:
  password: "secretpassword2"

ota:
  - platform: esphome
    password: "secretpassword3"

log:

INFO ESPHome 2024.12.2
INFO Reading configuration /config/esphome/kamerka.yaml...
WARNING The selected Arduino framework version is not the recommended one. If there are connectivity or build issues please remove the manual version.
WARNING The selected Arduino framework version is not the recommended one. If there are connectivity or build issues please remove the manual version.
INFO Generating C++ source...
INFO Compiling app...
Processing kam (board: nodemcuv2; framework: arduino; platform: platformio/[email protected])
--------------------------------------------------------------------------------
Library Manager: Installing esphome/ESPAsyncTCP-esphome @ 2.0.0
INFO Installing esphome/ESPAsyncTCP-esphome @ 2.0.0
Unpacking  [####################################]  100%
Library Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Library Manager: Installing esphome/ESPAsyncWebServer-esphome @ 3.2.2
INFO Installing esphome/ESPAsyncWebServer-esphome @ 3.2.2
Unpacking  [####################################]  100%
Library Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Library Manager: Resolving dependencies...
INFO Resolving dependencies...
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
Dependency Graph
|-- ESPAsyncTCP-esphome @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 3.2.2
|-- DNSServer @ 1.1.1
|-- ESP8266WiFi @ 1.0
|-- ESP8266mDNS @ 1.2
Compiling .pioenvs/kam/src/esphome/components/api/api_connection.cpp.o
Compiling .pioenvs/kam/src/esphome/components/api/api_frame_helper.cpp.o
Compiling .pioenvs/kam/src/esphome/components/api/api_pb2.cpp.o
Compiling .pioenvs/kam/src/esphome/components/api/api_pb2_service.cpp.o
In file included from src/esphome/components/api/api_connection.h:8:0,
                 from src/esphome/components/api/api_connection.cpp:1:
src/esphome/components/api/api_server.h:140:96: error: invalid use of '::'
   Trigger<std::string, std::string> *client_connected_trigger_ = new Trigger<std::string, std::string>();
                                                                                                ^
src/esphome/components/api/api_server.h:140:96: error: expected ';' at end of member declaration
src/esphome/components/api/api_server.h:140:102: error: expected unqualified-id before '>' token
   Trigger<std::string, std::string> *client_connected_trigger_ = new Trigger<std::string, std::string>();
                                                                                                      ^
src/esphome/components/api/api_server.h:141:99: error: invalid use of '::'
   Trigger<std::string, std::string> *client_disconnected_trigger_ = new Trigger<std::string, std::string>();
                                                                                                   ^
src/esphome/components/api/api_server.h:141:99: error: expected ';' at end of member declaration
src/esphome/components/api/api_server.h:141:105: error: expected unqualified-id before '>' token
   Trigger<std::string, std::string> *client_disconnected_trigger_ = new Trigger<std::string, std::string>();
                                                                                                         ^
src/esphome/components/api/api_server.h:140:83: error: template argument 1 is invalid
   Trigger<std::string, std::string> *client_connected_trigger_ = new Trigger<std::string, std::string>();
                                                                                   ^
src/esphome/components/api/api_server.h:141:86: error: template argument 1 is invalid
   Trigger<std::string, std::string> *client_disconnected_trigger_ = new Trigger<std::string, std::string>();
                                                                                      ^
Compiling .pioenvs/kam/src/esphome/components/api/api_server.cpp.o
Compiling .pioenvs/kam/src/esphome/components/api/list_entities.cpp.o
cc1plus: warning: unrecognized command line option "-Wno-nonnull-compare" [enabled by default]
*** [.pioenvs/kam/src/esphome/components/api/api_connection.cpp.o] Error 1
In file included from src/esphome/components/api/api_server.cpp:1:0:
src/esphome/components/api/api_server.h:140:96: error: invalid use of '::'
   Trigger<std::string, std::string> *client_connected_trigger_ = new Trigger<std::string, std::string>();
                                                                                                ^
src/esphome/components/api/api_server.h:140:96: error: expected ';' at end of member declaration
src/esphome/components/api/api_server.h:140:102: error: expected unqualified-id before '>' token
   Trigger<std::string, std::string> *client_connected_trigger_ = new Trigger<std::string, std::string>();
                                                                                                      ^
src/esphome/components/api/api_server.h:141:99: error: invalid use of '::'
   Trigger<std::string, std::string> *client_disconnected_trigger_ = new Trigger<std::string, std::string>();
                                                                                                   ^
src/esphome/components/api/api_server.h:141:99: error: expected ';' at end of member declaration
src/esphome/components/api/api_server.h:141:105: error: expected unqualified-id before '>' token
   Trigger<std::string, std::string> *client_disconnected_trigger_ = new Trigger<std::string, std::string>();
                                                                                                         ^
src/esphome/components/api/api_server.h:140:83: error: template argument 1 is invalid
   Trigger<std::string, std::string> *client_connected_trigger_ = new Trigger<std::string, std::string>();
                                                                                   ^
src/esphome/components/api/api_server.h:141:86: error: template argument 1 is invalid
   Trigger<std::string, std::string> *client_disconnected_trigger_ = new Trigger<std::string, std::string>();
                                                                                      ^
In file included from src/esphome/components/api/api_connection.h:8:0,
                 from src/esphome/components/api/list_entities.cpp:3:
src/esphome/components/api/api_server.h:140:96: error: invalid use of '::'
   Trigger<std::string, std::string> *client_connected_trigger_ = new Trigger<std::string, std::string>();
                                                                                                ^
src/esphome/components/api/api_server.h:140:96: error: expected ';' at end of member declaration
src/esphome/components/api/api_server.h:140:102: error: expected unqualified-id before '>' token
   Trigger<std::string, std::string> *client_connected_trigger_ = new Trigger<std::string, std::string>();
                                                                                                      ^
src/esphome/components/api/api_server.h:141:99: error: invalid use of '::'
   Trigger<std::string, std::string> *client_disconnected_trigger_ = new Trigger<std::string, std::string>();
                                                                                                   ^
src/esphome/components/api/api_server.h:141:99: error: expected ';' at end of member declaration
src/esphome/components/api/api_server.h:141:105: error: expected unqualified-id before '>' token
   Trigger<std::string, std::string> *client_disconnected_trigger_ = new Trigger<std::string, std::string>();
                                                                                                         ^
src/esphome/components/api/api_server.h:140:83: error: template argument 1 is invalid
   Trigger<std::string, std::string> *client_connected_trigger_ = new Trigger<std::string, std::string>();
                                                                                   ^
src/esphome/components/api/api_server.h:141:86: error: template argument 1 is invalid
   Trigger<std::string, std::string> *client_disconnected_trigger_ = new Trigger<std::string, std::string>();
                                                                                      ^
cc1plus: warning: unrecognized command line option "-Wno-nonnull-compare" [enabled by default]
*** [.pioenvs/kam/src/esphome/components/api/list_entities.cpp.o] Error 1
cc1plus: warning: unrecognized command line option "-Wno-nonnull-compare" [enabled by default]
*** [.pioenvs/kam/src/esphome/components/api/api_server.cpp.o] Error 1
========================= [FAILED] Took 21.13 seconds =========================


What happens if you do like instructed by the warning message?

WARNING The selected Arduino framework version is not the recommended one. If there are connectivity or build issues please remove the manual version.
1 Like

The problem is that I am using

light:
  - platform: fastled_clockless
    id: light0
    chipset: WS2812B
    pin: "D3"
    num_leds: 2
    rgb_order: GRB
    name: "LED rezim"
    restore_mode: ALWAYS_ON

which is supported only till 2.7.4 version of framework. TBH I do not know if there is any other way to drive these LEDs or if it is neccessary to replace them. For me it was a good way how to indicate state using different colors…

They give several alternatives on the clockless page.

Thank you. It looks it was discussed here https://community.home-assistant.io/t/esphome-fastled-clockless-fails-now-with-latest-esphome/548639/2

1 Like