I'm trying to add matter devices which are already linked to my apple homekit. Specifically an eve weather, and a switchbot matter hub.
The eve weather is connected to a thread network with multiple border routers (homepod mini, apple TV), the switchbot hub is on wifi.
I use the iOS homeassistant app, follow the prompt, put the device in pairing mode, enter the code, then it tries for a while and fails, with "Failed to add device."
My setup: Home Assistant OS 15.2, in a proxmox VM. The home assistant OS has a local ipv4 and a both a global and local ipv6 address, and has internet access.
I have a separate nginx reverse proxy running which exposes home-assistant at home.mydomain.tld, the reverse proxy has access to ipv4 and ipv6 of HA, and I configured the proxie's ipv4 and ipv6 addresses as trusted_proxies in the config yaml. The iOS app connects to HA via this reverse proxy.
I see these errors in the matter server logs:
2025-06-26 15:15:35.124 (Dummy-2) CHIP_ERROR [chip.native.CTL] Discovery timed out
2025-06-26 15:15:35.125 (Dummy-2) CHIP_ERROR [chip.native.ZCL] Secure Pairing Failed
2025-06-26 15:15:35.125 (Dummy-2) WARNING [chip.ChipDeviceCtrl] Failed to establish secure session to device: src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp:96: CHIP Error 0x00000003: Incorrect state
2025-06-26 15:15:35.125 (MainThread) ERROR [matter_server.server.client_handler] [139871248968080] Error while handling: commission_with_code: Commission with code failed for node 5.