This is not that hard and complicated, but I guess it’s a bit of uncanny valley of being relatively unexperienced while having relatively specific hardware.
I wanted to use ESP Thread Border Router as the “main” preferred network Thread Router network, using ethernet so the thread network is resilient on HA or Wifi failures. I also didn’t want any vendor-specific device like Apple’s or Google’s.
So the way how to do it:
- get the ESP Thread Border Router, potentially with Ethernet shield (optional, I think it’s worth it though)
- go to Releases · espressif/esp-thread-br · GitHub and get the latest release. It’s a little bit involved, you do have to compile stuff and so on, but you don’t really need to understand any of it and just follow the linked documentation from the release page. In short you need to build esp.idf and use the thread border router example from a second repo (it’s called examples, but it’s actually what you wanna use). This docs also helped a bit. The USB-C port to use is the one labeled “USB2” (but seems that both work?). It takes quite some time to clone and build everything (and is a bit confusing that you build stuff for esp32 h2 first, but do not flash it, it gets flashed afterwards when you are flashing the main part: ESP32-C3.) You don’t need to really setup thread details via that menuconfig, that can be done later (if I understand correctly). This guide shows that the last command is
idf.py -p flash monitorwhich is nonsense, you need a parameter afterwards. On my mac, the last command wasidf.py -p /dev/cu.usbmodem2101 flash monitor. However, you can drop thatmonitorin case you just want to flash the thing, this can be later brought in viaidf.py -p /dev/cu.usbmodem2101 monitor. It will spit out logs and gets you into a console, chances are high that you don’t need this for anything. To quit this console pressCTRL+], a bit of a gotcha. Note that to changing wifi name and creds you needidf.py -p /dev/cu.usbmodem2101 erase-flash flash monitor. - Once you connect it to the network, you should be able to get it up and running. I really just followed the guide above - the ethernet version, connected it to my router via ethernet cable and then I was able to access it under the mDNS http://esp-ot-br.local/index.html (note the index.html, it’s mandatory) or also via local IP like 192.168.0.33/index.html.
- In that web gui there is a settings that you can “Form” a new network on http://esp-ot-br.local/index.html#Form. You should change the default settings. I generated new PAN ID and Extended ID using
echo "PANID: 0x$(printf '%04X' $((1 + RANDOM % 65534)))" && echo "Extended PANID: $(od -An -N8 -tx1 /dev/urandom | tr -d ' ' | tr '[:lower:]' '[:upper:]')", changed the channel from default 15 to 25 so it can sit next to existing zigbee on 26 with as little overlap with wifi, used a differentPassphrase/Commissioner Credential(just any string) and also generated random 32 long hex string (there are online generators) to use as a Network Key. - That should be enough, once you click on Form Network, it should create it. Note that if you refresh the page, it will be gone, the web gui is abyssmal, i.e. it doesn’t work for me, showing “unknown” name etc… So don’t get surprised it doesn’t “save”.
- Then in HA enable
Open Thread Border Routerand in the configuration put in the IP address of your newly created device from the above, like http://192.168.0.33. Then add a Thread integration. Your border router should show up there as “Other Networks”. Click on three dots and let it be “Make a preferred network”. That should be it, this should now be the main network. AFAIK you don’t need an android or apple device or companion app, this should be enough. Do not try to use the border router to add it into a HA created thread network - that would wipe the settings from the Open Router.
If you sucedeed, you should see something like this:





