Thread not reachable

Dear community,

I have a Sonoff Dongle E with the custom firmware that also supports thread.

So my Sonoff dongle is a thread border router and the http address is a local one (http://sonoff-…:8081). When I try to add a matter device via the companion app (Android) it goes through all the steps, generates matter credentials but failes with the message that I should check if my phone is connected to my wifi (it certainly is)

I tested that on 3 phones now and I suspect that the server in my wifi cannot be found because it is not available in my network. (when I curl the ip with port 8081 it gives me nothing).

Could that be the issue and what could I do about it? I am running HassOs on a Raspberry Pi 5.

Do I need to open a port OS wise?

netstat -lntu gives me:

Proto Recv-Q Send-Q Local Address           Foreign Address         State 
tcp6       0      0 172.30.32.1:8081        :::*                    LISTEN    

Welcome to the community. From what I understand, to use a multi protocol dongle with Zigbee, Thread, and Matter, you need several add-ons running:

  1. The Silicon Labs Multiprotocol add-on, from what I can tell (and others may correct me since I don’t have one) “splits” the serial port into two separate virtual socket streams so that both Zigbee and Thread can use the serial adapter at the same time without conflicting;

  2. The Open Thread Border Router add-on, creates a new IPv6 subnet & interface to route Thread packets back and forth between your primary LAN. This add-on exposes two TCP ports, a web interface on port 8080 and a REST API on port 8081. You can browse to the first (8080), but the REST API (8081) won’t work in a web browser, it is used programmatically by the Thread Integration so that HA can send commands to the add-on to query/change Thread network settings. Once your Thread add-on and Integration are working you should have a “Preferred Network” in HA and credentials should be sync’d with your Android mobile companion app (this currently has to be done manually, for some reason);

  3. The Matter (BETA) add-on, runs a separate server for talking to devices that speak the Matter automation protocol, either over WiFi or Thread (i.e. TCP/IP) networks. This add-on opens TCP port 5580 which you can access with a web browser and which implements websockets to communicate with the HA integration. This does not even know about the underlying Thread stuff, since all its network traffic is standard IP-based.

As far as I know, HAOS does not install a system firewall, so there shouldn’t be any ports blocked unless you’ve added one yourself. Recommend thoroughly going over the HA docs as well as the commissioning hints topic pinned on this forum.

Of note, on my system, the netstat command’s “tcp6” ports do not show IPv4 network addresses (see my output below) leading me to wonder if your system has IPv6 correctly enabled, or if perhaps there are errors in the logs for your OTBR add-on.

tcp6   0   0 :::5580       :::*     LISTEN      7501/python3.11   (matter-server)
tcp6   0   0 :::8080       :::*     LISTEN      7022/otbr-web     
tcp6   0   0 :::8081       :::*     LISTEN      7049/otbr-agent   

One other thing you can also check is whether “pre-commissioning” works and your Thread device is able to get on your network. You need to install an mDNS / Bonjour discovery tool like Discovery (MacOS) or Flame (iOS) or Service Discovery (Android) and look for the _matter._tcp service. Check to see if there is a device with an IPv6 address starting with your Thread network’s fdxx-prefix (which is different from your LAN). If you do see it, you can run ping6 / traceroute6 commands to check for network issues; if you don’t see it, there is likely an issue with the Thread credentials or signal strength. The Matter server logs may show additional information about what step(s) are failing.