pio_upload_ota
Flash firmware over Wi-Fi to an ESP32/ESP8266 via ArduinoOTA, building the current image first and diagnosing connection, auth, or OTA partition errors.
Instructions
Flash firmware over Wi-Fi to an ESP32/ESP8266 running ArduinoOTA (espota). Give host (IP or name.local); port defaults to 3232 (ESP32) / 8266 (ESP8266) and auth is the ArduinoOTA password. By default it resolves and pings the host first, then runs pio run -t upload --upload-port <host> so the image matches the current build; build=false sends the existing .pio/build//firmware.bin with espota.py directly. filesystem=true sends the SPIFFS/LittleFS image instead. Failures are mapped to what to fix: no_response (ArduinoOTA.handle not running), auth_failed, no_callback (firewall), device_rejected (partition table has no OTA slot). Blocked under build_only/read_only policy.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | ||
| auth | No | ||
| host | Yes | ||
| port | No | ||
| build | No | ||
| timeout_s | No | ||
| filesystem | No | ||
| project_dir | No | ||
| verify_reachable | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||