tube0013 / esphome-stream-server-v2

Custom Component for ESPHome enabling Serial over TCP
32 stars 24 forks source link

Compile error with ESPHome version 2023.11.6 #8

Open Manuel-Haas opened 8 months ago

Manuel-Haas commented 8 months ago
INFO ESPHome 2023.11.6
INFO Reading configuration /config/esphome/wecker-manuel.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing wecker-manuel (board: seeed_xiao_esp32c3; framework: arduino; platform: platformio/espressif32@5.4.0)
--------------------------------------------------------------------------------

HARDWARE: ESP32C3 160MHz, 320KB RAM, 4MB Flash
 - toolchain-riscv32-esp @ 8.4.0+2021r2-patch5
Dependency Graph
|-- WiFi @ 2.0.0
|-- ESPmDNS @ 2.0.0
|-- Update @ 2.0.0
|-- noise-c @ 0.1.4
|-- ArduinoJson @ 6.18.5
|-- WiFiClientSecure @ 2.0.0
|-- HTTPClient @ 2.0.0
Compiling .pioenvs/wecker-manuel/src/esphome/components/api/api_connection.cpp.o
Compiling .pioenvs/wecker-manuel/src/esphome/components/api/api_frame_helper.cpp.o
Compiling .pioenvs/wecker-manuel/src/esphome/components/api/api_pb2.cpp.o
Compiling .pioenvs/wecker-manuel/src/esphome/components/api/api_pb2_service.cpp.o
Compiling .pioenvs/wecker-manuel/src/esphome/components/api/api_server.cpp.o
Compiling .pioenvs/wecker-manuel/src/esphome/components/api/list_entities.cpp.o
Compiling .pioenvs/wecker-manuel/src/esphome/components/api/proto.cpp.o
Compiling .pioenvs/wecker-manuel/src/esphome/components/api/subscribe_state.cpp.o
Compiling .pioenvs/wecker-manuel/src/esphome/components/api/user_services.cpp.o
Compiling .pioenvs/wecker-manuel/src/esphome/components/esp32/core.cpp.o
Compiling .pioenvs/wecker-manuel/src/esphome/components/esp32/gpio.cpp.o
Compiling .pioenvs/wecker-manuel/src/esphome/components/esp32/preferences.cpp.o
Compiling .pioenvs/wecker-manuel/src/esphome/components/http_request/http_request.cpp.o
Compiling .pioenvs/wecker-manuel/src/esphome/components/json/json_util.cpp.o
Compiling .pioenvs/wecker-manuel/src/esphome/components/logger/logger.cpp.o
Compiling .pioenvs/wecker-manuel/src/esphome/components/md5/md5.cpp.o
Compiling .pioenvs/wecker-manuel/src/esphome/components/mdns/mdns_component.cpp.o
Compiling .pioenvs/wecker-manuel/src/esphome/components/mdns/mdns_esp32.cpp.o
Compiling .pioenvs/wecker-manuel/src/esphome/components/mdns/mdns_esp8266.cpp.o
Compiling .pioenvs/wecker-manuel/src/esphome/components/mdns/mdns_host.cpp.o
Compiling .pioenvs/wecker-manuel/src/esphome/components/mdns/mdns_libretiny.cpp.o
Compiling .pioenvs/wecker-manuel/src/esphome/components/mdns/mdns_rp2040.cpp.o
Compiling .pioenvs/wecker-manuel/src/esphome/components/network/util.cpp.o
Compiling .pioenvs/wecker-manuel/src/esphome/components/ota/ota_backend_arduino_esp32.cpp.o
Compiling .pioenvs/wecker-manuel/src/esphome/components/ota/ota_backend_arduino_esp8266.cpp.o
Compiling .pioenvs/wecker-manuel/src/esphome/components/ota/ota_backend_arduino_libretiny.cpp.o
Compiling .pioenvs/wecker-manuel/src/esphome/components/ota/ota_backend_arduino_rp2040.cpp.o
Compiling .pioenvs/wecker-manuel/src/esphome/components/ota/ota_backend_esp_idf.cpp.o
Compiling .pioenvs/wecker-manuel/src/esphome/components/ota/ota_component.cpp.o
Compiling .pioenvs/wecker-manuel/src/esphome/components/socket/bsd_sockets_impl.cpp.o
Compiling .pioenvs/wecker-manuel/src/esphome/components/socket/lwip_raw_tcp_impl.cpp.o
Compiling .pioenvs/wecker-manuel/src/esphome/components/socket/lwip_sockets_impl.cpp.o
Compiling .pioenvs/wecker-manuel/src/esphome/components/socket/socket.cpp.o
Compiling .pioenvs/wecker-manuel/src/esphome/components/stream_server/binary_sensor.cpp.o
Compiling .pioenvs/wecker-manuel/src/esphome/components/stream_server/stream_server.cpp.o
Compiling .pioenvs/wecker-manuel/src/esphome/components/uart/uart.cpp.o
In file included from src/esphome/components/stream_server/binary_sensor.cpp:17:
src/esphome/components/stream_server/binary_sensor.h:20:10: fatal error: esphome/components/binary_sensor/binary_sensor.h: No such file or directory
 #include "esphome/components/binary_sensor/binary_sensor.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
*** [.pioenvs/wecker-manuel/src/esphome/components/stream_server/binary_sensor.cpp.o] Error 1
========================= [FAILED] Took 39.33 seconds =========================

This is my confg-yaml

esphome:
  name: wecker-manuel
  friendly_name: wecker-manuel

external_components:
  - source: github://tube0013/esphome-stream-server-v2

esp32:
  board: seeed_xiao_esp32c3
  framework:
    type: arduino

uart:
  id: uart_bus
  tx_pin: GPIO21
  rx_pin: GPIO20
  baud_rate: 115200

stream_server:
  uart_id: uart_bus
  port: 6638

# Enable logging
logger:
  baud_rate: 115200

# Enable Home Assistant API
api:
  encryption:
    key: "xxx"

ota:
  password: "xxx"

http_request:

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  domain: .int

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Wecker-Manuel Fallback Hotspot"
    password: "xxx"

Maybe the dependencies has to be chanced?

tube0013 commented 8 months ago

Try and clean the build files anre re-tryI just successfully compiled a binary using esphome 11.6 with no issues.

alternatively try the orginal Oxan version as it has been updated since I released this as a work around when that repo was stagnant. https://github.com/oxan/esphome-stream-server

Manuel-Haas commented 8 months ago

Thanks for your answer! Today I've successfully compiled it with another board: nodemcu-32s instead of _seeed_xiaoesp32c3. So i'm pretty sure, that makes the difference. It is another CPU Arch (Risc V). For me it is solved by now, since I've got some esp32s3 boards yesterday :-D

hschoute commented 5 months ago

Same error for me with an esp32c3 , board: lolin_c3_mini And esphome upgraded to 2024.3.0 Clean build files does not solve it

The Oxan version compiles and works for me