Configuration Unifi for Matter

I have been trying to pair a Matter over Thread roller blind for several days, and after yesterday’s “The State Of Matter” stream, I managed to determine that the problem is with the IPv6 configuration in Unifi. Unfortunately, the advice I found led me to this guide Matter, Unifi and mDNS – Tomás McGuinness which does not apply in my case, because my ISP does not provide IPv6. In the stream itself, there was advice that it is possible to do without it by setting a unique local address FD00::/8. Unfortunately, I only have predefined netmasks on my router.

My question is whether anyone has managed to find out how to configure UDM in such a way that everything works?"

1 Like

Hi Macter4,

I use a UDM Pro with matter and thread. I also had problems a while ago after an update to HA sometime in December 2023. For me the solution was to remove the matter integration from HA and reinstall it. After that everything worked fine again. I use a vlan 10 for my IOT devices including my HA. IPV6 is disabled because my ISP does not support it. Furthermore, IGMP Snooping and Multicast DNS must be enabled to ensure that airplay and chrome casting work.

In my case, removing and adding the integration, combined with reinstalling the add-on, did not help. IGMP Snooping and Multicast DNS are also enabled.


I use an Android phone to connect. After the stream, I suspect that it has something to do with the network, because that’s where I encounter a connection problem. I have a message about generating credentials for matter and then a long wait for reconnection, which ends with an error as in the screenshot

translation from Polish: Unable to connect to the device. Make sure your phone is connected to Wi-Fi

You missed the key point - the poster said “IPv6 is disabled”, that’s the important part. IPv6 is crucial for matter, and if there is no IPv6 DHCP server on the network, devices will assign themselves link local addresses that work within the subnet.

I know, that’s why I’m asking how to configure UDM

Interface Type: None.
Instead of Interface Type: Static.

What IP should I set and what netmask should I set so as not to accidentally mix things up? IPv6 is a very new thing for me and even though I try to quickly make up for the lack of knowledge, it is still a puzzling topic for me.

I did a quick look on an IPv6 CIDR tool.

You could try:

FD00:1::/96

That will provide up to 4.2 million IP addresses, which should be enough.

FD00::/64

Will provide 18,446,744,073,709,551,616 addresses, which is maybe a bit too excessive…

I set it up as suggested, but I still can’t connect. This is what UDM looks like


I wonder if it’s not my phone’s fault that can’t update the IP

This is what the pairing process looks like on my phone https://youtu.be/xZJPTY9Yj-M?si=5Gcghlqdt8-Skxay

Translation of subsequent messages:
Connecting to your device…
Generates Matter credentials…
Connecting your device to the network… (less than a second visible)
Checking the network connection…

Here are the logs from OpenThread Border Router and SkyConnect

