oxan / esphome-stream-server

Stream server (serial-to-wifi bridge) for ESPHome
Other
201 stars 86 forks source link

esphome 2021.10.0 breaks component #6

Closed tube0013 closed 3 years ago

tube0013 commented 3 years ago

the stream-server component no longer builds in esphome 2021.10.0:

INFO Reading configuration /config/esphome/serial-over-ip.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing serial-over-ip (board: esp-wrover-kit; framework: arduino; platform: espressif32 @ 3.3.2)
--------------------------------------------------------------------------------
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
PACKAGES: 
 - framework-arduinoespressif32 3.10006.210326 (1.0.6) 
 - tool-esptoolpy 1.30100.210531 (3.1.0) 
 - toolchain-xtensa32 2.50200.97 (5.2.0)
LDF Modes: Finder ~ off, Compatibility ~ soft
Dependency Graph
|-- <AsyncTCP-esphome> 1.2.2
|-- <WiFi> 1.0
|-- <FS> 1.0
|-- <Update> 1.0
|-- <ESPAsyncWebServer-esphome> 1.3.0
|   |-- <AsyncTCP-esphome> 1.2.2
|-- <ArduinoJson-esphomelib> 5.13.3
|-- <ESPmDNS> 1.0
Compiling /data/serial-over-ip/.pioenvs/serial-over-ip/src/esphome/components/stream_server/stream_server.cpp.o
In file included from /data/serial-over-ip/.piolibdeps/serial-over-ip/AsyncTCP-esphome/src/AsyncTCP.h:29:0,
                 from src/esphome/components/stream_server/stream_server.h:30,
                 from src/esphome/components/stream_server/stream_server.cpp:17:
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/semphr.h:74:3: error: #error "include FreeRTOS.h" must appear in source files before "include semphr.h"
  #error "include FreeRTOS.h" must appear in source files before "include semphr.h"
   ^
In file included from /data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/semphr.h:77:0,
                 from /data/serial-over-ip/.piolibdeps/serial-over-ip/AsyncTCP-esphome/src/AsyncTCP.h:29,
                 from src/esphome/components/stream_server/stream_server.h:30,
                 from src/esphome/components/stream_server/stream_server.cpp:17:
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:75:3: error: #error "include FreeRTOS.h" must appear in source files before "include queue.h"
  #error "include FreeRTOS.h" must appear in source files before "include queue.h"
   ^
