Skip to content

Installation and upgrade

Yurii edited this page Nov 25, 2026 · 5 revisions

Installation and upgrade

English · Русский

Installation uses 2 images — the firmware and the filesystem containing the web interface. Both must be for your ESP32 board, from the same version and build environment. A configured device needs a settings backup before updating.

First installation

The compatibility table lists each board's build environment. For example, the files for s3_mini have the following names.

Filename pattern Use
firmware_s3_mini_<version>.factory.bin First installation or serial recovery. The image includes the bootloader, partition table and application.
filesystem_s3_mini_<version>.bin Matching web interface and filesystem, used for both first installation and an upgrade.
firmware_s3_mini_<version>.bin Application update through the web interface's firmware field.

Ready-to-install files are attached to each release. Development builds can also be built from the corresponding source checkout.

Web Flasher

  1. Open the OTGateway Web Flasher on your computer in a browser that supports Web Serial, such as Chrome or Edge.
  2. Select the firmware Version, then select your Board. If your version or board is missing, use the ESP Flash Download Tool.
  3. Connect the ESP32 to your computer by USB or through a USB-to-UART adapter.
  4. Click Connect. In the browser dialog, select the board’s serial port and confirm the connection.
  5. Click Flash and wait for the write to finish.
  6. Restart the ESP32, then set up Wi-Fi and check the OpenTherm connection.

ESP Flash Download Tool

Warning

ERASE clears the board’s entire flash memory. Before erasing flash or writing the filesystem on a configured device, make a settings backup.

  1. Download the Flash Download Tool for Windows and extract the archive.
  2. From the OTGateway release, download the firmware image ending in .factory.bin and the filesystem image for your board. The example below uses s3_mini with the standard partition layout. In the filenames, <version> stands for the release number.
  3. Start the tool. In ChipType, select your board’s chip (ESP32-S3 for s3_mini). In WorkMode, select Develop.
  4. On the SPIDownload tab, select the firmware image firmware_s3_mini_<version>.factory.bin in the first row. Enter 0x0 as the address and check the box for that row.
  5. In the second row, select the filesystem image filesystem_s3_mini_<version>.bin. Enter 0x370000 as the address and check the box.
  6. Connect the ESP32 to your computer by USB or through a USB-to-UART adapter. Select the board’s port in COM and set BAUD to 921600.
  7. If you want to erase the entire flash before installing, click ERASE and wait for it to finish.
  8. Click START and wait for both images to finish writing.
  9. Restart the ESP32, then set up Wi-Fi and check the OpenTherm connection.

Build from source

Source builds use PlatformIO with the checkout for the desired version. The web interface requires Node.js with npm. The project's build workflow uses Python 3.13 and Node.js 22.

The board environment is built from the project root. The command for S3 mini is:

pio run -e s3_mini

The build for your PlatformIO board environment runs Gulp, builds the filesystem and copies the versioned artifacts into build/. Later core dump analysis requires the corresponding .elf alongside the binaries.

Backup, update and restore

Save the settings

The Backup button on the web interface's Upgrade page saves settings before an update. The browser downloads a JSON backup of your settings.

Warning

GET /api/backup/save exports network, settings and sensors, including Wi-Fi, web interface and MQTT credentials. The JSON must be stored privately.

Update firmware and filesystem

  1. Download the firmware and filesystem images for your board from the same release.
  2. On the Upgrade page, select the files in Firmware and Filesystem, then click Upgrade. Wait for writing to finish and the ESP32 to restart. For serial flashing, use the addresses given in the selected release's instructions.
  3. Reopen the web interface and reload the page so the browser uses the new scripts. If replacing the filesystem reset the network settings, connect to the OTGateway access point and configure Wi-Fi.

The filesystem contains the web pages and scripts. Both images need to be updated together so that their versions match.

Restore the settings

  1. On the Upgrade page, select the saved JSON backup and click Restore. Wait for the device to restart.
  2. Check network access, units and GPIO assignments. Under Sensors settings, check names, types and addresses, then check the readings on the Dashboard.
  3. Check the control mode, temperature limits, setpoints and disabled circuits.

The web interface converts older settings to the current format when restoring a JSON backup.

Important

Settings are restored through several requests. If restoration stops partway, accepted changes remain applied. A retry needs to account for the sections already restored.

A JSON containing only the required sections allows a partial restore. A sensor's settings are matched by its numeric ID.

MQTT and Home Assistant migration

After updating, applications and automations need to use the current topics and command addresses. The MQTT reference lists topics and access rights. The sensor examples explain how to supply readings from another system.

The previous MQTT prefix lets Home Assistant recognize the device. The Climate and PID entities used in dashboards and automations may need to be checked after an update. Changing a setting from Home Assistant provides a simple check: OTGateway should return the new value.

If many entities on the device page are unavailable after updating, the instructions for refreshing the OTGateway entity list in Home Assistant explain the recovery procedure.

Clone this wiki locally