addons icon indicating copy to clipboard operation
addons copied to clipboard

Multiprotocol consistently mismatches channels

Open Jonathanese opened this issue 2 years ago • 40 comments

Describe the issue you are experiencing

Addon: Silicon Labs Multiprotocol Version: 2.2.0 Device: Sonoff Zigbee Dongle-E Firmware: RCP Multi-Protocol

Every time I set up the SiLabs multiprotocol plugin and integrations, I immediately get an error saying the channels are mismatched. It sets the Zigbee channel to 25, and the Thread channel to 15.

I try to change the Thread channel by running Form on the OTBR page, setting it to 25. This tends to get rid of the error, but I can't pair anything via Matter. It finds the device, connects, generates the credentials, sends the credentials, then checks the connection. And it always fails at that last step, which I assume is a Thread issue because of a new network which perhaps the rest of the system hasn't detected.

I try to change the Zigbee channel, but rather than letting me change it, it says "This is configured by the Multiprotocol addon and must be changed in the hardware page". But there's no hardware page to set this. So it basically configures the channels wrong and prevents me from fixing it.

What type of installation are you running?

Home Assistant OS

Which operating system are you running on?

Home Assistant Operating System

Which add-on are you reporting an issue with?

Silicon Labs Multiprotocol

What is the version of the add-on?

2.2.0

Steps to reproduce the issue

  1. Flash Dongle-E using the online flashing tool. Use the RCP Multiprotocol firmware.
  2. Install the Multiprotocol addon. 460kbaud. Software flow control. OTBR enabled. Ports enabled.
  3. Point ZHA to the multiprotocol virtual device
  4. Thread and OTBR are auto-detected
  5. Reboot Home Assistant OS to re-run detection
  6. <Mismatched Channel" error usually occurs here as a settings notification>
  7. In ZHA configuration, try to change channel. Prompt tells you you can't do so. References a page in "Hardware" that doesn't exist.

Try matter 8. Install Matter addon. Autodetected/Auto-Added to integrations. 9. On phone, try to add Nanoleaf A12 bulb. 10. Sequence: Finding Device -> Connecting to device -> Generating Matter Credentials -> Testing connection -> Connection failed

Try Change Channel 11. Open OTBR page 12. Go to "Form", and configure network for channel 25 with the name home-assistant. Defaults elsewhere 13. Click "Form" 14. After a bit, or perhaps a refresh, in the Thread integration -> Configure page, a second home-assistant network shows up with a border router. This time saying channel 25 instead of channel 15. Set this as the preferred network. 15. Retry the matter settings. Same failure condition. ...

System Health information

Raspberry PI 4 Sonoff Zigbee Dongle-E

Anything in the Supervisor logs that might be useful for us?

No response

Anything in the add-on logs that might be useful for us?

No response

Additional information

No response

Jonathanese avatar Jun 29 '23 18:06 Jonathanese

When using Home Assistant hardware, either Yellow or SkyConnect, then these devices will show up on the hardware page. This provides a config flow for these devices to setup MultiPAN. I assume the channel migration has been moved there as well. Previously it was possible to just set the channel in ZHA and reset Thread to pickup change.

Obviously the ZBDongle-E (and other generic dongles that support Multipan RCP) wont show up there, so I am not sure how to access the channel migration now. May need to work out a way to implement this for generic (i.e non HomeAssistant) dongles.

darkxst avatar Jun 30 '23 06:06 darkxst

When using Home Assistant hardware, either Yellow or SkyConnect, then these devices will show up on the hardware page.

From what I understand this is the only place when using Multiprotocol to change channels now.

@emontnemery thoughts? Do we have a work around/way to get this done for non-SkyConnect/Yellow users?

agners avatar Jul 04 '23 07:07 agners

I tested the SkyConnect integration with the ZBDongle-E (via updated USB filters) , which works well for channel migration. etc. I wonder if we could generalise this integration to also include support for the ZBDongle-E? However that doesnt really solve it for users of other dongles which lack sufficient USB data for auto-detection (i.e. EasyIot ZB-GW04 and Elelabs etc)

