Part2 - thread Connect ZBT-1
This guide installs a firmware which supports only Thread!
To use the Home Assistant Connect ZBT-1 with Thread on a Raspberry Pi, you'll need to enable Thread support on the ZBT-1 and then configure the Thread integration in Home Assistant.
First, plug the ZBT-1 into the extension cable and then into your Raspberry Pi. Then, enable Thread support on the ZBT-1 through the Home Assistant UI.
Finally, configure the Thread integration to ensure the Home Assistant network is the preferred network and share the Thread credentials with your mobile app
Table of Contents
- Thread Border Router and Thread 网络
- Step 1.flasher firmware - Install dedicated Thread
- Step 2.Verify Hardware - ensure your debian 12 OS recognizes it
- Step 3.run OTBR on the pi using docker
- Configure the Thread network-Open Thread Border Router Integration
- Ensure Preferred Network
- Share Credentials
- Add Thread Device
https://connectzbt1.home-assistant.io/firmware-update/
Thread Border Router and Thread 网络
A border router is needed to bridge a Thread network to wifi/Ethernet.
Thread Border Router 将 Thread 网络连接到其他基于 IP 的网络,例如 Wi-Fi 或以太网。Thread 网络要求通过边界路由器连接到其他网络.
This border router is a form of a normal IPv6 router.
Thread 边界路由器负责在 Wi-Fi 和 Thread 网络之间转发 IP 帧
Thread 网络中的设备无法直接与 Wi-Fi 或以太网设备通信。为了使 Thread 设备与其他网络中的设备互联,需要在 Matter 的拓扑结构中增加一个特殊设备:Thread 边界路由器。
The Thread Border Router needs a 15.4 Radio Co-Processor (RCP) in order to create and interact with the Thread network.
Step 1.flasher firmware - Install dedicated Thread
Plug the Home Assistant Connect ZBT-1 via USB.
go to:https://connectzbt1.home-assistant.io/firmware-update/
Note
The running firmware could not be detected.
Make sure the USB port works and if you are using a USB extension cable, make sure the cable can transfer data. Unplug the Home Assistant Connect ZBT-1 and plug it back in to reset and try again.
Step 2.Verify Hardware - ensure your debian 12 OS recognizes it
ensure your debian 12 OS recognizes it
Used the command to determine the USB device:
# lsusb
Bus 001 Device 004: ID 10c4:ea60 Silicon Labs CP210x UART Bridge
ls /dev/tty*
/dev/ttyUSB0
ls -l /dev/serial/by-id/
usb-Nabu_Casa_SkyConnect_v1.0_c23df65189a3e811ba1d91603b0549ec-if00-port0 -> ../../ttyUSB0
Step 3.run OTBR on the pi using docker
lsusb
ls /dev/tty*
ls -l /dev/serial/by-id/
docker run --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" -p 8080:80 --dns=127.0.0.1 -it --volume /dev/pts/7:/dev/ttyUSB0 --privileged openthread/otbr
Following the OTBR install guide from https://openthread.io/guides/border-router/docker/run
this is my docker compose (i created an external macvlan for the network)
services:
otbr:
container_name: otbr
image: "openthread/otbr:latest"
privileged: true
restart: unless-stopped
networks:
- otbr_mvl
sysctls:
net.ipv6.conf.all.disable_ipv6: 0
net.ipv4.conf.all.forwarding: 1
net.ipv6.conf.all.forwarding: 1
net.ipv6.conf.all.accept_ra_rt_info_max_plen: 64
net.ipv6.conf.all.accept_ra: 2
command: --radio-url spinel+hdlc+uart:///dev/ttyUSB1?uart-baudrate=460800
devices:
- /dev/ttyUSB1
dns: 127.0.0.1
networks:
otbr_mvl:
external: true
https://github.com/orgs/openthread/discussions/10311#discussioncomment-9631786
IPv6 configuration (for example, IPv6 routing needs to be enabled)
output
success, you should have output similar to this:
WARNING: Localhost DNS setting (--dns=127.0.0.1) may fail in containers.
RADIO_URL: spinel+hdlc+uart:///dev/ttyUSB0
TUN_INTERFACE_NAME: wpan0
NAT64_PREFIX: 64:ff9b::/96
AUTO_PREFIX_ROUTE: true
AUTO_PREFIX_SLAAC: true
Current platform is ubuntu
* Applying /etc/sysctl.d/10-console-messages.conf ...
kernel.printk = 4 4 1 7
* Applying /etc/sysctl.d/10-ipv6-privacy.conf ...
net.ipv6.conf.all.use_tempaddr = 2
net.ipv6.conf.default.use_tempaddr = 2
* Applying /etc/sysctl.d/10-kernel-hardening.conf ...
kernel.kptr_restrict = 1
* Applying /etc/sysctl.d/10-link-restrictions.conf ...
fs.protected_hardlinks = 1
fs.protected_symlinks = 1
* Applying /etc/sysctl.d/10-magic-sysrq.conf ...
kernel.sysrq = 176
* Applying /etc/sysctl.d/10-network-security.conf ...
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.tcp_syncookies = 1
* Applying /etc/sysctl.d/10-ptrace.conf ...
kernel.yama.ptrace_scope = 1
* Applying /etc/sysctl.d/10-zeropage.conf ...
vm.mmap_min_addr = 65536
* Applying /etc/sysctl.d/60-otbr-ip-forward.conf ...
net.ipv6.conf.all.forwarding = 1
net.ipv4.ip_forward = 1
* Applying /etc/sysctl.conf ...
* Starting userspace NAT64 tayga [ OK ]
/usr/sbin/service
* Starting domain name service... bind9 [ OK ]
/usr/sbin/service
* dbus is not running
* Starting system message bus dbus [ OK ]
...fail!
otWeb[155]: border router web started on wpan0
otbr-agent[224]: Thread interface wpan0
otbr-agent[224]: Thread is down
otbr-agent[224]: Check if Thread is up: OK
otbr-agent[224]: Stop publishing service
otbr-agent[224]: PSKc is not initialized
otbr-agent[224]: Check if PSKc is initialized: OK
otbr-agent[224]: Initialize OpenThread Border Router Agent: OK
otbr-agent[224]: Border router agent started.
Configure the Thread network-Open Thread Border Router Integration
To add the Open Thread Border Router service to your Home Assistant instance
https://www.home-assistant.io/integrations/otbr
Ensure Preferred Network - Thread integration
Verify that the Home Assistant logo appears under "Preferred network,"
Note
Thread integration be used to create thread network, border router must be assigned to the homeassistant thread network
Share Credentials
Share the Thread network credentials with your mobile app (e.g., Android or iOS) to allow it to communicate with the ZBT-1, according to Home Assistant. This is done through the Home Assistant Companion app by going to Settings > Companion app > Troubleshooting and then selecting "Sync Thread credentials
Add Thread Device
Before you can add Matter-based Thread devices, your phone needs to know the credentials of your newly created Thread network.
To share the credentials with your Android phone, open the Home Assistant Companion app.
In the Companion app, go to Settings > Companion app > Troubleshooting, then select Sync Thread credentials.
Follow the instructions on screen.
Result: You will see a confirmation stating that Thread credentials from Home Assistant have been added to this device.
To add Matter-based Thread devices, follow the steps on Adding a matter device to Home Assistant
Useful links
https://connectzbt1.home-assistant.io/procedures/enable-thread/
Comments
Comments are closed