Zigbee binding

No - this is not supported (at least not yet).

No.[quote=“asemev, post:106, topic:15763”]
Secondly, which serial port should i use? I mean the Raspbee module is plugged directly into the Raspi
[/quote]

I guess you should use the ls /dev/tty* command - but as above - this device is not currently supported.

Thanks Chris.

Hi @chris,
Sorry to bother you again about this :wink:
Have you find some time to look into the color temperature stuff?

Yes, I spent a little more time on it on Monday, but I had to do some other stuff last night. It’s pretty much at the top of my list now ;).

I seem to be having trouble with getting my zigbee stick up and running - I’ve flashed with CC2531ZNP-Pro-Secure_LinkKeyJoin.hex.

openhab.log is showing:
2017-06-14 18:00:01.934 [INFO ] [ndler.ZigBeeCoordinatorCC2531Handler] - Serial port [/dev/ttyACM0] is initialized.
2017-06-14 18:00:06.938 [WARN ] [etwork.impl.ZigBeeNetworkManagerImpl] - Dongle reset failed. Assuming bootloader is running and sending magic byte 0xef.
2017-06-14 18:00:11.939 [WARN ] [etwork.impl.ZigBeeNetworkManagerImpl] - Attempt to get out from bootloader failed.
2017-06-14 18:00:11.994 [INFO ] [ndler.ZigBeeCoordinatorCC2531Handler] - Serial port [/dev/ttyACM0] is closed.

Any ideas what might be going on? This is on a VMWare ESXi 6.5 hosted Ubuntu 17.04 install with Openhab 2.0 release.

I am not using this binding yet, but I am curious: Would it be possible to emulate some virtual Lightlink Lights or expose switch items? (Not asking whether it is already implemented, more if it would be possible at all).

I am asking because I use some really nice busch jaeger Zigbee switches and they work all fine but I would love to fire a rule (e.g. turn tv on with harmony binding) when I use one of the buttons on those switches.
Using the harmony hub this isn’t possible as:

  • busch jager switches can only save light states on the buttons
  • No way to see the buttons state in the hue bridge
  • hue bridge is polling only, which would lead to lags

Yes - this should work ok.

I hope to get an update out in the next day or so. Color temperature is now supported and the refactoring is looking ok. There’s a couple of things I want to look at first though…

One point to note, and the main point of this message is that the next version of the binding will require the latest snapshot runtime since there was a breaking change made to ESH/OH2 last Friday. The current version will only work with an older binding, and the next version will only work with the latest binding (16th July or newer).

Update to this - I have flashed the CC2531 again and I’m getting further along. I’ve also added debug level logging to the binding. My logs now look like the attached file and no zigbee devices are discovered, stick is still in “Initializing” state.

2017-06-19 18:59:40.332 [DEBUG] [bee.discovery.ZigBeeDiscoveryService] - Starting ZigBee scan for zigbee:coordinator_cc2531:69a3d5c1
2017-06-19 18:59:52.556 [DEBUG] [zigbee.internal.ZigBeeHandlerFactory] - Creating coordinator handler for org.eclipse.smarthome.core.thing.internal.BridgeImpl@fe7dd353
2017-06-19 18:59:52.558 [DEBUG] [ndler.ZigBeeCoordinatorCC2531Handler] - Initializing ZigBee CC2531EMK serial bridge handler.
2017-06-19 18:59:52.558 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Initializing ZigBee network [zigbee:coordinator_cc2531:595f5da9].
2017-06-19 18:59:52.558 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Channel -1
2017-06-19 18:59:52.558 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - PANID 0
2017-06-19 18:59:52.558 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - EPANID 0000000000000000
2017-06-19 18:59:52.558 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Key 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2017-06-19 18:59:52.558 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Initialising network
2017-06-19 18:59:52.558 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Created random ZigBee PAN ID [9991].
2017-06-19 18:59:52.559 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Created random ZigBee extended PAN ID [52B234DA39CA3000].
2017-06-19 18:59:52.560 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Key String 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2017-06-19 18:59:52.560 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Key array [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
2017-06-19 18:59:52.560 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Key final array [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
2017-06-19 18:59:52.561 [DEBUG] [ndler.ZigBeeCoordinatorCC2531Handler] - ZigBee Coordinator CC2531 opening Port:'/dev/ttyACM1' PAN:9991, Channel:-1
2017-06-19 18:59:52.561 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Scheduling ZigBee start
2017-06-19 18:59:53.561 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - ZigBee network starting
2017-06-19 18:59:53.561 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Initialising ZigBee coordinator
2017-06-19 18:59:53.561 [DEBUG] [bee.discovery.ZigBeeDiscoveryService] - Creating ZigBee discovery service for zigbee:coordinator_cc2531:595f5da9
2017-06-19 18:59:53.561 [DEBUG] [bee.discovery.ZigBeeDiscoveryService] - Activating ZigBee discovery service for zigbee:coordinator_cc2531:595f5da9
2017-06-19 18:59:53.561 [DEBUG] [org.openhab.binding.zigbee          ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=307, service.bundleid=189, service$
2017-06-19 18:59:53.562 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Key initialise [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
2017-06-19 18:59:53.563 [DEBUG] [ndler.ZigBeeCoordinatorCC2531Handler] - Opening ZigBee CC2531 serial port
2017-06-19 18:59:53.563 [DEBUG] [ndler.ZigBeeCoordinatorCC2531Handler] - Connecting to serial port [/dev/ttyACM1]
2017-06-19 18:59:53.877 [INFO ] [ndler.ZigBeeCoordinatorCC2531Handler] - Serial port [/dev/ttyACM1] is initialized.
2017-06-19 18:59:55.589 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - initResponse is JOINED
2017-06-19 18:59:55.589 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - initializeNetwork is true
2017-06-19 19:00:51.184 [DEBUG] [bee.discovery.ZigBeeDiscoveryService] - Starting ZigBee scan for zigbee:coordinator_cc2531:d7fc4893
2017-06-19 19:00:51.184 [ERROR] [etwork.impl.ZigBeeNetworkManagerImpl] - Synchronous command send failed due to IO exception.
    java.io.IOException: Input/output error in writeByte
    at gnu.io.RXTXPort.writeByte(Native Method)
    at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1145)
    at com.zsmartsystems.zigbee.dongle.cc2531.network.impl.CommandInterfaceImpl.sendRaw(CommandInterfaceImpl.java:298)
    at com.zsmartsystems.zigbee.dongle.cc2531.network.impl.CommandInterfaceImpl.sendPacket(CommandInterfaceImpl.java:179)
    at com.zsmartsystems.zigbee.dongle.cc2531.network.impl.CommandInterfaceImpl.sendSynchronousCommand(CommandInterfaceImpl.java:264)
    at com.zsmartsystems.zigbee.dongle.cc2531.network.impl.ZigBeeNetworkManagerImpl.sendSynchronous(ZigBeeNetworkManagerImpl.java:832)
    at com.zsmartsystems.zigbee.dongle.cc2531.network.impl.ZigBeeNetworkManagerImpl.sendSynchronous(ZigBeeNetworkManagerImpl.java:807)
    at com.zsmartsystems.zigbee.dongle.cc2531.network.impl.ZigBeeNetworkManagerImpl.sendCommand(ZigBeeNetworkManagerImpl.java:803)
    at com.zsmartsystems.zigbee.dongle.cc2531.ZigBeeDongleTiCc2531.sendCommand(ZigBeeDongleTiCc2531.java:198)
    at com.zsmartsystems.zigbee.ZigBeeNetworkManager.sendCommand(ZigBeeNetworkManager.java:484)
    at com.zsmartsystems.zigbee.ZigBeeNetworkManager.permitJoin(ZigBeeNetworkManager.java:944)
    at com.zsmartsystems.zigbee.ZigBeeNetworkManager.permitJoin(ZigBeeNetworkManager.java:917)
    at org.openhab.binding.zigbee.handler.ZigBeeCoordinatorHandler.startDeviceDiscovery(ZigBeeCoordinatorHandler.java:467)
    at org.openhab.binding.zigbee.discovery.ZigBeeDiscoveryService.startScan(ZigBeeDiscoveryService.java:85)
    at org.eclipse.smarthome.config.discovery.AbstractDiscoveryService.startScan(AbstractDiscoveryService.java:199)
    at org.eclipse.smarthome.config.discovery.internal.DiscoveryServiceRegistryImpl.startScan(DiscoveryServiceRegistryImpl.java:382)
    at org.eclipse.smarthome.config.discovery.internal.DiscoveryServiceRegistryImpl.startScans(DiscoveryServiceRegistryImpl.java:358)
    at org.eclipse.smarthome.config.discovery.internal.DiscoveryServiceRegistryImpl.startScan(DiscoveryServiceRegistryImpl.java:216)
    at org.eclipse.smarthome.io.rest.core.discovery.DiscoveryResource.scan(DiscoveryResource.java:84)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_131]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_131]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_131]
    at java.lang.reflect.Method.invoke(Method.java:498)[:1.8.0_131]
    at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)[158:org.glassfish.jersey.core.jersey-server:2.22.2]
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)[158:org.glassfish.jersey.core.jersey-server:2.22.2]
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)[158:org.glassfish.jersey.core.jersey-server:2.22.2]
    at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160)[158:org.glassfish.jersey.core.jerse$
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)[158:org.glassfish.jersey.core.jersey-server:2.22.2]
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)[158:org.glassfish.jersey.core.jersey-server:2.22.2]
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)[158:org.glassfish.jersey.core.jersey-server:2.22.2]
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)[158:org.glassfish.jersey.core.jersey-server:2.22.2]
    at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326)[158:org.glassfish.jersey.core.jersey-server:2.22.2]
    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)[157:org.glassfish.jersey.core.jersey-common:2.22.2]
    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)[157:org.glassfish.jersey.core.jersey-common:2.22.2]
    at org.glassfish.jersey.internal.Errors.process(Errors.java:315)[157:org.glassfish.jersey.core.jersey-common:2.22.2]
    at org.glassfish.jersey.internal.Errors.process(Errors.java:297)[157:org.glassfish.jersey.core.jersey-common:2.22.2]
    at org.glassfish.jersey.internal.Errors.process(Errors.java:267)[157:org.glassfish.jersey.core.jersey-common:2.22.2]
    at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)[157:org.glassfish.jersey.core.jersey-common:2.22.2]
    at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)[158:org.glassfish.jersey.core.jersey-server:2.22.2]
    at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)[158:org.glassfish.jersey.core.jersey-server:2.22.2]
    at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473)[155:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]
    at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427)[155:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]
    at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388)[155:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]
    at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341)[155:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]
    at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228)[155:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]
    at com.eclipsesource.jaxrs.publisher.internal.ServletContainerBridge.service(ServletContainerBridge.java:76)[10:com.eclipsesource.jaxrs.publisher:5.3.1.201602281253]
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)[81:org.eclipse.jetty.servlet:9.2.19.v20160908]
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)[81:org.eclipse.jetty.servlet:9.2.19.v20160908]
    at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71)[172:org.ops4j.pax.web.pax-web-jetty:4.3.0]
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)[80:org.eclipse.jetty.server:9.2.19.v20160908]
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)[79:org.eclipse.jetty.security:9.2.19.v20160908]
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)[80:org.eclipse.jetty.server:9.2.19.v20160908]
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)[80:org.eclipse.jetty.server:9.2.19.v20160908]
    at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:287)[172:org.ops4j.pax.web.pax-web-jetty:4.3.0]
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)[81:org.eclipse.jetty.servlet:9.2.19.v20160908]
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)[80:org.eclipse.jetty.server:9.2.19.v20160908]
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)[80:org.eclipse.jetty.server:9.2.19.v20160908]
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[80:org.eclipse.jetty.server:9.2.19.v20160908]
    at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80)[172:org.ops4j.pax.web.pax-web-jetty:4.3.0]
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[80:org.eclipse.jetty.server:9.2.19.v20160908]
    at org.eclipse.jetty.server.Server.handle(Server.java:499)[80:org.eclipse.jetty.server:9.2.19.v20160908]
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)[80:org.eclipse.jetty.server:9.2.19.v20160908]
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)[80:org.eclipse.jetty.server:9.2.19.v20160908]
    at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)[72:org.eclipse.jetty.io:9.2.19.v20160908]
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[83:org.eclipse.jetty.util:9.2.19.v20160908]
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[83:org.eclipse.jetty.util:9.2.19.v20160908]
    at java.lang.Thread.run(Thread.java:748)[:1.8.0_131]

