Starting with matter pairing

Hi, i bought this to test matter
https://www.aliexpress.com/item/1005005792026871.html

I have HA in VLAN 25 (IP 192.168.25.2) and my wifi is VLAN 23 (network 192.168.23.0/24) .
I have set helpers in my router/firewall to forward mDNS traffic on port 5353 nad port 5340 between this networks.
I connect my phone to my devices wifi on VLAN 23.
When i put plug in socket, it starts to blink, so i use my phone to add matter device.
Device gets IP in network on VLAN 23, but pairing fails.

My phone goes thru various stages:
Searching device
Connecting device
Generating Matter credentials
Checking network connection
Then it ends with “device is no accessible”

After reading some discussions, i create VM directly in VLAN 23 and installed matter-server docker, then added it’s websocket url to my HA as matter integration

My docker configuration is

version: '3'
services:
  matter-server:
    container_name: matter-server
    image: ghcr.io/home-assistant-libs/python-matter-server:stable
    restart: unless-stopped
    security_opt:
      - apparmor=unconfined
    volumes:
      - /mnt/btrfs/system/docker_data/matter-server/data:/data
      - /run/dbus:/run/dbus:ro
    network_mode: host

The result is the same. When i use my phone, the device gets IP address in VLAN 23, but pairing fails.
There are no message in output of matter-server container.

What am i missing?

So, the problem was with my KVM networking setup. My VM for IOT was set with macvtap network device and was not receiving mDNS packets. After switching device to bridge, i can get mDNS packets in my VM

Pairing still fails, but at least i get some message

matter-server    | 2024-01-07 15:15:31 iot-proxy matter_server.server.device_controller[1] INFO Starting Matter commissioning on network using Node ID 1.
matter-server    | 2024-01-07 15:15:32 iot-proxy chip.CTL[1] ERROR Unknown filter type; all matches will fail
matter-server    | 2024-01-07 15:15:36 iot-proxy chip.EM[1] ERROR Failed to Send CHIP MessageCounter:163707042 on exchange 47474i sendCount: 4 max retries: 4
matter-server    | 2024-01-07 15:15:38 iot-proxy chip.SC[1] ERROR PASESession timed out while waiting for a response from the peer. Expected message type was 33
matter-server    | 2024-01-07 15:15:38 iot-proxy chip.ZCL[1] ERROR Secure Pairing Failed
matter-server    | 2024-01-07 15:15:38 iot-proxy matter_server.server.client_handler[1] ERROR [140486306897936] Error handling message: CommandMessage(message_id='35f2bf5e4120435b9959aa444bd7d57e', command='commission_on_network', args={'setup_pin_code': 54492031, 'ip_addr': None})
matter-server    | Traceback (most recent call last):
matter-server    |   File "/usr/local/lib/python3.11/site-packages/matter_server/server/client_handler.py", line 188, in _run_handler
matter-server    |     result = await result
matter-server    |              ^^^^^^^^^^^^
matter-server    |   File "/usr/local/lib/python3.11/site-packages/matter_server/server/device_controller.py", line 261, in commission_on_network
matter-server    |     raise NodeCommissionFailed(
matter-server    | matter_server.common.errors.NodeCommissionFailed: Commission on network failed for node 1

I reloaded integration in HA and next time, i managed to pair my device, great.

It shows only the relay control, no power consumption metter i was hoping to use