Zigbee2Mqtt binding

Tags: #<Tag:0x00007f616f696a68>

I install and use z2m bridge binding for OH2. Unfortunately the author stop to develop project. The binding almost work fine without issues but when i restart OH the linked chanels to thing does not work. I have to disable and enable thing in papeUii to chanels become available.
This is the link to binding:

And this is errors in log:

2019-11-25 11:25:48.076 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.initialize()' on 'org.openhab.binding.zigbee2mqtt.internal.Zigbee2MqttDeviceHandler@973b45': Duplicate channels zigbee2mqtt:zigbee2mqttDevice:0x00124b0018ecdaf6:0x00158d0002d73b5f:state
java.lang.IllegalArgumentException: Duplicate channels zigbee2mqtt:zigbee2mqttDevice:0x00124b0018ecdaf6:0x00158d0002d73b5f:state
	at org.eclipse.smarthome.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:159) ~[?:?]
	at org.eclipse.smarthome.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:135) ~[?:?]
	at org.eclipse.smarthome.core.thing.binding.builder.ThingBuilder.withChannels(ThingBuilder.java:85) ~[?:?]
	at org.openhab.binding.zigbee2mqtt.internal.Zigbee2MqttDeviceHandler.initialize(Zigbee2MqttDeviceHandler.java:95) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [103:org.eclipse.smarthome.core:0.11.0.oh250M1]
	at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [103:org.eclipse.smarthome.core:0.11.0.oh250M1]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:?]
	at java.lang.Thread.run(Thread.java:745) [?:?]
2019-11-25 11:25:48.113 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.initialize()' on 'org.openhab.binding.zigbee2mqtt.internal.Zigbee2MqttDeviceHandler@17e16df': Duplicate channels zigbee2mqtt:zigbee2mqttDevice:0x00124b0018ecdaf6:0x00158d00022805d9:temperature
java.lang.IllegalArgumentException: Duplicate channels zigbee2mqtt:zigbee2mqttDevice:0x00124b0018ecdaf6:0x00158d00022805d9:temperature
	at org.eclipse.smarthome.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:159) ~[?:?]
	at org.eclipse.smarthome.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:135) ~[?:?]
	at org.eclipse.smarthome.core.thing.binding.builder.ThingBuilder.withChannels(ThingBuilder.java:85) ~[?:?]
	at org.openhab.binding.zigbee2mqtt.internal.Zigbee2MqttDeviceHandler.initialize(Zigbee2MqttDeviceHandler.java:95) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [103:org.eclipse.smarthome.core:0.11.0.oh250M1]
	at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [103:org.eclipse.smarthome.core:0.11.0.oh250M1]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:?]
	at java.lang.Thread.run(Thread.java:745) [?:?]
2019-11-25 11:25:48.103 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.initialize()' on 'org.openhab.binding.zigbee2mqtt.internal.Zigbee2MqttDeviceHandler@b39820': Duplicate channels zigbee2mqtt:zigbee2mqttDevice:0x00124b0018ecdaf6:0x00158d000224c604:battery
java.lang.IllegalArgumentException: Duplicate channels zigbee2mqtt:zigbee2mqttDevice:0x00124b0018ecdaf6:0x00158d000224c604:battery
	at org.eclipse.smarthome.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:159) ~[?:?]
	at org.eclipse.smarthome.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:135) ~[?:?]
	at org.eclipse.smarthome.core.thing.binding.builder.ThingBuilder.withChannels(ThingBuilder.java:85) ~[?:?]
	at org.openhab.binding.zigbee2mqtt.internal.Zigbee2MqttDeviceHandler.initialize(Zigbee2MqttDeviceHandler.java:95) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [103:org.eclipse.smarthome.core:0.11.0.oh250M1]
	at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [103:org.eclipse.smarthome.core:0.11.0.oh250M1]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:?]
	at java.lang.Thread.run(Thread.java:745) [?:?]
