thegroove / esphome-zbbridge

ESPHome custom component and configuration for Sonoff Zigbee Bridge with serial-over-tcp
GNU General Public License v3.0
40 stars 9 forks source link

Could not compiling the node with serial_server component after update ESPHome to version 2021.10.02 #12

Open akalagov opened 3 years ago

akalagov commented 3 years ago
INFO Reading configuration config/zb-bridge-e33083.yaml...
WARNING Found 'HfAEH$A-3)KSAZ#h' (see wifi->networks->1->password) which looks like a substitution, but 'A' was not declared
INFO Detected timezone 'Asia/Almaty'
INFO Generating C++ source...
INFO Backup config will take: 708 bytes
INFO Compiling app...
Processing zb-bridge-e33083 (board: esp_wroom_02; framework: arduino; platform: platformio/espressif8266 @ 2.6.2)
--------------------------------------------------------------------------------
HARDWARE: ESP8266 80MHz, 80KB RAM, 2MB Flash
Dependency Graph
|-- <ESPAsyncTCP-esphome> 1.2.3
|   |-- <ESP8266WiFi> 1.0
|-- <ESPAsyncWebServer-esphome> 2.0.0
|   |-- <ESPAsyncTCP-esphome> 1.2.3
|   |   |-- <ESP8266WiFi> 1.0
|   |-- <Hash> 1.0
|   |-- <ESP8266WiFi> 1.0
|   |-- <ArduinoJson-esphomelib> 5.13.3
|-- <ESP8266WiFi> 1.0
|-- <ArduinoJson-esphomelib> 5.13.3
|-- <ESP8266mDNS> 1.2
|   |-- <ESP8266WiFi> 1.0
Compiling .pioenvs/zb-bridge-e33083/src/esphome/components/serial_server/serial_server.cpp.o
Compiling .pioenvs/zb-bridge-e33083/src/esphome/core/color.cpp.o
Compiling .pioenvs/zb-bridge-e33083/src/esphome/core/component.cpp.o
Compiling .pioenvs/zb-bridge-e33083/src/esphome/core/controller.cpp.o
Compiling .pioenvs/zb-bridge-e33083/src/esphome/core/entity_base.cpp.o
Compiling .pioenvs/zb-bridge-e33083/src/esphome/core/helpers.cpp.o
Compiling .pioenvs/zb-bridge-e33083/src/esphome/core/log.cpp.o
Compiling .pioenvs/zb-bridge-e33083/src/esphome/core/scheduler.cpp.o
Compiling .pioenvs/zb-bridge-e33083/src/esphome/core/util.cpp.o
Compiling .pioenvs/zb-bridge-e33083/src/main.cpp.o
Generating LD script .pioenvs/zb-bridge-e33083/ld/local.eagle.app.v6.common.ld
Compiling .pioenvs/zb-bridge-e33083/lib4d9/ESP8266WiFi/BearSSLHelpers.cpp.o
Compiling .pioenvs/zb-bridge-e33083/lib4d9/ESP8266WiFi/CertStoreBearSSL.cpp.o
src/esphome/components/serial_server/serial_server.cpp: In member function 'void esphome::serial_server::SerialServer::serial_read()':
src/esphome/components/serial_server/serial_server.cpp:77:29: error: 'class esphome::serial_server::SerialServer' has no member named 'readBytes'
         size_t read = this->readBytes(buf, min(len, 128));
                             ^
src/esphome/components/serial_server/serial_server.cpp:77:56: error: 'min' was not declared in this scope
         size_t read = this->readBytes(buf, min(len, 128));
                                                        ^
src/esphome/components/serial_server/serial_server.cpp:77:56: note: suggested alternative:
In file included from /root/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/4.8.2/algorithm:62:0,
                 from src/esphome/core/optional.h:19,
                 from src/esphome/core/component.h:7,
                 from src/esphome/components/serial_server/serial_server.h:23,
                 from src/esphome/components/serial_server/serial_server.cpp:21:
