-
Notifications
You must be signed in to change notification settings - Fork 41
OTA Updates
Once you have flashed your Ai-Thinker LED RGBW light, you can upload newer versions of the AiLight firmware via OTA (Over The Air) using PlatformIO without your AiLight Jig or USB/UART (or equivalent) adapter.
To update the AiLight firmware via OTA, it is important to make sure that:
- the
upload_port
variable in yourplatformio.ini
configuration file matches the 'hostname' value from the Serial Monitor / Web UI. - the
ota_port
variable in yourplatformio.ini
configuration file matches 'OTA_PORT' variable in yourconfig.h
file.
Now you can start using OTA to upload any updates of the firmware over the air by either:
-
"Run other target" from the "PlatformIO" menu in Atom, and choose the "PIO Upload dev-ota" or "PIO Upload prod-ota" target, or
-
Using the terminal, executing the command
platformio run --target upload --environment %environment% --upload-port=%hostname%
where %environment% is the ota environment ("dev-ota" or "prod-ota") and %hostname% the hostname (or IP address) of your Ai-Thinker LED RGBW light.
Checkout the Building Environments page to understand the preconfigured environments.
PlatformIO will start compiling the firmware and initiating the upload:
While the firmware is being uploaded, a progress message is shown on the Web UI:
Sometimes OTA updates fail. This can happen and it is not a problem as the firmware does not get overwritten if the upload fails. Instead of using the hostname of your device, you might want to try using its IP address as that generally performs better.
Getting started
Home Assistant
Using the Firmware
Advanced topics