Zigbee binding

Great, thank you! My concern was that, when starting discovery, the coordinator would not turn discovery on for neighbor routers that have a join state of UNKNOWN.

This won’t happen. When discovery is started, a network wide broadcast is sent to all routers to enable join mode for 30 seconds (or it might be 60 seconds actually, but it’s a fixed time as required by ZB3).

Hey Chris, any progress in getting the Conbee dongles working?

I would love to use Zigbee natively in OH. I even would like to use it commercially.
But the cc2531 is a developer Kit and therefore nothing I can really place in my parents/customers house.
It seems like here, in Germany, the only available dongles are: Conbee, Qivicon, Ubisys. The other dongles (like the Linear HUSBZB-1) are not available and need to be imported. Yes, one can do this. You can even buy those cheap china clones, but I don’t want to bother myself with warranty or even liability when importing/using their hardware (I am not speaking of software!))

Conbee is not as cheap as the china clones but also not as expensive as TI and also available in many other countries, therefore I think it would great to support them and could help to increase the number of people using your binding. The only downside with conbee as I know is their strange (sudo and xsession needed) interface called deCONZ. But as I read an github Dresden Electronic offered their help right?

Unfortunately not as much as I hoped. I have a dongle, but I’ve not managed to get it working yet. I had some information from Dresden which I’d hope would help, but it didn’t - I’ve asked them some further questions a week or so back, but I’ve not yet had a response.

They supplied me the API which looks simple enough. I’ve implemented the basic communications, but am not getting any response to my requests. I’ve sent them what I’m sending to the device as I’m sure it’s correct and this is what I’m waiting for an answer on. It may just be summer holiday time so I’ll give them a bit longer before I’m too annoying ;).

Thats still some kind of progress. Glad you are working on it. Thanks!

Yes this seems to be fair. I think they will easily sell a couple of units when their stick is supported and therefore they should spend a few minutes on answering your questions. And I am pretty sure they will.
But in case nobody responds let me know, then I will ask them too :wink:

Thanks - this is also what I’ve tried to tell them. Let’s see how it goes - they have generally been quite responsive.

hi
my stick is not fully initalizing
is the network key something to be set manually?

  "zigbee:coordinator_cc2531:15d804c1c17": {
    "class": "org.eclipse.smarthome.core.thing.internal.BridgeImpl",
    "value": {
      "label": "CC2531EMK Coordinator",
      "channels": [],
      "configuration": {
        "properties": {
          "zigbee_port": "",
          "zigbee_initialise": false,
          "zigbee_channel": -1,
          "zigbee_extendedpanid": 3462112827500246016,
          "zigbee_networkkey": "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
          "zigbee_panid": 23959
        }
      },
      "properties": {},
      "uid": {
        "segments": [
          "zigbee",
          "coordinator_cc2531",
          "15d804c1c17"
        ]
      },
      "thingTypeUID": {
        "segments": [
          "zigbee",
          "coordinator_cc2531"
        ]
      }
    }
  },

Hi Chris, my running openHABian on a Raspberry PI 3 Model B. I am using a USB Hub to connect the stick. On the same hub is also the ZWave stick an that is working perfectly. Maybe I’m the only one who connected 32 Hue bulbs to the device? :slight_smile:

I don’t think that’s the issue. The error is related to serial port timeouts. We have had some issues with the TI dongle, but I’m not really sure why/what’s causing it. It might be related to the serial driver used in OH since I don’t see it with the debug app I use which uses a different driver… (of course, it might also be unrelated to this).

Is there anything I can do to help finding the source of this problem? Any logs I could check? (Maybe dmesg?)

hi
sorry I just started with zigbee.
flashed a china zigbee modul with the hex file mentioned here … .thath worked

added the zigbee stick 2531 and entered the serial port…
stays in “initialising” state… any ideas?

log shows:

