1. Download OTA image

Download the latest version of the OTA image from:

ZBMINI-L:https://github.com/Koenkk/zigbee-OTA/tree/master/images/Sonoff

2. Enable OTA in the configuration.yaml file

2.1 Get the path to configuration.yaml

Get the path to configuration.yaml on the [Configuration] – [Info] page in HA.

For example: /home/guozi/.homeassistant

2.2 Create a new folder for the OTA image

Enter the following command in the terminal window to create a folder to store the OTA image:

cd /home/guozi/.homeassistant

mkdir ota

2.3 Enable OTA

Add the following configuration to configuration.yaml:

zha:

   zigpy_config:

     ota:

       otau_directory: /home/guozi/.homeassistant/ota

3. Place the OTA at the specified path in the configuration file

Place the *.ota file downloaded in the first step in the /home/guozi/.homeassistant/ota, as shown in the figure:

5. Start OTA

5.1 The device automatically starts the OTA process

After the ZBMINI-L is successfully reconnected, the ZBMINI-L will start the OTA upgrade process within 1 minute.

5.2 Trigger OTA process on Home Assistant

On the [Configuration] page, go to [Devices] – [Manage Clusters] of ZBMINI-L to trigger the OTA process by sending the image_notify command in the OTA Cluster.

It takes about 10-30 minutes to upgrade ZBMINI-L. After the successful upgrade, you can see the current version information of the device in [Devices] – [Firmware].

2. HAOS

The way to enable OTA in HAOS is similar to the operation in HACore, the main difference is that the configuration.yaml path is different.

1. Get/enter the path to the configuration.yaml file

For example: the path to configuration.yaml configuration file is /config

You can enter the /config directory by doing the following steps:

  • Enter login to enter the bash shell

  • Enter docker ps to view the Container ID of the container Home Assistant

  • Enter docker exec -it Container ID /bin/bash
  • Enter ls to see the configuration.yaml file

  • mkdir ota , create an ota folder
  • Place the .ota file in the USB flash drive under the ota folder:
    • Insert the USB disk into the Raspberry Pi;
    • Enter the ls /dev/sd* command to view the device file of the USB disk. In the example, sda1 is the USB flash drive;
    • Enter the mount -o rw /dev/sda1 ~/usbdisk command to mount the USB disk;
    • Enter the cp ~/usbdisk/zbmini-l-1006.ota ./ota/ command to copy the .ota file in the USB disk to the /config/ota directory
  •  Add the following configuration information to configuration.yaml:

zha:

   zigpy_config:

     ota:

       otau_directory: ./ota

End~