Zigbee2mqtt vs "ordinary" zigbee

zigbee
zigbee2mqtt
Tags: #<Tag:0x00007fe06352bc28> #<Tag:0x00007fe06352b778>

(Chris) #1

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!


(CM6.5 H102) #2

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.


(Chris Jackson) #3

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.


(Chris) #4

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…


(CM6.5 H102) #5

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.