From 7317053f257008c5326366fc20b0b517cc2058f0 Mon Sep 17 00:00:00 2001 From: Veillax <126523099+Veillax@users.noreply.github.com> Date: Fri, 30 Oct 2026 19:18:05 -0600 Subject: [PATCH] Add the scan speed option for service discovery --- bamboo/DOCS.md | 2 +- bamboo/config.yaml | 2 ++ bamboo/run.sh | 4 ++++ bamboo/translations/en.yaml | 3 +++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/bamboo/DOCS.md b/bamboo/DOCS.md index fcfd470..5629556 100644 --- a/bamboo/DOCS.md +++ b/bamboo/DOCS.md @@ -35,7 +35,7 @@ The add-on uses host networking, so a resource can also point at any address on ## Suggest services (optional) -Turn on **Suggest services** and Bamboo reports the services listening on Home Assistant's machine to Hammerhead, so you can pick one as a target instead of typing its address. Fill in **Scan subnets** (for example `192.168.1.0/24`) and it also looks for services on those networks, trying the ports in **Scan ports** or a short list of common ones. It is gentle, with a rate limit and a sweep every 15 minutes, and only private networks are accepted. Nothing is exposed until you pick a target. Only scan networks you are allowed to scan. +Turn on **Suggest services** and Bamboo reports the services listening on Home Assistant's machine to Hammerhead, so you can pick one as a target instead of typing its address. Fill in **Scan subnets** (for example `192.168.1.0/24`) and it also looks for services on those networks, trying the ports in **Scan ports** or a short list of common ones. It is gentle, with a rate limit (**Scan speed**, 50 connection attempts per second by default) and a sweep every 15 minutes, and only private networks are accepted. Nothing is exposed until you pick a target. Only scan networks you are allowed to scan. ## Updates diff --git a/bamboo/config.yaml b/bamboo/config.yaml index f628ce6..6ecd75b 100644 --- a/bamboo/config.yaml +++ b/bamboo/config.yaml @@ -19,9 +19,11 @@ options: discover: false discover_subnets: "" discover_ports: "" + discover_rate: 50 schema: hammerhead_url: url token: password discover: bool discover_subnets: str? discover_ports: str? + discover_rate: float(1,)? diff --git a/bamboo/run.sh b/bamboo/run.sh index f5287b3..7ecb7bb 100644 --- a/bamboo/run.sh +++ b/bamboo/run.sh @@ -26,6 +26,10 @@ ports="$(bashio::config 'discover_ports')" if [ -n "${ports}" ]; then export BAMBOO_DISCOVER_PORTS="${ports}" fi +rate="$(bashio::config 'discover_rate')" +if [ -n "${rate}" ]; then + export BAMBOO_DISCOVER_RATE="${rate}" +fi bashio::log.info "Starting $(bamboo -version), connecting to ${BAMBOO_HAMMERHEAD}" # /data survives restarts and updates; it holds this site's WireGuard key. diff --git a/bamboo/translations/en.yaml b/bamboo/translations/en.yaml index 96802e9..bbbf4ea 100644 --- a/bamboo/translations/en.yaml +++ b/bamboo/translations/en.yaml @@ -14,3 +14,6 @@ configuration: discover_ports: name: Scan ports description: "The TCP ports to try when scanning, for example 22,80,443,8000-8010. Leave empty for a short list of common ones." + discover_rate: + name: Scan speed + description: The most connection attempts per second a scan may make. The default is 50.