homieiot / homie-esp8266

💡 ESP8266 framework for Homie, a lightweight MQTT convention for the IoT
http://homieiot.github.io/homie-esp8266
MIT License
1.36k stars 308 forks source link

Homie isn't compatible with Espressif 8266 platform core v3.0.0 #711

Closed RunningPenguin closed 2 years ago

RunningPenguin commented 3 years ago

Hi,

I just updated my platform Espressif 8266 in PlatformIO from version 2.5.0 to version 3.0.0

image

Then some projects which are working with the "old" version stopped to work.

The first issue is these one: .pio/libdeps/d1_mini/Homie/src/Homie/Boot/BootConfig.cpp: In member function 'void HomieInternals::BootConfig::_proxyHttpRequest(AsyncWebServerRequest*)': .pio/libdeps/d1_mini/Homie/src/Homie/Boot/BootConfig.cpp:315:20: error: call to 'HTTPClient::begin' declared with attribute error: obsolete API, use ::begin(WiFiClient, url) 315 | _httpClient.begin(url); | ~~~~~~~~~~~~~~~~~^~~~~

I haven't investigated if there are more issues. Perhaps the fix is just to add three lines like described here: https://community.platformio.org/t/bool-httpclient-begin-string-is-deprecated/16924

But for the first the addition of the platform version in platformio.ini is a workaround

platform = espressif8266 @ 2.5.0

valpackett commented 3 years ago

add three lines like described here

Kinda, the fix is to add WiFiClient _wifiClient; to the class in BootConfig.hpp and then fix the call (_httpClient.begin(_wifiClient, url);)

mrRo8o7 commented 2 years ago

@unrelentingtech Thank you!