[Solved, see post7] Matter does not work properly in docker?

So apparently, devices like Govee Uplighter Lamp or Bosch Air 4000i cant be added as matter devices if you run a matter server as a docker container? (while running Home Assistant also in docker) They used IPv6 local + PASE and it tries to use the wrong ethernet adapter if I understood correctly and this can*t be changed via environment variables.

Is that correct? ChatGPT says I should switch to Home Assistant OS.

I also could not get my Smlight SLZB-06p10 (very disappointed to learn that Thread would not work reliably via PoE; can’t remember Youtubers to mention that) to work as a Thread Border Router. Could this maybe also be solved by switching to Home Assistant OS?

I am hesitant because about 2 years ago I tried Home Assistant OS and the Zigbee2Mqtt Addon was regularly crashing. Cause might have been that I did not use a usb extension cable.

Little vent: it’s extremely frustrating to run into these kinds of walls

HAOS is OS + docker + management tool

Matter works with docker
It does not work winwith vlan

if youre using python-matter-server, i saw it listen on any ip address available to host network. its behavior is like listening on [::] and 0.0.0.0.

python-matter-server listen stats
root@miniserver:/mnt/ssd0/docker-service/hass-matter# ss -tunlp | grep matter-server | grep LISTEN
tcp   LISTEN 0      128                                        0.0.0.0:5580       0.0.0.0:*    users:(("matter-server",pid=1758,fd=76))
tcp   LISTEN 0      128                                           [::]:5580          [::]:*    users:(("matter-server",pid=1758,fd=75))
root@miniserver:/mnt/ssd0/docker-service/hass-matter# 

Not sure why your dockerized setup wouldnt work, but what was the error you get when trying to add your matter devices ?

I’m getting these errors:

Starting Matter commissioning using Node ID 6 and IP fe80::xxxxx
PASESession timed out while waiting for a response from the peer
Secure Pairing Failed
Commissioning failed for node 6

Using 'None' as primary interface (for link-local addresses)

I’m not using vlan (at least not that I’m aware of)

Please show your docker-compose yaml.

  matter-server:
    container_name: matter-server
    image: ghcr.io/home-assistant-libs/python-matter-server:stable
    restart: unless-stopped
    network_mode: host
    environment:
      - MATTER_SERVER_INTERFACE=eno1
      #- CHIP_INET_INTERFACE=eno1
      #- CHIP_DEVICE_CONFIG_ENABLE_IPV6=true
    volumes:
      - ./matter:/data

I only added environment variables after back and forth with chatgpt

That MATTER_SERVER_INTERFACE variable is hallucination.

This is how I do it:

  matter-server:
    image: ghcr.io/matter-js/python-matter-server:stable
    container_name: matter-server
    restart: unless-stopped
    # Required for mDNS to work correctly
    network_mode: host
    security_opt:
      # Needed for Bluetooth via dbus
      - apparmor:unconfined
    volumes:
      # Create an .env file that sets the USERDIR environment variable.
      - ./matter-data:/data/
      # Required for Bluetooth via D-Bus
      - /run/dbus:/run/dbus:ro
    # If you adjust command line, make sure to pass the default CMD arguments too:
    command: --log-level verbose --storage-path /data --paa-root-cert-dir /data/credentials --bluetooth-adapter 0 --primary-interface enp1s0

1 Like

Thank you so much, it works!

changed the configuration to fit my eno1 network adapter and without bluetooth:

  matter-server:
    image: ghcr.io/matter-js/python-matter-server:stable
    container_name: matter-server
    restart: unless-stopped
    # Required for mDNS to work correctly
    network_mode: host
    volumes:
      # Create an .env file that sets the USERDIR environment variable.
      - ./matter-data:/data/
    # Command line without Bluetooth
    command: --log-level verbose --storage-path /data --paa-root-cert-dir /data/credentials --primary-interface eno1

So I think my main problem was that I used Package python-matter-server · GitHub ? It works with Package python-matter-server · GitHub.

Well, I would say your problem was to rely on AI rather than read the doc :wink:

PASE timing out…, have you setup your device in manufacturer endorse apps before ? There is two way you could set this up. Set your device to pairing mode from manufacturer apps which may give you new matter qrcode to add to homeassistant or reset your iot device then add via qrcode printed in physical box/devices.

Method one is to use matter integration on your manufacturer apps to set your device into pairing mode. This may generate new matter qrcode for homeassistant to add, please follow your manufacturer instruction for this step. After that then you could add this generated qr from manufacturer apps to homeassistant following your manufacturer apps instruction.

Second method is try to set your device into pairing mode by resetting it physically and retry adding it to homeassistant with matter qrcode printed in physcial devices/box.

Edit: Already solved right ?

Well, this doc recommends to use Home Assistant OS (as AI told me).

I used Home Assistant OS a couple years ago but Zigbee2MQTT addon was unreliable and I could not find the cause. Maybe it was because of the missing usb cable extension (which is mentioned now in every Zigbee USB Dongle Tutorial on Youtube, but I cant remember stumbling upon that back then).

Setting up a smart home is extremely time consuming, without AI I could not automate things like I do (then again, why does everybody have to reinvent the wheel anyway? Creating an automation for my Roborock S7 to clean the room which was cleaned the longest time ago when nobody is home was not easy.) Maybe you don’t have to if you’re at home with every available template (which I’m not).
What I’m trying to say: “just read the manual” does not do it justice imho.

@optilumin0x1 , yes already solved by koying, trying to find out how I can mark his post as solution for this problem.

Well, sure, but if you decide to go beyond recommendation, although you don’t have time for it, it’s a good idea to read the actual doc rather than / before playing Russian roulette with AI…

no need to mock a struggling Home Assistant user.

I wrote above why I go “beyond recommendation”. A failing integration forced me. WIthout AI, I would not even know where to start

Mock?

I just advise:

  1. Use HAOS if you don’t have time / don’t want to dig into the inners of HA
  2. If you still want to open the can of worms, use the actual doc rather than AI

This is true for every single user of HA.

Then you should have focused on that issue.
There is no way going the DIY route will ease any pain, just pilling them up, as you just noticed.

1 Like

There is only so much frustration I am willing to suffer while focusing on an issue…

and yes, “go beyond recommendation even if you dont have time for it” is mocking.