SkyConnect & Zigbee2Mqtt

For those using zigbee2mqtt over SiLab’s multiprotocol (both Thread and Zigbee), be aware that both zigbee2mqtt and Thread need to be using the same RF Channel. One can configure zigbee2mqtt for the channel it is to use, but what about the Thread stack?..

Maybe there are other ways to do it, but what I did was to create a pending dataset with the new channel number and submitted it to the Thread code. Using a Pending dataset is the recommended way to change a parameter(s) in a Thread network. In the example below, I changed the channel number from 15 to 25.

First of all, I don’t (yet) have any Thread devices, so the following was done without any Thread devices being used by the Multiprotocol Thread stack.

  • Shell into the Multiprotocol Add-On container. from HAOS shell #docker exec -it addon_core_silabs_multiprotocol /bin/bash
  • fire up the otbr command line interface shell: ot-ctl (hit return a couple of times to get the > prompt)
  • Verify the state as leader: > state
    leader
  • Get the current active dataset: > active. This should show a list of parameters including the channel number. Note also the Active timestamp
> dataset active
Active Timestamp: 1
Channel: 15
Channel Mask: 0x07fff800
....

Note: the channel mask shown here allows for channels 11 thru 26 to be used.

  • Check to see if there is a pending dataset (in my case there is not one):
    > dataset pending
    Error 23: NotFound
  • Next we’ll create a “pending” dataset from a “working copy” of the “active” dataset:
    > dataset init active
  • Next, change the channel number
    > dataset channel 25
  • Set the delay timer to 30 seconds (this is the minimum)
    > dataset delay 30000
  • Change the timestamps to be higher than the one currently used in the Active dataset. In this case the number 2 will suffice:
    > dataset pendingtimestamp 2
    > dataset activetimestamp 2
  • Now commit the pending dataset:
    > dataset commit pending

After 30 seconds or so the “pending” dataset should now become the “active” dataset so check the active dataset again:
> dataset active
Active Timestamp: 2
Channel: 25
Channel Mask: 0x07fff800
....

At this point you can exit out of the ot-ctl (exit) and the Add-On container.

HA Thread Integration should eventually pick up this new dataset (it may take a restart of the integration). The way to tell, is by going to the Thread Integration, click on CONFIGURE and at the “home-assistant” border router click on the (i) symbol looking at the Active Dataset TLV. This is a long string of hex digits that is a concatenation of several TLVs. Look for the portion 0003XXXXXX (Type = x00, Length =x03, Channel number = XXXXXX). This is the individual TLV showing the channel number XXXXXX. If the new channel is 25, which is hex 19, then this TLV portion should look like 0003000019. If the old channel was channel 15, which is hex 0f, and the TLV shows 000300000f then the Thread Integration has not yet picked up the new channel assignment.

Best Regards.

2 Likes