Thread TLV Code Retrieval from Home Assistant - Apple and Google Border Router

Are you working with Thread devices like the Gevako RS series, or do you want to experiment with OpenThread via ESPHome? At some point you will need the TLV code of your network. TLV stands for Type-Length-Value and contains all network settings of your Thread network: the network name, the channel and the unique network key. You need this code to manually pair Thread devices, for example when configuring ESPHome devices.
Google does not show this code in the Google Home app. However, Home Assistant automatically saves it as soon as your Thread border router is connected, whether that is a SkyConnect, Google or Apple HomePod.
Step 1: Check if the Thread network is active
First check whether the Thread network is present in Home Assistant. Go to Settings >Thread. Under the preferred network, at least one border router must be active.

Step 2: Prepare the Terminal
To access the necessary files, you need the Terminal & SSH app. Don’t have it yet?
- Go to Settings > Apps in Home Assistant.
- Click App Store in the bottom right.
- Search for “Terminal & SSH” and install the official version.
- Check “Watchdog” and “Auto update”. Optionally check “Show in sidebar” for quick access.
- For one-time use, you do not need to set a password or SSH key. If you want to use the app more often, add a public SSH key via Authorized Keys in the Configuration tab, or set a password for use via the browser within your own network.
You do not need an external tool like PuTTY – the terminal works directly in your browser.
Step 3: Read the TLV code
Open the terminal via the sidebar or via the “Open Web UI” button and run this command:
cat /config/.storage/thread.datasets
Tip: use Ctrl+Shift+V or Ctrl + right-click to paste in the terminal.
You will see a JSON file containing all Thread networks that Home Assistant knows. Find the block where your network_name is listed. The long string of letters and numbers after the "tlv": field is the code you are looking for.
Select the full TLV code by holding Shift + left mouse button and dragging over the text. Release the mouse button while keeping Shift held, then right-click and choose Copy.

Step 4: Disable Terminal & SSH
If the app is not secured with Authorized Keys, disable it after use.
- Go to Settings > Apps in Home Assistant.
- Click on Terminal & SSH.
- Click “Stop” to disable the app.
- Check that “Start on system boot” is unchecked, otherwise the app will start automatically when Home Assistant restarts.
You now have the TLV code of your Thread network. You can use it to develop your own ESPHome projects on for example an ESP32-C6 or ESP32-H2. The Gevako RS5 and RS6 both feature an ESP32-C6 and are therefore fully capable of operating via Thread.
Does this also work with Apple?
Yes. Apple HomePod and Apple TV share their Thread dataset with Home Assistant as well, provided you have allowed this via the Home app on your iPhone. After a successful connection, the dataset appears automatically in the same file. Sometimes this takes a moment or a restart of Home Assistant may be required.
Important
The TLV code is the master key of your Thread network. Never share it publicly. Anyone with this code can in principle connect to your Thread network.
