#Thread + Home Assistant in Container

1 messages · Page 1 of 1 (latest)

simple berry
#

I've now been trying to figure this out for couple of days and would like some advice/guidance.

I'm trying to get this combination to work:

  • Home Assistant in a container
  • Home assistant using Docker networking (as in not on host network)
  • SLZB-MR5U in network mode via PoE
  • SLZB in a "Thread+OTBR
    running on device"-mode so slzb is border router itself and HA connects to it via REST API
  • Matter server also running in a container (python-matter-server image)

Some reasoning for these choices:

  • HA in a container because I have no device to run HAOS and run other programs on same machine
  • Not running HA in host network mode because it makes it much easier for other containers to communicate with HA and for traefik to route that
  • SLZB in network/PoE mode for placement reasons
  • SLZB in OTBR mode because then there is no need for external OTBR and communication between radio and OTBR is not affected by network speeds etc.
  • Matter server also in container because containerized HA can't have add-ons.

It seems like most things work but comissioning a matter device fails. Seen many different fail messages now. Currently at "can't connect to thread border router"

I guess I'm mostly curious if anyone else is running a similar combo AND has comissioning working?

spare copper
#

are you using any VLANs? As long as your TBR and matter server are on the same VLAN AND your HA container can talk to that VLAN, you should be ok. When you go to your thread network in HA assume you can see the OTBR thread network? Have you shared the credentials with you phone and with HA? You should also move to the matter-js matter server image. It is way better, it is what HA will be moving to and it has better diagnostic and logging AND support under the new-matter-server channel in discord.

simple berry
#

I started by first just installing HAOS as a VM on my proxmox server and just installed the matter add on there. Didn't change anything about SLZB or its settings. Just installed OTBR integration in HA and pointed it via URL to the same SLZB device and it just worked.
Then I switched back to my containerized HA Core and made sure I had ipv6 enabled on host device and in docker network.
After that I was kinda sure that it has something to do with the matter server, especially since the commissioning got all the way to "Adding device to Home Assistant" and then failed with "Something went wrong" message.

Apparently I just had to make sure that these are setup correctly on host machine:

  • Made sure that CONFIG_IPV6_ROUTER_PREF was enabled (not something you can enable as it is kernel level but still good to confirm it is enabled)
  • Also made sure that CONFIG_IPV6_ROUTE_INFO was enabled (same as above)
    and these 2 settings needed to be applies:
sysctl -w net.ipv6.conf.wlan0.accept_ra_rt_info_max_plen=64

ofc had to substitute wlan0 with the name of my interface ens18

and voila, commissioning started working 🥳 In a containerized HA Core with no addons, with matter server running in a separate container and with SLZB-MR5U running Thread+OTBR locally on the device itself.

#

This was almost a week long effort but it works now.

spare copper
simple berry
#

Kinda scary to migrate as I just barely got the other one working 😅