14:32:09.452 [INFO ] [smarthome.event.ThingAddedEvent     ] - Thing 'zigbee:coordinator_cc2531:a98d2159' has been added.
14:32:09.454 [DEBUG] [zigbee.internal.ZigBeeHandlerFactory] - Creating coordinator handler for org.eclipse.smarthome.core.thing.internal.BridgeImpl@de31c29e
14:32:09.533 [DEBUG] [ndler.ZigBeeCoordinatorCC2531Handler] - Initializing ZigBee CC2531EMK serial bridge handler.
14:32:09.536 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Initializing ZigBee network [zigbee:coordinator_cc2531:a98d2159].
14:32:09.537 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Channel -1
14:32:09.540 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - PANID 0
14:32:09.541 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - EPANID 0000000000000000
14:32:09.543 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Key 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
14:32:09.557 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'zigbee:coordinator_cc2531:a98d2159' changed from UNINITIALIZED to INITIALIZING
14:32:09.561 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Initialising network
14:32:09.568 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Created random ZigBee PAN ID [29E8].
14:32:14.552 [WARN ] [ome.core.thing.internal.ThingManager] - Initializing handler for thing 'zigbee:coordinator_cc2531:a98d2159' takes more than 5000ms.
14:32:14.559 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Created random ZigBee extended PAN ID [43A8F27FF26F2C00].
14:32:14.560 [INFO ] [smarthome.event.ThingUpdatedEvent   ] - Thing 'zigbee:coordinator_cc2531:a98d2159' has been updated.
14:32:14.588 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Key String 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
14:32:14.589 [INFO ] [smarthome.event.ThingUpdatedEvent   ] - Thing 'zigbee:coordinator_cc2531:a98d2159' has been updated.
14:32:14.599 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Key array [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
14:32:14.605 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Key final array [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
14:32:14.892 [INFO ] [smarthome.event.ThingUpdatedEvent   ] - Thing 'zigbee:coordinator_cc2531:a98d2159' has been updated.
14:32:14.898 [DEBUG] [ndler.ZigBeeCoordinatorCC2531Handler] - ZigBee Coordinator CC2531 opening Port:'/dev/ttyACM0' PAN:29e8, Channel:-1
14:32:14.901 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Scheduling ZigBee start
14:32:15.906 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - ZigBee network starting
14:32:15.908 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Initialising ZigBee coordinator
14:32:15.912 [DEBUG] [bee.discovery.ZigBeeDiscoveryService] - Creating ZigBee discovery service for zigbee:coordinator_cc2531:a98d2159
14:32:15.916 [DEBUG] [bee.discovery.ZigBeeDiscoveryService] - Activating ZigBee discovery service for zigbee:coordinator_cc2531:a98d2159
14:32:15.999 [DEBUG] [org.openhab.binding.zigbee          ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=413, service.bundleid=233, service.scope=singleton} - org.openhab.binding.zigbee
14:32:16.053 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Key initialise [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
14:32:16.065 [DEBUG] [ndler.ZigBeeCoordinatorCC2531Handler] - Opening ZigBee CC2531 serial port
14:32:16.071 [DEBUG] [ndler.ZigBeeCoordinatorCC2531Handler] - Connecting to serial port [/dev/ttyACM0]
14:32:16.123 [INFO ] [ndler.ZigBeeCoordinatorCC2531Handler] - Serial port [/dev/ttyACM0] is initialized.
14:32:17.556 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - initResponse is JOINED
14:32:17.559 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - initializeNetwork is true

Hi there. I’ve got the same HUSBZB-1 stick, but even with the latest installed and the baud rate set to 57600 it’s not working. I freely admit I don’t really know what I’m doing, so it’s possible I missed an important step.

The two serial ports that show up for the stick are ttyUSB0 and USB1. I’m not sure which is which so I’ve been creating one for each, then re-starting, but I don’t see anything but “Initializing”

I plug the stick in, install the latest build you linked to, and create an Ember Coordinator with port “/dev/ttyUSB*” and baud rate 57600.

Anything else that needs to be done?

I added more logging. maybe this helps for somebody to give me a hint whats wrong?

09:28:44.798 [DEBUG] [bee.discovery.ZigBeeDiscoveryService] - Starting ZigBee scan for zigbee:coordinator_cc2531:6b61a59b
09:28:44.808 [DEBUG] [tsystems.zigbee.ZigBeeNetworkManager] - Permit join for 60 seconds.
09:28:44.811 [DEBUG] [tsystems.zigbee.ZigBeeNetworkManager] - TX CMD: ManagementPermitJoiningRequest [0/0 -> 65532/0, cluster=0036, TID=07, permitDuration=60, tcSignificance=true]
09:28:44.815 [DEBUG] [31.network.impl.CommandInterfaceImpl] - ->  AF_DATA_REQUEST (Packet: subsystem=null, length=13, apiId=24 01, data=FE 0D 24 01 FC FF 00 00 36 00 07 30 1F 03 00 3C 01 0B, checksum=0B, error=false) 
09:28:45.817 [DEBUG] [etwork.impl.ZigBeeNetworkManagerImpl] - AF_DATA_REQUEST executed and timed out while waiting for response.
09:28:45.830 [DEBUG] [etwork.impl.ZigBeeNetworkManagerImpl] - Failed to send AF_DATA_REQUEST [attempt 1]
09:28:46.834 [DEBUG] [31.network.impl.CommandInterfaceImpl] - ->  AF_DATA_REQUEST (Packet: subsystem=null, length=13, apiId=24 01, data=FE 0D 24 01 FC FF 00 00 36 00 07 30 1F 03 00 3C 01 0B, checksum=0B, error=false) 
09:28:47.836 [DEBUG] [etwork.impl.ZigBeeNetworkManagerImpl] - AF_DATA_REQUEST executed and timed out while waiting for response.
09:28:47.838 [DEBUG] [etwork.impl.ZigBeeNetworkManagerImpl] - Failed to send AF_DATA_REQUEST [attempt 2]
09:28:49.341 [DEBUG] [31.network.impl.CommandInterfaceImpl] - ->  AF_DATA_REQUEST (Packet: subsystem=null, length=13, apiId=24 01, data=FE 0D 24 01 FC FF 00 00 36 00 07 30 1F 03 00 3C 01 0B, checksum=0B, error=false) 
09:28:50.344 [DEBUG] [etwork.impl.ZigBeeNetworkManagerImpl] - AF_DATA_REQUEST executed and timed out while waiting for response.
09:28:50.346 [DEBUG] [etwork.impl.ZigBeeNetworkManagerImpl] - Failed to send AF_DATA_REQUEST [attempt 3]
09:28:50.347 [DEBUG] [bee.discovery.ZigBeeDiscoveryService] - Starting ZigBee scan for zigbee:coordinator_cc2531:87d7f61f
09:28:50.349 [DEBUG] [tsystems.zigbee.ZigBeeNetworkManager] - Permit join for 60 seconds.
09:28:50.351 [DEBUG] [tsystems.zigbee.ZigBeeNetworkManager] - TX CMD: ManagementPermitJoiningRequest [0/0 -> 65532/0, cluster=0036, TID=08, permitDuration=60, tcSignificance=true]
09:28:50.355 [DEBUG] [31.network.impl.CommandInterfaceImpl] - ->  AF_DATA_REQUEST (Packet: subsystem=null, length=13, apiId=24 01, data=FE 0D 24 01 FC FF 00 00 36 00 08 30 1F 03 00 3C 01 04, checksum=04, error=false) 
09:28:51.361 [DEBUG] [etwork.impl.ZigBeeNetworkManagerImpl] - AF_DATA_REQUEST executed and timed out while waiting for response.
09:28:51.367 [DEBUG] [etwork.impl.ZigBeeNetworkManagerImpl] - Failed to send AF_DATA_REQUEST [attempt 1]
09:28:51.892 [DEBUG] [zigbee.internal.ZigBeeHandlerFactory] - Creating coordinator handler for org.eclipse.smarthome.core.thing.internal.BridgeImpl@af598273
09:28:51.898 [INFO ] [smarthome.event.ThingAddedEvent     ] - Thing 'zigbee:coordinator_cc2531:6a8d4988' has been added.
09:28:52.102 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'zigbee:coordinator_cc2531:6a8d4988' changed from UNINITIALIZED to INITIALIZING
09:28:52.102 [DEBUG] [ndler.ZigBeeCoordinatorCC2531Handler] - Initializing ZigBee CC2531EMK serial bridge handler.
09:28:52.103 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Initializing ZigBee network [zigbee:coordinator_cc2531:6a8d4988].
09:28:52.105 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Channel -1
09:28:52.107 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - PANID 0
09:28:52.108 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - EPANID 0000000000000000
09:28:52.111 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Key 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
09:28:52.114 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Initialising network
09:28:52.118 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Created random ZigBee PAN ID [72F0].
09:28:52.376 [DEBUG] [31.network.impl.CommandInterfaceImpl] - ->  AF_DATA_REQUEST (Packet: subsystem=null, length=13, apiId=24 01, data=FE 0D 24 01 FC FF 00 00 36 00 08 30 1F 03 00 3C 01 04, checksum=04, error=false) 
09:28:53.378 [DEBUG] [etwork.impl.ZigBeeNetworkManagerImpl] - AF_DATA_REQUEST executed and timed out while waiting for response.
09:28:53.380 [DEBUG] [etwork.impl.ZigBeeNetworkManagerImpl] - Failed to send AF_DATA_REQUEST [attempt 2]
09:28:55.079 [DEBUG] [31.network.impl.CommandInterfaceImpl] - ->  AF_DATA_REQUEST (Packet: subsystem=null, length=13, apiId=24 01, data=FE 0D 24 01 FC FF 00 00 36 00 08 30 1F 03 00 3C 01 04, checksum=04, error=false) 
09:28:56.081 [DEBUG] [etwork.impl.ZigBeeNetworkManagerImpl] - AF_DATA_REQUEST executed and timed out while waiting for response.
09:28:56.084 [DEBUG] [etwork.impl.ZigBeeNetworkManagerImpl] - Failed to send AF_DATA_REQUEST [attempt 3]
09:28:56.106 [DEBUG] [bee.discovery.ZigBeeDiscoveryService] - Starting ZigBee scan for zigbee:coordinator_cc2531:1192f89b
09:28:56.108 [DEBUG] [tsystems.zigbee.ZigBeeNetworkManager] - Permit join for 60 seconds.
09:28:56.111 [DEBUG] [tsystems.zigbee.ZigBeeNetworkManager] - TX CMD: ManagementPermitJoiningRequest [0/0 -> 65532/0, cluster=0036, TID=09, permitDuration=60, tcSignificance=true]
09:28:56.114 [DEBUG] [31.network.impl.CommandInterfaceImpl] - ->  AF_DATA_REQUEST (Packet: subsystem=null, length=13, apiId=24 01, data=FE 0D 24 01 FC FF 00 00 36 00 09 30 1F 03 00 3C 01 05, checksum=05, error=false) 
09:28:57.135 [DEBUG] [etwork.impl.ZigBeeNetworkManagerImpl] - AF_DATA_REQUEST executed and timed out while waiting for response.
09:28:57.137 [DEBUG] [etwork.impl.ZigBeeNetworkManagerImpl] - Failed to send AF_DATA_REQUEST [attempt 1]
09:28:57.142 [WARN ] [ome.core.thing.internal.ThingManager] - Initializing handler for thing 'zigbee:coordinator_cc2531:6a8d4988' takes more than 5000ms.
09:28:57.189 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Created random ZigBee extended PAN ID [7194394C5FB01000].
09:28:57.191 [INFO ] [smarthome.event.ThingUpdatedEvent   ] - Thing 'zigbee:coordinator_cc2531:6a8d4988' has been updated.
09:28:57.227 [INFO ] [smarthome.event.ThingUpdatedEvent   ] - Thing 'zigbee:coordinator_cc2531:6a8d4988' has been updated.
09:28:57.233 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Key String 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
09:28:57.241 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Key array [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
09:28:57.248 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Key final array [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
09:28:57.725 [INFO ] [smarthome.event.ThingUpdatedEvent   ] - Thing 'zigbee:coordinator_cc2531:6a8d4988' has been updated.
09:28:57.738 [DEBUG] [ndler.ZigBeeCoordinatorCC2531Handler] - ZigBee Coordinator CC2531 opening Port:'/dev/ttyACM2' PAN:72f0, Channel:-1
09:28:57.758 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Scheduling ZigBee start
09:28:58.145 [DEBUG] [31.network.impl.CommandInterfaceImpl] - ->  AF_DATA_REQUEST (Packet: subsystem=null, length=13, apiId=24 01, data=FE 0D 24 01 FC FF 00 00 36 00 09 30 1F 03 00 3C 01 05, checksum=05, error=false) 
09:28:59.148 [DEBUG] [etwork.impl.ZigBeeNetworkManagerImpl] - AF_DATA_REQUEST executed and timed out while waiting for response.
09:28:59.150 [DEBUG] [etwork.impl.ZigBeeNetworkManagerImpl] - Failed to send AF_DATA_REQUEST [attempt 2]
09:29:00.653 [DEBUG] [31.network.impl.CommandInterfaceImpl] - ->  AF_DATA_REQUEST (Packet: subsystem=null, length=13, apiId=24 01, data=FE 0D 24 01 FC FF 00 00 36 00 09 30 1F 03 00 3C 01 05, checksum=05, error=false) 
09:29:01.656 [DEBUG] [etwork.impl.ZigBeeNetworkManagerImpl] - AF_DATA_REQUEST executed and timed out while waiting for response.
09:29:01.658 [DEBUG] [etwork.impl.ZigBeeNetworkManagerImpl] - Failed to send AF_DATA_REQUEST [attempt 3]

ok update:

Used the market binding

now switched to 2.2.0 snapshot binding solving the issue
stick is initalized!

:smiley:

I would suggest to check your configuration for starters since you have at least 3 coordinators running -:

My zwave came up on ttyUSB0 and zigbee on ttyUSB1, but I have udev rules to give them static names in case they ever changed.

Not sure what you mean here… try /dev/ttyUSB1. Exactly what version of the binding do you have (bundle:list in Karaf)? What OS/version? Driver issue? Does the zwave side come up? Logs would probably help too.

Glad there are others with this device! Zwave has been working great but zigbee has some issues that Chris is looking into.

Sorry, by that I mean I try both /dev/ttyUSB0 and /dev/ttyUSB1 since I can’t tell which is Zwave and which is Zigbee.

Zwave does not come up either, but again, not sure what I’m doing.

The version is the latest version link you had, so here it is:
184 | Active | 80 | 2.2.0.201707272205 | ZigBee Binding

It’s a Raspberry Pi Zero W, Raspian, fully up to date.

And now that I know where to find logs, I see errors:

10:22:46.496 [ERROR] [andler.ZigBeeCoordinatorEmberHandler] - Serial Error: Port /dev/ttyUSB1 does not exist
10:22:46.508 [ERROR] [andler.ZigBeeCoordinatorEmberHandler] - Serial Error: Port /dev/ttyUSB0 does not exist

I found the tutorial about teaching OpenHAB to see serial port symlinks, but first I have to figure that out.

In the meantime, this is the info I can get about the ports. The only difference is a couple of 1-0 flips. How do I tell which one is Zwave and which is Zigbee?

Edit: I have followed the tutorial by modifying the karaf startup script and adding the line
-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyUSB1 \ to the java start. Unfortunately, no change to the error in the logs.

Are there any steps I might not have done, or information that would help figure out why it’s not working?

Just FYI I had a response back from Dresden which has now got things moving. Their docs are a little light on information and have a lot of errors so it’s a little slow but I’ve now got the basic comms working with the ConBee.

Yeah! Those are great news. Step by Step. As soon as the stick is supported I will get one! Can’t wait to get rid of the hue bridge.

Does your zigbee binding work like zwave and needs some kind of database? I would like use zigbee devices beside bulbs. e.g. the Ubisys Lineup
I really would like to help support more things. I don’t know much about Java (but coding in general isn’t a problem), but ordering those Items and debug and make some ordinary copy paste and adjusting from existing devices may help :slight_smile:

No - it’s totally database free. At the moment it’s only really supporting a limited number of clusters (mainly associated with lights - dimmers/switches/colour). This can be added to though.

Zigbee is a bit more descriptive than Zwave so it doesn’t need the database. That said, I also plan to remove a large chunk of the dependancy on the database in ZWave as well when I get the chance.

These should work. I did some work with Ubisys a while back so I have a few of their devices and used them for some early testing on the binding. Note that the metering functions aren’t yet supported, but the switches/dimmers work fine (last time I checked anyway).

That would be great - there’s only so many dongles I can run myself :wink: . Once ConBee is (hopefully) supported, we’ll have 3 different dongles which is quite nice. Thankfully most of the system is common and it’s “just” the low level interfaces that change…