Merged - Yes it has been merged into the “main” branch of Openthread.
Needed - The best I can tell, is that these REST API changes are needed as a way to import and export Thread network datasets across multiple Thread networks. Not all Thread BRs support these APIs, but an HA OTBR is expected get its dataset over this API, so yes.
Since you are using Unify, it may be different, but from what I can tell here (this was updated just recently), it is using the GeckoSDK and the same version (4.2.2) as the Add-On.
After further review of @agners PR, it looks like the API was changed to “/node/active-dataset-tlvs” for the code that was merged. The HomeAssistant integration likely needs to be updated to reflect this.
There are several iterations around of the patchset, the ones which works with current Home Assistant Core can be found in the add-on:
I am working on upstreaming the change, so it will eventually land in vanilla OTBR. However, from first reviews I already know that it will be incompatible with the current implementation.
@agners: Let me tell you that I appreciate a lot that not only you contributed to the openthread/ot-br-posix main repository, but you are following it up.
I know it’s a chore, so here’s a thank you emoji for you:
I echo that thanks!! Also thanks for the pointer to the patchset, @agners. That was the key for me.
For those who are running a standalone OTBR and are too impatient to wait for Agners’ PR to be merged upstream (like me), you can simply apply the patchset manually to get this working:
git clone --depth=1 https://github.com/openthread/ot-br-posix.git
cd ot-br-posix
curl -s https://raw.githubusercontent.com/home-assistant/addons/master/openthread_border_router/0001-Avoid-writing-to-system-console.patch | git apply
curl -s https://raw.githubusercontent.com/home-assistant/addons/master/openthread_border_router/0001-rest-implement-REST-API-to-get-dataset.patch | git apply
curl -s https://raw.githubusercontent.com/home-assistant/addons/master/openthread_border_router/0002-rest-support-state-change.patch | git apply
git diff --name-status
# Then proceed with normal installation steps for your platform. For example:
./script/bootstrap
INFRA_IF_NAME=wlan0 ./script/setup
After this the dataset API should be working (try http:<otbr ip/host>:8081/node/dataset/active to test), and you should be able to add it to Home Assistant (enter http:<otbr ip/host>:8081 as the URL to the OTBR API).
A word of caution: I imagine this is very likely to break during a future upgrade given the differences between the patched API and what will eventually be merged as @Joe_Saiko called out.
Thank you for that write up @bdunn44. It was pretty much cut, paste, and go. I am going to mark it as the solution so folks will have an easier time finding it.
Anyone here able to get a matter over thread device working yet? Mine seems to be stuck on joining the network. Thanks.
EDIT: Ended up getting it all working. Seems to be an issue when enabling IPV6 Prefix delegation on the OTBR. Compiling with the defaults works and my thread based matter devices are now working as expected.
I’ve read this whole thread trying to find what the URL the integration asks for should be, and the closest I got was
http://<otbr ip/host>:8081/node/dataset/active and that doesn’t work.
When I attempt to “Add an open thread border router” in Integrations/configurations, I’m asked to “Provide URL for the Open Thread Border Router’s REST API”
And I can’t find any example of what is supposed to be in there.
I think the URL is just http://<otbr ip/host>:8081. If your OTBR is the SiLabs Multiprotocol Add-On, I think you can use http://core-silabs-multiprotocol:8081
Depends on the firmware flashed.
There is ZigBee only firmware, there is multiprotocol firmware (ZigBee and Thread) and there is Thread only firmware.
You need Thread to be an OTBR (Thread or multiprotocol)
To re-add OTBR (after manual deletion) in the integration’s list I had to disable the OTBR firewall in the Silicon Labs Multiprotocol configuration, because I see these errors there otherwise:
Hi, I’ve been trying all kinds of setups, including Apple Homekit. The case is that I try to connect Eve Energy wall plugs to Home Assistant Open Thread Border Router. In HA it looks ok to me. Using SkyConnect, integrations for thread + open thread border router and matter are available and a border router is running on HA:
However when I try to connect a wall plug with the HA companion app, the following message is returned: Thread Border router vereist. Om dit accessoire te koppelen moet je thuisnetwerk een Thread Border Router bevatten. (Translation: Thread Border router required. To connect this accessory, your home network must contain a Thread Border Router)
What might be causing this message to show up?