Files
libretiny/docs/flashing/esphome.md
2023-01-18 14:59:36 +01:00

1.3 KiB

Flashing ESPHome

ESPHome can be flashed in few different ways, depending on your needs.

!!! abstract All binary files generated by ESPHome will be in .esphome/build/<yourdevice>/.pioenvs/<yourdevice>/. The methods described below may require you to get a file from that directory.

This path will be referred to as **build directory**.

Built-in flasher

The flasher program built-in LibreTuya is also available for ESPHome.

  • use python -m esphome run yourdevice.yml to recompile AND upload the firmware
  • use python -m esphome upload yourdevice.yml to upload without recompiling

{% include-markdown "inc/uart-info.md" %}

If your device is already running ESPHome, refer to the OTA guide below.

Over-the-Air (OTA)

This method requires having ESPHome already installed on your device.

  • If you've added the Web Server component, navigate to the device's IP address (or .local name) in your web browser. Grab firmware.uf2 from the build directory and drop it on the "OTA Update" field.
  • You can also use ESPHome CLI to flash via OTA. Add a --device argument to the command, as such: python -m esphome upload yourdevice.yml --device yourdevice.local

{% include-markdown "inc/uart-ltchiptool.md" %}

{% include-markdown "inc/ota-cloudcutter.md" %}

{% include-markdown "inc/ota-openbeken.md" %}