Finding the Network Key for Thread Network

I have a SkyConnect set up successfully as a border router. Everything functions.

I also have a GL-iNet GL-S20 border router sitting around. What is the best way to integrate this to “expand” the coverage of my thread network? The S-20 has the option to join a Thread network, and it finds the HA network easily enough, but it requires a “Network Key” to join and I have no clue how to find that.

There is also the option to “Join with Commissioner,” but this requires a “Joiner Credential.” No clue what that is.

Am I understanding how Thread works correctly? Is there a logical way to use the S20 in my home as a repeater or mesh extender?


In general you can expand your Thread mesh using Thread compatible border routers. Ideally they use the same version (the OTBR add-on driving the SkyConnect provides Thread 1.3).

I don’t have experience with the GL-iNet GL-S20, I guess it is built using the Espressif Thread Border router component, which others have gotten to work with the Espressif SDK. If the OTBR is compatible with the upstream REST API, then you can control it directly using the Home Assistant OpenThread Border Router integration. But looking at the API docs, this seems a different REST API. :frowning_face:

What you probably can do is joining the GL-S20 to HA/SkyConnect setup network by using the network key. There is a guide: Join the network by using Network Key.

To get the network key of the Home Assistant generated network is a bit PITA currently: In the Thread panel, when pressing the three dot menu on top right, you should see “Active dataset TLVs” along with along hexadeximal string. This is the common exchange format for Thread credentials used in Matter etc. but it seems that the GL-S20 just requires the network key, which is part of that long string. To extract just the network key, you can use this Python script which can parse the TLV string. Call it with python <TLV string>. The output should display the network key as NETWORKKEY.


Thanks, that worked!

I have no idea how to test the mesh, but the GL-S20 is showing as a border router under the preferred network now.

To anyone reading this for help, after you use the python script above, make sure you remove the first two characters from the outputted key “0x”

1 Like