[21:56:45] INFO: Successfully sent discovery information to Home Assistant.
s6-rc: info: service otbr-agent-rest-discovery successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
otbr-agent[183]: 00:00:01.791 [N] Mle-----------: Attach attempt 1, AnyPartition reattaching with Active Dataset
otbr-agent[183]: 00:00:08.291 [N] RouterTable---: Allocate router id 11
otbr-agent[183]: 00:00:08.291 [N] Mle-----------: RLOC16 fffe -> 2c00
otbr-agent[183]: 00:00:08.296 [N] Mle-----------: Role detached -> leader
otbr-agent[183]: 00:00:08.297 [N] Mle-----------: Partition ID 0x4557d1f1
otbr-agent[183]: 00:00:08.375 [W] Platform------: [netif] ADD [U] fde5:9c8:93e8:cc59:0:ff:fe00:2c00 failed (InvalidArgs)
otbr-agent[183]: 00:00:08.375 [W] Platform------: [netif] Failed to process event, error:InvalidArgs
otbr-agent[183]: 00:00:08.378 [W] Platform------: [netif] ADD [U] fde5:9c8:93e8:cc59:0:ff:fe00:fc00 failed (InvalidArgs)
otbr-agent[183]: 00:00:08.378 [W] Platform------: [netif] Failed to process event, error:InvalidArgs
otbr-agent[183]: [NOTE]-BBA-----: BackboneAgent: Backbone Router becomes Primary!
otbr-agent[183]: 00:00:08.463 [W] Platform------: [netif] ADD [U] fde5:9c8:93e8:cc59:0:ff:fe00:fc38 failed (InvalidArgs)
otbr-agent[183]: 00:00:08.463 [W] Platform------: [netif] Failed to process event, error:InvalidArgs
otbr-agent[183]: 00:00:08.465 [W] Platform------: [netif] ADD [U] fde5:9c8:93e8:cc59:0:ff:fe00:fc10 failed (InvalidArgs)
otbr-agent[183]: 00:00:08.465 [W] Platform------: [netif] Failed to process event, error:InvalidArgs
otbr-agent[183]: 00:00:10.478 [W] Platform------: [netif] ADD [U] fd44:6150:3b3a:1:803:7b0a:cb85:970e failed (InvalidArgs)
otbr-agent[183]: 00:00:10.478 [W] Platform------: [netif] Failed to process event, error:InvalidArgs
otbr-agent[183]: 00:00:20.049 [W] Platform------: [netif] ADD [U] fde5:9c8:93e8:cc59:0:ff:fe00:fc11 failed (InvalidArgs)
otbr-agent[183]: 00:00:20.049 [W] Platform------: [netif] Failed to process event, error:InvalidArgs
otbr-agent[183]: 00:06:53.182 [N] MeshForwarder-: Failed to send IPv6 UDP msg, len:214, chksum:7cc8, ecn:no, to:0x2c01, sec:yes, error:NoAck, prio:low, radio:15.4
otbr-agent[183]: 00:06:53.183 [N] MeshForwarder-:     src:[fdfd:2d27:de39:6ba8:3d93:a51f:8f5c:2675]:46643
otbr-agent[183]: 00:06:53.183 [N] MeshForwarder-:     dst:[fd44:6150:3b3a:1:655e:df86:a3a6:6928]:5540
otbr-agent[183]: 00:06:59.923 [N] MeshForwarder-: Failed to send IPv6 UDP msg, len:214, chksum:7cc8, ecn:no, to:0x2c01, sec:yes, error:NoAck, prio:low, radio:15.4
otbr-agent[183]: 00:06:59.924 [N] MeshForwarder-:     src:[fdfd:2d27:de39:6ba8:3d93:a51f:8f5c:2675]:46643
otbr-agent[183]: 00:06:59.924 [N] MeshForwarder-:     dst:[fd44:6150:3b3a:1:655e:df86:a3a6:6928]:5540
otbr-agent[183]: 00:07:06.240 [N] MeshForwarder-: Failed to send IPv6 UDP msg, len:214, chksum:7cc8, ecn:no, to:0x2c01, sec:yes, error:NoAck, prio:low, radio:15.4
otbr-agent[183]: 00:07:06.240 [N] MeshForwarder-:     src:[fdfd:2d27:de39:6ba8:3d93:a51f:8f5c:2675]:46643
otbr-agent[183]: 00:07:06.240 [N] MeshForwarder-:     dst:[fd44:6150:3b3a:1:655e:df86:a3a6:6928]:5540
otbr-agent[183]: 00:07:16.152 [N] MeshForwarder-: Failed to send IPv6 UDP msg, len:214, chksum:7cc8, ecn:no, to:0x2c01, sec:yes, error:NoAck, prio:low, radio:15.4
otbr-agent[183]: 00:07:16.153 [N] MeshForwarder-:     src:[fdfd:2d27:de39:6ba8:3d93:a51f:8f5c:2675]:46643
otbr-agent[183]: 00:07:16.153 [N] MeshForwarder-:     dst:[fd44:6150:3b3a:1:655e:df86:a3a6:6928]:5540
otbr-agent[183]: 00:07:31.998 [N] MeshForwarder-: Failed to send IPv6 UDP msg, len:214, chksum:7cc8, ecn:no, to:0x2c01, sec:yes, error:NoAck, prio:low, radio:15.4
otbr-agent[183]: 00:07:31.999 [N] MeshForwarder-:     src:[fdfd:2d27:de39:6ba8:3d93:a51f:8f5c:2675]:46643
otbr-agent[183]: 00:07:31.999 [N] MeshForwarder-:     dst:[fd44:6150:3b3a:1:655e:df86:a3a6:6928]:5540
otbr-agent[183]: 00:08:05.926 [N] MeshForwarder-: Failed to send IPv6 UDP msg, len:214, chksum:d405, ecn:no, to:0x2c01, sec:yes, error:NoAck, prio:low, radio:15.4
otbr-agent[183]: 00:08:05.926 [N] MeshForwarder-:     src:[fdfd:2d27:de39:6ba8:3d93:a51f:8f5c:2675]:46643
otbr-agent[183]: 00:08:05.926 [N] MeshForwarder-:     dst:[fd44:6150:3b3a:1:655e:df86:a3a6:6928]:5540
otbr-agent[183]: 00:08:11.665 [N] MeshForwarder-: Failed to send IPv6 UDP msg, len:214, chksum:d405, ecn:no, to:0x2c01, sec:yes, error:NoAck, prio:low, radio:15.4
otbr-agent[183]: 00:08:11.665 [N] MeshForwarder-:     src:[fdfd:2d27:de39:6ba8:3d93:a51f:8f5c:2675]:46643
otbr-agent[183]: 00:08:11.665 [N] MeshForwarder-:     dst:[fd44:6150:3b3a:1:655e:df86:a3a6:6928]:5540
otbr-agent[183]: 00:08:17.695 [N] MeshForwarder-: Failed to send IPv6 UDP msg, len:214, chksum:d405, ecn:no, to:0x2c01, sec:yes, error:NoAck, prio:low, radio:15.4
otbr-agent[183]: 00:08:17.695 [N] MeshForwarder-:     src:[fdfd:2d27:de39:6ba8:3d93:a51f:8f5c:2675]:46643
otbr-agent[183]: 00:08:17.695 [N] MeshForwarder-:     dst:[fd44:6150:3b3a:1:655e:df86:a3a6:6928]:5540
otbr-agent[183]: 00:08:30.292 [N] MeshForwarder-: Dropping IPv6 UDP msg, len:214, chksum:d405, ecn:no, sec:yes, error:AddressQuery, prio:low, radio:all
otbr-agent[183]: 00:08:30.292 [N] MeshForwarder-:     src:[fdfd:2d27:de39:6ba8:3d93:a51f:8f5c:2675]:46643
otbr-agent[183]: 00:08:30.292 [N] MeshForwarder-:     dst:[fd44:6150:3b3a:1:655e:df86:a3a6:6928]:5540
otbr-agent[183]: 00:08:44.588 [N] MeshForwarder-: Dropping IPv6 UDP msg, len:214, chksum:d405, ecn:no, sec:yes, error:Drop, prio:low, radio:all
otbr-agent[183]: 00:08:44.589 [N] MeshForwarder-:     src:[fdfd:2d27:de39:6ba8:3d93:a51f:8f5c:2675]:46643
otbr-agent[183]: 00:08:44.589 [N] MeshForwarder-:     dst:[fd44:6150:3b3a:1:655e:df86:a3a6:6928]:5540
1 Like

