Many Zigbee bulbs, plugs, sensors and remotes can take new firmware over the radio, without a cable or the manufacturer's hub. Zigbee2MQTT handles this itself: it looks up images for your devices, tells you when one is available and sends it in small chunks across your mesh. It is convenient, and it is also the one routine job that can change how a device behaves overnight. This guide covers where the images come from, how to check and start an update, how to deal with battery devices that ignore you, and what a downgrade can and cannot do.

Everything here is about end devices and routers on your network. The coordinator's own firmware is a separate job: you flash the USB stick or Ethernet gateway with a dedicated tool, not over the air.

Where Zigbee2MQTT gets the firmware

By default, Zigbee2MQTT matches devices against the Koenkk/zigbee-OTA repository on GitHub, as long as it has internet access. The repository is a mirror of firmware files published by manufacturers, curated partly by hand and partly automatically. It has two manifests:

  • index.json lists the latest image for each device;
  • index1.json lists the previous version, which is what makes a one-step downgrade possible.

New images reach the repository through pull requests, and an automated check validates each file before it is merged. That check confirms the file is a well-formed OTA image. It does not tell you whether the update is a good idea for your setup.

The Zigbee2MQTT documentation is blunt about this. A firmware update can bring bug fixes, security patches and new features, but it can also change device behaviour in ways that affect Zigbee2MQTT compatibility, and in principle it can introduce buggy or even malicious code. The recommendation is to read the release notes before you apply anything. The Home Assistant ZHA documentation gives a concrete example of the risk: some IKEA updates have broken group binding, the feature that lets a remote control lights directly.

So treat "update available" as information, not as an instruction. If a device works and the release notes do not mention a problem you have, or a security fix, waiting is a reasonable choice.

How Zigbee2MQTT finds out an update exists

Devices that support OTA periodically ask the coordinator whether a new image is available. When that request arrives, Zigbee2MQTT checks the index and publishes the result to the device's MQTT topic, zigbee2mqtt/<friendly_name>, in an update object:

{"update": {"state": "available"}}

The state field has four possible values:

  • idle - nothing available, nothing running;
  • available - a newer image exists for this device;
  • scheduled - the update will start the next time the device asks;
  • updating - transfer in progress, with progress in percent and remaining in seconds, reported every 30 seconds.

Some devices ask far too often, so by default Zigbee2MQTT runs the check at most once a day (1440 minutes) and ignores requests in between. You can stretch that interval in configuration.yaml:

ota:
    update_check_interval: 2880

If you would rather nothing checks automatically, turn it off and do it by hand:

ota:
    disable_automatic_update_check: true

With this set, Zigbee2MQTT replies "no image available" to every device request. The same option exists per device, in that device's section under devices:, which is handy when one model keeps offering an update you have decided to skip. Note that disabling automatic checks does not stop an update you have explicitly scheduled.

Checking and updating by hand

Most of this is available as buttons in the Zigbee2MQTT frontend. Under the hood, everything goes through MQTT requests on the bridge topic, which is useful if you want to script it.

To check one device, publish to zigbee2mqtt/bridge/request/device/ota_update/check:

{"id": "hallway_motion"}

The id can be the friendly name or the IEEE address. Zigbee2MQTT first asks the device for its manufacturer code, image type and installed version, and only then looks up the index. If the device does not answer, the check fails. If an update exists, the response contains "update_available": true, the source of the file and, when the index has them, release notes.

To start the update, publish the same payload to zigbee2mqtt/bridge/request/device/ota_update/update. To abort a running transfer, use zigbee2mqtt/bridge/request/device/ota_update/update/abort.

When the transfer finishes, the response shows the old and new file_version (plus software_build_id and date_code if the device reports them), so you have a record of what changed.

What happens during an update

The transfer is slow on purpose. Zigbee2MQTT sends 50-byte chunks with at least 250 ms between them by default, and the documentation puts a full update at anywhere from 10 to 100 minutes, depending on the device, the settings and how stable your network is. ZHA's documentation says a typical device takes about 10 minutes, and that a much longer time usually points to poor reception.

