# Arduino OTA from PlatformIO

**URL:** <https://wled.discourse.group/t/arduino-ota-from-platformio/2432>\
**Category:** Questions\
**Created:** [March 4, 2021, 8:03pm UTC](https://wled.discourse.group/t/arduino-ota-from-platformio/2432 "2021-03-04T20:03:51Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![peter](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@peter](https://wled.discourse.group/u/peter)\
**Post date:** [March 4, 2021, 8:03pm UTC](https://wled.discourse.group/t/arduino-ota-from-platformio/2432/1 "2021-03-04T20:03:51Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![peter](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@peter](https://wled.discourse.group/u/peter)\
**Post date:** [March 5, 2021, 2:07pm UTC](https://wled.discourse.group/t/arduino-ota-from-platformio/2432/2 "2021-03-05T14:07:40Z")

</div>

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. 🙂

---

<div class="post-metadata">

**Author:** ![Dlay\_71](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/dlay_71/32/5857_2.png) [@Dlay\_71](https://wled.discourse.group/u/Dlay_71)\
**Post date:** [September 30, 2023, 4:10pm UTC](https://wled.discourse.group/t/arduino-ota-from-platformio/2432/3 "2023-09-30T16:10:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![peter](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@peter](https://wled.discourse.group/u/peter)\
**Post date:** [October 1, 2023, 6:21pm UTC](https://wled.discourse.group/t/arduino-ota-from-platformio/2432/4 "2023-10-01T18:21:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![divsys](https://avatars.discourse-cdn.com/v4/letter/d/a3d4f5/32.png) [@divsys](https://wled.discourse.group/u/divsys)\
**Post date:** [October 2, 2023, 2:26pm UTC](https://wled.discourse.group/t/arduino-ota-from-platformio/2432/5 "2023-10-02T14:26:15Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Dlay\_71](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/dlay_71/32/5857_2.png) [@Dlay\_71](https://wled.discourse.group/u/Dlay_71)\
**Post date:** [October 2, 2023, 9:37pm UTC](https://wled.discourse.group/t/arduino-ota-from-platformio/2432/6 "2023-10-02T21:37:12Z")

</div>

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](https://global.discourse-cdn.com/free1/uploads/wled/original/2X/3/30585fa40aa46f17eeaa4741920fd6bc05e8a1cb.png)

---

<div class="post-metadata">

**Author:** ![divsys](https://avatars.discourse-cdn.com/v4/letter/d/a3d4f5/32.png) [@divsys](https://wled.discourse.group/u/divsys)\
**Post date:** [October 3, 2023, 1:56am UTC](https://wled.discourse.group/t/arduino-ota-from-platformio/2432/7 "2023-10-03T01:56:16Z")

</div>

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)?

---

<div class="post-metadata">

**Author:** ![netmindz](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/netmindz/32/304_2.png) [@netmindz](https://wled.discourse.group/u/netmindz)\
**Post date:** [August 20, 2025, 10:43pm UTC](https://wled.discourse.group/t/arduino-ota-from-platformio/2432/8 "2025-08-20T22:43:10Z")

</div>

Does this still work for you? I just get timeouts. What OS are you running?

---

<div class="post-metadata">

**Author:** ![blazoncek](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/blazoncek/32/1886_2.png) [@blazoncek](https://wled.discourse.group/u/blazoncek)\
**Post date:** [August 21, 2025, 7:39am UTC](https://wled.discourse.group/t/arduino-ota-from-platformio/2432/9 "2025-08-21T07:39:29Z")

</div>

ArduinoOTA is not compiled in by default in 0.16 (since #4748). You will need to define `-D WLED_ENABLE_AOTA` macro, compile and upload via HTTP.

Once that is done you can update firmware OTA from PlatformIO by using this in your build environment:

```ini
[env:your_env]
...
upload_protocol = espota
upload_port="192.168.x.x"
...

```

You can substitute IP address with mDNS name, i.e. “wled.local”.

After that, hit “Upload” in PIO.
