Arduino OTA from PlatformIO

Hi All. I’m just starting with WLED. I’m custom compiling in PlatformIO, as the project I’m putting together will (hopefully) use 2 or 3 small usermods. My esp32 is not easily accessible, so once I’ve got my base code in place I’m hoping I can disconnect the USB, get the unit into its final location, and flash the controller with OTA as I iterate the project.

I see that WLED supports the ArduinoOTA update mechanism, but can this also work when compiling from PlatformIO? I know OTA using .bin upload is a possibility, but ArduinoOTA would speed things up even more. I can’t see any specific tutorials or discussions here or on the GitHub wiki about using the ArduinoOTA.

For anyone else looking for a solution, I managed to get it working. Assuming you’ve already flashed the controller once via USB, then turned on the “Enable ArduinoOTA” setting on the web interface, you should only need to add the following two lines to the platformio.ini file:

upload_protocol = espota
upload_port = 192.168.1.65 ; replace with your IP or mDNS name

My ESP32 build settings block now looks like this:

[env:esp32dev]
board = esp32dev
platform = espressif32@2.0
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp32}
upload_protocol = espota
upload_port = 192.168.1.65
lib_ignore =
  ESPAsyncTCP
  ESPAsyncUDP

This has made iterating and flashing builds SOOOO much quicker and easier for me. :slight_smile:

Hi Peter,

i am new to the Arduino IDE. Can you give a hint on how to Update an ESP8266 WLED flashed device with ArduinoOTA?

Thanks for your effort.

Sorry. I’d have no special info on flashing via the Arduino IDE. I’ve only used PlatformIO.

What 8266 board are you running?
What version of WLED is currently loaded?

If you’re just looking to reflash the 8266 to a newer version of WLED, that should be builtin.

Look at the picture. There is all the information i have.
Manual OTA is disabled in that build, but ArduinoOTA is enabled.

My hope was to flash the Update to a newer Version that way.

image

Are you sure “Manual OTA” (under Config->Security & Updates->Software Update) is disabled ?
Normally that’s a large grey button you can click on to start the OTA process.

If you can’t click on it (and Arduino OTA is checked) perhaps you could try a different browser (and/or different PC)?