From db417e78d6eeae9a521959e93af91a156174b54b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 22 Feb 2026 23:31:55 +0000 Subject: [PATCH 2/5] Fix Icecast service hardcoding /run/pulse/native and ignoring PULSE_SERVER - Use ${PULSE_SERVER:-unix:/run/pulse/native} in icecast/run and main/run to respect the PULSE_SERVER env var set by HA supervisor - Create /run/pulse/native symlink when PulseAudio socket is elsewhere - Copy PulseAudio cookie for icecast2 user authentication - Add icecast2 to audio group Co-authored-by: alexbelgium <44178713+alexbelgium@users.noreply.github.com> --- .../rootfs/etc/cont-init.d/15-audio_perms.sh | 26 ++++++++++++++++++- .../rootfs/etc/services.d/icecast/run | 2 +- birdnet-pipy/rootfs/etc/services.d/main/run | 2 +- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/birdnet-pipy/rootfs/etc/cont-init.d/15-audio_perms.sh b/birdnet-pipy/rootfs/etc/cont-init.d/15-audio_perms.sh index 162fbd319..3752d6d86 100755 --- a/birdnet-pipy/rootfs/etc/cont-init.d/15-audio_perms.sh +++ b/birdnet-pipy/rootfs/etc/cont-init.d/15-audio_perms.sh @@ -14,8 +14,32 @@ if [ -n "${SND_GID}" ] && getent group audio >/dev/null 2>&1; then fi fi -for u in root nginx www-data; do +for u in root nginx www-data icecast2; do if id "${u}" >/dev/null 2>&1; then usermod -aG audio "${u}" 2>/dev/null || true fi done + +# Create /run/pulse/native symlink if the PulseAudio socket is elsewhere +# (e.g. HAOS provides it at /run/audio/pulse.sock) +PULSE_SOCK="${PULSE_SERVER:-}" +PULSE_SOCK="${PULSE_SOCK#unix:}" +if [ -n "${PULSE_SOCK}" ] && [ -S "${PULSE_SOCK}" ] && [ ! -S /run/pulse/native ]; then + mkdir -p /run/pulse + ln -sf "${PULSE_SOCK}" /run/pulse/native +fi + +# Copy PulseAudio cookie for the icecast2 user so it can authenticate +if id icecast2 >/dev/null 2>&1; then + ICECAST_HOME="$(getent passwd icecast2 | cut -d: -f6)" + if [ -n "${ICECAST_HOME}" ]; then + for cookie in /config/.config/pulse/cookie /root/.config/pulse/cookie; do + if [ -f "${cookie}" ]; then + mkdir -p "${ICECAST_HOME}/.config/pulse" + cp "${cookie}" "${ICECAST_HOME}/.config/pulse/cookie" + chown icecast2 "${ICECAST_HOME}/.config/pulse" "${ICECAST_HOME}/.config/pulse/cookie" + break + fi + done + fi +fi diff --git a/birdnet-pipy/rootfs/etc/services.d/icecast/run b/birdnet-pipy/rootfs/etc/services.d/icecast/run index 220df56dc..8a608c9a5 100644 --- a/birdnet-pipy/rootfs/etc/services.d/icecast/run +++ b/birdnet-pipy/rootfs/etc/services.d/icecast/run @@ -1,5 +1,5 @@ #!/usr/bin/with-contenv bashio # shellcheck shell=bash set -euo pipefail -export PULSE_SERVER=unix:/run/pulse/native +export PULSE_SERVER="${PULSE_SERVER:-unix:/run/pulse/native}" gosu icecast2 /usr/local/bin/start-icecast.sh diff --git a/birdnet-pipy/rootfs/etc/services.d/main/run b/birdnet-pipy/rootfs/etc/services.d/main/run index 0ceae662a..68d4ae1d1 100644 --- a/birdnet-pipy/rootfs/etc/services.d/main/run +++ b/birdnet-pipy/rootfs/etc/services.d/main/run @@ -2,7 +2,7 @@ # shellcheck shell=bash set -euo pipefail export PYTHONPATH=/app -export PULSE_SERVER=unix:/run/pulse/native +export PULSE_SERVER="${PULSE_SERVER:-unix:/run/pulse/native}" bashio::net.wait_for 5002 127.0.0.1 300 cd /app exec python3 -m core.main From e476bddd037468b4f531158b67d41a1b51fbbcf5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 22 Feb 2026 23:40:22 +0000 Subject: [PATCH 3/5] Bump birdnet-pipy version to 0.5.5 and add changelog entry Co-authored-by: alexbelgium <44178713+alexbelgium@users.noreply.github.com> --- birdnet-pipy/CHANGELOG.md | 3 +++ birdnet-pipy/config.yaml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/birdnet-pipy/CHANGELOG.md b/birdnet-pipy/CHANGELOG.md index f371745c7..75d0eca06 100644 --- a/birdnet-pipy/CHANGELOG.md +++ b/birdnet-pipy/CHANGELOG.md @@ -1,4 +1,7 @@ +## 0.5.5 (2026-02-22) +- Fix Icecast service failing to connect to PulseAudio on HAOS by respecting PULSE_SERVER env var and setting up socket symlink and auth cookie for icecast2 user + ## 0.5.4 (2026-02-21) - Update to latest version from Suncuss/BirdNET-PiPy (changelog : https://github.com/Suncuss/BirdNET-PiPy/releases) ## 0.5.0-6 (15-02-2026) diff --git a/birdnet-pipy/config.yaml b/birdnet-pipy/config.yaml index 5c55a0fd7..d8091c055 100644 --- a/birdnet-pipy/config.yaml +++ b/birdnet-pipy/config.yaml @@ -93,5 +93,5 @@ schema: ssl: bool? slug: birdnet-pipy url: https://github.com/alexbelgium/hassio-addons/tree/master/birdnet-pipy -version: "0.5.4" +version: "0.5.5" webui: "[PROTO:ssl]://[HOST]:[PORT:80]" From af461c5f71597bb612be7cedf91c3a04d22b852a Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Mon, 23 Feb 2026 00:43:55 +0100 Subject: [PATCH 4/5] Downgrade version from 0.5.5 to 0.5.4-2 --- birdnet-pipy/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/birdnet-pipy/config.yaml b/birdnet-pipy/config.yaml index d8091c055..2460f4a97 100644 --- a/birdnet-pipy/config.yaml +++ b/birdnet-pipy/config.yaml @@ -93,5 +93,5 @@ schema: ssl: bool? slug: birdnet-pipy url: https://github.com/alexbelgium/hassio-addons/tree/master/birdnet-pipy -version: "0.5.5" +version: "0.5.4-2" webui: "[PROTO:ssl]://[HOST]:[PORT:80]" From ffdcc54dec0568579d0f0d47a4759d510d0c582e Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Mon, 23 Feb 2026 00:44:22 +0100 Subject: [PATCH 5/5] Remove 0.5.5 entry from CHANGELOG.md Remove version 0.5.5 entry from CHANGELOG. --- birdnet-pipy/CHANGELOG.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/birdnet-pipy/CHANGELOG.md b/birdnet-pipy/CHANGELOG.md index 75d0eca06..25ca9ea44 100644 --- a/birdnet-pipy/CHANGELOG.md +++ b/birdnet-pipy/CHANGELOG.md @@ -1,5 +1,3 @@ - -## 0.5.5 (2026-02-22) - Fix Icecast service failing to connect to PulseAudio on HAOS by respecting PULSE_SERVER env var and setting up socket symlink and auth cookie for icecast2 user ## 0.5.4 (2026-02-21)