/root/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/4.8.2/bits/stl_algo.h:4226:5: note:   'std::min'
     min(initializer_list<_Tp> __l, _Compare __comp)
     ^
In file included from src/esphome/components/uart/uart.h:6:0,
                 from src/esphome/components/serial_server/serial_server.h:24,
                 from src/esphome/components/serial_server/serial_server.cpp:21:
src/esphome/components/serial_server/serial_server.cpp: In member function 'virtual void esphome::serial_server::SerialServer::dump_config()':
src/esphome/components/serial_server/serial_server.cpp:93:64: error: 'network_get_address' was not declared in this scope
     ESP_LOGCONFIG(TAG, "  Address: %s:%u", network_get_address().c_str(), this->port_);
                                                                ^
src/esphome/core/log.h:97:90: note: in definition of macro 'esph_log_config'
   esp_log_printf_(ESPHOME_LOG_LEVEL_CONFIG, tag, __LINE__, ESPHOME_LOG_FORMAT(format), ##__VA_ARGS__)
                                                                                          ^
src/esphome/components/serial_server/serial_server.cpp:93:5: note: in expansion of macro 'ESP_LOGCONFIG'
     ESP_LOGCONFIG(TAG, "  Address: %s:%u", network_get_address().c_str(), this->port_);
     ^
Compiling .pioenvs/zb-bridge-e33083/lib4d9/ESP8266WiFi/ESP8266WiFi.cpp.o
Compiling .pioenvs/zb-bridge-e33083/lib4d9/ESP8266WiFi/ESP8266WiFiAP.cpp.o
*** [.pioenvs/zb-bridge-e33083/src/esphome/components/serial_server/serial_server.cpp.o] Error 1
========================== [FAILED] Took 5.19 seconds ==========================
MattWestb commented 3 years ago

I have the same problem also with https://github.com/oxan/esphome-stream-server updated version that not have all the futures that thegroove s version is having.

MattWestb commented 3 years ago

Also ESP8266 device after cleaning the build and is using local source for the component:

INFO Reading configuration /config/ESPH_D1M01.yaml...
WARNING 'esph_d1m1': Using the '_' (underscore) character in the hostname is discouraged as it can cause problems with some DHCP and local name services. For more information, see https://esphome.io/guides/faq.html#why-shouldn-t-i-use-underscores-in-my-device-name
INFO Generating C++ source...
INFO Compiling app...
Processing esph_d1m1 (board: d1_mini; framework: arduino; platform: platformio/espressif8266 @ 2.6.3)
--------------------------------------------------------------------------------
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
Dependency Graph
|-- <ESPAsyncTCP-esphome> 1.2.3
|   |-- <ESP8266WiFi> 1.0
|-- <ESPAsyncWebServer-esphome> 2.0.0
|   |-- <ESPAsyncTCP-esphome> 1.2.3
|   |   |-- <ESP8266WiFi> 1.0
|   |-- <Hash> 1.0
|   |-- <ESP8266WiFi> 1.0
|   |-- <ArduinoJson-esphomelib> 5.13.3
|-- <ESP8266WiFi> 1.0
|-- <noise-c> 0.1.4
|   |-- <libsodium> 1.10018.1
|-- <ArduinoJson-esphomelib> 5.13.3
|-- <ESP8266mDNS> 1.2
|   |-- <ESP8266WiFi> 1.0
|-- <DNSServer> 1.1.1
|   |-- <ESP8266WiFi> 1.0
Compiling .pioenvs/esph_d1m1/src/esphome/components/adc/adc_sensor.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/api/api_connection.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/api/api_frame_helper.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/api/api_pb2.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/api/api_pb2_service.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/api/api_server.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/api/list_entities.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/api/proto.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/api/subscribe_state.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/api/user_services.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/api/util.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/binary_sensor/automation.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/binary_sensor/binary_sensor.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/binary_sensor/filter.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/captive_portal/captive_portal.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/debug/debug_component.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/esp8266/core.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/esp8266/gpio.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/esp8266/preferences.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/gpio/switch/gpio_switch.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/json/json_util.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/logger/logger.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/md5/md5.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/mdns/mdns_component.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/mdns/mdns_esp32_arduino.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/mdns/mdns_esp8266.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/mdns/mdns_esp_idf.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/network/util.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/ota/ota_backend_arduino_esp32.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/ota/ota_backend_arduino_esp8266.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/ota/ota_backend_esp_idf.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/ota/ota_component.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/restart/restart_switch.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/sensor/automation.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/sensor/filter.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/sensor/sensor.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/socket/bsd_sockets_impl.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/socket/lwip_raw_tcp_impl.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/status/status_binary_sensor.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/stream_server/stream_server.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/switch/automation.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/switch/switch.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/template/switch/template_switch.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/uart/switch/uart_switch.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/uart/uart.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/uart/uart_component.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/uart/uart_component_esp32_arduino.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/uart/uart_component_esp8266.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/uart/uart_component_esp_idf.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/web_server/web_server.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/web_server_base/web_server_base.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/wifi/wifi_component.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/wifi/wifi_component_esp32_arduino.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/wifi/wifi_component_esp8266.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/components/wifi/wifi_component_esp_idf.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/core/application.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/core/color.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/core/component.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/core/controller.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/core/entity_base.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/core/helpers.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/core/log.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/core/scheduler.cpp.o
Compiling .pioenvs/esph_d1m1/src/esphome/core/util.cpp.o
Compiling .pioenvs/esph_d1m1/src/main.cpp.o
Compiling .pioenvs/esph_d1m1/src/stream_server.cpp.o
Generating LD script .pioenvs/esph_d1m1/ld/local.eagle.app.v6.common.ld
Compiling .pioenvs/esph_d1m1/libfb1/ESP8266WiFi/BearSSLHelpers.cpp.o
Compiling .pioenvs/esph_d1m1/libfb1/ESP8266WiFi/CertStoreBearSSL.cpp.o
src/stream_server.cpp: In member function 'void StreamServerComponent::read()':
src/stream_server.cpp:59:65: error: 'min' was not declared in this scope
         size_t read = this->stream_->readBytes(buf, min(len, 128));
                                                                 ^
src/stream_server.cpp:59:65: note: suggested alternative:
In file included from /config/.esphome/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/4.8.2/algorithm:62:0,
                 from src/esphome/core/optional.h:19,
                 from src/esphome/core/component.h:7,
                 from src/stream_server.h:19,
                 from src/stream_server.cpp:17:
/config/.esphome/platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/4.8.2/bits/stl_algo.h:4226:5: note:   'std::min'
     min(initializer_list<_Tp> __l, _Compare __comp)
     ^
In file included from src/stream_server.cpp:19:0:
src/stream_server.cpp: In member function 'virtual void StreamServerComponent::dump_config()':
src/stream_server.cpp:75:64: error: 'network_get_address' was not declared in this scope
     ESP_LOGCONFIG(TAG, "  Address: %s:%u", network_get_address().c_str(), this->port_);
                                                                ^
src/esphome/core/log.h:97:90: note: in definition of macro 'esph_log_config'
   esp_log_printf_(ESPHOME_LOG_LEVEL_CONFIG, tag, __LINE__, ESPHOME_LOG_FORMAT(format), ##__VA_ARGS__)
                                                                                          ^
src/stream_server.cpp:75:5: note: in expansion of macro 'ESP_LOGCONFIG'
     ESP_LOGCONFIG(TAG, "  Address: %s:%u", network_get_address().c_str(), this->port_);
     ^
*** [.pioenvs/esph_d1m1/src/stream_server.cpp.o] Error 1
========================= [FAILED] Took 47.96 seconds =========================