Home Home Automation Adding unsupported devices to Zigbee2MQTT

Adding unsupported devices to Zigbee2MQTT

What if you have a Zigbee device which is not listed on supported devices?

The pairing process for the IKEA and Xiaomi devices went well. It was also easy with the Zemismart Zigbee RGB Downlight (review soon), but I was not able to read the state or control the device as the Zemismart Zigbee RGB Downlight was not on the list of the supported devices. I thought I would cover the procedure in case you get stuck on how to add new devices to Zigbee2MQTT.

Pairing new devices to Zigbee2MQTT

The pairing depends on the manufacturer’s instructions, so please refer to that to learn how to enter the correct pairing state via reset. While pairing IKEA and Aqara remotes lights and sensors is described well in the guide already, you don’t get many clues for other devices. Make sure your configuration.yaml file has permit_join: true.

#open configuration file
sudo nano /opt/zigbee2mqtt/data/configuration.yaml

 #Stopping zigbee2mqtt
 sudo systemctl stop zigbee2mqtt

 #Starting zigbee2mqtt
 sudo systemctl start zigbee2mqtt
 #View the log of zigbee2mqtt
 sudo journalctl -u zigbee2mqtt.service -f 

Just hold the device close in the pairing mode until you see the following lines:

zigbee2mqtt:warn 6/7/2019, 12:26:07 PM Message without device!
 zigbee2mqtt:info 6/7/2019, 12:26:16 PM New device 'undefined' with address 0x00124b001c889570 connected!
 zigbee2mqtt:info 6/7/2019, 12:26:16 PM MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"device_connected","message":"0x00124b001c889570","meta":{}}'
 zigbee2mqtt:warn 6/7/2019, 12:26:16 PM Device with modelID 'undefined' is not supported.
 zigbee2mqtt:warn 6/7/2019, 12:26:16 PM Please see: https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html

This means your device is paired and you can open the configuration.yaml and name it. It will be listed as the last device on the list:

     friendly_name: ' 0x00124b001c889570'
     retain: false

change to:

     friendly_name: 'spotlight'
     retain: false 

Save the file and restart your Zigbee2MQTT service or reboot the Raspberry Pi. At this point, you are ready to add the new device to the list.

Buy USB Zigbee Stick CC2531

Buy it using these links to support NotEnoughTech.

At this point, do yourself a favour and keep the device close to the cc2531. I got frustrated and I wanted to continue my work downstairs and I took the device outside of the Zigbee network without realising.

To control the new device I had to modify the node_modules/zigbee-herdsman-converters/devices.js file. Without this, I would not be able to send any commands. Open:

sudo nano /opt/zigbee2mqtt/node_modules/zigbee-herdsman-converters/devices.js

Then add the new device according to the template:

    zigbeeModel: ['lumi.sens'], // The model ID from: Device with modelID 'lumi.sens' is not supported.
    model: 'WSDCGQ01LM', // Vendor model number, look on the device for a model number
    vendor: 'Xiaomi', // Vendor of the device (only used for documentation and startup logging)
    description: 'MiJia temperature & humidity sensor ', // Description of the device, copy from vendor site. (only used for documentation and startup logging)
    supports: 'temperature and humidity', // Actions this device supports (only used for documentation)
    fromZigbee: [], // We will add this later
    toZigbee: [], // Should be empty, unless device can be controlled (e.g. lights, switches).

Pay closer attention to the: fromZigbee: [] & toZigbee: [] as these can be replaced with:

extend: generic.light_onoff_brightness_colortemp,

If you look at the top of the template file (at the top), you will see a couple of control templates stored under generic.xxxxx hue.xxxx and gledopto.xxxx. Check what control/and report capabilities your device comes with and add a single extend line instead.

 extend: generic.light_onoff_brightness_colortemp, 

is equal to:

fromZigbee: generic.light_onoff_brightness_colortemp.fromZigbee,
toZigbee: [tz.gledopto_light_onoff_brightness, tz.gledopto_light_colortemp, tz.ignore_transition, tz.light_alert,],

Since I know that my device supports toggle, dimming, and colour controls I have added the following config

    zigbeeModel: ['NUET56-DL27LX1.1'], 
    model: 'LXZB-12A', 
    vendor: 'Zemismart', 
    description: 'RGB LED Downlight', 
    supports: 'RGB, Dimming',
    extend: gledopto.light_onoff_brightness_colortemp_colorxy

I didn’t have to recalculate any values, but your case might be different. Zigbee2MQTT page mentioned that you might need to do this if your Zigbee protocol isn’t compatible. Since I had no device to test it on, I won’t be able to help you there.

Zigbee2MQTT control basics

Once your device is configured, we can add the MQTT nodes to control it. To read the status of your device add MQTT in node and debug with:


swap the appropriate values if you edited the Zigbee2MQTT topic and enter your device name. If you issue the following JSON:

     "state": ""

To the zigbee2mqtt/devicename/getMQTT out node – you will receive status update looking like this:


If you want to control the Zigbee device, just send the JSON message:

     "state": "ON",
     "brightness": 255,
     "color_temp": 155,
     "color": {
         "hex": "#ea770b"

To zigbee2mqtt/devicename/set with the changes you want to make. You don’t have to pass all the data, only the JSON values you want to set.


The process isn’t as beginner-friendly as adding Xiaomi or IKEA devices, but with time, the list of supported devices will get bigger. Now you should know how to add and use new devices in Zigbee2MQTT. Soon I will show you cool control scenarios using various remote controllers. If you have any questions, feel free to ask it in this Reddit thread.


Nothing says "Thank you" better than keeping my coffee jar topped up!


Support me on Patreon and get an early access to tutorial files and videos.


Bitcoin (BTC)

Use this QR to keep me caffeinated with BTC: 1FwFqqh71mUTENcRe9q4s9AWFgoc8BA9ZU

Smart Ideas with

Automate your space in with these ecosystems and integrate it with other automation services

Learn NodeRED

NodeRED for beginners: 1. Why do you need a NodeRED server?

To server or not to server? That's a very silly question!

Best Automation Projects

Sonoff R3 DIY mode & why it sucks

Long awaited Sonoff R3 DIY mode is even worse than I expected.

IKEA TRADFRI Wireless dimmer in NodeRED

Thanks to NodeRED you can use IKEA TRADFRI Wireless Dimmer to interact with everything

NEST your old thermostat under $5

Nest-ing up your older thermostat under $5

Things they don’t tell you about IKEA Trådfri

There are things you should know about IKEA Tradfri before you make your purchase

Nora – Google Assistant in NodeRED

Integrate Google Assistant with NodeRED thanks to Nora - NodeRED home automation

Smart Home

Shelly 1PM: “PM” stands for Printer Manager

I decided not to use my Shelly 1PM with lights. I had a much better idea in mind! I'm going to show you how to get your printer ready for automatic ON/OFF and print price calculations including electricity used.

Monitor 2 gangs at once with Shelly 2.5

Taking a closer look at Shelly 2.5 switch with 2 switch/gang support and individual power metering

Sonoff DUALR3 has a hidden secret

Hands on on new product from ITEAD: Sonoff Dual R3

M5Paper received UIFlow support

Much desired support for UIFlow for M5Paper has arrived! If you needed an extra reason to get it, now it's the time.

PIR sensor like no other: Shelly Motion

Shelly enters IoT sensor space with their Shelly Motion - a WiFi enabled PIR sensor that can last up to 3 years!