Thread
The THRM ONE ships out of the box configured for WiFi. Its radio also supports Thread, so the device can join a Thread mesh and reach Home Assistant over IPv6 instead of WiFi. This page covers what that changes, how to read the network dataset, and how to build and flash the Thread firmware.
Thread is optional. If you are setting up a THRM ONE for the first time, start with the setup guide - the boiler entities, the web interface and the Home Assistant side are identical either way.
The THRM ONE on Thread is not a Matter device. It uses the same ESPHome API as when it is configured for WiFi.
Thread is a network standard, and defines how devices wirelessly communicate with each other. Matter is an application standard, that is a different framework for smart home devices. A device can use Thread without Matter, and Matter can run over other networks.
What you need
- A THRM ONE. Its radio supports Thread, so no extra hardware is needed on the device.
- A Thread border router on your network: Home Assistant's OpenThread Border Router app with a Connect ZBT-1 or Connect ZBT-2, or any other OpenThread-based border router.
- The Thread network's active dataset, as a TLV string (see below).
- The ESPHome Device Builder installed on a computer, to edit and install the configuration, plus a USB-C cable in case the device cannot be reached over the network.
Read the network dataset
Thread networks are protected by an operational dataset: the network key, channel, PAN ID, extended PAN ID and network name, encoded as a single hex TLV string. It is what a device needs to join, so treat it like a WiFi password.
Ask the border router for it on its command line:
ot-ctl dataset active -x
That prints one line of hex, for example:
0e080000000000010000000300001035060004001fffe00208e227ac6a7f24052f0708fdb753eb517cb4d3051062b2442a928d9ea3b947a1618fc4085a030f4f70656e5468726561642d39383733...
In Home Assistant the same dataset is visible in the Thread integration (Settings > Devices & Services > Thread, then Configure): it lists the Thread networks it knows and can take a dataset pasted in as a TLV. Home Assistant can only read the credentials of OpenThread-based border routers, not of vendor border routers such as Google's or Apple's.
The TLV must have an even number of hex characters and be at most 254 bytes. It is a secret - keep it out of public repositories.
Configure the Thread build
The Thread firmware is the WiFi firmware with the network transport swapped: the OpenTherm entities, the sensors, the LED and the Home Assistant side are unchanged. Two things change in esphome/thrm-one.yaml - the dataset, and one entry in the list of files it imports:
substitutions:
version: "0.4.0"
thread_tlv: "0e08000000000001000000030000103506..." # ot-ctl dataset active -x
packages:
main:
refresh: 4h
url: https://codeberg.org/elvinhome/thrm-one
ref: v${version}
files:
- esphome/core/base.yaml
- esphome/core/status-led.yaml
- esphome/core/opentherm.yaml
- esphome/connectivity/thread.yaml # was: esphome/connectivity/wifi.yaml
esphome/connectivity/thread.yaml carries the OpenThread setup - the dataset applied at every boot, and the Thread diagnostics - so there is nothing else to edit. IPv6 is already enabled in esphome/core/base.yaml, which the OpenThread component requires.
The network credentials are part of the firmware, so there is no Bluetooth or serial provisioning step. Changing the dataset means rebuilding and flashing.
Build and flash
- Install the Thread configuration. While you can flash this over the air, an incorrect configuration will mean you lose control of the device. It's best to do this over USB-C connected directly to a computer. In the Device Builder, Install > Plug into this computer.
- The device joins the mesh on boot. The dataset from the configuration is applied over anything previously stored on the device, so no provisioning step is needed.
- Home Assistant picks the device up through the ESPHome integration. If discovery does not reach it, add it manually in that integration using its IPv6 address or hostname - discovery relies on mDNS over IPv6.
- Future updates install over the air on Thread. Ethernet remains available as a second path either way.
How ESPHome uses Thread
- Radio. The ESP32-C6's 802.15.4 radio does the Thread work; you only supply the network credentials.
- Credentials. Either the complete dataset as a TLV string, as used here, or the individual fields (network_key, channel, pan_id, ext_pan_id, network_name, pskc, mesh_local_prefix). Exactly one of the two ways, never both.
- Device type. FTD (the default) is always awake and can be promoted to a router, which suits a mains-powered device. MTD with a poll_period becomes a sleepy end device: less power, but the ESPHome OTA server does not work while it sleeps.
- IPv6 and the border router. Thread is IPv6 end to end. The border router bridges the mesh and your LAN, so the device is simply another IPv6 host: Home Assistant and the Device Builder both talk to it directly.
- Ethernet is unchanged. Thread only replaces WiFi, so the device keeps its Ethernet address, its web interface and OTA even while the mesh is down.
- Mesh networking. Thread devices route for one another. A mains-powered device like this one can extend coverage to battery-powered Thread devices elsewhere in the house.
- Diagnostics. The Thread build also publishes the device's role, channel and address as diagnostic entities in Home Assistant - the first things to look at when the mesh link is weak.
If the device does not join
- Check the dataset. The TLV has to be copied completely - an even number of hex characters, no line breaks - and come from the network your border router is on. An unset or malformed thread_tlv fails the build rather than producing a device that quietly never joins.
- Check the border router. It is the only route in and out of the mesh, so it has to be running and have working IPv6 connectivity to your network.
- Check the link. Thread shares the 2.4 GHz band with WiFi and Zigbee, so make sure they're not using the same channel.
- If Home Assistant does not discover it, add the device by hand in the ESPHome integration using its IPv6 address.
- Going back to WiFi is a matter of swapping that one entry back to the WiFi file - over the air while the device is on Ethernet or the mesh, or over USB if it is on neither.
The repository
The transport split lives in the firmware repository, and the configuration imports what it needs from it - you never have to copy these files yourself:
- esphome/connectivity/wifi.yaml - WiFi, the Bluetooth and serial provisioning helpers. This is what the shipped configuration imports.
- esphome/connectivity/thread.yaml - the OpenThread transport and its diagnostics.
- esphome/connectivity/zigbee.yaml - the Zigbee alternative for the same radio.
- esphome/core/base.yaml - the hardware, including the Ethernet link and IPv6.
Only one transport can be active at a time: WiFi and OpenThread cannot be compiled into the same firmware.
Further reading: