Zigbee basic questions from n00b

  • Platform information:
    • Hardware: aarch64/2GB/32GB + CC2531 ZigBee
    • OS: ubuntu focal fossa
    • Java Runtime Environment: openjdk version “1.8.0_252-ea”
    • openHAB version: openhab2 2.5.3-1
  • Issue of the topic: questions about zigbee protocol
  • Please post configurations (if applicable):
    • Items configuration related to the issue : zigbee2mqtt mosquitto
    • Sitemap configuration related to the issue : none
    • Rules code related to the issue : none
    • Services configuration related to the issue : mqtt
  • If logs where generated please post these here using code fences : none

For all clarity, I have no particular issues (yet), this is a first time deployment …

I want to intergate cc2531 as gateway in my zigbee ‘home’ using openhab and mqtt

right now I have a Hue gateway on channel 25 and several zigbee lamps and accessories
soon I will have a Xiaomi gateway and several zigbee devices

I am not sure I understand some zigbee protocol aspects

is it

  • impossible
  • possible
  • forbidden
  • allowed
  • not recommended
  • recommended
  • mandatory
    to have multiple gateways on same channel?

is it

  • impossible
  • possible
  • forbidden
  • allowed
  • not recommended
  • recommended
  • mandatory
    to pair devices with multiple gateways?

Thanks to answer two simple multiple choice questions :slight_smile:

Any reason why you do not wish to use the Zigbee binding instead of zigbee2mqtt?

1 Like

would Zigbee binding find my cc2531?, it seems it does not
do you then still know answers to both questions?

It is supported according to the documentation. You may need to add it manually. Be sure to configure EXTRA_JAVA_OPTS for the serial port.

If you are running on Linux, then you probably need to add the user ‘openhab’ to the tty group, and enable EXTRA_JAVA_OPTS for the serial port your coordinator uses

1 Like

Yes, the ZigBee binding will work with the 2531.

Yes, it is possible to have multiple gateways on the same channel. You can have multiple networks on the same channel also if that’s what you mean. You can only have one coordinator per network though.

Devices can only be paired to a single network. If the multiple gateways are on the same network, then of course they will work together. If they are on different networks, then it is not possible.

1 Like

Thanks Chris
This sounds good.
So I can operate all gateways on same channel, right?

Yes, you can. In general it should be fine, but the more traffic you have, the more possibility there is of interference.

Are these gateways different networks? If so, it’s probably best to try and operate on different channels in general as it will limit the possibility of any interference. If you can’t do that, then probably it’s still fine - so long as you don’t have “lots” of networks operating.

1 Like

actually, I could manually add the stick but it shows UNINITIALIZED
CC2531EMK Coordinator
TI CC2531EMK USB Stick
Also I would then think, once initialised, it would find devices (Philips and Xiaomi etc)
But perhaps I am too optimistic :slight_smile:

OK it is initialised now, I had the wrong (but very lookalike) serial /dev/tt… in EXTRA_JAVA_OPTS :frowning:

thanks for help


@chris : sorry for asking. What is Zigbee the network concept? How do I find the network on which, say, my Philips hue and my TI cc2531 USB Stick operate?

What do you mean?

Normally you can do a search if you are writing some software to do this, but it’s normally done automatically as part of the join process so you don’t normally do such a search.

1 Like

you mentioned the word ‘network’ when replying

If the multiple gateways are on the same network, then of course they will work together. If they are on different networks, then it is not possible.

I guess network is different from channel, right?

So then how do I know which ‘network’ each one is on?

Yes, of course. The same as a wifi channel and a wifi network are different. You can have multiple logical networks on a channel.

You can do a scan for networks, but you can’t find out what devices are on the network. You can only find out information about devices after you join the network.

1 Like

Thanks for kind and patient expert replies
Fair enough, but I seem to have a little problem, my cc2531 is on channel 11 but I get
# whsniff -c 11
ERROR: No working device found.
even if openhab sees it as a Hue emulator (and zigbee2mqtt sees it as well)

Sorry - I don’t know what this is - what is whsniff?

I’m not familiar at all with the cc2531 or whatever CLI you are using. If this is just sniffing traffic on the channel though, then it is unlikely to help as all ZigBee traffic is encrypted and it’s not possible to get the keys until you join the network.

1 Like

Sorry Chris to bring in unfamiliar things. It’s all yet unfamiliar for me.
In IP, a network is identified by its address and mask
say a.b.c.0/24 (IPv4) or a:b:c:d::/64 (IPv6)
so: I wonder, in Zigbee, how a network is identified.
(and how to join it like giving or acquiring correct address in range)

I am not familiar with zigbee2mqtt - I use completely different tools.

This isn’t really a network - that’s just a subnet mask and addressing scheme.

With IP, a network could be a Windows network, or a WiFi network etc. When you join a network, you will normally communicate with a trust centre (eg a Windows or Linux server) and you will exchange credentials and receive a network address and the keys so that you can communicate with other devices on the network.

ZigBee is the same.

This is not super simple - joining ZigBee networks is quite complex, and if you are trying to sniff a network, then as I said earlier it is unlikely to work unless you know the network key in use for that network. This is not simple to find.

To join a network, a device will perform a scan and will communicate with the trust centre once joining is enabled. If the trust centre accepts the join request (if the joining device has the right credentials) then it will be told the network key which is transferred using a different key called a link key. There are different types of link key in use - normally HA uses a standard key, but ZB3 defines a higher security model which makes it almost impossible to crack the keys.

1 Like

Sounds good.
In Zigbee2mqtt it is said to factory reset a Hue lamp for example to make it join the cc2531 trust centre. But then, I guess, it will no longer be part of the Philips Hue trust centre gateway network, Or will it?
To say it otherwise, can one have more than one trust centre per network?

No - it won’t be part of the previous network.

No - this is not possible. Only one TC and one Coordinator per network is allowed.

1 Like

so the answer to my OP 2nd question was ‘no’
impossible to pair with multiple gateways?