Confusion about version of ESP8266 Core [SOLVED]

I try to stream a large JSON through a parser via ESP8266HTTPClient.h

This example is exactly what I need: http.begin(client, link)

But this won’t compile with PIO…
Looking into the library used in the example, it has the used function added.
Copying .cpp/.h over into my installed PIO library solves my problem (not sure if that naive move creates new issues tho) and the project compiles fine - and works :slight_smile:

My question now: What repository/version of the ESP8266 core is used in PIO and how would one up-/sidegrade onto the one I linked in? Or are there other pitfalls ahead, because PIO uses modified version, etc.?
And how would a real developer solve the problem I described?

Sorry for those noob-questions, this whole PIO in VSC business is quite new to me and all those frameworks, libs, dependencies, parsers, compilers, rules, etc. on top of each other make me dizzy…

The current PlatformIO ESP8266 core is the stable 2.4.2…

Since that library (ESP8266HTTPClient) seems to have had some work done to it a couple of months ago, I don’t think it’ll be bundled with PlatformIO core until the stable version of 2.5.0 is released (which may not be that far away). Until then, you can probably just install the updated version in the lib folder of your project.

It should be possible to install the latest bleading edge version of the ESP8266 Arduino core via these instructions.


As always: Easy fix, thanks a lot!
adding this to my platformio.ini did the trick:
platform =

1 Like

Alright, so main.cpp compiles now, but SPIFFS (which I also use) seems to have received some changes too, so that fails now. And FS upload from PIO IDE is also now broken:
Building SPIFFS image from 'data' directory to .pioenvs/nodemcuv2/spiffs.bin
<usually you get a list of files here...>
*** [.pioenvs/nodemcuv2/spiffs.bin] Error -8

So I got back to my initial fix and updated the ESP8266HTTPclient .cpp/.h only for the time being…