Hi All, brand you to all of this. Trying to bringup HA with the USB dongles. Got one of each (ZWave, Zigbee and Matter/Thread). To make things worse, setting things up using docker compose.
I have performed the following steps:
Using SMLIGHT SLZB-07Mg24 USB stick for Matter/Thread. I’ve updated the firmware to Thread already.
Added matter-server container to docker compose.
Installed Matter(Beta) integration and connected it to the matter-server websocket server. Looks like that worked.
Yet I didn’t get to the point to specify which USB device to use for Thread. Would I need to bring-up the OpenThreadBorderRouter container and point it to the Thread USB dongle (SLZB-07Mg24)?
I would appreciate some input on this. Very hard to find docs on this. TY!
Below is how my docker compose looks like.
I also have another Matter network provided by the Apple TV. Would it cause any troubles?
services:
homeassistant:
container_name: homeassistant
image: "ghcr.io/home-assistant/home-assistant:stable"
volumes:
- /home/ubuntu/home-assistant/config:/config
- /etc/localtime:/etc/localtime:ro
- /run/dbus:/run/dbus:ro
restart: unless-stopped
privileged: true
network_mode: host
zwavejs2mqtt:
container_name: zwavejs2mqtt
image: zwavejs/zwavejs2mqtt:latest
restart: always
tty: true
stop_signal: SIGINT
environment:
- SESSION_SECRET=xxxxxxxxxxxxx
- ZWAVEJS_EXTERNAL_CONFIG=/usr/src/app/store/.config-db
devices:
- '/dev/serial/by-id/usb-Zooz_800_Z-Wave_Stick_533D004242-if00:/dev/zwave'
volumes:
- /home/ubuntu/home-assistant/addons/z-wave-js/:/usr/src/app/store
network_mode: host
matter-server:
container_name: matter-server
image: ghcr.io/home-assistant-libs/python-matter-server:stable
restart: unless-stopped
security_opt:
- apparmor=unconfined
volumes:
- /home/ubuntu/home-assistant/addons/matter-server:/data
- /run/dbus:/run/dbus:ro
network_mode: host
otbr:
image: siliconlabsinc/openthread-border-router:latest
privileged: true
network_mode: host
devices:
- "/dev/ttyACM0:/dev/ttyACM0" # Adjust if your RCP is on a different port
environment:
- OTBR_DOCKER_MODE=rcp # Use a physical RCP
- OTBR_RADIO_URL="spinel+hdlc:///dev/ttyACM0" # Adjust if your RCP is on a different port
volumes:
- ./otbr-data:/var/lib/otbr # Persist OTBR data
You should create a docker network that the containers can use to communicate on.
You should also add hostnames to your containers to allow, for example, connection to zwave container at hostname:port instead of IP:port
No. You can add matter devices to multiple networks.
I never used apple but in HA there is a “share device” link. It puts the device in commisioning mode and allows it to be paired to another network. Pretty sure this is standard for all matter hubs.
I have the same four containers on my server. I also have HomePods mini with TBR function which shouldn’t interfere with OTBR. I keep my two networks separate, as different TBR vendors don’t play well together at the moment.
Both HA and Matter containers must be run with network_mode = host; openthread works best in host mode but can be made to work with macvlan networks. Zwave only uses one port so doesn’t need host mode.
(Zwavejs2mqtt has been renamed zwavejs-ui by the way. Not sure if they’re maintaining containers under the old name still so consider switching at some point.)
OTBR can be tricky to run in docker. There are a few topics on this forum but you’re right about minimal documentation. My docker-compose.yaml looks like this; note I’m using a different image which perhaps explains the difference in environment variables, which is what assigns the USB port to the otbr-agent process:
@peterxian, I had some progress with this. Your instructions were definitely helpful. I managed to get the OTBR running and could “Form a new network”. Though I am still stuck at the next step - adding the Open Thread Border Routing integration. The HA refuses to connect to “http://localhost:8888/” when adding an integration. This is what my docker compose looks like:
You are still not using the right network config. Again, OpenThread should be in host mode or use macvlan networking. (Matter should be host mode, too, per its docs). This is required for mDNS support.
Also, at least in my image, the web interface runs on port 8080, not any of the ports you are using. You can check the otbr-web process should be running with a -p parameter specifying which port to use.
That’s very odd TBH. I have switched back to using host mode. This is what the docker compose looks like. The OTBR web interface is accessible now through “http://localhost:8080” (had to set the HTTP_PORT environment variable). The Open Thread Border Router Integration still complains about that url. Is the REST API endpoint same as the Web UI?
I don’t believe I even got the the point to configuring the Matter Server, right?
If you have errors in the logs about the radio, try using the /dev/ttyUSBx path and if it works make a udev rule so the stick is always mounted to the same path. I’m not sure why, but many OTBR images make a note of not using /dev/serial/by-id/...
It’s not very well documented, but 8081 is the default OTBR REST API endpoint. The UI is port 80, and the API endpoint is port 8081. That is the URL to use when adding the home assistant OTBR integration.
@peterxian, @D34DC3N73R,
Switching openthread/otbr with ghcr.io/ownbee/hass-otbr-docker did the trick. Ideally I would like to stay within the “official images”, but that would work for now.