So everything I have read so far suggests that if your ISP isn’t giving you an IPv6 address for the router to hand out (the Prefix - which is greyed out for you) - then DO NOT turn on the DHCP server for IPv6, because devices will assign themselves addresses (Link Local) that are only accessible inside the network.

1 Like

Thanks for the advice, I managed to connect. In the settings, to switch from DHCPv6 to SLAAC, I had to change the netmask to 64, because with other settings it did not allow the switch. After saving the settings, pairing went well on the first try and surprisingly quickly, compared to what I saw on the Internet.


Screenshot for those looking for a solution in the future

7 Likes

Just to say thanks for this. I’ve been trying to figure this out for a long while. My solution previously was to us network hardware from Unifi to setup my devices (same WiFi credentials etc.) and then bring back into my network (very clumsy). This fix seems to have solved it !

So this worked for me and I don’t understand why…just making a 2nd network with ipv6 on ? But the matter device doesn’t even pull a ipv6 address…so if it can use ipv4 why even require ipv6…if someone can help me understand that would help a bunch. I’m just glad it’s working…

If it’s SLAAC or IPv6 is just fully turned off, then devices will assign themselves IPv6 addresses without the help the router. They create IPv6 addresses that are partially based on their MAC address - and then basically broadcast a message that asks other devices on the network if they have any problems with the address they have picked for themself.

You therefore would not see any IPv6 leases on the router.

To answer your question though, Matter devices absolutely 100% require IPv6, you might see an IPv4 address for them in the router, because DHCP is weird and even devices that require IPv6 will be handed an IPv4 address too. Actual matter communication though definitely only happens over IPv6.

Hi.

I have the same issue and tried it with these settings.

I tried with SLAAC settings as well exactly like above.

And did all these steps in both situations.
I have restarted the USG 3P.
Reinstalled the Matter Hub.
Restarted HA.
Reconfigured the Matter Hub.
Restarted my 3 Alexas.

I can not find the Matter Hub in my network.
Even though IPv6 is working for sure now.
My cell does get IPv6 IP.
HA did get IPv6 IP.

IPv6 via Wifi and via LAN seems to work now.