Xbee Zigbee communication and OpenHab

  • Platform information:
    • Hardware: Raspberry pi4B
    • OS: Openhabian (latest)
    • openHAB version:3
  • Issue of the topic: Cannot establish communication between two Xbee Zigbee modules

Hello,

I have setup a Raspberry PI 4 with Openhabian, and connected a Xbee Zigbee board on it through USB port (=coordinator). I use the Zigbee Binding.

The coordinator is correclty recognized by Openhab. That’s the first good point!

I have an other Xbee module (also zigbee) which is in the same zigbee network than the coordinator. This 2nd module is sending a measurement (from an ADC input) through API mode to the coordinator. I can see that the transmission is OK thanks to the RSSI led on the Xbee boards (both led of coordinator and sender are blinking).

On the Openhab side, the 2nd Xbee board was triggered in the Inbox. I created one “Thing” from this Inbox notification, and then I am stuck.

The 2nd Xbee device (sender) is correclty listed in the “Things” list, with the correct MAC address. Nevertheless, its state is “Offline, Node has not completed discovery”.

I suppose that I have something to configure in order to define what type of data should be received from this Xbee module in order to allow Openhab to “understand” the message, or something like that, but I don’t know how and where to do that configuration.

Anyone can help?.

Thanks

I don’t know if this can help, but here are some screenshots


The coordinator “code” is the following:

UID: zigbee:coordinator_xbee:ac6d282a5e
label: XBee Coordinator
thingTypeUID: zigbee:coordinator_xbee
configuration:
zigbee_port: /dev/ttyUSB0
zigbee_flowcontrol: 0
zigbee_baud: 9600
zigbee_initialise: false
zigbee_channel: 11
zigbee_panid: 9334
zigbee_linkkey: 5A6967426565416C6C69616E63653039
zigbee_extendedpanid: “0000000000002020”
zigbee_networkkey: ECE7C7BC11AE2B2B880AF30057D6FEC0
zigbee_meshupdateperiod: 86400

and the device code is:

UID: zigbee:device:ac6d282a5e:0013a20041b7643a
label: Unknown ZigBee Device 0013A20041B7643A
thingTypeUID: zigbee:device
configuration:
zigbee_macaddress: 0013A20041B7643A
bridgeUID: zigbee:coordinator_xbee:ac6d282a5e

Tried nearly all the day with no sucess…

I am wondering if the configuration of the end device (sender) is OK… ( I tried to match all the settings with the coordinator in XCTU)

If anyone can give me some advice, I would be verry happy… :slight_smile:

Hello!

I made a small step… (I think…)

It seems that I had to put the Xbee sender (end device) in network mode in the XCTU interface…

When doing that, OpenHab reacts, and collects some information about the end device Thing.

Nevertheless, after that, the thing is always “Offline”, but with an other error message:

“Offline : HANDLER_INITIALIZING_ERROR - No supported clusters found”

:roll_eyes:

Hi,
I’m not sure I can directly help as I have no knowledge of producing an end device with the Xbee. I can however maybe provide some pointers that might help you understand what is happening.

Firstly, I would suggest taking a look at the binding docs - at the end there is a section called something like “what to do when things don’t go as planned”. This will tell you how to configure the logging - this is important as you will be able to see what is failing, and then hopefully you can adjust your Xbee code to fix this.

It’s also important to understand that the ZigBee binding uses the ZigBee protocol - this is not necessarily the same as Xbee. The binding expects features such as the different descriptors to be supported (as required by ZigBee) so that it can discover the features in the device.

Once you have logging working, then you can use the log viewer here -:

Now what the binding will do is to download the descriptors - one of which (called the SimpleDescriptor) will describe the features of an endpoint - the server and client clusters supported etc. The binding will evaluate this to find clusters that it knows how to support - it will try and read back attributes to work out how to support them, and will then present these to the user as channels.

It seems from the error above that either your device isn’t returning this descriptor, or it is not reporting clusters correctly, or simply that the clusters supported do not provide any of the standard features that the binding supports. I don’t know what you are implementing here, so it is very difficult to say too much more.

I hope that helps at least :slight_smile:

Hello @chris

Thank you for your answer, it provides me indications and keywords in order to go further.

As you say, I think that the issue is located on the end device, which is not sending the informations needed by the binding in order to set up correclty the communication.

This morning, I was able to connect through SSH to the OpenHab console and activate DEBUG logs. Then, the idea is to check what the log says when I have the “No supported clusers found”, and look for any RX frame. This will confirm that the end-device is sending something, but which is not recognized by the binding.

I will post here when I will get something new :slight_smile:

Thanks!

Probably this will not help you since the descriptors will have been downloaded much earlier during the discovery phase. You may need to rediscover the device, and then look at the log of the discovery.

Yep, understood, that’s logic.

If I get some useful informations from the logs during the discovery process I will post them here.

Thanks for your help!

Sam

1 Like

So I have done the init phase with debug active.

Here is the result of the viewer

Far from being an expert, it seems that the end device does not respond to the ActiveEndPoint Request at the first try…

And I don’t know if the descriptors are correct or not…

They aren’t. The problem is that your device doesn’t support any clusters - just like the error states :slight_smile:

What exaclty do you call “clusters”?

Do you mean that the end device is not sending the correct “data description” to the coordinator?

Thanks for your support, I try to understand and it is not always easy for me :stuck_out_tongue:

Sam

Hmmm - you might need to read up on how ZigBee works. If you’re creating your own device, and you are not able to answer this very fundamental question, then you should look for a crash course in ZigBee on the web :wink:

Clusters are kind of functional blocks within the interface - eg there is a cluster for turning devices on or off, another for color control, another for alarm related functions etc.

If you don’t support any clusters (and you don’t) then your device doesn’t do anything.

Well, it is not reporting that it supports any clusters - as above, that means it doesn’t do anything. This might be correct and the device is not programmed to do anything, or it might be that something is wrong. I really don’t know as I’ve no visibility of how you’re programming your device.

Thank you @chris.

I have some reading now, but I begin to understand…

My end device is not sending any cluster, and I have to check how I can define this.

The issue is not zigbee, but the programming of the xbee device that I need to refine…