[Solved] Zigbee2mqtt vs "ordinary" zigbee

Hello!

First of all please excuse my bad english!

I have ordered a CC2531 usb stick and want to add several Xiaomi sensors. Maybe later I am going to order some tradfri, osram or other devices. I want to integrate all of these zigbee devices to OH.

As far as I understood there are two possibilities after flashing the stick with the right firmware:

  1. use the OH zigbee binding
  2. use zigbee2mqtt

All of the mentioned devices should work with both variants. So, what ist the benifit of zigbee2mqtt?

Thanks for your help!

I have only used zigbee2mqtt so my input will most likely be biased but I like the fact you easily add any new device without a need for support.

3 Likes

This should also be the case for most ZigBee devices. The binding is designed to automatically detect the channels a device provides, and to add them. “Support” is only required if the device doesn’t report its services correctly.

So, as far as I understood, there is no advantage of zigbee2mqtt. On the contrary, I have to mess around with mqtt, rules and transformations…

Thanks @chris for the info on the zigbee binding.:+1: I’m more a DIY person, and like knowing/seeing all the in’s and out, hence the reason for choosing zigbee2mqtt route.

For zigbee2mqtt you will need to use mqtt and most likely a transformation. The rule option is completely up to you and how you plan to use the devices.

Here’s a zigbee2mqtt item example:

Switch MyLight "My Light"    <light> ["Lighting"] { mqtt=">[pibroker:zigbee/0xb0ce1814030ac279/set:command:*:JS(setZigbeeState.js)],<[pibroker:zigbee/0xb0ce1814030ac279:state:JSONPATH($.state)]", expire="120m,command=OFF" }
Dimmer MyLight_Level "My Light Level"    <light> ["Lighting"] { mqtt=">[pibroker:zigbee/0xb0ce1814030ac279/set:command:*:JS(setZigbeeBrightness.js)],<[pibroker:zigbee/0xb0ce1814030ac279:state:JS(getZigbeeBrightness.js)]" }

This is one, of about 7 mqtt items, that I haven’t converted to the new 2.4 mqtt version but I have plan to do so in the near future. I’ve already found and bookmarked a topic that provides a good example.:wink:

Notice at the end of the Switch item I’m using the expire binding to automatically turn the light off after 2 hours so no rules need for this device to do what I need.:grinning:

The great thing about OH is the flexibility to work and do whatever your home automation needs may be. Use a rule, the expire binding, zigbee2mqtt, the zigbee binding or a little of both.

Best of luck and hope you find what works best for you.

The advantage of zigbee2mqtt in your case is, that you can use your Xiaomi sensors. I have read many times that they are not very close to the standard and that they are not properly supported by the current OH zigbee binding.
The Xiaomi sensors are working very well with zigbee2mqtt. I have sveral window/door contacts, the MagicCube and a Xiaomi Mija smoke detector. It’s quite easy to configure them for MQTT.

The only thing so far that made problems with zigbee2mqtt is my Osram Lightify Flex RGBW stripe.

1 Like

Correction: The zigbee binding works with the zigbee protocol, it does not support device which don’t conform to the protocol

There’s no need for a correction. You should have quoted the full sentence where I already wrote that the Xiaomi Sensors are not very close to the standard and that this is the reason for not working properly with the current zigBee binding.

There are quite some advantages.

  • development is extremely agile: updates come regularly and in the DEV tree on an almost daily basis, you can contribute via GitHub (suggestions and code)
  • quick updates for new (= “currently unsupported”) devices
  • integrates with HomeAssistant und Domoticz; that way the community is huge and list of supported devices grows quickly
  • you won’t be blamed for using zigbee devices that don’t comply with the zigbee standard (I would also love to live in an ideal world but if I bought some imperfect device I’d rather work around rather than throwing it out of the window because “it’s not standard, we will not support it”)
  • great features like reporting, binding, group support, network maps…

Check out https://www.zigbee2mqtt.io/. Z2M has a lot of great things. Currently it’s not integrating well with openHAB but that should change in the future. Most critical issue is that it is using JSON messages which… “is not standard” and thus not supported out of the box by the openHAB MQTT binding. However for setting values there is already support for plain messages without JSON. There is also someone that is implementing Homie compatibility which would make devices auto-discoverable by PaperUI. It might not happen this month or next but I guess end of year Z2M should be able to work directly with openHAB.

2 Likes

Thanks for your answers. I already set up zigbee2mqtt and paired several Xiaomi sensors.
Anyway i am going to buy a Gateway to use it as doorbell and alarm system (for water lekage or so).

So i think this thread could be closed (I dont know how to do that…)

Mark the thread which helped you most as “solved” and put a “[Solved]” in front of the thread title.