Closed tube0013 closed 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 ==========================
@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
Yeah, I suppose this will need some refactoring to use the new networking APIs.
Similar issue here with esphome 2021.10.2
I also experience the same issue :(
@oxan when this will be pushed to repo?
the stream-server component no longer builds in esphome 2021.10.0: