Zigbee binding

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: .

I’ll take the chance and let you know in a few days :slight_smile:. Thank you!

Great work, thanks for your effort, as soon as I get some time I will try it out!

Except from CC2531 I have CC2538 and CC2650 boards that should be able to use the same TI stack, but sometimes the “magic” to exit bootloader differs, can you tell what is used by the binding, or guide me to where I find it in the code?
Where would be a good place to hook into the code if i would like to adapt it and react on a device(bulb) getting back online after being powered off? Or is that posted to the eventbus?

Best regards,
Mattias

I will likely make this configurable as it is currently not very easy to change this as it’s in the low level libraries.

Really I would suggest to avoid hacking [quote=“elevation, post:128, topic:15763”]
Or is that posted to the eventbus?
[/quote]

It’s possible already to trigger rules when a thing goes on/off line…

Hi @chris,
I’ve updated the test environment to snapshot and installed the binding through PaperUI:

167 | Active   |  90 | 2.1.0.201706222153     | openHAB Core
...
211 | Active   |  80 | 2.1.0.201706222153     | ZigBee Binding

In the first step, I left the existing CC2531 coordinator thing configured and removed just the ZLL lamps.
Doing so, I was able to discover the bulbs and the RGBW strip. BUT: I got not items linked. Not in “simple mode” nor manually.

So I decided to remove the coordinator thing as well and tried starting over with it. When configuring the coordinator again, it is not initializing:

2017-06-23 13:50:17.467 [DEBUG] [zigbee.internal.ZigBeeHandlerFactory] - Creating coordinator handler for org.eclipse.smarthome.core.thing.internal.BridgeImpl@c38d2455
2017-06-23 13:50:17.521 [DEBUG] [ndler.ZigBeeCoordinatorCC2531Handler] - Initializing ZigBee CC2531EMK serial bridge handler.
2017-06-23 13:50:17.523 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Initializing ZigBee network [zigbee:coordinator_cc2531:ef4fa80d].
2017-06-23 13:50:17.526 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Channel -1
2017-06-23 13:50:17.529 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - PANID 0
2017-06-23 13:50:17.531 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - EPANID 0000000000000000
2017-06-23 13:50:17.533 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Key 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2017-06-23 13:50:17.535 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Initialising network
2017-06-23 13:50:17.538 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Created random ZigBee PAN ID [F2C0].
2017-06-23 13:50:22.534 [WARN ] [ome.core.thing.internal.ThingManager] - **Initializing handler for thing 'zigbee:coordinator_cc2531:ef4fa80d' takes more than 5000ms.**
2017-06-23 13:50:22.552 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Created random ZigBee extended PAN ID [EEC77E2C8AD83370].
2017-06-23 13:51:21.039 [DEBUG] [ndler.ZigBeeCoordinatorCC2531Handler] - Closing ZigBee CC2531 serial port

I did the same with a different zigbee stick :


2017-06-23 13:51:51.271 [DEBUG] [zigbee.internal.ZigBeeHandlerFactory] - Creating coordinator handler for org.eclipse.smarthome.core.thing.internal.BridgeImpl@b3cd1cbe
2017-06-23 13:51:51.333 [DEBUG] [ndler.ZigBeeCoordinatorCC2531Handler] - Initializing ZigBee CC2531EMK serial bridge handler.
2017-06-23 13:51:51.335 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Initializing ZigBee network [zigbee:coordinator_cc2531:bb33a3d9].
2017-06-23 13:51:51.339 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Channel -1
2017-06-23 13:51:51.341 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - PANID 0
2017-06-23 13:51:51.342 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - EPANID 0000000000000000
2017-06-23 13:51:51.344 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Key 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2017-06-23 13:51:51.346 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Initialising network
2017-06-23 13:51:51.348 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Created random ZigBee PAN ID [1DE2].
2017-06-23 13:51:56.339 [WARN ] [ome.core.thing.internal.ThingManager] - Initializing handler for thing 'zigbee:coordinator_cc2531:bb33a3d9' takes more than 5000ms.
2017-06-23 13:51:56.347 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Created random ZigBee extended PAN ID [ABF47A7A683E9C04].

First stick is a CC2540USB, second is a genuine TI CC2531EMK.
Firmware on both is CC2531ZNP-Pro-Secure_LinkKeyJoin.hex.
Both sticks worked quite well on the former version of the binding (from May, 20th)

Should I reflash back to CC2531ZNP-Pro-Secure_Standard.hex? The “…LinkKeyJoin.hex” was required for the Ikea Tradfri to join …

EDIT:
I’ve uninstalled the zigbee binding through Paper UI and copied your jar from yesterday into the addons folder:

213 | Active   |  80 | 2.1.0.201706221911     | ZigBee Binding

It behaves slightly different. Now the the serial gets initialized but the coordinator remains “offline”:

2017-06-23 15:17:20.199 [DEBUG] [org.openhab.binding.zigbee          ] - ServiceEvent REGISTERED - {org.openhab.binding.zigbee.internal.ZigBeeConfigProvider}={component.name=org.openhab.binding.zigbee.ConfigDescription, component.id=14, service.id=186, service.bundleid=213, service.scope=bundle} - org.openhab.binding.zigbee
2017-06-23 15:17:38.013 [DEBUG] [zigbee.internal.ZigBeeHandlerFactory] - Creating coordinator handler for org.eclipse.smarthome.core.thing.internal.BridgeImpl@bd150b20
2017-06-23 15:17:38.171 [DEBUG] [ndler.ZigBeeCoordinatorCC2531Handler] - Initializing ZigBee CC2531EMK serial bridge handler.
2017-06-23 15:17:38.172 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Initializing ZigBee network [zigbee:coordinator_cc2531:ce3dca80].
2017-06-23 15:17:38.176 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Channel -1.0
2017-06-23 15:17:38.178 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - PANID 21641.0
2017-06-23 15:17:38.180 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - EPANID 1.68943762438732595E+18
2017-06-23 15:17:38.182 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Initializing ZigBee network [zigbee:coordinator_cc2531:ce3dca80].
2017-06-23 15:17:38.190 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - ZigBee initialisation exception
java.lang.ClassCastException: java.math.BigDecimal cannot be cast to java.lang.String
        at org.openhab.binding.zigbee.handler.ZigBeeCoordinatorHandler.initialize(ZigBeeCoordinatorHandler.java:121)[213:org.openhab.binding.zigbee:2.1.0.201706221911]
        at org.openhab.binding.zigbee.handler.ZigBeeCoordinatorCC2531Handler.initialize(ZigBeeCoordinatorCC2531Handler.java:74)[213:org.openhab.binding.zigbee:2.1.0.201706221911]
        at org.eclipse.smarthome.core.thing.internal.ThingManager$9.call(ThingManager.java:741)[106:org.eclipse.smarthome.core.thing:0.9.0.201706211517]
        at org.eclipse.smarthome.core.thing.internal.ThingManager$9.call(ThingManager.java:1)[106:org.eclipse.smarthome.core.thing:0.9.0.201706211517]
        at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:181)[99:org.eclipse.smarthome.core:0.9.0.201706211517]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_131]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_131]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_131]
        at java.lang.Thread.run(Thread.java:748)[:1.8.0_131]
