Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ZHA section about Zigbee OTA #28895

Open
wants to merge 10 commits into
base: current
Choose a base branch
from
52 changes: 21 additions & 31 deletions source/_integrations/zha.markdown
Expand Up @@ -221,6 +221,18 @@ Some devices can be auto-discovered, which can simplify the ZHA setup process. T

Additional devices in the [Known working Zigbee radio modules](#known-working-zigbee-radio-modules) list may be discoverable, however, only devices that have been confirmed discoverable are listed above.

### OTA updates of Zigbee device firmware

The ZHA integration have the ability to perform OTA (Over-The-Air) firmware updates of paired/joined Zigbee devices and this feature is enabled by default. As this uses standard [Update](/integrations/update/) entities in Home Assistant, Home Assistant users will get a UI notification if and when an OTA firmware update is available for a specific device, with an option to initiate the update or ignore that specific update for that device.

Prerequisites for OTA updates to become available for a specific device is that it both support the standard Zigbee OTAU (Over-The-Air Update) feature and firmware images with standard Zigbee OTA format for that brand and device model are provided to the public by the manufacturer. For this reason ZHA currently only includes OTA providers from a few manufacturers that provide official online sources for Zigbee device OTA firmware images for their brands and models. Today that is; IKEA, INOVELLI, LEDVANCE (OSRAM), SALUS (Computime), Sonoff (ITead), and 3reality (Third Reality).

<div class="note warning">

When it comes to Zigbee device OTA firmware updates it is always recommended to check if an update will bring you any advantages before updating. Most Zigbee device OTA firmware updates are normally NOT specifically made for this ZHA integration, but instead usually only tested to work with the manufacturer's own Zigbee gateway/hub/bridge from the same brand. In some cases, the firmware update can cause unwanted issues, including no longer accessible functions until ZHA Device Handlers (quirks) are added/updated, or at worse even bricking a device causing it to stop working. So the general advice is to try to apply a "*if it ain't broke then don't fix it*" philosophy when it comes to Zigbee device firmware updates.

</div>

## Configuration - YAML

For more advanced configuration, you can modify `configuration.yaml` and restart Home Assistant
Expand All @@ -241,46 +253,24 @@ custom_quirks_path:
type: string
{% endconfiguration %}

### OTA firmware updates
### Advanced OTA configuration

The ZHA {% term integration %} has the ability to automatically download and perform OTA (Over-The-Air) firmware updates of Zigbee devices if the OTA firmware provider source URL for updates is available. OTA firmware updating is set to disabled (`false`) in the configuration by default.
The default configuration for OTA (Over-The-Air) firmware updates is today carefully chosen by ZHA developers, so normal users should not need to change any configurations manually. As such almost all of the configuration options listed in the zigpy section in the Home Assistant `configuration.yaml` file are just meant for development or advanced users.

Online OTA providers for firmware updates are currently only available for IKEA, LEDVANCE/OSRAM, SALUS/Computime, and INOVELLI devices. Support for OTA updates from other manufacturers could be supported in the future if they publish their firmware images publicly.

To enable OTA firmware updates for the ZHA {% term integration %} you need to add the following configuration to your `configuration.yaml` and restart Home Assistant:
Hence most advanced configuration options will remain in the [zigpy project's developers documentation](https://github.com/zigpy/zigpy). The exception is if want to disable OTA firmware updates for a specific manufacturer's provider, as then you can add the following configuration to your `configuration.yaml` and restart Home Assistant.

```yaml
zha:
zigpy_config:
ota:
ikea_provider: true # Auto update Trådfri devices
ledvance_provider: true # Auto update LEDVANCE/OSRAM devices
salus_provider: true # Auto update SALUS/Computime devices
inovelli_provider: true # Auto update INOVELLI devices
thirdreality_provider: true # Auto update 3REALITY devices
#otau_directory: /path/to/your/ota/folder # Utilize .ota files to update everything else
ikea_provider: false # Disable OTA update downloads for Trådfri devices
inovelli_provider: false # Disable OTA update downloads for INOVELLI devices
ledvance_provider: false # Disable OTA update downloads for LEDVANCE/OSRAM devices
salus_provider: false # Disable OTA update downloads for SALUS/Computime devices
sonoff_provider: false # Disable OTA update downloads for Sonoff (ITead) devices
thirdreality_provider: false # Disable OTA update downloads for 3REALITY devices
```

You can choose if the IKEA, LEDVANCE, SALUS, INOVELLI or THIRDREALITY provider should be set to enabled (`true`) or disabled (`false`) individually. After the OTA firmware upgrades are finished, you can set these to `false` again if you do not want ZHA to automatically download and perform OTA firmware upgrades in the future.

Note that the `otau_directory` setting is optional and can be used for any firmware files you have downloaded yourself, for any device type and manufacturer. For example, Philips Hue firmwares manually downloaded from [here](https://github.com/Koenkk/zigbee-OTA/blob/master/index.json) and/or [here](https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/OTA-Image-Types---Firmware-versions) added to the `otau_directory` can be flashed, although a manual `zha.issue_zigbee_cluster_command` command currently (as of 2021.3.3) must be issued against the IEEE of the Philips Hue device under Developer Tools->Services, e.g.:

```yaml
service: zha.issue_zigbee_cluster_command
data:
ieee: "xx:xx:xx:xx:xx:xx:xx:xx"
endpoint_id: 1
cluster_id: 25
cluster_type: out
command: 0
command_type: client
args:
- 0
- 100
```

Note: `cluster_id: 25` may also be `cluster_id: 0x0019`. The two are synonymous.

### Defining Zigbee channel to use

Tip! Before considering to change to an other Zigbee channel on an existing Zigbee network, it is highly recommended that you read through the two segments under the [troubleshooting](#troubleshooting) section below about "*Best practices to avoid pairing/connection difficulties*" and "*Zigbee interference avoidance and network range/coverage optimization*". These sections provide prerequisite information and advice on how to achieve the best possible Zigbee network in your environment.
Expand Down