Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions openthread_border_router/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 3.0.2

- Honor the configured `otbr_log_level` for the OTBR web interface (previously always logged at info level)
- Bump beta to OTBR POSIX version ec16e396 (tag v2026.07.0)

## 3.0.1

- Backport fix for [CVE-2026-8369](https://github.com/advisories/GHSA-f6vh-g7gh-wh6h) to stable. This only affects users who have enabled NAT64 and use an untrusted network.
Expand Down
2 changes: 1 addition & 1 deletion openthread_border_router/DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Installation

Follow these steps to get the app (formerly knowon as add-on) installed on your system:
Follow these steps to get the app (formerly known as add-on) installed on your system:

1. In Home Assistant, go to **Settings** > **Apps** > **Install app**.
2. Select the top right menu and **Repository**.
Expand Down
4 changes: 1 addition & 3 deletions openthread_border_router/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ ENV DOCKER=1


COPY openthread-core-ha-config-posix.h /usr/src/
COPY 0001-rest-SO_REUSEADDR.patch /usr/src/

WORKDIR /usr/src
RUN \
Expand Down Expand Up @@ -44,8 +43,7 @@ RUN \
&& cd /usr/src/ot-br-posix \
&& git fetch origin ${OTBR_BETA_VERSION} \
&& git checkout ${OTBR_BETA_VERSION} \
&& git submodule update --init --recursive --depth 1 \
&& patch -p1 < /usr/src/0001-rest-SO_REUSEADDR.patch
&& git submodule update --init --recursive --depth 1

WORKDIR /usr/src/ot-br-posix
RUN \
Expand Down
2 changes: 1 addition & 1 deletion openthread_border_router/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ build_from:
aarch64: ghcr.io/home-assistant/aarch64-base-debian:trixie
amd64: ghcr.io/home-assistant/amd64-base-debian:trixie
args:
OTBR_BETA_VERSION: 78d9c289473602d3faab535c4e7fbd12ca8d32f5
OTBR_BETA_VERSION: ec16e396382b4559e70a2c6fdeecb7d596a5e915
OTBR_VERSION: 624a7d98e0dac5984c2982068f71fc81d2dbceb5
UNIVERSAL_SILABS_FLASHER_VERSION: 0.1.2
SERIALX_VERSION: 1.8.0
2 changes: 1 addition & 1 deletion openthread_border_router/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
version: 3.0.1
version: 3.0.2
breaking_versions: [3.0.0]
slug: openthread_border_router
name: OpenThread Border Router
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ declare device
declare baudrate
declare flow_control
declare migrate_flow_control
declare otbr_log_level
declare otbr_log_level_int
declare otbr_rest_listen
declare otbr_rest_listen_port
Expand Down Expand Up @@ -59,36 +58,8 @@ else
migrate_flow_control="none"
fi

otbr_log_level=$(bashio::string.lower "$(bashio::config otbr_log_level)")
case "${otbr_log_level}" in
debug)
otbr_log_level_int="7"
;;
info)
otbr_log_level_int="6"
;;
notice)
otbr_log_level_int="5"
;;
warning)
otbr_log_level_int="4"
;;
error)
otbr_log_level_int="3"
;;
critical)
otbr_log_level_int="2"
;;
alert)
otbr_log_level_int="1"
;;
emergency)
otbr_log_level_int="0"
;;
*)
bashio::exit.nok "Unknown otbr_log_level: ${otbr_log_level}"
;;
esac
otbr_log_level_int="$(otbr_log_level_to_int)" \
|| bashio::exit.nok "Unknown otbr_log_level: $(bashio::config otbr_log_level)"

# shellcheck disable=SC2015
mkdir -p /data/thread && ln -sft /var/lib /data/thread || bashio::exit.nok "Could not create directory /var/lib/thread to store Thread data."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@
# ==============================================================================
# Start OpenThread BorderRouter web interface
# ==============================================================================
# shellcheck source=./openthread_border_router/rootfs/etc/s6-overlay/scripts/otbr-agent-common
. /etc/s6-overlay/scripts/otbr-agent-common

bashio::log.info "Starting otbr-web..."
declare otbr_web_port
declare otbr_log_level_int

otbr_web_port="$(bashio::addon.port 8080)"
otbr_log_level_int="$(otbr_log_level_to_int)" \
|| bashio::exit.nok "Unknown otbr_log_level: $(bashio::config otbr_log_level)"

exec stdbuf -oL /usr/sbin/otbr-web -I wpan0 -d6 -s -a "::" -p "${otbr_web_port}"
exec stdbuf -oL /usr/sbin/otbr-web -I wpan0 -d"${otbr_log_level_int}" -s -a "::" -p "${otbr_web_port}"
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,22 @@ otbr_forward_egress_chain="OTBR_FORWARD_EGRESS"
otbr_forward_nat64_chain="OTBR_FORWARD_NAT64"
otbr_fw_mark="0x1001"

# Map the configured otbr_log_level to the numeric level expected by the
# otbr-agent/otbr-web -d flag. Echoes the numeric level on success, returns
# non-zero on an unknown level (callers own the user-facing error message).
otbr_log_level_to_int() {
local level
level=$(bashio::string.lower "$(bashio::config otbr_log_level)")
case "${level}" in
debug) echo "7" ;;
info) echo "6" ;;
notice) echo "5" ;;
warning) echo "4" ;;
error) echo "3" ;;
critical) echo "2" ;;
alert) echo "1" ;;
emergency) echo "0" ;;
*) return 1 ;;
esac
}

Loading