All things matter

You know the saying where it tells that what you don’t understand looks like magic. Matter/Thread is something like that. Unless you read/study all the documentation of course, but then you would be a Pro and I’m not.
A couple of days ago two thirds of my Matter devices went offline and stayed that way. I tried a few things, pushed the buttons on the devices, restarted Home Assistant, the Matter Server and the Thread border router but to no avail.
I run HA core in docker, Python Matter Server in docker and use a SLZB-MR1U from SMLIGHT as a Thread Border Router so no support. During all the resetting and button pushing I managed to decommission some of the devices that I could not commision again: “This device needs a Thread Border Router”.
I decided this was an opportunity to switch from the Python Matter Server to the Matter JS server. This went fine, but I initially managed to apply the fix of the access settings to the wrong directory. After that commissioning went a step farther but now stopped at: “Could not connect to the Thread network”. Syncing Thread credentials did not help.
I then decided to delete the Matter integration from HA and to start from fresh. I was pleasantly surprised that the matter devices miraculously appeared again. The Matter Server preserved them. But commissioning still stopped at Could not connect.
A day later I noticed this on the web interface of the SLZB-MR1U:

and this on the settings page of the Thread integration:


So I copied the hex encoded TLVs and pasted them in the Add dataser from TLV, synchronized the Thread credentials and Lo and Behold, commisioning works, everything looks stable.
The Matter JS Server is a big improvement over the Python Matter Server, looks more stable (up till now, fingers crossed), firmware update works and the network layout is very nice. I could see the Thread network reconfiguring itself.