Adding a matter device (Aqara Smart Lock U200) to Home Assistant via Google Home

I trying to add the Aqara Smart Lock U200 to Home Assistant via Google Home but it doesn’t seem to work.

I added the lock without any problems in Google Home and works good, but when I’m trying to add it to home assistant keeps failing.

My preferred thread network is 2 nest devices (Hub Max, Hub 2) and a Google TV streamer.

I have already checked if IPv6 is working in my network. I have already resetted the device twice. I synced the credentials via the Home Assistant companion a lot of times, tried 3 different android devices and 2 iOS but never managed to add it to Home Assistant.

I use docker containers for both Home Assistant and Matter Server. The docker containers are running in a NAS with TrueNAS scale as OS. Using a Ubiquiti Cloud Gateway for my network.

Update 1:
I can see the following in the matter servers log

2024-10-31 18:34:19.518 (Dummy-2) CHIP_ERROR [chip.native.CTL] Discovery timed out
2024-10-31 18:34:23.289 (Dummy-2) CHIP_ERROR [chip.native.EM] Failed to Send CHIP MessageCounter:180863174 on exchange 28753i with Node: <0000000000000000, 0> sendCount: 4 max retries: 4
2024-10-31 18:34:29.625 (Dummy-2) CHIP_ERROR [chip.native.SC] PASESession timed out while waiting for a response from the peer. Expected message type was 33
2024-10-31 18:34:29.625 (Dummy-2) CHIP_ERROR [chip.native.ZCL] Secure Pairing Failed
2024-10-31 18:34:29.625 (Dummy-2) WARNING [chip.ChipDeviceCtrl] Failed to establish secure session to device: src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp:89: CHIP Error 0x00000003: Incorrect state
2024-10-31 18:34:29.626 (MainThread) ERROR [matter_server.server.client_handler] [140687091445840] Error while handling: commission_with_code: Commission with code failed for node 68.

Update 2:
I added a hue bridge as matter without problems

Update 3:
I recreated the container still the same error in the logs. Do I need a BT device in my Home Assistant instance?

Update 4:
I created the matter server container in a rpi which has bt, no problem adding it to home assistant. So to be added needs a BT adaptor.

Update 5:
Ordered a BT dongle for the NAS to use the matter server there. Hopefully it will work there too.

Update 6:
I was trying for more than one week to add the lock in Home Assistant.
I found this post that can be helpful for others

All the help/tips are welcome :slight_smile:

Matter devices can be added to multiple ecosystems at the same time. If you managed to add it to Google Home, try to share it from Google Home to HA. This worked nicely for me with Tuya

The code used to pair the device with the Thread Border Router only works with the router after a factory reset.
When the second Thread Border Router must be paired, then a share code from the first Thread Border Router must be extracted.

That is what I did and didn’t work. Tuya is thread over wifi right? It seems that U200 is thread over bluetooth and then a bluetooth adapter has to be connected to the matter server. If you check my updates in the post you can see that I did finally got it working and how I did.

I’m not sure that I understood exactly what you mean, but if you check my posts and my updates you’ll see that I figured out what was wrong.

No, it is either thread or wifi.
You might mean Matter over WiFi or Matter over Thread.

Matter over Thread use bluetooth to pair, before switching to thread.

Yes I meant that :slight_smile:

Is it just for pairing?

It is just for pairing.

Does that mean that if I copy the container data folder from my pi to my nas that I can use that container instead?

That I do not know.

I’ll try today, to see if its working :slight_smile:

Unfortunatelly is seems that I cannot use an bluetooth dongle with truenas and matter server container.