2017-06-23 15:17:38.309 [DEBUG] [ndler.ZigBeeCoordinatorCC2531Handler] - ZigBee Coordinator CC2531 opening Port:'/dev/ttyACM0' PAN:5489, Channel:-1
2017-06-23 15:17:38.320 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Scheduling ZigBee start
2017-06-23 15:17:39.956 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - ZigBee network starting
2017-06-23 15:17:39.958 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Initialising ZigBee coordinator
2017-06-23 15:17:39.976 [DEBUG] [bee.discovery.ZigBeeDiscoveryService] - Creating ZigBee discovery service for zigbee:coordinator_cc2531:ce3dca80
2017-06-23 15:17:39.978 [DEBUG] [bee.discovery.ZigBeeDiscoveryService] - Activating ZigBee discovery service for zigbee:coordinator_cc2531:ce3dca80
2017-06-23 15:17:39.987 [DEBUG] [org.openhab.binding.zigbee          ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=268, service.bundleid=213, service.scope=singleton} - org.openhab.binding.zigbee
2017-06-23 15:17:40.126 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Key initialise null
2017-06-23 15:17:40.130 [DEBUG] [e.dongle.cc2531.ZigBeeDongleTiCc2531] - CC2531 transport initialize
2017-06-23 15:17:40.160 [DEBUG] [ndler.ZigBeeCoordinatorCC2531Handler] - Opening ZigBee CC2531 serial port
2017-06-23 15:17:40.166 [DEBUG] [ndler.ZigBeeCoordinatorCC2531Handler] - Connecting to serial port [/dev/ttyACM0]
2017-06-23 15:17:41.628 [INFO ] [ndler.ZigBeeCoordinatorCC2531Handler] - Serial port [/dev/ttyACM0] is initialized.
2017-06-23 15:17:41.784 [DEBUG] [31.network.impl.CommandInterfaceImpl] - ->  SYS_RESET (Packet: subsystem=null, length=1, apiId=41 00, data=FE 01 41 00 01 41, checksum=41, error=false)
2017-06-23 15:17:43.719 [DEBUG] [31.network.impl.CommandInterfaceImpl] - <-- SYS_RESET_RESPONSE (FE 06 41 80 00 02 00 02 06 03 C2)
2017-06-23 15:17:43.760 [DEBUG] [31.network.impl.CommandInterfaceImpl] - Received Async Cmd: Packet: subsystem=null, length=6, apiId=41 80, data=FE 06 41 80 00 02 00 02 06 03 C2, checksum=C2, error=false
2017-06-23 15:17:43.771 [DEBUG] [31.network.impl.CommandInterfaceImpl] - ->  SYS_VERSION (Packet: subsystem=null, length=0, apiId=21 02, data=FE 00 21 02 23, checksum=23, error=false)
2017-06-23 15:17:43.791 [DEBUG] [31.network.impl.CommandInterfaceImpl] - <-  SYS_VERSION_RESPONSE (FE 05 61 02 02 00 02 06 03 63)
2017-06-23 15:17:43.815 [DEBUG] [etwork.impl.ZigBeeNetworkManagerImpl] - CC2531 version is Software=2.6 Product=0 Hardware=3 Transport=2
2017-06-23 15:17:43.822 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - initResponse is JOINED
2017-06-23 15:17:43.826 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - initializeNetwork is false
2017-06-23 15:17:43.829 [DEBUG] [31.network.impl.CommandInterfaceImpl] - ->  ZB_GET_DEVICE_INFO (Packet: subsystem=null, length=1, apiId=26 06, data=FE 01 26 06 05 24, checksum=24, error=false)
2017-06-23 15:17:43.854 [DEBUG] [31.network.impl.CommandInterfaceImpl] - <-  ZB_GET_DEVICE_INFO_RSP (FE 09 66 06 05 00 00 00 00 00 00 00 00 6C)
2017-06-23 15:17:43.859 [DEBUG] [31.network.impl.CommandInterfaceImpl] - ->  ZB_GET_DEVICE_INFO (Packet: subsystem=null, length=1, apiId=26 06, data=FE 01 26 06 06 27, checksum=27, error=false)
2017-06-23 15:17:43.871 [DEBUG] [31.network.impl.CommandInterfaceImpl] - <-  ZB_GET_DEVICE_INFO_RSP (FE 09 66 06 06 FE FF 00 00 00 00 00 00 6E)
2017-06-23 15:17:43.886 [DEBUG] [31.network.impl.CommandInterfaceImpl] - ->  ZB_GET_DEVICE_INFO (Packet: subsystem=null, length=1, apiId=26 06, data=FE 01 26 06 07 26, checksum=26, error=false)
2017-06-23 15:17:43.947 [DEBUG] [31.network.impl.CommandInterfaceImpl] - <-  ZB_GET_DEVICE_INFO_RSP (FE 09 66 06 07 00 50 C9 7F 91 16 72 17 6A)
2017-06-23 15:17:43.950 [DEBUG] [e.dongle.cc2531.ZigBeeDongleTiCc2531] - CC2531 transport startup
2017-06-23 15:17:44.032 [DEBUG] [etwork.impl.ZigBeeNetworkManagerImpl] - Creating network as Coordinator
2017-06-23 15:17:44.035 [DEBUG] [31.network.impl.CommandInterfaceImpl] - ->  ZDO_MSG_CB_REGISTER (Packet: subsystem=null, length=2, apiId=25 3E, data=FE 02 25 3E FF FF 19, checksum=19, error=false)
2017-06-23 15:17:44.047 [DEBUG] [31.network.impl.CommandInterfaceImpl] - <-  ZDO_MSG_CB_REGISTER_SRSP (FE 01 65 3E 00 5A)
2017-06-23 15:17:44.061 [DEBUG] [31.network.impl.CommandInterfaceImpl] - ->  ZB_WRITE_CONFIGURATION (Packet: subsystem=null, length=3, apiId=26 05, data=FE 03 26 05 8F 01 01 AF, checksum=AF, error=false)
2017-06-23 15:17:44.085 [DEBUG] [31.network.impl.CommandInterfaceImpl] - <-  ZB_WRITE_CONFIGURATION_RSP (FE 01 66 05 00 62)
2017-06-23 15:17:44.096 [DEBUG] [31.network.impl.CommandInterfaceImpl] - ->  ZDO_STARTUP_FROM_APP (Packet: subsystem=null, length=2, apiId=25 40, data=FE 02 25 40 00 00 67, checksum=67, error=false)
2017-06-23 15:17:44.924 [DEBUG] [31.network.impl.CommandInterfaceImpl] - <-  ZDO_STARTUP_FROM_APP_SRSP (FE 01 65 40 01 25)
2017-06-23 15:17:44.927 [INFO ] [etwork.impl.ZigBeeNetworkManagerImpl] - Initialized ZigBee network with new or reset network state.

Any ideas?

1 Like

I’m not sure I can answer the question about what version of the TI firmware is needed right now, but I’ll make a few general comments that might help you and others… TI firmware is a bit of a pain which is why I’d really like to find a simple, commercial stick that is readily available…

Anyway…