darkxst avatar Jul 04 '23 10:07 darkxst

I too have this issue zigbee Mqtt is set to channel 22 but no way to set thread which seems to want to use 15 and is conflicting with my wifi bands... and was is fighting with zbmqtt? No luck with pairing devices (Nanoleaf Matter Essentials E27) but seems to be happy with the smartthings hub

pssc avatar Jul 10 '23 15:07 pssc

I can provide a rudimentry workaround until there is a better solution implemented.

Copy the following folder to `/config/custom_components' https://github.com/home-assistant/core/tree/dev/homeassistant/components/homeassistant_sky_connect

Update the manifest.json with the usb data for zbdongle-E

{
  "domain": "homeassistant_sky_connect",
  "name": "Sonoff ZBDongle-E",
  "version": "0.0.1",
  "codeowners": ["@home-assistant/core"],
  "config_flow": true,
  "dependencies": ["hardware", "usb", "homeassistant_hardware"],
  "documentation": "https://www.home-assistant.io/integrations/homeassistant_sky_connect",
  "integration_type": "hardware",
  "usb": [
      {
      "vid": "1A86",
      "pid": "55D4",
      "description": "*sonoff*plus*",
      "known_devices": ["sonoff zigbee dongle plus v2"]
    }
  ]
}

You should now get a SkyConnect device show up in the hardware menu and you can use this perform the channel migration

darkxst avatar Jul 11 '23 01:07 darkxst

We'll add a Thread channel change feature in the Thread panel at one point. That will allow manually change the channels on Zigbee and Thread side.

Meanwhile, the API can be accessed internally, you can use curl to ask the OpenThread REST API directly to change the channel:

curl http://core-silabs-multiprotocol:8081/node/dataset/active | \
  jq '.ActiveTimestamp.Seconds = .ActiveTimestamp.Seconds + 1 |
       {
         ActiveDataset: select(.),
         Delay: 30000,
         PendingTimestamp: .ActiveTimestamp
       } | 
       .ActiveDataset.Channel = 20' | \
  curl -X PUT http://core-silabs-multiprotocol:8081/node/dataset/pending -d@-

After 30s the pending dataset will be applied. You can watch the delay counting down by getting the pending dataset.

curl http://core-silabs-multiprotocol:8081/node/dataset/pending

agners avatar Jul 11 '23 14:07 agners

allow manually change the channels on Zigbee

How do you manually change Zigbee channel though? ZHA no longer allows this when using multiprotocol, and instead refers you to the non-existent hardware integration.

darkxst avatar Jul 11 '23 14:07 darkxst

allow manually change the channels on Zigbee

How do you manually change Zigbee channel though? ZHA no longer allows this when using multiprotocol, and instead refers you to the non-existent hardware integration.

zigbee2mqtt allows you to set the channel and use multiprotocol.

pssc avatar Jul 11 '23 20:07 pssc

How do you manually change Zigbee channel though? ZHA no longer allows this when using multiprotocol, and instead refers you to the non-existent hardware integration.

Good point, that use case is not covered currently :cry:

agners avatar Jul 11 '23 22:07 agners

@emontnemery thoughts? Do we have a work around/way to get this done for non-SkyConnect/Yellow users?

I'd be happy to look at implementing a solution for this, but any thoughts on the best way forward to provide access to channel migration in this case?

darkxst avatar Aug 01 '23 00:08 darkxst

I want to change the channel too, but move the ZHA channel to the Thread channel, and not move the Thread radio to another channel, as it forms one network with another Thread radio on another device.

My work-around was :

  • install Zigbee2MQTT
  • set the desired channel
  • stop Zigbee2MQTT
  • do a radio migration

And Zigbee channel is set to the Thread channel

francisp2 avatar Aug 26 '23 06:08 francisp2

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Sep 25 '23 09:09 github-actions[bot]

Still no solution

francisp2 avatar Sep 25 '23 10:09 francisp2

In pure Thread mode you get this option:

Screenshot from 2023-09-26 09-34-54

@francisp2 is this missing/not working in your case?

Typically, with Multiprotocol we coordinate the channel change, in that case it is available through the hardware menu (Settings > System > Hardware > Configure, then "Configure IEEE 802.15.4 radio multiprotocol support"). But if the Zigbee side is not under the control of Home Assistant Core, the above menu should allow channel change, if I am not mistaken.

agners avatar Sep 26 '23 07:09 agners

This I get when I want to change the Zigbee channel, but there is no multiprotocol under hardware.

image

Thread changing works, aligning Zigbee with Thread does not.

francisp2 avatar Sep 26 '23 09:09 francisp2

Changing channel on the Zigbee side is only possible through the EmberZNet serial protocol (EZSP). From what I understand you are using Zigbee2MQTT? So this needs to be initiated from Z2M...

Thread changing works, aligning Zigbee with Thread does not.

So how did you change the Thread channel then?

agners avatar Sep 26 '23 09:09 agners

I only used Zigbee2MQTT to change the Zigbee channel, and then used migrate radio to have the new channel in ZHA

Changing thread here: image

but if you then add ZHA, it will install on channel 25, and no way to change it to the same channel as Thread, unless you take a detour through Zigbee2MQTT and then choose 'migrate radio' to install ZHA.

francisp2 avatar Sep 26 '23 11:09 francisp2

Ok wait, so I better understand: Your goal is to use Thread and ZHA, and change the channel of both? But there is no way as the hardware config is missing for the hardware you are using, correct?

agners avatar Sep 26 '23 12:09 agners

But there is no way as the hardware config is missing for the hardware you are using, correct?

correct

francisp2 avatar Sep 26 '23 16:09 francisp2

I ran into this same issue. Strangely, the channel numbers seem to stay out of sync when reconfigured through Hardware -> Home Assistant SkyConnect (e.g. it starts with Thread/Zigbee at 15/25, then if I reconfigure it to 11 for example, it will switch to 11/15, and so on). Maybe something is done out of order? (e.g. code sets Zigbee to Thread's channel, then configures the new Thread channel)

The workaround that I came up with was to go to Settings -> Devices & services -> Zigbee Home Automation -> Configure, then click Download Backup. This creates a .json with your current Zigbee settings. Open the file with a text editor, and under network_info you'll find channel - change this to the same channel as the Thread network. Then click Migrate Radio -> Reconfigure the current radio, and Upload a manual backup. Select your modified .json file, and the Zigbee network will be on the correct channel (maybe needs a restart).

Obviously it'd be nice if it just worked out of the box as intended, but this is a fairly easy workaround. Hope this helps.

calwip avatar Sep 30 '23 22:09 calwip

I haven't been able to get Thread working... I mean - the Nanoleaf app sees HA thread network in settings, but if I try to assign that hetwork to a led strip (currently BT connected) - the "select" menu is empty ....

Onepamopa avatar Oct 09 '23 18:10 Onepamopa

Is there any update on a long-term solution for this issue? I just encountered the same problem after following basically the exact same steps as the original report. This workaround worked for me to change my Thread channel (although I have not successfully commissioned any Matter over Thread devices yet so I can't claim that it's definitely working).

Is it a bug that the Thread and ZHA integrations don't let you change the channel when using multiprotocol firmware? And/or, is it a bug that nothing shows up on the Hardware page?

jtbandes avatar Nov 03 '23 04:11 jtbandes

I am also having the same issue, is there a solution being worked on?

laurynas-pliuskys avatar Nov 20 '23 15:11 laurynas-pliuskys

I have the same problem too. No idea to solve it. Thank you for any help.

shoyu63 avatar Nov 28 '23 18:11 shoyu63

Same here

Ston3s avatar Dec 01 '23 15:12 Ston3s

That's the best solution! Got it working with no problems: Matter and ZigBee (ZHA) working excellently! Worked perfectly!!!

The only thing I did differently, was that I completely removed all ZigBee devices first, then removed the ZigBee integration also after I downloaded the ZigBee network settings into the .json file. Corrected the ch to 15 (or whichever the Thread used (you can find it out from the config/integrations/integration/thread then configure/change channel it will display the current Thread ch). After everything was removed (ZHA) I reinstalled ZHA service/integration and loaded the network configuration from the saved .yaml file (with the changed ch number)

Original post from calwip - wrote it perfectly!

https://github.com/home-assistant/addons/issues/3124#issuecomment-1741874374

I ran into this same issue. Strangely, the channel numbers seem to stay out of sync when reconfigured through Hardware -> Home Assistant SkyConnect (e.g. it starts with Thread/Zigbee at 15/25, then if I reconfigure it to 11 for example, it will switch to 11/15, and so on). Maybe something is done out of order? (e.g. code sets Zigbee to Thread's channel, then configures the new Thread channel)

The workaround that I came up with was to go to Settings -> Devices & services -> Zigbee Home Automation -> Configure, then click Download Backup. This creates a .json with your current Zigbee settings. Open the file with a text editor, and under network_info you'll find channel - change this to the same channel as the Thread network. Then click Migrate Radio -> Reconfigure the current radio, and Upload a manual backup. Select your modified .json file, and the Zigbee network will be on the correct channel (maybe needs a restart).

Obviously it'd be nice if it just worked out of the box as intended, but this is a fairly easy workaround. Hope this helps.

radulyz avatar Dec 02 '23 07:12 radulyz

Sorry to interrupt, but I have a SkyConnect dongle, which I assume is supposed to be supported for switching channels with multiprotocol...

[core-ssh ~]$ lsusb | grep Silicon
Bus 001 Device 006: ID 10c4:ea60 Silicon Labs CP2102N USB to UART Bridge Controller

But I don't see the Settings -> System -> Hardware -> Configure Option.

image

Is there some additional step to get the Hardware Configure option to show up?

satmandu avatar Dec 13 '23 05:12 satmandu

It's not done through hardware configuration, but integration configuration (config/integrations/integration/thread then configure/change channel and respectively: Settings -> Devices & services -> Zigbee Home Automation -> Configure)

For these to work you do have to have the dual stack configured on the USB device and also installed and configured the Silicon Labs Multiprotocol add-on for the device AND configured ZHA to point to it instead of the USB device directly...

The add-on and configuration are close to this video https://www.youtube.com/watch?v=j6x43lC9TkM but you may be able to find something more relevant to the SkyConnect USB dongle...

radulyz avatar Dec 13 '23 05:12 radulyz

I have two Zigbee networks, with one Thread network:

  1. Sonoff E dongle
    • zigbee2mqtt
    • Thread
  2. Sonoff P dongle for Zigbee alone (ZHA)

Because there are devices that are better supported by zigbee2mqtt, and then there are devices that work better with ZHA.

  • z2m: channel 20
  • thread: channel 15 (claimed in the HA interface)
  • zha: channel 25

I need to switch Thread to channel 25 to match my Apple Border Routers so I can join them into a single thread network, I may eventually migrate all my ZHA to a different channel so there is no overlap, but for now I can live with the overlap, and I have fewer devices in z2m than in ZHA so re-pairing them isn't as big of a deal.

The web interface won't let me do anything saying that ZHA is on channel 15 (false) and to go to the hardware -> configure (which is non-existent for my setup). I can update the channel to 25 in z2m however the thread channel does not change in HA, and it refuses to join the existing thread network because it still says it is 15.

I tried some of the work-arounds but I don't seem to be getting anywhere. Anyone got any suggestions?

digitalresistor avatar Dec 19 '23 00:12 digitalresistor

The web interface won't let me do anything saying that ZHA is on channel 15 (false) and to go to the hardware -> configure (which is non-existent for my setup). I can update the channel to 25 in z2m however the thread channel does not change in HA, and it refuses to join the existing thread network because it still says it is 15.

I tried some of the work-arounds but I don't seem to be getting anywhere. Anyone got any suggestions?

I'm having this same issue with my Sonoff E dongle with multiprotocol configured and Z2M. Changing the channel to match the Apple network in Z2M doesn't resolve.

vypergts avatar Dec 30 '23 16:12 vypergts