2019-11-25 11:25:48.078 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.initialize()' on 'org.openhab.binding.zigbee2mqtt.internal.Zigbee2MqttDeviceHandler@8a59c': Duplicate channels zigbee2mqtt:zigbee2mqttDevice:0x00124b0018ecdaf6:0x00158d0001100d38:action
java.lang.IllegalArgumentException: Duplicate channels zigbee2mqtt:zigbee2mqttDevice:0x00124b0018ecdaf6:0x00158d0001100d38:action
	at org.eclipse.smarthome.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:159) ~[?:?]
	at org.eclipse.smarthome.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:135) ~[?:?]
	at org.eclipse.smarthome.core.thing.binding.builder.ThingBuilder.withChannels(ThingBuilder.java:85) ~[?:?]
	at org.openhab.binding.zigbee2mqtt.internal.Zigbee2MqttDeviceHandler.initialize(Zigbee2MqttDeviceHandler.java:95) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [103:org.eclipse.smarthome.core:0.11.0.oh250M1]
	at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [103:org.eclipse.smarthome.core:0.11.0.oh250M1]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:?]
	at java.lang.Thread.run(Thread.java:745) [?:?]
2019-11-25 11:25:48.547 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while initializing handler of thing 'zigbee2mqtt:zigbee2mqttDevice:0x00124b0018ecdaf6:0x00158d000224c604': Duplicate channels zigbee2mqtt:zigbee2mqttDevice:0x00124b0018ecdaf6:0x00158d000224c604:battery
java.lang.IllegalArgumentException: Duplicate channels zigbee2mqtt:zigbee2mqttDevice:0x00124b0018ecdaf6:0x00158d000224c604:battery
	at org.eclipse.smarthome.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:159) ~[?:?]
	at org.eclipse.smarthome.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:135) ~[?:?]
	at org.eclipse.smarthome.core.thing.binding.builder.ThingBuilder.withChannels(ThingBuilder.java:85) ~[?:?]
	at org.openhab.binding.zigbee2mqtt.internal.Zigbee2MqttDeviceHandler.initialize(Zigbee2MqttDeviceHandler.java:95) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [103:org.eclipse.smarthome.core:0.11.0.oh250M1]
	at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [103:org.eclipse.smarthome.core:0.11.0.oh250M1]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:?]
	at java.lang.Thread.run(Thread.java:745) [?:?]
2019-11-25 11:25:48.450 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while initializing handler of thing 'zigbee2mqtt:zigbee2mqttDevice:0x00124b0018ecdaf6:0x00158d00022805d9': Duplicate channels zigbee2mqtt:zigbee2mqttDevice:0x00124b0018ecdaf6:0x00158d00022805d9:temperature
java.lang.IllegalArgumentException: Duplicate channels zigbee2mqtt:zigbee2mqttDevice:0x00124b0018ecdaf6:0x00158d00022805d9:temperature
	at org.eclipse.smarthome.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:159) ~[?:?]
	at org.eclipse.smarthome.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:135) ~[?:?]
	at org.eclipse.smarthome.core.thing.binding.builder.ThingBuilder.withChannels(ThingBuilder.java:85) ~[?:?]
	at org.openhab.binding.zigbee2mqtt.internal.Zigbee2MqttDeviceHandler.initialize(Zigbee2MqttDeviceHandler.java:95) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [103:org.eclipse.smarthome.core:0.11.0.oh250M1]
	at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [103:org.eclipse.smarthome.core:0.11.0.oh250M1]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:?]
	at java.lang.Thread.run(Thread.java:745) [?:?]
2019-11-25 11:25:48.754 [WARN ] [core.thing.internal.ThingManagerImpl] - Initializing handler for thing 'zigbee2mqtt:zigbee2mqttDevice:0x00124b0018ecdaf6:0x00158d00022805d9' takes more than 5000ms.
2019-11-25 11:25:48.739 [WARN ] [core.thing.internal.ThingManagerImpl] - Initializing handler for thing 'zigbee2mqtt:zigbee2mqttDevice:0x00124b0018ecdaf6:0x00158d0002d73b5f' takes more than 5000ms.
2019-11-25 11:25:48.738 [WARN ] [core.thing.internal.ThingManagerImpl] - Initializing handler for thing 'zigbee2mqtt:zigbee2mqttDevice:0x00124b0018ecdaf6:0x00158d000224c604' takes more than 5000ms.
2019-11-25 11:25:48.736 [WARN ] [core.thing.internal.ThingManagerImpl] - Initializing handler for thing 'zigbee2mqtt:zigbee2mqttDevice:0x00124b0018ecdaf6:0x00158d0001100d38' takes more than 5000ms.
2019-11-25 11:25:48.337 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while initializing handler of thing 'zigbee2mqtt:zigbee2mqttDevice:0x00124b0018ecdaf6:0x00158d0002d73b5f': Duplicate channels zigbee2mqtt:zigbee2mqttDevice:0x00124b0018ecdaf6:0x00158d0002d73b5f:state