Compiling /data/serial-over-ip/.pioenvs/serial-over-ip/src/main.cpp.o
Compiling /data/serial-over-ip/.pioenvs/serial-over-ip/src/stream_server.cpp.o
In file included from /data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/semphr.h:77:0,
                 from /data/serial-over-ip/.piolibdeps/serial-over-ip/AsyncTCP-esphome/src/AsyncTCP.h:29,
                 from src/esphome/components/stream_server/stream_server.h:30,
                 from src/esphome/components/stream_server/stream_server.cpp:17:
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:613:1: error: 'BaseType_t' does not name a type
 BaseType_t xQueueGenericSend( QueueHandle_t xQueue, const void * const pvItemToQueue, TickType_t xTicksToWait, const BaseType_t xCopyPosition ) PRIVILEGED_FUNCTION;
 ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:725:1: error: 'BaseType_t' does not name a type
 BaseType_t xQueuePeekFromISR( QueueHandle_t xQueue, void * const pvBuffer ) PRIVILEGED_FUNCTION;
 ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:906:1: error: 'BaseType_t' does not name a type
 BaseType_t xQueueGenericReceive( QueueHandle_t xQueue, void * const pvBuffer, TickType_t xTicksToWait, const BaseType_t xJustPeek ) PRIVILEGED_FUNCTION;
 ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:917:1: error: 'UBaseType_t' does not name a type
 UBaseType_t uxQueueMessagesWaiting( const QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;
 ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:930:1: error: 'UBaseType_t' does not name a type
 UBaseType_t uxQueueSpacesAvailable( const QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;
 ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:940:43: error: expected initializer before 'PRIVILEGED_FUNCTION'
 void vQueueDelete( QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;
                                           ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:1267:1: error: 'BaseType_t' does not name a type
 BaseType_t xQueueGenericSendFromISR( QueueHandle_t xQueue, const void * const pvItemToQueue, BaseType_t * const pxHigherPriorityTaskWoken, const BaseType_t xCopyPosition ) PRIVILEGED_FUNCTION;
 ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:1268:1: error: 'BaseType_t' does not name a type
 BaseType_t xQueueGiveFromISR( QueueHandle_t xQueue, BaseType_t * const pxHigherPriorityTaskWoken ) PRIVILEGED_FUNCTION;
 ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:1347:1: error: 'BaseType_t' does not name a type
 BaseType_t xQueueReceiveFromISR( QueueHandle_t xQueue, void * const pvBuffer, BaseType_t * const pxHigherPriorityTaskWoken ) PRIVILEGED_FUNCTION;
 ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:1354:1: error: 'BaseType_t' does not name a type
 BaseType_t xQueueIsQueueEmptyFromISR( const QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;
 ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:1355:1: error: 'BaseType_t' does not name a type
 BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;
 ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:1356:1: error: 'UBaseType_t' does not name a type
 UBaseType_t uxQueueMessagesWaitingFromISR( const QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;
 ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:1374:1: error: 'BaseType_t' does not name a type
 BaseType_t xQueueAltGenericSend( QueueHandle_t xQueue, const void * const pvItemToQueue, TickType_t xTicksToWait, BaseType_t xCopyPosition );
 ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:1375:1: error: 'BaseType_t' does not name a type
 BaseType_t xQueueAltGenericReceive( QueueHandle_t xQueue, void * const pvBuffer, TickType_t xTicksToWait, BaseType_t xJustPeeking );
 ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:1390:1: error: 'BaseType_t' does not name a type
 BaseType_t xQueueCRSendFromISR( QueueHandle_t xQueue, const void *pvItemToQueue, BaseType_t xCoRoutinePreviouslyWoken );
 ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:1391:1: error: 'BaseType_t' does not name a type
 BaseType_t xQueueCRReceiveFromISR( QueueHandle_t xQueue, void *pvBuffer, BaseType_t *pxTaskWoken );
 ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:1392:1: error: 'BaseType_t' does not name a type
 BaseType_t xQueueCRSend( QueueHandle_t xQueue, const void *pvItemToQueue, TickType_t xTicksToWait );
 ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:1393:1: error: 'BaseType_t' does not name a type
 BaseType_t xQueueCRReceive( QueueHandle_t xQueue, void *pvBuffer, TickType_t xTicksToWait );
 ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:1400:62: error: expected initializer before 'PRIVILEGED_FUNCTION'
 QueueHandle_t xQueueCreateMutex( const uint8_t ucQueueType ) PRIVILEGED_FUNCTION;
                                                              ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:1401:67: error: 'StaticQueue_t' has not been declared
 QueueHandle_t xQueueCreateMutexStatic( const uint8_t ucQueueType, StaticQueue_t *pxStaticQueue ) PRIVILEGED_FUNCTION;
                                                                   ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:1401:98: error: expected initializer before 'PRIVILEGED_FUNCTION'
 QueueHandle_t xQueueCreateMutexStatic( const uint8_t ucQueueType, StaticQueue_t *pxStaticQueue ) PRIVILEGED_FUNCTION;
                                                                                                  ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:1402:52: error: 'UBaseType_t' does not name a type
 QueueHandle_t xQueueCreateCountingSemaphore( const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount ) PRIVILEGED_FUNCTION;
                                                    ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:1402:82: error: 'UBaseType_t' does not name a type
 QueueHandle_t xQueueCreateCountingSemaphore( const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount ) PRIVILEGED_FUNCTION;
                                                                                  ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:1402:111: error: expected initializer before 'PRIVILEGED_FUNCTION'
 QueueHandle_t xQueueCreateCountingSemaphore( const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount ) PRIVILEGED_FUNCTION;
                                                                                                               ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:1403:58: error: 'UBaseType_t' does not name a type
 QueueHandle_t xQueueCreateCountingSemaphoreStatic( const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount, StaticQueue_t *pxStaticQueue ) PRIVILEGED_FUNCTION;
                                                          ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:1403:88: error: 'UBaseType_t' does not name a type
 QueueHandle_t xQueueCreateCountingSemaphoreStatic( const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount, StaticQueue_t *pxStaticQueue ) PRIVILEGED_FUNCTION;
                                                                                        ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:1403:116: error: 'StaticQueue_t' has not been declared
 QueueHandle_t xQueueCreateCountingSemaphoreStatic( const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount, StaticQueue_t *pxStaticQueue ) PRIVILEGED_FUNCTION;
                                                                                                                    ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:1403:147: error: expected initializer before 'PRIVILEGED_FUNCTION'
 QueueHandle_t xQueueCreateCountingSemaphoreStatic( const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount, StaticQueue_t *pxStaticQueue ) PRIVILEGED_FUNCTION;
                                                                                                                                                   ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:1404:56: error: expected initializer before 'PRIVILEGED_FUNCTION'
 void* xQueueGetMutexHolder( QueueHandle_t xSemaphore ) PRIVILEGED_FUNCTION;
                                                        ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:1410:1: error: 'BaseType_t' does not name a type
 BaseType_t xQueueTakeMutexRecursive( QueueHandle_t xMutex, TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;
 ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:1411:1: error: 'BaseType_t' does not name a type
 BaseType_t xQueueGiveMutexRecursive( QueueHandle_t pxMutex ) PRIVILEGED_FUNCTION;
 ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:1548:41: error: 'UBaseType_t' does not name a type
 QueueSetHandle_t xQueueCreateSet( const UBaseType_t uxEventQueueLength ) PRIVILEGED_FUNCTION;
                                         ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:1548:74: error: expected initializer before 'PRIVILEGED_FUNCTION'
 QueueSetHandle_t xQueueCreateSet( const UBaseType_t uxEventQueueLength ) PRIVILEGED_FUNCTION;
                                                                          ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:1572:1: error: 'BaseType_t' does not name a type
 BaseType_t xQueueAddToSet( QueueSetMemberHandle_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet ) PRIVILEGED_FUNCTION;
 ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:1591:1: error: 'BaseType_t' does not name a type
 BaseType_t xQueueRemoveFromSet( QueueSetMemberHandle_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet ) PRIVILEGED_FUNCTION;
 ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:1627:79: error: 'TickType_t' does not name a type
 QueueSetMemberHandle_t xQueueSelectFromSet( QueueSetHandle_t xQueueSet, const TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;
                                                                               ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:1627:105: error: expected initializer before 'PRIVILEGED_FUNCTION'
 QueueSetMemberHandle_t xQueueSelectFromSet( QueueSetHandle_t xQueueSet, const TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;
                                                                                                         ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:1632:81: error: expected initializer before 'PRIVILEGED_FUNCTION'
 QueueSetMemberHandle_t xQueueSelectFromSetFromISR( QueueSetHandle_t xQueueSet ) PRIVILEGED_FUNCTION;
                                                                                 ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:1636:60: error: 'TickType_t' has not been declared
 void vQueueWaitForMessageRestricted( QueueHandle_t xQueue, TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;
                                                            ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:1636:86: error: expected initializer before 'PRIVILEGED_FUNCTION'
 void vQueueWaitForMessageRestricted( QueueHandle_t xQueue, TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;
                                                                                      ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:1637:1: error: 'BaseType_t' does not name a type
 BaseType_t xQueueGenericReset( QueueHandle_t xQueue, BaseType_t xNewQueue ) PRIVILEGED_FUNCTION;
 ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:1638:50: error: 'UBaseType_t' has not been declared
 void vQueueSetQueueNumber( QueueHandle_t xQueue, UBaseType_t uxQueueNumber ) PRIVILEGED_FUNCTION;
                                                  ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:1638:78: error: expected initializer before 'PRIVILEGED_FUNCTION'
 void vQueueSetQueueNumber( QueueHandle_t xQueue, UBaseType_t uxQueueNumber ) PRIVILEGED_FUNCTION;
                                                                              ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:1639:1: error: 'UBaseType_t' does not name a type
 UBaseType_t uxQueueGetQueueNumber( QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;
 ^
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/queue.h:1640:53: error: expected initializer before 'PRIVILEGED_FUNCTION'
 uint8_t ucQueueGetQueueType( QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;
                                                     ^
In file included from src/esphome/components/stream_server/stream_server.cpp:17:0:
src/esphome/components/stream_server/stream_server.h: In member function 'void StreamServerComponent::set_uart_parent(esphome::uart::UARTComponent*)':
src/esphome/components/stream_server/stream_server.h:37:80: error: cannot convert 'esphome::uart::UARTComponent*' to 'Stream*' in assignment
     void set_uart_parent(esphome::uart::UARTComponent *parent) { this->stream_ = parent; }
                                                                                ^
src/esphome/components/stream_server/stream_server.cpp: In member function 'void StreamServerComponent::read()':
src/esphome/components/stream_server/stream_server.cpp:59:65: error: 'min' was not declared in this scope
         size_t read = this->stream_->readBytes(buf, min(len, 128));
                                                                 ^
src/esphome/components/stream_server/stream_server.cpp:59:65: note: suggested alternative:
In file included from /data/cache/platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/5.2.0/algorithm:62:0,
                 from src/esphome/core/optional.h:19,
                 from src/esphome/core/component.h:7,
                 from src/esphome/components/stream_server/stream_server.h:19,
                 from src/esphome/components/stream_server/stream_server.cpp:17:
/data/cache/platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/5.2.0/bits/stl_algo.h:3451: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/stream_server/stream_server.h:20,
                 from src/esphome/components/stream_server/stream_server.cpp:17:
src/esphome/components/stream_server/stream_server.cpp: In member function 'virtual void StreamServerComponent::dump_config()':
src/esphome/components/stream_server/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/esphome/components/stream_server/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_);
     ^
src/stream_server.cpp: In member function 'void StreamServerComponent::read()':
src/stream_server.cpp:60:65: error: 'min' was not declared in this scope
         size_t read = this->stream_->readBytes(buf, min(len, 128));
                                                                 ^
src/stream_server.cpp:60:65: note: suggested alternative:
In file included from /data/cache/platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/5.2.0/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:18:
/data/cache/platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/5.2.0/bits/stl_algo.h:3451:5: note:   'std::min'
     min(initializer_list<_Tp> __l, _Compare __comp)
     ^
In file included from src/stream_server.cpp:20:0:
src/stream_server.cpp: In member function 'virtual void StreamServerComponent::dump_config()':
src/stream_server.cpp:76: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:76:5: note: in expansion of macro 'ESP_LOGCONFIG'
     ESP_LOGCONFIG(TAG, "  Address: %s:%u", network_get_address().c_str(), this->port_);
     ^
Archiving /data/serial-over-ip/.pioenvs/serial-over-ip/lib915/libESPmDNS.a
Compiling /data/serial-over-ip/.pioenvs/serial-over-ip/FrameworkArduino/FunctionalInterrupt.cpp.o
*** [/data/serial-over-ip/.pioenvs/serial-over-ip/src/esphome/components/stream_server/stream_server.cpp.o] Error 1
Compiling /data/serial-over-ip/.pioenvs/serial-over-ip/FrameworkArduino/HardwareSerial.cpp.o
*** [/data/serial-over-ip/.pioenvs/serial-over-ip/src/stream_server.cpp.o] Error 1
In file included from src/esphome.h:37:0,
                 from src/main.cpp:3:
src/esphome/components/stream_server/stream_server.h: In member function 'void StreamServerComponent::set_uart_parent(esphome::uart::UARTComponent*)':
src/esphome/components/stream_server/stream_server.h:37:80: error: cannot convert 'esphome::uart::UARTComponent*' to 'Stream*' in assignment
     void set_uart_parent(esphome::uart::UARTComponent *parent) { this->stream_ = parent; }
                                                                                ^
*** [/data/serial-over-ip/.pioenvs/serial-over-ip/src/main.cpp.o] Error 1
========================== [FAILED] Took 6.41 seconds ==========================
jeroen85 commented 3 years ago

Similar problem.

Compiling .pioenvs/rflink/src/esphome/components/stream_server/stream_server.cpp.o
Compiling .pioenvs/rflink/src/esphome/components/switch/switch.cpp.o
In file included from src/esphome/components/stream_server/stream_server.cpp:17:0:
src/esphome/components/stream_server/stream_server.h: In member function 'void StreamServerComponent::set_uart_parent(esphome::uart::UARTComponent*)':
src/esphome/components/stream_server/stream_server.h:37:80: error: cannot convert 'esphome::uart::UARTComponent*' to 'Stream*' in assignment
     void set_uart_parent(esphome::uart::UARTComponent *parent) { this->stream_ = parent; }
                                                                                ^
src/esphome/components/stream_server/stream_server.cpp: In member function 'void StreamServerComponent::read()':
src/esphome/components/stream_server/stream_server.cpp:59:65: error: 'min' was not declared in this scope
         size_t read = this->stream_->readBytes(buf, min(len, 128));
                                                                 ^
src/esphome/components/stream_server/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/esphome/components/stream_server/stream_server.h:19,
                 from src/esphome/components/stream_server/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/esphome/components/uart/uart.h:6:0,
                 from src/esphome/components/stream_server/stream_server.h:20,
                 from src/esphome/components/stream_server/stream_server.cpp:17:
src/esphome/components/stream_server/stream_server.cpp: In member function 'virtual void StreamServerComponent::dump_config()':
src/esphome/components/stream_server/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/esphome/components/stream_server/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_);
     ^
Compiling .pioenvs/rflink/src/esphome/components/template/text_sensor/template_text_sensor.cpp.o
*** [.pioenvs/rflink/src/esphome/components/stream_server/stream_server.cpp.o] Error 1
========================== [FAILED] Took 6.09 seconds ==========================
tube0013 commented 3 years ago

@jjansen85 this is also what I got as well when I added in an include for freertos at the top of the includes in stream_server.h

oxan commented 3 years ago

Yeah, I suppose this will need some refactoring to use the new networking APIs.

Fran6u commented 3 years ago

Similar issue here with esphome 2021.10.2

DJ-Nek commented 3 years ago

I also experience the same issue :(

mercenaruss commented 3 years ago

@oxan when this will be pushed to repo?