The plug connected to the Meros Android app quickly but I can’t add it to HA. I run both HA (the latest version) and the matter server in containers and HA can see the matter integration with no errors. When I try to pair with HA the app completes a number of stages but at the end says that something went wrong. Here is the log from the matter service:
2024-05-05 02:10:42.444 (MainThread) INFO [matter_server.server.device_controller] Starting Matter commissioning using Node ID 4 and IP fe80::4ae1:e9ff:fedc:c4ca (attempt 1/3).
2024-05-05 02:10:46.244 (Dummy-2) CHIP_ERROR [chip.native.EM] Failed to Send CHIP MessageCounter:121153542 on exchange 53347i with Node: <0000000000000000, 0> sendCount: 4 max retries: 4
2024-05-05 02:10:48.672 (Dummy-2) CHIP_ERROR [chip.native.SC] PASESession timed out while waiting for a response from the peer. Expected message type was 332024-05-05 02:10:48.672 (Dummy-2) CHIP_ERROR [chip.native.ZCL] Secure Pairing Failed
2024-05-05 02:10:48.672 (Dummy-2) WARNING [root] Failed to establish secure session to device: src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp:89: CHIP Error 0x00000003: Incorrect state
2024-05-05 02:10:48.673 (Dummy-2) WARNING [root] Failed to commission: src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp:89: CHIP Error 0x00000003: Incorrect state
2024-05-05 02:10:53.679 (MainThread) INFO [matter_server.server.device_controller] Starting Matter commissioning using Node ID 4 and IP fe80::4ae1:e9ff:fedc:c4ca (attempt 2/3).
2024-05-05 02:10:57.344 (Dummy-2) CHIP_ERROR [chip.native.EM] Failed to Send CHIP MessageCounter:121153543 on exchange 53348i with Node: <0000000000000000, 0> sendCount: 4 max retries: 4
2024-05-05 02:10:59.907 (Dummy-2) CHIP_ERROR [chip.native.SC] PASESession timed out while waiting for a response from the peer. Expected message type was 332024-05-05 02:10:59.907 (Dummy-2) CHIP_ERROR [chip.native.ZCL] Secure Pairing Failed
2024-05-05 02:10:59.908 (Dummy-2) WARNING [root] Failed to establish secure session to device: src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp:89: CHIP Error 0x00000003: Incorrect state
2024-05-05 02:10:59.908 (Dummy-2) WARNING [root] Failed to commission: src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp:89: CHIP Error 0x00000003: Incorrect state
2024-05-05 02:11:04.912 (MainThread) INFO [matter_server.server.device_controller] Starting Matter commissioning using Node ID 4 and IP fe80::4ae1:e9ff:fedc:c4ca (attempt 3/3).
2024-05-05 02:11:08.694 (Dummy-2) CHIP_ERROR [chip.native.EM] Failed to Send CHIP MessageCounter:121153544 on exchange 53349i with Node: <0000000000000000, 0> sendCount: 4 max retries: 4
2024-05-05 02:11:11.140 (Dummy-2) CHIP_ERROR [chip.native.SC] PASESession timed out while waiting for a response from the peer. Expected message type was 332024-05-05 02:11:11.140 (Dummy-2) CHIP_ERROR [chip.native.ZCL] Secure Pairing Failed
2024-05-05 02:11:11.140 (Dummy-2) WARNING [root] Failed to establish secure session to device: src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp:89: CHIP Error 0x00000003: Incorrect state
2024-05-05 02:11:11.141 (Dummy-2) WARNING [root] Failed to commission: src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp:89: CHIP Error 0x00000003: Incorrect state
2024-05-05 02:11:11.142 (MainThread) ERROR [matter_server.server.client_handler] [140416868541456] Error while handling: commission_on_network: Commissioning failed for node 4.
Yes, I tried that and it didn’t help. I also tried a bunch of other things that are supposed to fix matter issues: tried on/off mDNS on my Unifi router, added wireless adapter to the server running the HA and matter containers so that it is on the same ip subnet as the plug (matter uses tcp multicast and ipv6), etc… I have some background in network engineering and tcp programming but I have no desire to study matter specs just to get one cheap plug to work.
I ended up adding the native Meross integration for HA from HACS and the plug paired with HA instantaneously. IMHO Matter is not as ready as the marketing materials would want to present it.
Hmm, that sounds like multiple NICs, which will not work.
HA, Matter addon, Matter device and commisioning device all need to be on the same IPv6 network and HA and the Matter addon can not have multiple NICs, because there is no way to control IPv6 interfaces in those.
Interesting, thanks for the information. Is the multiple NICs limitation something specific to HA? I have never dealt with ipv6 before. Can’t I just tweak the docker settings in the HA and Matter containers to only use the virtual interface corresponding to the wifi NIC? Also my router supports both ipv6 routing and mDNS forwarding. The mandatory single subnet requirement looks like a major flaw in the standard. I have both wired and wifi networks which use different subnets. Also it is not uncommon to have a separate subnet for IoT devices while sharing the servers for many things (like I do).
The IPv6 protocol is vastly different from the IPv4 protocol.
You should not assume you can use any information from IPv4 in the IPv6 protocol.
Sadly this seems also to be the case with the HA devs, so HA is lacking really important features to setup and manage an IPv6 network. It is not the protocol! It is HA.
Currently you can only expect HA and matter to work with a single NIC in HA and probably also only with the IPv6 set to automatic configuration.
You need to understand that you will have multiple IP-adresses per interface and some will be randomized, some will be semi-randomized, some could be DHCP managed, some could be static and some could be semi-static.
Of these IP-addresses, some will be non-routable, some will be local-routable and some will be global-routable.
You will also have the same network address on multiple, and even on every interface, but it is not the same network, which is what causes the most issue with the Matter addon.
Matter will try to use the FE80 network, which will exist on all your interfaces, but the Matter devices will only be on one of them.
You might even be in a situation where you have different devices with the same IP-address, but on different interfaces.
@alex-v, did you ever get this to work? I am having the same issue. I purchased the MSS115 because it supported Matter and would rather not have to use the Meross integration.
These Incorrect state have likely been caused by re-entrancy issues in the Python Matter SDK layer. I’ve fixed this recently in this PR. Can you try pairing with the latest Python Matter Server 6.1.0?
Hi all, I believe I may have a similar (same?) issue when pairing an Aqara P2 sensor with HA. The sensor pairs fine with the Google Home app via Matter.
2024-08-10 11:52:31.525 (MainThread) INFO [matter_server.server.device_controller] Starting Matter commissioning with code using Node ID 25.
2024-08-10 11:52:59.892 (Dummy-2) CHIP_ERROR [chip.native.EM] Failed to Send CHIP MessageCounter:221652376 on exchange 53273i with Node: <0000000000000000, 0> sendCount: 4 max retries: 4
2024-08-10 11:53:01.544 (Dummy-2) CHIP_ERROR [chip.native.CTL] Discovery timed out
2024-08-10 11:53:08.045 (Dummy-2) CHIP_ERROR [chip.native.SC] PASESession timed out while waiting for a response from the peer. Expected message type was 33
2024-08-10 11:53:08.045 (Dummy-2) CHIP_ERROR [chip.native.ZCL] Secure Pairing Failed
2024-08-10 11:53:08.045 (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-08-10 11:53:08.046 (MainThread) ERROR [matter_server.server.client_handler] [23117313099728] Error while handling: commission_with_code: Commission with code failed for node 25.
Unifi router.
Google Nest Hub border router.
Latest HA docker.
Latest Matter Server docker.
IPV6 enabled.
It looks like your are trying to share an already paired device.
You need a sharing code from the Matter network it is paired with currently.
The one on the device can only be used for first network pairing after a factory reset.
Has anyone looked at the difference in HA between Android and iOS. I get these messages when trying to use my Samsung S10+ but my wife’s iPhone 10s works fine. My Samsung worked fine in the spring when I added a leviton switch. Went to add a few more and found this issue Phones are on 2024.10.3. HA is on 2024.10.4. Matter is on 2024.9.0.
You should create a new thread.
This one is old and might not be related to your issue.
Maybe your credentials are not updated and maybe they are bugged and the Google Play Cache needs to be cleared.
On the Android Companion App open Settings → Companion App → Troubleshooting (I think that is what it is called in english, but it list logfiles and other tools to diagnostics as description of the item).
In this next window click the Sync Thread Login Credentials (Again it might not be named exactly that, but close to and there should not be that many options and it should be in the bottom)
It should say either something with “Added …” or “Already using the same credentials”.
The trick here is to run it again and make sure that it does not say “Added …” the second time.
If it does then you need to clear the Google Play Services Cache, which might clear a lot of other stuff, like login to services and credit card informations for Google Play and websites and so on, so make sure you know you informations before hand.
The way to clear the cache is Settings → Apps → See All Apps → Google Play Services → Storage and Cache → Manage Storage → Clear All Cache
Now repeat the syncing of the thread credentials above.