I bought one of the HomeAssistant Connect ZBT-1 dongles a while ago, hoping to run a Thread border router on NixOS. I was disappointed to find out that this dongle is rather complicated to setup for Thread use, and has upstream support only when running the HomeAssistant OS.
I have some partial progress towards making this work. This is going to take a lot more refinement for a nice nix package and module. I wanted to share what I have working for anyone else who wants to hack on this.
Run otbr-agent, something similar to this, substituting br0 with your network inface that has IPv6, and substituting the skyconnect dongle path. You need to have port 8081 free for this. This port seems to be hard-coded in few places.
Go into the otbr webui, form a network. If you do not form a network home-assistant will fail to initialize the otbr addon with the error âInvalid datasetâ
Go into home-assistant, add the open thread border router device at http://127.0.0.1:8081
In home-assistant Thread integration âOpenThreadDemoâ will appear. Make this your preferred network.
Thereâs a lot more work to be done before this will be ready:
Iâm curious if anyone else is working on running a Thread border router in NixOS, or if you have suggestions for a better open hardware/software stack.
I think the Thread home-assistant integration only creates/deletes the active dataset (thread lingo for the network configuration). When I did my setup, I just created the network with openthread-border-router and then chose the âAdd dataset from TLVâ menu item inside the home-assistant Thread integration. This allows the HA mobile app to share it with iOS and I could then provision thread devices to join the network from their 3rd party app.
Once the networks are bridged Matter will use SRP/mDNS and doesnât need to change any Thread-level settings.
You can use ot-ctl to create a dataset and start the router, then get your TLVs with ot-ctl dataset active -x
I started looking into this back in June 2024 and got sidetracked with a different project. I made the mistake of not checking nixpkgs again when I got back to it, thanks for the pointer!