diff --git a/openthread_border_router/CHANGELOG.md b/openthread_border_router/CHANGELOG.md index 0573b2df9ed..f60450590c1 100644 --- a/openthread_border_router/CHANGELOG.md +++ b/openthread_border_router/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## 2.14.0 +- Remove firmware flashing from the addon, this is now handled by Core 2025.7.0. + ## 2.13.0 - Bump to OTBR POSIX version b067e5ac (2025-01-13 22:32:22 -0500) - Bump universal-silabs-flasher to 0.0.28 diff --git a/openthread_border_router/DOCS.md b/openthread_border_router/DOCS.md index 7ec95d6ae70..fe3b0d368f3 100644 --- a/openthread_border_router/DOCS.md +++ b/openthread_border_router/DOCS.md @@ -12,9 +12,10 @@ Follow these steps to get the add-on installed on your system: ## How to use -You will need a 802.15.4 capable radio supported by OpenThread. Home Assistant -Yellow as well as Home Assistant SkyConnect/Connect ZBT-1 are both capable to run -OpenThread. This add-on automatically installs the necessary firmware on these systems. +You will need a 802.15.4 capable radio supported by OpenThread flashed with OpenThread +RCP firmware. Home Assistant Yellow as well as Home Assistant SkyConnect/Connect ZBT-1 +are both able to run OpenThread and will be flashed with the correct firmware by Home +Assistant Core. If you are using Home Assistant Yellow, choose `/dev/ttyAMA1` as device. @@ -61,7 +62,6 @@ Add-on configuration: | device (mandatory) | Serial port where the OpenThread RCP Radio is attached | | baudrate | Serial port baudrate (depends on firmware) | | flow_control | If hardware flow control should be enabled (depends on firmware) | -| autoflash_firmware | Automatically install/update firmware (Home Assistant SkyConnect/Yellow) | | otbr_log_level | Set the log level of the OpenThread BorderRouter Agent | | firewall | Enable OpenThread Border Router firewall to block unnecessary traffic | | nat64 | Enable NAT64 to allow Thread devices accessing IPv4 addresses | diff --git a/openthread_border_router/Dockerfile b/openthread_border_router/Dockerfile index a758d34377b..8fe45750ec1 100644 --- a/openthread_border_router/Dockerfile +++ b/openthread_border_router/Dockerfile @@ -3,7 +3,6 @@ FROM $BUILD_FROM ARG BUILD_ARCH ARG OTBR_VERSION -ARG UNIVERSAL_SILABS_FLASHER # Set shell SHELL ["/bin/bash", "-o", "pipefail", "-c"] @@ -93,8 +92,6 @@ RUN \ && cd build/otbr/ \ && ninja \ && ninja install) \ - && pip install --break-system-packages \ - universal-silabs-flasher==${UNIVERSAL_SILABS_FLASHER} \ && apt-get purge -y --auto-remove \ git \ nodejs \ diff --git a/openthread_border_router/build.yaml b/openthread_border_router/build.yaml index 8bf57d2054f..a0998bc190f 100644 --- a/openthread_border_router/build.yaml +++ b/openthread_border_router/build.yaml @@ -4,4 +4,3 @@ build_from: amd64: ghcr.io/home-assistant/amd64-base-debian:bookworm args: OTBR_VERSION: b067e5ac5f8b3e92750df24922017eee2bc0fa04 - UNIVERSAL_SILABS_FLASHER: 0.0.28 diff --git a/openthread_border_router/config.yaml b/openthread_border_router/config.yaml index 3e982a32837..31759ebfb2a 100644 --- a/openthread_border_router/config.yaml +++ b/openthread_border_router/config.yaml @@ -1,5 +1,5 @@ --- -version: 2.13.0 +version: 2.14.0 slug: openthread_border_router name: OpenThread Border Router description: OpenThread Border Router add-on @@ -8,7 +8,7 @@ url: >- arch: - aarch64 - amd64 -homeassistant: 2023.9.0 +homeassistant: 2025.7.0 gpio: true hassio_api: true discovery: @@ -28,7 +28,6 @@ options: device: null baudrate: "460800" flow_control: true - autoflash_firmware: true otbr_log_level: notice firewall: true nat64: false @@ -43,7 +42,6 @@ schema: baudrate: list(57600|115200|230400|460800|921600) flow_control: bool network_device: str? - autoflash_firmware: bool otbr_log_level: list(debug|info|notice|warning|error|critical|alert|emergency) firewall: bool nat64: bool diff --git a/openthread_border_router/rootfs/etc/s6-overlay/s6-rc.d/otbr-agent/dependencies.d/universal-silabs-flasher b/openthread_border_router/rootfs/etc/s6-overlay/s6-rc.d/otbr-agent/dependencies.d/universal-silabs-flasher deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/openthread_border_router/rootfs/etc/s6-overlay/s6-rc.d/otbr-agent/run b/openthread_border_router/rootfs/etc/s6-overlay/s6-rc.d/otbr-agent/run index af84f245307..2b6885f8638 100755 --- a/openthread_border_router/rootfs/etc/s6-overlay/s6-rc.d/otbr-agent/run +++ b/openthread_border_router/rootfs/etc/s6-overlay/s6-rc.d/otbr-agent/run @@ -17,6 +17,11 @@ declare otbr_log_level_int declare otbr_rest_listen declare otbr_rest_listen_port +# Cleanup unused configs +if bashio::config.exists 'autoflash_firmware'; then + bashio::addon.option 'autoflash_firmware' +fi + backbone_if="$(bashio::api.supervisor 'GET' '/network/info' '' 'first(.interfaces[] | select (.primary == true)) .interface')" device=$(bashio::config 'device') diff --git a/openthread_border_router/rootfs/etc/s6-overlay/s6-rc.d/universal-silabs-flasher/dependencies.d/banner b/openthread_border_router/rootfs/etc/s6-overlay/s6-rc.d/universal-silabs-flasher/dependencies.d/banner deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/openthread_border_router/rootfs/etc/s6-overlay/s6-rc.d/universal-silabs-flasher/notification-fd b/openthread_border_router/rootfs/etc/s6-overlay/s6-rc.d/universal-silabs-flasher/notification-fd deleted file mode 100644 index 00750edc07d..00000000000 --- a/openthread_border_router/rootfs/etc/s6-overlay/s6-rc.d/universal-silabs-flasher/notification-fd +++ /dev/null @@ -1 +0,0 @@ -3 diff --git a/openthread_border_router/rootfs/etc/s6-overlay/s6-rc.d/universal-silabs-flasher/type b/openthread_border_router/rootfs/etc/s6-overlay/s6-rc.d/universal-silabs-flasher/type deleted file mode 100644 index bdd22a1850a..00000000000 --- a/openthread_border_router/rootfs/etc/s6-overlay/s6-rc.d/universal-silabs-flasher/type +++ /dev/null @@ -1 +0,0 @@ -oneshot diff --git a/openthread_border_router/rootfs/etc/s6-overlay/s6-rc.d/universal-silabs-flasher/up b/openthread_border_router/rootfs/etc/s6-overlay/s6-rc.d/universal-silabs-flasher/up deleted file mode 100644 index 56e09fe7678..00000000000 --- a/openthread_border_router/rootfs/etc/s6-overlay/s6-rc.d/universal-silabs-flasher/up +++ /dev/null @@ -1 +0,0 @@ -/etc/s6-overlay/scripts/universal-silabs-flasher-up diff --git a/openthread_border_router/rootfs/etc/s6-overlay/scripts/universal-silabs-flasher-up b/openthread_border_router/rootfs/etc/s6-overlay/scripts/universal-silabs-flasher-up deleted file mode 100755 index fc632d8139f..00000000000 --- a/openthread_border_router/rootfs/etc/s6-overlay/scripts/universal-silabs-flasher-up +++ /dev/null @@ -1,95 +0,0 @@ -#!/usr/bin/with-contenv bashio -# vim: ft=bash -# shellcheck shell=bash -# ============================================================================== -# Start universal-silabs-flasher if requested -# ============================================================================== - -# shellcheck disable=SC2034 -declare autoflash_firmware -declare device -declare firmware -declare usb_device_path -declare usb_manufacturer -declare usb_product -declare gpio_reset_flag - -function exit_no_firmware { - bashio::log.warning "No firmware found for the selected device, assuming firmware is installed." - exit 0 -} - -# Function to check if the device is Home Assistant Yellow -function is_home_assistant_yellow { - # First, ensure the device is /dev/ttyAMA1 - if [ "${device}" != "/dev/ttyAMA1" ]; then - return 1 - fi - - # Check the known paths for Home Assistant Yellow - local paths=( - "/sys/devices/platform/soc/fe201800.serial/tty/ttyAMA1" - "/sys/devices/platform/axi/1000120000.pcie/1f0003c000.serial/tty/ttyAMA1" - ) - for path in "${paths[@]}"; do - if [ -d "${path}" ]; then - return 0 - fi - done - return 1 -} - -device=$(bashio::config 'device') -gpio_reset_flag="" - -if bashio::config.false 'autoflash_firmware'; then - bashio::log.info "Flashing firmware is disabled" - exit 0 -fi - -if bashio::config.has_value 'network_device'; then - bashio::log.info "Network device is selected, skipping firmware flashing" - exit 0 -fi - -if is_home_assistant_yellow; then - bashio::log.info "Detected Home Assistant Yellow" - firmware="yellow_openthread_rcp_2.4.4.0_GitHub-7074a43e4_gsdk_4.4.4.gbl" - gpio_reset_flag="--bootloader-reset yellow" -else - # Check device manufacturer/product information - # shellcheck disable=SC2046,SC2086 - usb_device_path=$(realpath /sys/class/tty/$(readlink /sys/class/tty/$(basename ${device}) | sed 's:/[^/]*tty[^/]*::g' )/../) - if [ ! -f "${usb_device_path}/idProduct" ]; then - bashio::log.info "The selected serial port is not a USB device." - exit_no_firmware - fi - - if [ ! -f "${usb_device_path}/manufacturer" ] || [ ! -f "${usb_device_path}/product" ]; then - bashio::log.info "USB device is missing manufacturer or product name." - exit_no_firmware - fi - - usb_manufacturer=$(cat "${usb_device_path}/manufacturer") - usb_product=$(cat "${usb_device_path}/product") - - bashio::log.info "Checking ${device} identifying ${usb_product} from ${usb_manufacturer}." - if [[ "${usb_manufacturer}" == "Nabu Casa" && "${usb_product}" == "SkyConnect"* ]]; then - firmware="skyconnect_openthread_rcp_2.4.4.0_GitHub-7074a43e4_gsdk_4.4.4.gbl" - elif [[ "${usb_manufacturer}" == "Nabu Casa" && "${usb_product}" == "Home Assistant Connect ZBT-1"* ]]; then - firmware="skyconnect_openthread_rcp_2.4.4.0_GitHub-7074a43e4_gsdk_4.4.4.gbl" - elif [[ "${usb_manufacturer}" == "ITEAD" && "${usb_product}" == "SONOFF Zigbee 3.0 USB Dongle Plus V2" ]]; then - firmware="ot-rcp-v2.4.2.0-zbdonglee-460800.gbl" - gpio_reset_flag="--bootloader-reset sonoff" - elif [[ "${usb_manufacturer}" == "SMLIGHT" && "${usb_product}" == "SMLIGHT SLZB-07" ]]; then - firmware="ot-rcp-v2.4.2.0-slzb-07-460800.gbl" - gpio_reset_flag="--bootloader-reset slzb07" - else - exit_no_firmware - fi -fi - -bashio::log.info "Starting universal-silabs-flasher with ${device}" -# shellcheck disable=SC2086 -exec universal-silabs-flasher --device ${device} ${gpio_reset_flag} \ - flash --ensure-exact-version --allow-cross-flashing --firmware "/root/${firmware}" diff --git a/openthread_border_router/rootfs/root/ot-rcp-v2.4.2.0-slzb-07-460800.gbl b/openthread_border_router/rootfs/root/ot-rcp-v2.4.2.0-slzb-07-460800.gbl deleted file mode 100644 index 81f92cb757c..00000000000 Binary files a/openthread_border_router/rootfs/root/ot-rcp-v2.4.2.0-slzb-07-460800.gbl and /dev/null differ diff --git a/openthread_border_router/rootfs/root/ot-rcp-v2.4.2.0-zbdonglee-460800.gbl b/openthread_border_router/rootfs/root/ot-rcp-v2.4.2.0-zbdonglee-460800.gbl deleted file mode 100644 index 6b62389913f..00000000000 Binary files a/openthread_border_router/rootfs/root/ot-rcp-v2.4.2.0-zbdonglee-460800.gbl and /dev/null differ diff --git a/openthread_border_router/rootfs/root/skyconnect_openthread_rcp_2.4.4.0_GitHub-7074a43e4_gsdk_4.4.4.gbl b/openthread_border_router/rootfs/root/skyconnect_openthread_rcp_2.4.4.0_GitHub-7074a43e4_gsdk_4.4.4.gbl deleted file mode 100644 index 2b7b9cb91d3..00000000000 Binary files a/openthread_border_router/rootfs/root/skyconnect_openthread_rcp_2.4.4.0_GitHub-7074a43e4_gsdk_4.4.4.gbl and /dev/null differ diff --git a/openthread_border_router/rootfs/root/yellow_openthread_rcp_2.4.4.0_GitHub-7074a43e4_gsdk_4.4.4.gbl b/openthread_border_router/rootfs/root/yellow_openthread_rcp_2.4.4.0_GitHub-7074a43e4_gsdk_4.4.4.gbl deleted file mode 100644 index c20313baa94..00000000000 Binary files a/openthread_border_router/rootfs/root/yellow_openthread_rcp_2.4.4.0_GitHub-7074a43e4_gsdk_4.4.4.gbl and /dev/null differ diff --git a/openthread_border_router/translations/en.yaml b/openthread_border_router/translations/en.yaml index 8f55f9b9951..0d65aa973c4 100644 --- a/openthread_border_router/translations/en.yaml +++ b/openthread_border_router/translations/en.yaml @@ -16,11 +16,6 @@ configuration: when connecting to a device via sockets (takes precedence over above configuration). Not recommended! See documentation for more information. - autoflash_firmware: - name: Automatically flash firmware - description: >- - Automatically flash OpenThread RCP firmware on Home Assistant Yellow and - SkyConnect/Connect ZBT-1. otbr_log_level: name: OpenThread Border Router agent log level description: >-