I think it would be good to get a detailed debug log - enabling debug on com.zsmartsystems.zigbee to see the low level stuff. Most of this hasn’t changed since the last version, and I’ve been testing with the TI stick so I’m reasonably confident it should be ok. The one exception is initialisation - I’ve not reinitialised a stick and in this are a few changes as I changed the EPanID from a long to a new class to avoid a problem with long/unsigned long values…

Let me take a look tonight and get back to you…

However, not that it helps you now, but you shouldn’t really have needed to reinitialise the stick etc. The devices that are associated to the network should continue to work - the thing that will change is the channels and therefore the items that are linked to them as I changed the item names during the refactoring.

That’s the log while logging of both relevant bundles is set to DEBUG:

openhab> log:list
Logger                                                      | Level
-------------------------------------------------------------------
ROOT                                                        | WARN
com.zsmartsystems.zigbee                                    | DEBUG
...
org.openhab.binding.zigbee                                  | DEBUG

openhab>

When creating a new coordinator:

2017-06-23 20:46:41.471 [DEBUG] [zigbee.internal.ZigBeeHandlerFactory] - Creating coordinator handler for org.eclipse.smarthome.core.thing.internal.BridgeImpl@24ac7ba2
2017-06-23 20:46:41.523 [DEBUG] [ndler.ZigBeeCoordinatorCC2531Handler] - Initializing ZigBee CC2531EMK serial bridge handler.
2017-06-23 20:46:41.525 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Initializing ZigBee network [zigbee:coordinator_cc2531:55335adc].
2017-06-23 20:46:41.529 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Channel -1
2017-06-23 20:46:41.531 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - PANID 0
2017-06-23 20:46:41.532 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - EPANID 0000000000000000
2017-06-23 20:46:41.534 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Key 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2017-06-23 20:46:41.536 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Initialising network
2017-06-23 20:46:41.539 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Created random ZigBee PAN ID [AAE4].
2017-06-23 20:46:46.536 [WARN ] [ome.core.thing.internal.ThingManager] - Initializing handler for thing 'zigbee:coordinator_cc2531:55335adc' takes more than 5000ms.
2017-06-23 20:46:46.549 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Created random ZigBee extended PAN ID [001082EED7306000].
2017-06-23 20:46:46.566 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Key String 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2017-06-23 20:46:46.569 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Key array [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
2017-06-23 20:46:46.570 [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-23 20:46:46.591 [DEBUG] [ndler.ZigBeeCoordinatorCC2531Handler] - ZigBee Coordinator CC2531 opening Port:'/dev/ttyACM0' PAN:aae4, Channel:-1
2017-06-23 20:46:46.593 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Scheduling ZigBee start
2017-06-23 20:46:47.595 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - ZigBee network starting
2017-06-23 20:46:47.599 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Initialising ZigBee coordinator
2017-06-23 20:46:47.603 [DEBUG] [bee.discovery.ZigBeeDiscoveryService] - Creating ZigBee discovery service for zigbee:coordinator_cc2531:55335adc
2017-06-23 20:46:47.606 [DEBUG] [bee.discovery.ZigBeeDiscoveryService] - Activating ZigBee discovery service for zigbee:coordinator_cc2531:55335adc
2017-06-23 20:46:47.622 [DEBUG] [org.openhab.binding.zigbee          ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=329, service.bundleid=213, service.scope=singleton} - org.openhab.binding.zigbee
2017-06-23 20:46:47.626 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Key initialise [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
2017-06-23 20:46:47.629 [DEBUG] [e.dongle.cc2531.ZigBeeDongleTiCc2531] - CC2531 transport initialize
2017-06-23 20:46:47.634 [DEBUG] [ndler.ZigBeeCoordinatorCC2531Handler] - Opening ZigBee CC2531 serial port
2017-06-23 20:46:47.637 [DEBUG] [ndler.ZigBeeCoordinatorCC2531Handler] - Connecting to serial port [/dev/ttyACM0]
2017-06-23 20:46:47.677 [INFO ] [ndler.ZigBeeCoordinatorCC2531Handler] - Serial port [/dev/ttyACM0] is initialized.
2017-06-23 20:46:47.693 [DEBUG] [31.network.impl.CommandInterfaceImpl] - ->  SYS_RESET (Packet: subsystem=null, length=1, apiId=41 00, data=FE 01 41 00 01 41, checksum=41, error=false)
2017-06-23 20:46:49.966 [DEBUG] [31.network.impl.CommandInterfaceImpl] - <-- SYS_RESET_RESPONSE (FE 06 41 80 00 02 00 02 06 03 C2)
2017-06-23 20:46:49.971 [DEBUG] [31.network.impl.CommandInterfaceImpl] - Received Async Cmd: Packet: subsystem=null, length=6, apiId=41 80, data=FE 06 41 80 00 02 00 02 06 03 C2, checksum=C2, error=false
2017-06-23 20:46:49.975 [DEBUG] [31.network.impl.CommandInterfaceImpl] - ->  SYS_VERSION (Packet: subsystem=null, length=0, apiId=21 02, data=FE 00 21 02 23, checksum=23, error=false)
2017-06-23 20:46:49.986 [DEBUG] [31.network.impl.CommandInterfaceImpl] - <-  SYS_VERSION_RESPONSE (FE 05 61 02 02 00 02 06 03 63)
2017-06-23 20:46:49.989 [DEBUG] [etwork.impl.ZigBeeNetworkManagerImpl] - CC2531 version is Software=2.6 Product=0 Hardware=3 Transport=2
2017-06-23 20:46:49.996 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - initResponse is JOINED
2017-06-23 20:46:50.000 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - initializeNetwork is true
2017-06-23 20:46:50.004 [DEBUG] [31.network.impl.CommandInterfaceImpl] - ->  ZB_GET_DEVICE_INFO (Packet: subsystem=null, length=1, apiId=26 06, data=FE 01 26 06 05 24, checksum=24, error=false)
2017-06-23 20:46:50.019 [DEBUG] [31.network.impl.CommandInterfaceImpl] - <-  ZB_GET_DEVICE_INFO_RSP (FE 09 66 06 05 00 00 00 00 00 00 00 00 6C)
2017-06-23 20:46:50.021 [DEBUG] [31.network.impl.CommandInterfaceImpl] - ->  ZB_GET_DEVICE_INFO (Packet: subsystem=null, length=1, apiId=26 06, data=FE 01 26 06 06 27, checksum=27, error=false)
2017-06-23 20:46:50.037 [DEBUG] [31.network.impl.CommandInterfaceImpl] - <-  ZB_GET_DEVICE_INFO_RSP (FE 09 66 06 06 FE FF 00 00 00 00 00 00 6E)
2017-06-23 20:46:50.039 [DEBUG] [31.network.impl.CommandInterfaceImpl] - ->  ZB_GET_DEVICE_INFO (Packet: subsystem=null, length=1, apiId=26 06, data=FE 01 26 06 07 26, checksum=26, error=false)
2017-06-23 20:46:50.053 [DEBUG] [31.network.impl.CommandInterfaceImpl] - <-  ZB_GET_DEVICE_INFO_RSP (FE 09 66 06 07 00 E0 DD E9 55 08 E1 4D 4B)
2017-06-23 20:46:50.056 [DEBUG] [31.network.impl.CommandInterfaceImpl] - ->  ZB_WRITE_CONFIGURATION (Packet: subsystem=null, length=18, apiId=26 05, data=FE 12 26 05 62 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 43, checksum=43, error=false)
2017-06-23 20:46:50.085 [DEBUG] [31.network.impl.CommandInterfaceImpl] - <-  ZB_WRITE_CONFIGURATION_RSP (FE 01 66 05 00 62)
2017-06-23 20:46:50.088 [DEBUG] [31.network.impl.CommandInterfaceImpl] - ->  ZB_WRITE_CONFIGURATION (Packet: subsystem=null, length=10, apiId=26 05, data=FE 0A 26 05 2D 08 00 60 30 D7 EE 82 10 00 F7, checksum=F7, error=false)
2017-06-23 20:46:50.109 [DEBUG] [31.network.impl.CommandInterfaceImpl] - <-  ZB_WRITE_CONFIGURATION_RSP (FE 01 66 05 00 62)
2017-06-23 20:46:50.111 [DEBUG] [e.dongle.cc2531.ZigBeeDongleTiCc2531] - CC2531 transport startup
2017-06-23 20:46:50.116 [DEBUG] [etwork.impl.ZigBeeNetworkManagerImpl] - Resetting network stack.
2017-06-23 20:46:50.120 [DEBUG] [31.network.impl.CommandInterfaceImpl] - ->  ZB_WRITE_CONFIGURATION (Packet: subsystem=null, length=3, apiId=26 05, data=FE 03 26 05 03 01 03 21, checksum=21, error=false)
2017-06-23 20:46:50.136 [DEBUG] [31.network.impl.CommandInterfaceImpl] - <-  ZB_WRITE_CONFIGURATION_RSP (FE 01 66 05 00 62)
2017-06-23 20:46:50.138 [DEBUG] [etwork.impl.ZigBeeNetworkManagerImpl] - Changing the Network Mode to Coordinator.
2017-06-23 20:46:50.143 [DEBUG] [31.network.impl.CommandInterfaceImpl] - ->  ZB_WRITE_CONFIGURATION (Packet: subsystem=null, length=3, apiId=26 05, data=FE 03 26 05 87 01 00 A6, checksum=A6, error=false)
2017-06-23 20:46:50.165 [DEBUG] [31.network.impl.CommandInterfaceImpl] - <-  ZB_WRITE_CONFIGURATION_RSP (FE 01 66 05 00 62)
2017-06-23 20:46:50.167 [DEBUG] [etwork.impl.ZigBeeNetworkManagerImpl] - Resetting CC2531 dongle.
2017-06-23 20:46:50.172 [DEBUG] [31.network.impl.CommandInterfaceImpl] - ->  SYS_RESET (Packet: subsystem=null, length=1, apiId=41 00, data=FE 01 41 00 01 41, checksum=41, error=false)
2017-06-23 20:46:52.847 [DEBUG] [31.network.impl.CommandInterfaceImpl] - <-- SYS_RESET_RESPONSE (FE 06 41 80 00 02 00 02 06 03 C2)
2017-06-23 20:46:52.849 [DEBUG] [31.network.impl.CommandInterfaceImpl] - Received Async Cmd: Packet: subsystem=null, length=6, apiId=41 80, data=FE 06 41 80 00 02 00 02 06 03 C2, checksum=C2, error=false
2017-06-23 20:46:52.857 [DEBUG] [e.dongle.cc2531.ZigBeeDongleTiCc2531] - Unhandled ZToolPacket type 0x4180
2017-06-23 20:46:52.860 [DEBUG] [etwork.impl.ZigBeeNetworkManagerImpl] - Setting channel to 0.
2017-06-23 20:46:52.865 [DEBUG] [31.network.impl.CommandInterfaceImpl] - ->  ZB_WRITE_CONFIGURATION (Packet: subsystem=null, length=6, apiId=26 05, data=FE 06 26 05 84 04 01 00 00 00 A4, checksum=A4, error=false)
2017-06-23 20:46:52.886 [DEBUG] [31.network.impl.CommandInterfaceImpl] - <-  ZB_WRITE_CONFIGURATION_RSP (FE 01 66 05 00 62)
2017-06-23 20:46:52.889 [DEBUG] [etwork.impl.ZigBeeNetworkManagerImpl] - Setting PAN to FFFF.
2017-06-23 20:46:52.894 [DEBUG] [31.network.impl.CommandInterfaceImpl] - ->  ZB_WRITE_CONFIGURATION (Packet: subsystem=null, length=4, apiId=26 05, data=FE 04 26 05 83 02 FF FF A6, checksum=A6, error=false)
2017-06-23 20:46:52.918 [DEBUG] [31.network.impl.CommandInterfaceImpl] - <-  ZB_WRITE_CONFIGURATION_RSP (FE 01 66 05 00 62)
2017-06-23 20:46:52.920 [DEBUG] [etwork.impl.ZigBeeNetworkManagerImpl] - Setting Extended PAN ID to 1082EED7306000.
2017-06-23 20:46:52.924 [DEBUG] [31.network.impl.CommandInterfaceImpl] - ->  ZB_WRITE_CONFIGURATION (Packet: subsystem=null, length=10, apiId=26 05, data=FE 0A 26 05 2D 08 00 60 30 D7 EE 82 10 00 F7, checksum=F7, error=false)
2017-06-23 20:46:52.950 [DEBUG] [31.network.impl.CommandInterfaceImpl] - <-  ZB_WRITE_CONFIGURATION_RSP (FE 01 66 05 00 62)
2017-06-23 20:46:52.953 [DEBUG] [etwork.impl.ZigBeeNetworkManagerImpl] - Setting NETWORK_KEY.
2017-06-23 20:46:52.957 [DEBUG] [31.network.impl.CommandInterfaceImpl] - ->  ZB_WRITE_CONFIGURATION (Packet: subsystem=null, length=18, apiId=26 05, data=FE 12 26 05 62 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 43, checksum=43, error=false)
2017-06-23 20:46:52.988 [DEBUG] [31.network.impl.CommandInterfaceImpl] - <-  ZB_WRITE_CONFIGURATION_RSP (FE 01 66 05 00 62)
2017-06-23 20:46:52.990 [DEBUG] [etwork.impl.ZigBeeNetworkManagerImpl] - Setting Distribute Network Key to true.
2017-06-23 20:46:53.002 [DEBUG] [31.network.impl.CommandInterfaceImpl] - ->  ZB_WRITE_CONFIGURATION (Packet: subsystem=null, length=3, apiId=26 05, data=FE 03 26 05 63 01 00 42, checksum=42, error=false)
2017-06-23 20:46:53.025 [DEBUG] [31.network.impl.CommandInterfaceImpl] - <-  ZB_WRITE_CONFIGURATION_RSP (FE 01 66 05 00 62)
2017-06-23 20:46:53.027 [DEBUG] [etwork.impl.ZigBeeNetworkManagerImpl] - Setting Security Mode to 1.
2017-06-23 20:46:53.032 [DEBUG] [31.network.impl.CommandInterfaceImpl] - ->  ZB_WRITE_CONFIGURATION (Packet: subsystem=null, length=3, apiId=26 05, data=FE 03 26 05 64 01 01 44, checksum=44, error=false)
2017-06-23 20:46:53.054 [DEBUG] [31.network.impl.CommandInterfaceImpl] - <-  ZB_WRITE_CONFIGURATION_RSP (FE 01 66 05 00 62)
2017-06-23 20:46:53.056 [DEBUG] [etwork.impl.ZigBeeNetworkManagerImpl] - Creating network as Coordinator
2017-06-23 20:46:53.062 [DEBUG] [31.network.impl.CommandInterfaceImpl] - ->  ZDO_MSG_CB_REGISTER (Packet: subsystem=null, length=2, apiId=25 3E, data=FE 02 25 3E FF FF 19, checksum=19, error=false)
2017-06-23 20:46:53.076 [DEBUG] [31.network.impl.CommandInterfaceImpl] - <-  ZDO_MSG_CB_REGISTER_SRSP (FE 01 65 3E 00 5A)
2017-06-23 20:46:53.079 [DEBUG] [31.network.impl.CommandInterfaceImpl] - ->  ZB_WRITE_CONFIGURATION (Packet: subsystem=null, length=3, apiId=26 05, data=FE 03 26 05 8F 01 01 AF, checksum=AF, error=false)
2017-06-23 20:46:53.097 [DEBUG] [31.network.impl.CommandInterfaceImpl] - <-  ZB_WRITE_CONFIGURATION_RSP (FE 01 66 05 00 62)
2017-06-23 20:46:53.100 [DEBUG] [31.network.impl.CommandInterfaceImpl] - ->  ZDO_STARTUP_FROM_APP (Packet: subsystem=null, length=2, apiId=25 40, data=FE 02 25 40 00 00 67, checksum=67, error=false)
2017-06-23 20:46:54.384 [DEBUG] [31.network.impl.CommandInterfaceImpl] - <-  ZDO_STARTUP_FROM_APP_SRSP (FE 01 65 40 01 25)
2017-06-23 20:46:54.386 [INFO ] [etwork.impl.ZigBeeNetworkManagerImpl] - Initialized ZigBee network with new or reset network state.

It remains on “initializing” and the green LED on the stick remains off…[quote=“chris, post:131, topic:15763”]
Let me take a look tonight and get back to you…
[/quote]

Thanks again in advance …

I’ve been able to reproduce the various issues once I reinitialise a coordinator. I’ve fixed a couple of problems, and will hopefully finish this off tomorrow morning.

Chris

I’ve just updated the binding and started a rebuild so hopefully it will be available in the system in 30 minutes or so. I intend to remove the download from my website to avoid confusion.

Hi @chris,
sorry for the late reply and many thanks for publishing this update :+1:

Unfortunately, I didn’t had the time for a thorough test yet.
But in a first quick check the bulbs from Philips and Ikea and the Osram RGBW strip are working properly.
Initialization and discovery have worked as well as the dimmer, switch and color channels.The lag issue seems to be gone as you wrote…

Yes, the color temperature channel is working too (many, many thanks for it!). The RGB types switch to CT mode when receiving a CT command and back to RGB mode when getting a color command. Perfect.

Obviosly, the supported range for CT commands is slightly different amoung the manufacturers:
While the Ikea and Philips react on all values between 0 and 100 percent, the Osram strip works just from 16 til 100 percent.

Hope I’ll find some more time tomorrow…

Hi @curlyel many thanks for the report - I’m glad things are working pretty well :slight_smile: .

It might be possible to add some scaling configuration for the CT - let’s see. I’ll have a read as I would have expected the implementation to be reasonably standard across manufacturers.

Cheers
Chris

Some success!

I changed my ESXI 6.5d Ubuntu 17.04 VM to be high priority mode, and I’m no longer getting the errors that I was before. I’ve also now updated to Openhab2 snapshot, and have added my first Zigbee device (Hue lighstrip (2nd gen)) and it will turn on and off! Thank you, Chris!!!

I’ve also tried adding another device and it’s throwing an error. Any thoughts?

Device: SmartThings SmartSense Motion (2015 model)

2017-06-25 20:32:47.856 [DEBUG] [31.network.impl.CommandInterfaceImpl] - <-- ZToolPacket (FE 0D 45 FF 00 00 00 32 80 00 00 00 00 00 00 00 00 05)
2017-06-25 20:32:47.856 [DEBUG] [31.network.impl.CommandInterfaceImpl] - Received Async Cmd: Packet: subsystem=null, length=13, apiId=45 FF, data=FE 0D 45 FF 00 00 00 32 80 00 00 00 00 00 00 00 00 05, checksum=05, error=false
2017-06-25 20:32:47.856 [DEBUG] [tsystems.zigbee.ZigBeeNetworkManager] - RX CMD: ManagementRoutingResponse [0/0 -> 0/0, cluster=8032, TID=NULL, status=SUCCESS, routingTableEntries=0, startIndex=0, routingTableListCount=0, routingTableList=[]]
2017-06-25 20:32:48.977 [DEBUG] [31.network.impl.CommandInterfaceImpl] - <-- ZToolPacket (FE 0C 45 CA 0E F3 CC 36 6B 05 00 6F 0D 00 00 00 88)
2017-06-25 20:32:48.977 [DEBUG] [31.network.impl.CommandInterfaceImpl] - Received Async Cmd: Packet: subsystem=null, length=12, apiId=45 CA, data=FE 0C 45 CA 0E F3 CC 36 6B 05 00 6F 0D 00 00 00 88, checksum=88, error=false
2017-06-25 20:32:48.977 [DEBUG] [e.dongle.cc2531.ZigBeeDongleTiCc2531] - Unhandled ZToolPacket type 0x45ca
2017-06-25 20:32:52.873 [DEBUG] [bee.internal.ZigBeeNetworkDiscoverer] - 45504: Discovery request POWER_DESCRIPTOR failed. Wait before retry.
2017-06-25 20:32:54.375 [DEBUG] [bee.internal.ZigBeeNetworkDiscoverer] - 45504: Ending node discovery
2017-06-25 20:32:57.731 [DEBUG] [31.network.impl.CommandInterfaceImpl] - <-- ZToolPacket (FE 0C 45 CA 0E F3 CC 36 6B 05 00 6F 0D 00 00 00 88)
2017-06-25 20:32:57.732 [DEBUG] [31.network.impl.CommandInterfaceImpl] - Received Async Cmd: Packet: subsystem=null, length=12, apiId=45 CA, data=FE 0C 45 CA 0E F3 CC 36 6B 05 00 6F 0D 00 00 00 88, checksum=88, error=false
2017-06-25 20:32:57.732 [DEBUG] [e.dongle.cc2531.ZigBeeDongleTiCc2531] - Unhandled ZToolPacket type 0x45ca
2017-06-25 20:32:57.839 [DEBUG] [bee.internal.ZigBeeNetworkDiscoverer] - Ieee Address for 62222 returned null
2017-06-25 20:32:57.839 [DEBUG] [bee.internal.ZigBeeNetworkDiscoverer] - 62222: Discovery request IEEE_ADDRESS failed. Wait before retry.

Battery devices are a pain in Zigbee - mostly they don’t respond. They are meant to wake up every few seconds (less than 7.5 if my memory is correct), and the router to which they are associated is meant to store messages to them until they wake, but in my experience, it’s not as reliable as ZWave…

I would try to manually wake up the device - I guess there’s a button used for association that you can press and it might wake it up for a few seconds while these messages are exchanged… I think I need to look more at how to handle battery devices :frowning: .

Also, I think there’s another issue with the SmartThings sensors that I need to look at. I bought a hub and want to sniff some of the comms between the device and the hub as I think there’s some extra messages being sent. Maybe this is different on your model - I probably have a newer one…

Hi @chris,
I did some more testing and like to share my observations. First of all, I’ve not found any issue in the binding itself up to now. All the channels are working as expected, no lags, no unexpected behaviour. All fine :slight_smile:

I’ve tested:

Philips HUE A60 RGB 2nd gen
Osram Lightify A60 TW
Osram Lightify RGBW strip
Osram Lightify Surface TW ceiling lamp
Ikea Tradfri GU10 white spectrum

With regards to the (power-) on/off behaviour and the reaction on color/CT-command while switched soft off, they act differently:

  1. Some lamps switch on fully bright on power on (HUE, all Lightify), others store the current status on power off and restore it on power on. (Ikea). Btw.: Ikea stores the CT value too…

  2. When switch a lamp soft off via ZLL, some act on CT commands but remain unlit (Ikea), others ignore it (Philips, Osram).

  3. Some accept CT from 0 til 100 percent (Ikea, Hue, Lightify Surface), others just from 16 til 100 percent (Lightify A60 TW, Ligtify RGBW strip)

  4. When issuing a dimming command while a lamp is soft off, it will will light up and dim to the requested value. The switch channel in openHAB remains untouched (“OFF”).

Knowing the above, you can never be sure, if the channel/item corresponds the real state of the lamps.

Q1: Is there an option to gather the current status of all channels from time to time or at least at some event (e.g. when a thing came online)?

Q2: Are the lamps reporting the CT range somehow? Is it possible to scale 0-100 percent to their range?

Q3: Implicite update on switching channel? Like:

  • When a ZLL bulb comes online, the switching channel should always update to “ON” (to be confirmed, if all manufacturers doing so)
  • When a dimming command of 0 percent, switching should update to “OFF”
  • When a dimming command of >0 percent, switching should update to “ON”

The latter (Q3) can easily solved via rules. But probably, it may be done in the binding already.

What do you think?