Skip to content
Switch branches/tags


Failed to load latest commit information.
Latest commit message
Commit time

Zigbee2Mqtt Adapter

This adapter for WebThings Gateway allows to use awesome zigbee2mqtt project to support lots of zigbee devices, even on a cheap cc2531 usb stick zigbee dongle.

This addon uses the "exposes" feature of Zigbee2MQTT, so in theory it supports all the devices that Zigbee2MQTT supports. You can find the list of supported devices here:

WebhThings gateway Zigbee2Mqtt screenshot

This addon is able to 'generically' handle Zigbee devices, so there is no need to manually add support for new devices anymore. However, while this is done automatically, in some rare cases it may be worthwhile to have this addon support a device more specifically. For those cases the devices.js file may be used. You can add specific devices to it like this:

  'lumi.sensor_magnet': {
    name: 'Xiaomi Magnet Contact Sensor',
    '@type': ['BinarySensor'],
    properties: {
      battery: {
        type: 'integer',
        unit: 'percent',
        minimum: 0,
        maximum: 100,
        readOnly: true,
      linkquality: {
        type: 'integer',
        readOnly: true,
      contact: {
        type: 'boolean',
        '@type': 'BooleanProperty',
        readOnly: true,


You can install this addon by simply selecting it in the WebThings Gateway.

Alternatively, you can install it manually:

Download the addon git clone ~/.webthings/addons/zigbee2mqtt-adapter

Update NPM, the package manager for NodeJS npm install -g npm

Go to the addon folder cd ~/.webthings/addons/zigbee2mqtt-adapter

Get the addon to download the software it depends on npm install

Combine the now complete software into a package npm pack

Then, reboot the WebThings gateway.