In the Aqara App, open the MYGGBETT sensor.
Go to:
Plain Text
Third-Party Matter Ecosystems
or the equivalent Matter sharing page.
Generate a fresh Matter pairing code.
Copy the generated 11-digit numeric pairing code. [1, 2, 3, 4]
In Node-RED,
drag out Sam's Device Management node.
Choose your Matter Controller config node (ensure it's running on the same IPv6 network/subnet).
Select the Commission Device method, paste the pairing code you got from Alexa, and give the device a label (e.g., tado_sensor).
Deploy the flow. Once commissioned, your Node-RED controller acts as a secondary ecosystem. [1, 2, 5]
In Alexa
Devices
→ +
→ Add Device
→ Matter
→ Enter Aqara-generated Pairing Code
That keeps Aqara as the primary commissioner and adds Alexa as an additional Matter administrator, exactly the same way you've just rebuilt the TestVendor relationship.
One thing I'd be interested to see afterwards is whether the sensor reappears in Alexa as a Matter device and whether you can once again ask things such as:
"Alexa, is the garage door open?"
or whatever phrasing previously worked for the contact sensor. Given that you've now got all three devices back in Node-RED and the Matter Controller is healthy again, I suspect re-adding Alexa via a fresh Aqara sharing code will work much more smoothly than it did when the controller state was corrupted.