Three consequences are worth planning for:

  1. The mesh gets busy. The device stays usable, but the transfer adds a lot of traffic. Update one device at a time, when the network is quiet. Starting ten bulbs at once is how people end up with a sluggish house and half-finished transfers.
  2. The device reboots at the end. Its power-on behaviour then applies. A bulb set to turn on after a power cut will light up, which is not what you want at 3 a.m.
  3. Zigbee2MQTT treats it like a new pairing. After a successful update it re-interviews and reconfigures the device, because the new firmware may expose different features. This can reset custom reporting intervals to their defaults, so check them afterwards if you changed them.

You can tune the chunk size (default_maximum_data_size, 10-100 bytes), the delay between chunks (image_block_response_delay, minimum 50 ms) and the timeout. Bigger chunks and shorter delays are faster but need a more stable mesh, and some devices refuse anything above 50 or 64 bytes. On a home network, the defaults are the sensible choice.

Battery devices: wake them up or schedule the update

Battery-powered sensors and remotes are sleepy end devices. They spend most of their time with the radio off and only listen briefly after they send something. A manual check or update request usually lands while they are asleep and goes nowhere.

There are two ways around it:

  • Wake it up right before sending the request. Press a button on the remote, trigger the motion sensor, open and close the contact sensor. ZHA's docs suggest that if it still does not start, you keep the device awake by repeating the action until the first progress message appears.
  • Schedule the update. Publish to zigbee2mqtt/bridge/request/device/ota_update/schedule with the device id. Zigbee2MQTT then starts the transfer the next time the device itself asks for an update. The schedule survives a Zigbee2MQTT restart, and if the transfer fails, it stays scheduled for the next request. Some devices, including some Legrand models, can only be updated this way. To cancel, use .../ota_update/unschedule.

Also check the battery. Both the Zigbee2MQTT and ZHA documentation warn that OTA uses a lot of power, and some devices refuse to start below a minimum level. Zigbee2MQTT suggests at least 70%. A fresh battery before a long transfer is cheaper than a half-flashed sensor.

Going back to an older version

Downgrades use the same commands with /downgrade added: .../ota_update/check/downgrade, .../ota_update/update/downgrade and .../ota_update/schedule/downgrade.

The limits matter more than the commands:

  • The default repository usually keeps only the latest and the previous image, so you can go back one version. Anything older you must supply yourself.
  • The Zigbee specification allows downgrades, but some devices reject older firmware anyway.
  • You cannot reinstall the same version, and Zigbee2MQTT cannot back up the firmware currently on the device.

In practice, this means you should decide before updating, not count on undoing it later.

Custom firmware files and an offline network

If your Zigbee2MQTT host has no internet access, or you want an image the public repository does not carry, you can point it at your own index:

ota:
    zigbee_ota_override_index_location: my_index.json

The value can be a path (relative to configuration.yaml) or a URL, and the file must use the same structure as the zigbee-OTA index. If both indexes are reachable, entries in yours take precedence. The update requests also accept a url field pointing at a single firmware file or an index.

The documentation's warning here is stronger: several of the usual safety checks are bypassed in this mode, and the wrong file can brick a device. Only use images from a source you trust, ideally the manufacturer.

When an update will not start or fails

The Zigbee2MQTT troubleshooting notes cover the usual errors:

  • "Device didn't respond to OTA request" or "aborted by device". Remove power or the battery for a few seconds, put it back, wake the device and send the request again immediately.
  • INVALID_IMAGE with the correct image. Put default_maximum_data_size back to its default, power-cycle the device, and check whether the update actually completed despite the error.
  • Nothing happens on any device. One model, the SONOFF ZBM5-3C-80/86 on firmware 1.0.6, is known to block firmware updates for other devices on the network.
  • The frontend shows no progress. Set the log level to info. At warning or error, some OTA status messages are not shown.

If transfers are slow or keep failing on several devices, look at the mesh rather than at OTA settings. Weak links and missing routers show up here first, because an update is the longest continuous conversation a device ever has with the coordinator.

A routine that keeps surprises small

  1. Leave automatic checks on, but treat "available" as a prompt to read release notes.
  2. Update one device at a time, in the evening or whenever the network is quiet.
  3. Fresh batteries in battery devices, and schedule rather than chase them.
  4. Expect a reboot: check power-on behaviour on lights first.
  5. After the update, confirm the device still does what you rely on, including bindings and reporting intervals.