Jump to content

Openthread: Difference between revisions

From Official NixOS Wiki
Jeantil (talk | contribs)
No edit summary
Jeantil (talk | contribs)
No edit summary
Line 17: Line 17:
</syntaxhighlight>of course these are merely examples for specific devices but you will want to use the by-id path to ensure it remains stable across configurations.   
</syntaxhighlight>of course these are merely examples for specific devices but you will want to use the by-id path to ensure it remains stable across configurations.   


Then you can enable the open thread border router service in nixos using    
Then you can enable the open thread border router service in nixos  <syntaxhighlight lang="nixos">
    openthread-border-router = {
      enable = true;
      backboneInterface = "eno1";
      # logLevel = "notice"; controls the log levels
      radio = {
        device = "/dev/serial/by-id/usb-Nabu_Casa_ZBT-2_xxxxxxxxxxx-if00";
        baudRate = 460800;  # This and flow control are hardware dependant
        flowControl = false; # check your device's documentation
      };
      rest = {
        # listenAddress = "::"; # Defaults to 127.0.0.1


 
        # It is recommended to use port 8081 as some web UI features do not work
 
        # with a different port
 
        # listenPort = 8081;
 
     
 
      };
      web = {
        enable = true; # enables the basic web interface


        # listenAddress = "::"; # defaults to 127.0.0.1
        # listenPort = 58082;  # this port can be altered freely
      };     
    };
</syntaxhighlight>once the service is started you should be able to access the web ui
[[File:Openthread border router web ui.png|thumb|970x970px]]
[[Category:Software]]
[[Category:Software]]
[[Category:Applications]]
[[Category:Applications]]

Revision as of 19:46, 20 April 2026

Openthread

Openthread is an open source implementation of the Thread IOT networking specification.

This implementation provides an openthread border router server and a small webui to monitor it. It can be used to setup a thread network on your server if it is equiped with a Thread radio device.

Popular Thread radio devices include Home assistant's connect ZBT-2 and SONOFF Zigbee 3.0 USB dongles among many other.

Once your thread network is established, you can use the Matter IOT standard to control various home automation devices adhering to the standard.

The most likely configuration for nixos users will be to use openthread in combination with the Home Assistant module and the Matter Server module.

Basic Setup

Make sure you have the required radio USB device connected to your server and note its device path which should look something like

/dev/serial/by-id/usb-Nabu_Casa_ZBT-2_xxxxxxxxx_ifxx
// OR
/dev/serial/by-id/usb-Itead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_V2_xxxxxxxxxxxxxxxxxxxxx-ifxx-portx

of course these are merely examples for specific devices but you will want to use the by-id path to ensure it remains stable across configurations. Then you can enable the open thread border router service in nixos

    openthread-border-router = {
      enable = true;
      backboneInterface = "eno1";
      # logLevel = "notice"; controls the log levels
      radio = { 
        device = "/dev/serial/by-id/usb-Nabu_Casa_ZBT-2_xxxxxxxxxxx-if00";
        baudRate = 460800;   # This and flow control are hardware dependant
        flowControl = false; # check your device's documentation
      };
      rest = {
        # listenAddress = "::"; # Defaults to 127.0.0.1

        # It is recommended to use port 8081 as some web UI features do not work 
        # with a different port 
        # listenPort = 8081;
       
      };
      web = {
        enable = true; # enables the basic web interface 

        # listenAddress = "::"; # defaults to 127.0.0.1
        # listenPort = 58082;   # this port can be altered freely
      };      
    };

once the service is started you should be able to access the web ui