Files
libretiny/docs/flashing/esphome.md
2023-08-17 17:17:10 +02:00

2.1 KiB

Flashing ESPHome

!!! tip See the Cloudcutter video guide for a complete tutorial on flashing with Cloudcutter and installing LibreTiny-ESPHome. Includes Home Assistant Add-On setup.

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.

If you're using the GUI (ESPHome Dashboard) this path will be in your `configs/` directory.

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

Built-in flasher

=== "CLI"

The flasher program built-in LibreTiny 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

<!-- the line below needs to be indented by 4 spaces!!!  -->
{%
	include-markdown "../inc/uart-info.md"
%}

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

=== "GUI"

The built-in flasher is not yet available in the GUI. Here are your options:

- OTA, using the downloaded UF2 file (if you're already running ESPHome)
- wired (also UF2), using [ltchiptool](tools/ltchiptool.md)
- wirelessly, using tuya-cloudcutter

Read below for more details on each of these methods.

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" %}