Zigbee is an IEEE 802.15.4-based specification for a suite of high-level communication protocols used to create personal area networks with small, low-power digital radios. It is widely used for home automation, smart lighting, sensors, and other low-power low-bandwidth wireless applications.
The Weble universal gateway Zigbee driver integrates zigbee2mqtt — an open-source Zigbee to MQTT bridge — directly into the gateway. It runs a built-in MQTT broker, starts zigbee2mqtt as a background process, and automatically maps all discovered Zigbee devices and their properties to routable gateway addresses.
The driver provides two interfaces:
A Zigbee coordinator (USB dongle) must be connected to the gateway. The coordinator must be compatible with zigbee2mqtt supported adapters. Common adapter types include:
How to plug the adapter and what to enter in Serial Port: see Serial ports and USB adapters.
Create a new gateway and select the Zigbee driver. Configure the Serial Port to point to the connected Zigbee coordinator:
/dev/ttyACM0).Set the Adapter type to match your coordinator hardware, or leave it on Auto for automatic detection.
On Windows installations there is no default port: select the COM port of the coordinator.
Only one Zigbee gateway can run on a box: the driver uses fixed local ports (
28521for the zigbee2mqtt interface,28522for its MQTT broker) and the fixed/zigbeeweb path.
When the gateway is started, the driver:
28522, dedicated to zigbee2mqtt (see 4.1)./zigbee path on the gateway's web server.The first start can take up to three minutes while zigbee2mqtt initialises. The gateway is shown as connected once zigbee2mqtt reports that it has started.
Once started, the zigbee2mqtt interface is accessible from the UI tab in the gateway view.
To pair a new Zigbee device, use the zigbee2mqtt interface in the UI tab:
After a device is paired, the gateway automatically creates addresses for the device and all its exposed properties. For example, a temperature/humidity sensor named LivingRoom would generate:
%zig:LivingRoom — the main device address (receives the full JSON payload with all properties)%zig:LivingRoom/temperature — individual temperature value%zig:LivingRoom/humidity — individual humidity value%zig:LivingRoom/battery — battery level%zig:LivingRoom/set — writable address (for devices that support commands)%zig:LivingRoom/get — get endpoint (write to it to request current values, see 3.4)These addresses are routable and loggable like any other gateway address. They can be used in routes to forward Zigbee sensor data to other protocols such as BACnet, Modbus, MQTT, or the cloud.
Note: Addresses are automatically created when devices are discovered. Manual address insertion is not available. However, addresses can be manually deleted if a device has been removed from the network.
| Label | JSON Key | Description |
|---|---|---|
| Name | name | A descriptive name for this Zigbee gateway instance. |
| Cluster ID | cluster | 0 (default): the gateway runs in its own process. Any other number: the gateway shares one process with the gateways that have the same number. See Gateway clusters. |
| Description | description | Optional description for this gateway. |
| Serial Port | serialPort | The serial port of the Zigbee coordinator. Use the auto-complete to select from detected USB/serial interfaces. Can be set by unique ID (recommended, stays stable across reboots and USB port changes) or by system path (e.g. /dev/ttyACM0). |
| Adapter | adapter | Coordinator driver used by zigbee2mqtt: Auto (automatic detection, recommended), zstack, deconz, ember, ezsp or zigate. Leave on Auto unless detection fails. With zigbee2mqtt 2.x, Auto and a Silicon Labs coordinator whose saved network backup reports an old firmware, the driver selects ezsp by itself. The zigbee2mqtt version in use is written in the gateway log at start. |
| Baudrate | baudrate | Serial communication speed: Auto (recommended), 9600, 19200, 38400, 57600, 76800, or 115200. Most adapters work with Auto. |
| rtscts | rtscts | Enable RTS/CTS hardware flow control on the serial port. Required by some adapters. Default: disabled. |
{
"serialPort": "/dev/serial/by-id/usb-Texas_Instruments_XDS110-if00",
"adapter": "",
"baudrate": "",
"rtscts": false
}
Zigbee addresses use the prefix %zig: followed by the device friendly name and optionally a property path:
%zig:LivingRoom — main device address (full JSON payload)%zig:LivingRoom/temperature — published property (pushed by the device)%zig:LivingRoom/set — set endpoint (send commands to the device)%zig:LivingRoom/set/brightness — set a specific property%zig:LivingRoom/get — get endpoint (write to it to request values from the device)%zig:LivingRoom/get/temperature — write to it to request a specific property valueThe address names are derived from the friendly name configured in zigbee2mqtt. Choose the friendly name before you create routes, logs or views. When a device is renamed later, the driver creates a new set of addresses under the new name; the addresses under the old name are kept but no longer receive values. Routes and logs attached to them must be moved to the new addresses, and the old addresses deleted by hand.
In addition to device addresses, the driver automatically creates bridge management addresses for controlling zigbee2mqtt itself:
| Address | Description |
|---|---|
%zig:bridge/state |
Bridge connection state (online / offline). |
%zig:bridge/devices |
JSON list of all paired Zigbee devices with their properties and capabilities. |
%zig:bridge/info |
Bridge information (version, coordinator type, network settings). |
%zig:bridge/request/permit_join |
Write to enable/disable device pairing. |
%zig:bridge/request/restart |
Write to restart zigbee2mqtt. |
%zig:bridge/request/health_check |
Request a health check. |
%zig:bridge/request/networkmap |
Request a network map. |
%zig:bridge/request/backup |
Request a coordinator backup. |
%zig:bridge/request/device/remove |
Remove a device from the network. |
%zig:bridge/request/device/rename |
Rename a device. |
%zig:bridge/request/device/ota_update/check |
Check for OTA firmware updates. |
%zig:bridge/request/device/ota_update/update |
Apply an OTA firmware update. |
%zig:bridge/request/group/add |
Create a Zigbee group. |
%zig:bridge/request/group/remove |
Remove a Zigbee group. |
%zig:bridge/request/group/members/add |
Add a device to a group. |
%zig:bridge/request/group/members/remove |
Remove a device from a group. |
Bridge requests take the JSON payload defined by the zigbee2mqtt MQTT API. Examples:
| Address | Value to write | Effect |
|---|---|---|
%zig:bridge/request/permit_join |
true or false, or {"value": true, "time": 120} |
Opens or closes pairing, or opens it for 120 seconds. |
%zig:bridge/request/device/rename |
{"from": "0x00158d0001234567", "to": "LivingRoom"} |
Renames a device (see the note on renaming in 3.1). |
%zig:bridge/request/device/remove |
{"id": "LivingRoom"} |
Removes a device from the network. |
The driver also creates these request addresses under %zig:bridge/request/: coordinator_check, install_code/add, device/configure, device/options, device/bind, device/unbind, device/configure_reporting, group/rename, group/options, group/members/remove_all, options, config/last_seen, config/elapsed, touchlink/scan, touchlink/identify, touchlink/factory_reset.
When a Zigbee device is discovered, the driver inspects each property's access level (from the zigbee2mqtt device definition) and creates the appropriate addresses:
| Access | Description | Address created |
|---|---|---|
| Published | The device pushes this value automatically (e.g. sensor readings) | %zig:device/property |
| Settable | The value can be written to the device (e.g. brightness, on/off) | %zig:device/set/property |
| Gettable | The value can be explicitly requested from the device | %zig:device/get/property |
A property can have multiple access levels (e.g. a light's brightness is both published and settable).
Reading. Zigbee values are pushed by the devices: the gateway keeps the last value received and does not poll. To ask a device for a fresh value of a gettable property, write any value (for example an empty text) to its get address, e.g. %zig:LivingRoom/get/temperature: zigbee2mqtt queries the device and the answer updates %zig:LivingRoom/temperature.
Writing to a device address (%zig:device/property) automatically routes the write to the corresponding set MQTT topic if one exists. If no set endpoint is available, the write returns a "read only" error.
| Property | Value |
|---|---|
| Readable | No (values are pushed by the device, not polled) |
| Writable | Yes (for settable properties) |
| Routable | Yes |
| Loggable | Yes |
The Zigbee driver uses the following internal architecture:
28522. It is reserved for the Zigbee driver: never forward this port through a router or a firewall, restrict access to the box with a firewall or by network segmentation, and install the box on a trusted network. To exchange Zigbee data with external MQTT clients, route the %zig: addresses to an MQTT gateway instead.%zig: prefix (internally translated from %mqtt:zigbee2mqtt/ topics)./zigbee path.The zigbee2mqtt data consists of the following files:
configuration.yaml — zigbee2mqtt settings and device friendly namescoordinator_backup.json — coordinator network state backupdatabase.db — device databaseThese files are kept in the data directory of the box. Depending on the installation, zigbee2mqtt 1.x or 2.x is used; when a box moves to 2.x, the existing network data is copied once and the paired devices are kept. The version in use is written in the gateway log at start.
The driver updates the serial section of zigbee2mqtt's configuration.yaml at each startup with the configured serial port, adapter, baudrate, and rtscts parameters. This ensures the gateway's configuration always takes precedence over any manual changes in the zigbee2mqtt configuration file.
| Symptom | Cause | What to do |
|---|---|---|
The gateway restarts in a loop; the log shows zigbee2mqtt process closed (serialPort=...) followed by the last errors of zigbee2mqtt |
zigbee2mqtt cannot open the coordinator: wrong Serial Port, wrong Adapter type, or the dongle is not detected. | Select the Serial Port again, preferably by unique ID, and check the Adapter type of your coordinator. See Serial ports and USB adapters. |
| The gateway is not connected during the first minutes after the start | Normal: the first start of zigbee2mqtt can take up to three minutes. | Wait. |
The log shows missing license |
No licence for the Zigbee driver. | Contact support@weble.ch. |
To read the driver log, open the menu ☰ of the gateway and choose Logs (see Logs of a gateway).
Keep this gateway on Cluster ID
0: the driver restarts its process when zigbee2mqtt stops, which would restart every gateway of a shared cluster.