After fiddling with platformio vscode, I decided to use directly platformio core.
I am using ESP8266 with OTA programming.
If I type
pio run -t upload --upload-port 192.168.1.144
everything is fine. But I would prefer to insert the IP in the env setting of the project, to avoid errors (sending the code to the wrong device).
I thus set us the platformio.ini as
platform = espressif8266
lib_extra_dirs = …/Arduino_LIBS
board = nodemcuv2
framework = arduino
upload-port = 192.168.1.144
But it does not work when I type
pio run -t upload
Looking for upload port…
Error: Please specify
upload_port for environment or use global
For some development platforms it can be a USB flash drive (i.e. /media//)
*** [upload] Explicit exit, status 1
Thanks for any hint.