Does this problem in binding code or may be this is some troubles in OH main code? The binding is open source and i will try to resolve this problem by myself but i need a some help.

You do you not use our native ZigBee binding?
If the developer is no longer supporting ZigBee2MQTT it is time to either fix it yourself or move to something else.

i use the bridge binding from zigbee2mqtt project to openhab. Native ZigBee binding unfortunately does not support my Xiaomi devices.

UPD: NOT GENERALY XIAOMI DEVICE - just my Xiaomi Cube

According to a posting from our developer @chris , that is incorrect.

Don’t know that, but you may use zigbee2mqtt with the mqtt binding.

Have a look here:

1 Like

Many people are using the Xiaomi devices with the ZigBee binding, so in general there should not be an issue. The ZigBee binding supports different coordinators - it may be that some coordinators don’t work with Xiaomi (I’ve tested it with the Ember chips, and I suspect it works with the CC2531, but I’m not sure about Telegesis).

2 Likes

Ok. Thank you for this idea i will try this variant. z2m binding for OH allow automatic discovery all z2m devices and his channels. I OH2 z2m binding very conveniently to work with z2m devices. Full automatic scan and control z2m server (zigbee map, control join option thru OH interface) This is example of my Zigbeedevice. All channels discovery automaticaly.

But after restart OH channel disapeared. I need to disable - enable thing and channels become available.

Thank you, Chris. Few month ago i wrote you about Xiaomi Cube in this dialog.


This device improtant for me and i couldn’t connect Cube and yours ZigBee binding. May be cube using non standart zigbee profile. I use cc2531 coordinator with firmware from z2m binding project.

1 Like

I couldn’t connect Xiaomi Cube controller with native Zigbee Xiaomi binding.

I think (from memory, which is bad :slight_smile: ) that the cube may have used a non-standard attribute, or even non-standard clusters which without documentation is difficult to implement. If the documentation is available, then it makes things easier.

So, yes, there may be some specific issues with Xiaomi devices not being supported - the same as there may be issues with other devices not being supported if they are non-standard, but it’s 's not really a general “Xiaomi devices don’t work” statement.

2 Likes

Exactly. I just wrote - my Xiaomi device (not generaly).
Using z2m is not a good idea. But thi is only one solution that worked for my situation: CC2531+z2m+xiaomi cube

2 Likes

I disagree. Z2m supports far more devices than the Zigbee Binding (afaik)

Yes. Z2m support a lot of zigbee devices and active development. But cons is need to install nodejs that take some cpu resources.

Is it worth to install zigbee2mqtt 3.0 firmware vs 1.2?
Any advantages or disadvantages?

This guide is quite clear on what you shall use: https://github.com/Koenkk/Z-Stack-firmware/tree/master/coordinator.

@pistoletov1974 There is no need to use nodejs for zigbee2mqtt.

Zigbee2mqtt server coded on nodejs. In few days New Cc2538 coirdinator will arrive. And I will test with new powerfull stick my zigbee network

Oop. Sorry for some reason I read it as node-red.

Recently upgraded to OH 2.54 (from OH 2.53) docker the usual way. But for some reasons, now all my zigbee2mqtt things show up as “uninitialized”. The things/items do not respond of course in paper UI.
But,the zigbee2mqtt logs show everything to be ok

I cannot figure out what is wrong.

I stop using z2m binding because have the same problem too. And binding author stop developing this binding. Now I use simple mqtt binding with some settings in zigbee2mqtt server.
About “uninitialized” reenable things resolve problem but this is not good way for me.

I use this method : Zigbee2mqtt revisited: No more ugly transformation and it work just fine