Unable to add matter device, thread credential error

I’ve just gotten started with HA. I have HA running on a Raspberry Pi 5. I have a zigbee radio dongle but no other radios attached to HA. I’m having a hard time remembering what I did, but I think I have HA configured to use my Apple and Echo border routers for thread. If I go to the integration configuration for Thread and click the gear cog I see both an Apple border router and two Echo border routers. I was able to add an Eve Energy plug by adding it through Alexa first, then going to HA and choosing to add a matter device, choosing that it’s already set up on another network, going back to Alexa and getting the set up code, then adding it in HA. This worked for the Eve energy plug as well as an Aquara FP400. I then deleted the devices out of Alexa and they continue to work in HA.

I also added a Sonoff Mini dry contact sensor that is Matter over WiFi. Went to home assistant, Matter integration, chose add device, scanned the code, and voila, it added and worked fine.

Here’s the problem. I tried adding another Sonoff Mini relay/switch that is Matter over Wifi. I go to the matter integration, choose to add device, it asks me if it’s new or already on another Matter controller, I choose new, it changes to the “Add matter device” screen, and after a few seconds I get a pop up message that says,

“Failed to save thread network credential, error: Thread network credentials does not match with an of the active thread networks around. Failed to save thread network credential.”

I’m then presented with a Cancel or Continue option. If I choose continue it brings up the camera window to scan a QR code. I scan the code, it identifies it as a plug, and immediately says “Unable to add accessory. Pairing failed.”

I just checked. My Apple TV is my preferred thread router.

Any ideas?

After some digging for answers, I went to the thread integration and clicked the 3 dots next to the Apple TV and chose “Use iOS credentials.” Now when I go to add the matter device it does not give me the thread credential error.

Unfortunately, when I scan the code then choose setup, it still immediate goes to a “pairing failed” message.

Finally gave up and added it to the eWeLink app. From there went back to HA to add it, picked it was already set up, and got the setup code from eWeLink. That worked.