I’ve seen this before with some Chinese sticks. I don’t know what causes it - it looks like the serial port (ie USB) momentarily drops and the serial driver throws an exception.

Is your stick a TI stick, or is it from somewhere else? What firmware is running?

(ps. Please don’t post logs as quotes - use the </> button to format the block. It’s very hard to read when you they are posted as quotes).

Updated formatting - thank you for the note. This is a TI 2531 stick programmed with a TI CC Debugger. I’ve tried this with both:

Z-Stack Home 1.2.2a.44539\Projects\zstack\ZAP\ZNP-HexFiles\CC2531\CC2531ZNP-Pro-Secure_LinkKeyJoin.hex
Z-Stack Home 1.2.2a.44539\Projects\zstack\ZAP\ZNP-HexFiles\CC2531\CC2531ZNP-Pro-Secure_Standard.hex

The error log above is from CC2531ZNP-Pro-Secure_LinkKeyJoin.hex

Strange - I don’t know what this is then - sorry.

I’ve now updated the binding with the latest changes. This refactors the converters, and fixes a few bugs including the issue where color changes were happening slowly (although the issue was not limited to color changes). It also adds the color temperature channel.

I’d welcome feedback. Here’s it’s now working nicely with a Hue bulb I’m using for testing…

This should also be added to the main OH repository in the coming day or two so that the binding can be installed through PaperUI.

I want to beta test this also!
Any suggestions on where I can get a good quality ZigBee stick? (that has been tested and working with the binding)

Completely wrong! It has just been added TODAY! Build #963 already includes it and the docs can be found here: http://docs.openhab.org/addons/bindings/zigbee/readme.html

Have fun :slight_smile:

2 Likes

http://i.imgur.com/vkMfQug.gif

It’s a big day for home automation enthusiasts :wink: :beers:

The only thing missing are ZigBee dongles with firmwares to buy - that is still a major obstacle for most users, I am afraid :confused:

I agree - all dongles at the moment require a bit of work to get working :frowning: .

I will look to add support for the ConBee dongle which is available in two forms - a RPi board, and a USB stick. I’ll get one ordered up and try and get this running quickly to improve the options…

3 Likes

Perfect timing for me to ask… would the Linear HUSBZB-1 be compatible with this binding?

https://www.nortekcontrol.com/pdf/manuals/husbzb-1-instructions.pdf

The specification section lists ZigBee Developer’s Kit Silicon Labs EmberZNet
Pro Release 5.4.

Well, if it’s an Ember inside, and the 5.4 is the Silabs version, then it could be, but I would not like to state that for sure without more info…

My guess is it will work - but don’t blame me if it doesn’t :wink: .