May 27, 20242 yr Goal: Using Docker: Matter Server with Home Assistant (Docker). Current State: Using Home Assistant (Docker) with Matter Server (VM with HAOS). Problem: The Matter Server cannot connect devices from an existing Thread network. Possible Cause: Unraid cannot access the IPv6 addresses of devices in the Thread network. However, VMs installed on the Unraid server can access the IPv6 addresses of the devices. Infrastructure: Unifi network with an Apple TV (Thread Border Router), 5 HomePod Minis (Thread Border Router), and the Unraid server, all in the same flat network with no additional VLANs. Free Text: Hi everyone, I am currently running Home Assistant (HA) in Docker and have installed a VM where HAOS is running just to use the Matter plugin (which is also a Docker in HAOS). I would now like to use Matter Server Docker from Unraid, but unfortunately, Unraid cannot route to the IPv6 addresses of the individual devices and therefore cannot connect them. If I ping one of these devices from my Windows PC, Mac, iPhone, or the HAOS VM running on Unraid, it works immediately, and the device responds. However, if I ping from the Unraid terminal directly, I get "Destination unreachable: No route". My question is, what do I need to configure in Unraid so that I can reach these devices? Unfortunately, IPv6 is still new to me, and I have some knowledge gaps in this area. Network Config: Edited May 27, 20242 yr by xee
May 27, 20242 yr Community Expert Your using ipvlan docker setup you would need to use a macvlan setup. This is due to each docker in ipvan using the same mac address... Turn off bridging. Under docker setting set: custom host access enabled. Edited May 27, 20242 yr by bmartino1
May 27, 20242 yr Author Hi bmartino1, thanks for the reply i have tried the settings: Unfortunately, it had no effect on the problem. Even after setting it up and waiting a few minutes, neither the Unraid system nor the Docker could ping any of my devices, nor could I add them to the Matter server.
May 27, 20242 yr Community Expert did you turn unriad network seting bridgin off? It its is on even with docker setting it will use ipvaln.
May 27, 20242 yr Community Expert You issues is more network related... I understand you are using a matter server docker: Example: https://github.com/home-assistant-libs/python-matter-server and a VM running Home assistant., https://www.home-assistant.io/installation/generic-x86-64/ So lets review the next issue. What's your home assistant xml / vm setting for the network? As there may be a network issues via vmbir0 that conect to the lan. in the VM go to termainl what ip shem is it getting? ip a netstat -i Ideally you would want all this to talk and be on the lan network.
May 27, 20242 yr Community Expert My next suggestion is checking the vm lan connection: In my setup I had to use vhost0 to get a lan ip to the vm to use with my server: xml code example: <interface type='direct' trustGuestRxFilters='yes'> <mac address='52:54:00:26:97:94'/> <source dev='vhost0' mode='bridge'/> <target dev='macvtap0'/> <model type='virtio'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> </interface> while using a macvlan docker, network: this is to guarantee that both the vm and docker are able to talk to my lan network over and on 192.168.2.x since you have a unfi network. make sure you have a ipv6 dhcp server.
May 28, 20242 yr Author Oh I think there is a misunderstanding. I am using HA (Docker) and I am currently using a VM with HAOS in it but only the Matter server. However, I want to use the Matter server in Docker to get rid of the VM. Current state: HA (docker), Matter (VM with HAOS) <- Works Target state: HA (docker), Matter (docker) <- Works Not PS: all combinations of HA and Matter can be connected to each other without any problems. The problem is that Unraid itself cannot access the ipv6 devices in the thread network (ping) and therefore the docker cannot either. However, the VM on the Unraid can access the devices, just like all other devices I have on the network, such as PC or iPhone.
May 28, 20242 yr Community Expert Thank you for that info, yes I misunderstood. Thank you for clarifying What is the network options you have set for both the home assist docker and the Matter Docker? Are they both in bridge mode? Custom with there own ip?
May 28, 20242 yr Community Expert other on forum support: https://community.home-assistant.io/t/matter-server-with-docker-not-working-correctly/642336 to clarify you have this dockers and Home assistant installed? Unriad support form goes to a discord server: https://discord.com/invite/dgRZSw6
May 28, 20242 yr Author Yes exactly I have installed both Docker (HA and Matter Server) from the "App Store" of unraid. I have read the post in the support forum and see that there are several people who have a connection problem, unfortunately no solution seems to have been found here. My guess is that I have to make some settings in the Linux substructure so that the Thread Boarder routers are recognized correctly. Since the entire ipv6 network which is in the thread network is not accessible for unraid. For WinPC, iPhone and VMs however already.
June 8, 20242 yr Hi Xee, did you ever get this working? I have the exact same setup as you (Unraid hosting docker of HA and docker of matter-server, both installed from Unraid app store. And I am unable to add matter devices to HA, despite ipv6 being turned on etc. The devices add just fine via the Google Home app, but I cannot share them either to HA. The log on the matter-server docker reads like this: 2024-06-08 10:31:51.299 (MainThread) ERROR [matter_server.server.client_handler] [22591129297168] Error while handling: commission_with_code: Commission with code failed for node 12. 2024-06-08 18:25:31.834 (MainThread) INFO [matter_server.server.device_controller] Starting Matter commissioning with code using Node ID 13 (attempt 1/3). 2024-06-08 18:26:01.835 (Dummy-2) CHIP_ERROR [chip.native.CTL] Discovery timed out 2024-06-08 18:26:03.726 (Dummy-2) CHIP_ERROR [chip.native.EM] Failed to Send CHIP MessageCounter:42379508 on exchange 62780i with Node: <0000000000000000, 0> sendCount: 4 max retries: 4 2024-06-08 18:26:08.335 (Dummy-2) CHIP_ERROR [chip.native.SC] PASESession timed out while waiting for a response from the peer. Expected message type was 33 2024-06-08 18:26:08.335 (Dummy-2) CHIP_ERROR [chip.native.ZCL] Secure Pairing Failed 2024-06-08 18:26:08.336 (Dummy-2) WARNING [root] Failed to establish secure session to device: src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp:89: CHIP Error 0x00000003: Incorrect state 2024-06-08 18:26:08.336 (Dummy-2) WARNING [root] Failed to commission: src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp:89: CHIP Error 0x00000003: Incorrect state
June 8, 20242 yr Community Expert 4 hours ago, BrandyAU said: Hi Xee, did you ever get this working? I have the exact same setup as you (Unraid hosting docker of HA and docker of matter-server, both installed from Unraid app store. And I am unable to add matter devices to HA, despite ipv6 being turned on etc. The devices add just fine via the Google Home app, but I cannot share them either to HA. The log on the matter-server docker reads like this: 2024-06-08 10:31:51.299 (MainThread) ERROR [matter_server.server.client_handler] [22591129297168] Error while handling: commission_with_code: Commission with code failed for node 12. 2024-06-08 18:25:31.834 (MainThread) INFO [matter_server.server.device_controller] Starting Matter commissioning with code using Node ID 13 (attempt 1/3). 2024-06-08 18:26:01.835 (Dummy-2) CHIP_ERROR [chip.native.CTL] Discovery timed out 2024-06-08 18:26:03.726 (Dummy-2) CHIP_ERROR [chip.native.EM] Failed to Send CHIP MessageCounter:42379508 on exchange 62780i with Node: <0000000000000000, 0> sendCount: 4 max retries: 4 2024-06-08 18:26:08.335 (Dummy-2) CHIP_ERROR [chip.native.SC] PASESession timed out while waiting for a response from the peer. Expected message type was 33 2024-06-08 18:26:08.335 (Dummy-2) CHIP_ERROR [chip.native.ZCL] Secure Pairing Failed 2024-06-08 18:26:08.336 (Dummy-2) WARNING [root] Failed to establish secure session to device: src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp:89: CHIP Error 0x00000003: Incorrect state 2024-06-08 18:26:08.336 (Dummy-2) WARNING [root] Failed to commission: src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp:89: CHIP Error 0x00000003: Incorrect state Did you follow the instrution on the docker template? step 1 unraid needs ipv6 and ipv4 enabled. step 2 the docker network for the matter server need to be set to host. per requirments as that is how the image was built to run. step 3 confirm you can ping the HA docker within the container While ipv6 can be used ipv4 is the ip to conect talk and do things on. ipv6 comes after ipv4 comunication is established at unraids level. Then things tunel off ipv4 and use ipv6 in this instance..
June 8, 20242 yr I had similar issues connecting Matter over Thread devices using the Dockerized Matter Server. Though I had no issue connecting the MoT devices using the HAos VM. My main reason for preferring Docker to the VM was I didn't want to dedicate half my cpu cores to Home Assistant. But if I'm understanding pinning vs isolation, those cores may be used for other tasks. I'm really only using the small NAS for Plex and HA anyways.
June 10, 20242 yr Author Unfortunately, my further attempts have not yielded any results yet. I have the "unconfirmed" feeling that it might have something to do with the Router Advertisements. I am unable to ping the IPv6 addresses of the individual Thread devices behind the Border Router from Unraid (though it works from the Windows PC), but I can ping the Border Router using IPv6. I have also tried some steps from this documentation, but without success. So, the situation remains that all devices in my network can ping the Thread devices using IPv6, only Unraid cannot.
June 13, 20242 yr Community Expert i need a advance screen shot of you docker page. EX: as you can see I have multiple docker in the example, I need the once for your HA docker and Matter Server Docker. As the Matter Server Docker networking MUST BE HOST!!!! you need to complete ipv4 unraid connections first before using ipv6 connections. This will make the matter Server at unraids IP for ipv4 and ipv6 and is the dockers requirements to run and use...
June 15, 20242 yr Community Expert 16 hours ago, xee said: Gladly here is my docker list: ok. Is your unriad ip at 192.168.1.100 ? also your Home assistant should be using a custom br0/bond0/eth0 not host. and should be set to a lan static Ip address.
June 15, 20242 yr Author Yes 192.168.1.100 is the unraid system. The HA docker is set to host is just not shown in the UI for the docker, no idea why that is, but it is the same for other setups I have seen. To clarify, the problem is that the Matter server cannot communicate with the devices (lamps and sensors) in the ipv6 network behind the boarder router. HA has nothing to do with this problem. The interaction between HA and matter Server also runs without any problems. The aim is for the matter server to be able to "see" the devices.
June 15, 20242 yr Community Expert as i said earlier. the HA docker needs to be set to custom bridge network. it can't communicate due to a nat issues between docker network setups and both being set to the same ipv6 address... The mater Server docker is corect the HA docker is not. HA should be at its own lan ip address via your LAN netowrk. meaning it needs a ip of 192.168.1.x to set that stop the docker edit docker and under network type set custom [br0,bond0,eth0] <(Depenign on your docker settings...) Then the mater server should be able to talk to the ha docekr with out issue.
June 16, 20242 yr Author I have now run tests on the HA and Matter server combinations. TL;DR: the HA has no influence on the Device <-> Matter-server connection. So the test setup is: HA-Docker (network type set custom) Matter-Server-Docker (network type set Host) HA-VM Matter-Server-VM Combinations with result: HA-Docker & Matter-Server-VM (working) HA-VM & Matter-Server-VM (working) HA-Docker & Matter-Server-Docker (NOT working) HA-VM & Matter-Server-Docker (NOT working) It only works if the Matter server is running in the VM with its own network stack. If it is running in the Docker with the Unraid network stack, the Matter server can no longer reach the devices. It is not important whether the HA itself is running in a VM or Docker, nor does the Docker network type play a role. The connection between HA and the Matter server worked without any problems in all combinations. Edited June 16, 20242 yr by xee
June 16, 20242 yr Community Expert 33 minutes ago, xee said: I have now run tests on the HA and Matter server combinations. TL;DR: the HA has no influence on the Device <-> Matter-server connection. So the test setup is: HA-Docker (network type set custom) Matter-Server-Docker (network type set Host) HA-VM Matter-Server-VM Combinations with result: HA-Docker & Matter-Server-VM (working) HA-VM & Matter-Server-VM (working) HA-Docker & Matter-Server-Docker (NOT working) HA-VM & Matter-Server-Docker (NOT working) It only works if the Matter server is running in the VM with its own network stack. If it is running in the Docker with the Unraid network stack, the Matter server can no longer reach the devices. It is not important whether the HA itself is running in a VM or Docker, nor does the Docker network type play a role. The connection between HA and the Matter server worked without any problems in all combinations. Ok great then lets try the matter server to custom. Most have moved away from HA in a Docker. and use HA as a VM now. Lets check: What is your repository for the mater server image? - ghcr.io/home-assistant-libs/python-matter-server:stable ? You should also check: https://github.com/home-assistant-libs/python-matter-server#dockerfile Normally Unraid apps have a separate support forum that I would send you too there is a discord server for other user configurations and support: https://discord.com/invite/dgRZSw6 I'm not having the same issues you are with HA and the matter server. I have run both the dockers and VM and passed a zigby usb device with both... I run a macvlan unraid docker setup. Bridging off, bonding on, docker settings macvlan and host custom access enabled... ^- you may need to use or change some docker settings... Edited June 16, 20242 yr by bmartino1
June 16, 20242 yr Community Expert I think you are using a ipvlan docker network and the matter server is alos in need of its own custum mac address. which is why it works with the vm as the mac address are different. with a mac vlan setup you can define a mac address as well. --mac-address 02:42:C0:A8:01:00
July 4, 20242 yr Author Unfortunately no, I also tried the beta of Unraid 7 once but unfortunately this did not work either. I can't get unraid itself or Docker running on Unraid to connect to the Matter devices. I have now accepted that it only works in a VM. That's ok for now and you can live with the workaround.
July 8, 20241 yr I can confirm the problem, same error, no connection to matter server possible although in host mode: 2024-07-08 14:52:38.604 (Dummy-2) CHIP_ERROR [chip.native.EM] Failed to Send CHIP MessageCounter:201119341 on exchange 50749i with Node: <0000000000000000, 0> sendCount: 4 max retries: 4 2024-07-08 14:52:38.739 (Dummy-2) CHIP_ERROR [chip.native.CTL] Discovery timed out 2024-07-08 14:52:42.604 (Dummy-2) CHIP_ERROR [chip.native.SC] PASESession timed out while waiting for a response from the peer. Expected message type was 33 2024-07-08 14:52:42.604 (Dummy-2) CHIP_ERROR [chip.native.ZCL] Secure Pairing Failed 2024-07-08 14:52:42.605 (Dummy-2) WARNING [root] Failed to establish secure session to device: src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp:89: CHIP Error 0x00000003: Incorrect state 2024-07-08 14:52:42.605 (MainThread) ERROR [matter_server.server.client_handler] [23375242052368] Error while handling: commission_with_code: Commission with code failed for node 8.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.