Once again I am revisiting code that used to build just fine and now it does not… Apparently, the influxdb code uses WifiClientSecure.h but that has now disappeared from platform = espressif32. How could this be? (It is even stranger in that I am not using WIFI in this app, but rather using an esp32 boad with ethernet interface). Do I need to “freeze” my espressif version each time I successfully build a project if I want to expect it to be buildable in the future? Advice here is greatly appreciated.
Compiling .pio\build\wt32-eth01\libea7\ESP8266 Influxdb\Point.cpp.o
.pio/libdeps/wt32-eth01/ESP8266 Influxdb/src/HTTPService.cpp: In constructor 'HTTPService::HTTPService(ConnectionInfo*)':
.pio/libdeps/wt32-eth01/ESP8266 Influxdb/src/HTTPService.cpp:37:5: error: 'WiFiClientSecure' was not declared in this scope; did you mean 'WiFiClientRxBuffer'?
37 | WiFiClientSecure *wifiClientSec = new WiFiClientSecure;
| ^~~~~~~~~~~~~~~~
| WiFiClientRxBuffer
.pio/libdeps/wt32-eth01/ESP8266 Influxdb/src/HTTPService.cpp:37:23: error: 'wifiClientSec' was not declared in this scope; did you mean '_wifiClient'?
37 | WiFiClientSecure *wifiClientSec = new WiFiClientSecure;
| ^~~~~~~~~~~~~
| _wifiClient
.pio/libdeps/wt32-eth01/ESP8266 Influxdb/src/HTTPService.cpp:37:43: error: 'WiFiClientSecure' does not name a type; did you mean 'WiFiClientRxBuffer'?
37 | WiFiClientSecure *wifiClientSec = new WiFiClientSecure;
| ^~~~~~~~~~~~~~~~
| WiFiClientRxBuffer
*** [.pio\build\wt32-eth01\libea7\ESP8266 Influxdb\HTTPService.cpp.o] Error 1
The Arduino-ESP32 3.x framework looks like https://github.com/Jason2866/platform-espressif32.git#Arduino/IDF5, which is a major version change from 2.x, so many things break. The library repo also has in one of its issues that it’s not compatible with the 1.x core. So, better stay safe by sticking to the current last stable version of the framework, which is 2.x.
My platform builds are not fully compatible to official ones. The are a fork just made for the project Tasmota. So there are functions and libs removed (like WifiClientSecure) and sdkconfig settings are different set.The result is using less RAM and flash space.
As said from Max, for compability use the official provided from Platformio.