﻿# Installation – Shelly Firmware Manager v1.5.0

This guide applies to an ESP32-C6 board with 4 MB flash and the partition
table shipped with this release. Check the board revision and flash size
before flashing. The firmware is a prototype and not hardware-certified.

## Verify checksums

In PowerShell, in the directory containing this guide:

```powershell
Get-FileHash -Algorithm SHA256 .\bootloader.bin
Get-FileHash -Algorithm SHA256 .\partitions.bin
Get-FileHash -Algorithm SHA256 .\firmware.bin
```

Compare the printed SHA-256 values with the entries in `SHA256SUMS.txt`.
Install only unmodified artifacts.

## First installation on a fresh ESP32-C6 (USB)

1. Install `esptool` in the documented version if it is not yet
   available:

   ```powershell
   python -m pip install esptool==4.8.9
   ```

2. Connect the board via USB and determine the COM port in Windows Device
   Manager. Replace `COMx` in the following command with that port.
3. Put the board into the ROM bootloader if the upload does not start
   automatically. On many boards: hold BOOT, press RESET briefly, and
   release BOOT when the command starts.
4. Run the following in the directory containing this guide:

   ```powershell
   python -m esptool --chip esp32c6 --port COMx write_flash 0x0 .\bootloader.bin 0x8000 .\partitions.bin 0x10000 .\firmware.bin
   ```

5. After the reboot, connect to the Wi-Fi network `FirmwareManager`
   (password `12345678`), open `http://192.168.4.1/`, and set up the
   Wi-Fi and manager credentials. The dashboard is then available at the
   IP address assigned by your router.

The flash is not fully erased. The flash addresses and partition table are
intended for the configured 4 MB ESP32-C6 configuration.

## Firmware update via OTA

OTA requires the manager to be running and reachable from a browser in the
same trusted local network.

1. Verify the checksum of `firmware.bin` as described above.
2. Open `http://<manager-ip-address>/update` in the browser and sign in
   with the manager credentials.
3. Select `firmware.bin` from this release and start the upload.
   Use only `firmware.bin`, not `bootloader.bin` or `partitions.bin`.
4. Wait for the success message; the ESP32 then reboots.

The OTA upload writes the inactive app slot and preserves the LittleFS
configuration. The firmware image must fit into the OTA app slot of the
partition table (1.75 MiB).

## Firmware update via USB

1. Verify `firmware.bin` and determine the COM port of the board.
2. If necessary, put the board into the ROM bootloader as described above.
3. In the directory containing this guide, update only the firmware
   partition:

   ```powershell
   python -m esptool --chip esp32c6 --port COMx write_flash 0x10000 .\firmware.bin
   ```

The bootloader and partition table are not rewritten; LittleFS with the
configuration and device data is preserved. This method requires the
partition table matching this release to be already installed on the board.
For a first installation, use the full steps above instead.

## Security notice

The web interface and OTA upload use unencrypted HTTP in this firmware.
Use OTA only in a trusted local network. Do not reuse credentials.
