Architecture
Components on the device
flowchart TB
subgraph phone["Phone"]
A2DP["A2DP source"]
AVRCP["AVRCP controller"]
end
subgraph radxa["Radxa ZERO 3W (Armbian)"]
direction TB
bluetoothd["bluetoothd (BlueZ)"]
bluealsa["bluealsa<br/>A2DP sink: SBC, aptX, …"]
aplay["boombox-aplay<br/>bluealsa-aplay --single-audio"]
pcm["ALSA pcm.boombox<br/>plug → softvol 'Boombox' → dmix → hw:UDA1334A"]
nm["NetworkManager<br/>wpa_supplicant · dnsmasq (setup AP)"]
avahi["avahi<br/>boombox.local"]
subgraph agentbox["boombox-agent (root, sandboxed, no TYPO3)"]
agent["services: player · bluetooth · audio · wifi · system"]
backend["Linux backend<br/>busctl · nmcli · amixer · hostnamectl · gpioset"]
end
subgraph web["boombox-frankenphp (www-data)"]
caddy["Caddy: captive portal rules, Mercure hub"]
typo3["TYPO3 (worker mode)<br/>EXT:boombox_speaker · SQLite"]
end
end
A2DP --> bluetoothd --> bluealsa --> aplay --> pcm --> dac["UDA1334A → MAX98306 → speakers"]
AVRCP <--> bluetoothd
backend <-- "D-Bus" --> bluetoothd
backend <-- "D-Bus" --> bluealsa
backend <-- "D-Bus" --> nm
backend -- "amixer, asound.conf" --> pcm
backend -- "gpioset (amp enable)" --> dac
typo3 <-- "Unix socket /run/boombox/agent.sock<br/>NDJSON, group boombox" --> agent
agent -- "POST updates (publisher JWT)" --> caddy
browser["Browser"] <-- "HTTP :80" --> caddy
caddy <--> typo3
caddy -- "SSE (subscriber JWT cookie)" --> browser
Repository packages
| Package | Role |
|---|---|
packages/boombox-agent (ochorocho/boombox-agent) | The system agent: a plain PHP library and daemon (ReactPHP). It has a Linux backend and a simulated one. It never loads TYPO3. |
packages/boombox-speaker (EXT:boombox_speaker) | The web side: content elements, the JSON API at /api/boombox/, login guard, Mercure subscriber tokens and the captive portal redirects. |
packages/boombox (EXT:boombox) | The site package: page templates, the site set, the initial page tree (Initialisation/data.xml) and the backend's Boombox group. |
packages/insights (EXT:insights) | The backend module Insights: the documentation in Documentation/, searchable, with its diagrams. |
packages/model-viewer (EXT:model_viewer) | The backend module Model viewer, and /models/… for the slicers. |
deploy/device/ | install.sh, the files it installs (systemd units, Caddyfile, NetworkManager, avahi, overlays) and the emulated-device test. |
Why a separate agent
Bluetooth pairing, NetworkManager profiles, the hostname and power need root. TYPO3 runs as www-data, and www-data can write TYPO3's compiled caches (var/cache/code/di/*.php). If root ever loaded TYPO3, anyone who controlled www-data could run code as root. So the agent:
- loads only its own package, from a release www-data cannot write;
- listens on one Unix socket, mode 0660, group
boombox; - validates every argument (Bluetooth addresses, SSIDs, passwords, hostnames, ranges) before it reaches a tool;
- runs tools from argument vectors, never a shell;
- writes Wi-Fi passwords into root-only NetworkManager keyfiles, never onto a command line other users could read;
- runs under a strict systemd sandbox (
systemd-analyze security: 3.2).
Boot order
What counts after power-on is how soon a phone can connect, not how soon the web page answers. The units are ordered for that:
aic-bluetooth.service, the project's replacement for Armbian's unit of the same name, attaches the AIC8800's Bluetooth UART right afterbasic.target, next tobluetoothd. Armbian's unit wasType=idleand ordered afterbluetooth.target, so it waited for bluealsa, about four seconds. bluetoothd picks uphci0whenever it appears.bluealsaandboombox-aplaymake the speaker an A2DP sink.boombox-agentisType=notify. It reports ready once Bluetooth is set up and the last phone is being reconnected. Its own start takes about 250 ms; the rest is PHP loading from the SD card.boombox-frankenphpis ordered after the agent, so TYPO3 no longer loads from the card at the same moment. Its lowerCPUWeight,IOWeightandNiceonly matter while something else needs the board.
Measured on a Radxa ZERO 3W, in seconds from the start of the kernel:
| microSD, old order | microSD | eMMC | |
|---|---|---|---|
hci0 appears: phones can connect | 22.4 | 17.9 | 12.6 |
| The agent reconnects the last phone | 25.9 | 22.5 | 13.8 |
| The web interface answers | 29.6 | 31.4 | 17.4 |
The eMMC column is the biggest step; see Booting from eMMC.
Once hci0 is powered, the agent plays the ready sound, once per boot. A marker in /run/boombox (tmpfs, kept across agent restarts by RuntimeDirectoryPreserve=yes) keeps a deploy from playing it again.
Sounds
Each prompt (ready, pairing, connect, disconnect) holds a list of up to eight entries, {"sound": id} or {"say": text, "lang": "de"|"en"}, and plays one at random. Settings stored as a single id are read as a list of one.
- Library: the bundled WAVs in
packages/boombox-agent/resources/sounds, by file name, and the owner's uploads in/var/lib/boombox/sounds, ascustom:<slug>. - Playback: prompts go through
aplay -D boombox_direct, so they follow the volume and mix over music, but pass the recording tap: they are never recorded. Each one wakes the amplifier first. - Speech: Pico (
libttspico-utils, in Debian's non-free, which Armbian enables). The package only recommends it, and Armbian installs no recommended packages, soboombox-setup.shandmake installask for it by name.pico2wave -l de-DE|en-US -w <file> -- <text>renders a text once into/run/boombox/tts; afterwards it plays from there. The--keeps a text starting with a dash from being read as an option. Without Pico the page offers sounds only. - Upload: the browser posts the raw file as
audio/wavtoPOST /api/boombox/sounds/upload?name=…. It is one of three routes with a raw body, besidelibrary/uploadandbrand/logo; they keep the same-origin, CSRF and owner checks.- The socket protocol caps a line at 64 KiB, so the middleware hands the file to the agent in base64 chunks (
sounds.upload). - The agent assembles the chunks and checks the RIFF header before storing anything: PCM 8/16/24 bit, mono or stereo, at most 48 kHz, 10 s and 2 MB.
- No directory is shared between www-data and root.
- The socket protocol caps a line at 64 KiB, so the middleware hands the file to the agent in base64 chunks (
Song history
The agent records the songs, not the web app: it sees every track change, whether or not a page is open. Once a second it looks at what plays: the phone, Spotify, a playlist or a radio station. A new track that is playing becomes a row in /var/lib/boombox/history.sqlite (title, artist, album, the phone's name or "Spotify", "Playlist", "Radio", time). A radio station plays what its stream says: the agent asks for the ICY StreamTitle (a second, short curl connection with Icy-MetaData: 1, as nobody) every 30 s and records "Artist - Song" as artist and song, the station as album. A station that sends none (HLS, many CDNs) is one play under its name. Only a phone's plays can be recorded. The same track again within 30 minutes is the same play. Rows past the newest 5,000 are deleted on insert.
history.search takes a text, a page size of up to 100 and a cursor (the id to continue before). The text matches a lower-cased copy of title, artist, album and phone, because SQLite's LIKE only folds ASCII; % and _ are escaped. The history state section carries only the count and the newest play, so pages hear about new songs without receiving the list.
Who plays
Phones (bluealsa-aplay into pcm.boombox), Home Assistant streams, playlists and Spotify Connect (Soloist, through a PulseAudio of its own; all three into pcm.boombox_direct) end in the same dmix, so two of them would play over each other. The agent's PlaybackArbiter decides instead. Every source - BluetoothSource, StreamService, PlaylistService, SpotifyService - can be suspended; all but Spotify resume.
The agent follows Spotify Soloist through its local WebSocket API (127.0.0.1:47917, SoloistReceiver): what plays, and an app starting to play, which claims the speaker. Suspending Spotify pauses Soloist and gives up the speaker (pause, deactivate), which ends the app's session here. Spotify's playlists are not in the agent's database: the agent asks the Web API for them with the owner's account, and asks Spotify to play them on the receiver. See Spotify.
The players stop with SIGKILL, never SIGTERM: alsa-lib ignores a signal that interrupts its wait for dmix's lock, mixes without the lock and releases the one another player holds; when it exits, the lock stays taken and every player waits forever - a phone taking over from a playlist played silence. The agent kills its aplays outright (the sink of CommandRunner::pipeline(), sounds and speech), and boombox-aplay.service has KillSignal=SIGKILL.
- A new source claims the speaker. With
audio.newPlayback=takeover(the default) whatever plays is suspended; withkeepthe claim fails withbusy(HTTP 409) unless it is forced. - A phone cannot ask first: the arbiter watches its AVRCP status and treats a change to
playingas its claim. Underkeepit pauses the phone again; a phone without AVRCP takes over rather than mix. Pauses and plays the arbiter sends itself are not taken for the phone acting. - A suspended playlist waits in a resume slot. It picks up 3 s after a phone stopped (phones report short stops between tracks) and right after a stream ended; the slot survives a chain of takeovers.
- Announcements pass whatever the policy, pause what plays and resume it afterwards; a phone starting during one waits for it.
- What the speaker is about (
SpeakerHolder, published asaudio.playback.holds): what plays; else, of a paused playlist and a paused Spotify, the one that started last; else the phone. The knob and Home Assistant pause and skip it, and Now playing and the display show it.
Playlists
Playlists are in /var/lib/boombox/playlists.sqlite, in the agent: the speaker plays them with or without the web app. Each entry keeps the file's uid, its path, title, artist and length. The web app finds the files (music library or recordings) and sends their paths; the agent resolves each one and plays it only if it is an MP3 below BOOMBOX_MEDIA_ROOTS. Paths never reach the browser.
A song on a server (SMB, SFTP, WebDAV, FTP, S3) has no path on the speaker: when it is added, the web app copies it into the playback cache, shared/var/boombox-cache (PlaybackCache, 2 GB), and sends the copy's path. A copy is named <uid>-<size>-<modified>.mp3, so a changed song is a new copy; the songs used least recently make room. A copy that left the cache shows its entry missing, and showing the playlist fetches it again, unless its server does not answer. The agent itself never talks to a server.
A track plays as mpg123 | aplay on boombox_direct: the agent opens the file and hands it to mpg123 as stdin, mpg123 runs as nobody and resamples to 48 kHz stereo. After a takeover it starts again with -k, the MPEG frames to skip, so the playlist picks up mid-song. A file renamed, moved or deleted in TYPO3 is passed on (playlists.entries.repath); a folder renamed is found again when a page shows the playlist.
Radio stations
An entry can be an internet radio station: kind radio, its stream URL where a file keeps its path, no file uid and no length. It plays as ffmpeg | aplay: ffmpeg runs as nobody, fetches the stream itself (an HLS playlist names segments, often on other hosts), speaks only http(s) and HLS, reconnects when the stream drops, and decodes MP3, AAC, Ogg and HLS to 48 kHz stereo. A station plays live: no position, no seeking, and a resume starts it again from now. One that stops is tried again after 2, 4 and 8 s; then it counts as a broken track and the next entry plays. A watchdog covers a station that goes silent with its tools still running: when aplay has read nothing for 20 s (rchar in /proc/<pid>/io), the agent stops the station and tries it again the same way. ffmpeg's own reconnect fits within that time. Once, on a speaker, aplay stayed blocked after an outage, and the station was silent for good.
Stations are found in Radio Browser, a free community directory (radio.search): curl as nobody over HTTPS, a random mirror first, the others when it fails. Only the search terms leave the speaker. A pasted address goes through radio.resolve, which follows redirects itself, checks and pins every hop like a Home Assistant stream (RemoteUrl: never the speaker, its loopback or a name pointing there), and unwraps .pls and .m3u playlists. It keeps the address from before a redirect: broadcasters redirect to CDN addresses whose tokens expire. The simulated speaker lists a few fixed stations instead.
A station found there keeps its logo's address: HTTPS, and checked like a stream, since the directory is community-edited. While it plays, the cover service fetches the logo like a Spotify cover, with the same switch and cache, over HTTPS even through redirects, and Now playing shows it whole instead of an album cover. A station without one, such as a pasted address, gets a radio icon.
The station's own host is checked again before every play. The hosts ffmpeg is redirected to, and HLS segment hosts, are not: ffmpeg cannot be pinned like curl. Stations come only from the logged-in owner, and ffmpeg reads, as nobody, without a shell. The egress wall (boombox-egress.nft) keeps nobody off the speaker itself and off the home network (the private, shared and link-local ranges, DNS excepted): a redirect or an HLS segment cannot reach a router's admin page or another device. A station on the home network itself (an Icecast on a NAS) does not play for that reason.
The music library
MP3s in the owner's music folder (library.folder, default 1:/music/, on any storage, a server's too). The browser walks a dropped folder tree and uploads each file in chunks of 2 MiB (the web server takes 8 MB per request) with its path and offset. The web app keeps chunks in var/transient/boombox-upload/ per session, answers with how much it has, and only a complete MP3 goes into FAL, into the folders its path names. Paths with .., dot files or __MACOSX are refused, 256 MB must stay free on the card.
Playlists also take songs from the cards mounted under Settings → Storage, without them being the music folder: GET library/mounts lists those online, and GET library?storage=<uid> browses one from its top. A song is checked by its uid to lie in the music folder or on a mount that is online; a folder from a mount goes to playlists/add as {folder, storage}.
The page's player gets a song from GET /api/boombox/library/<uid>, read through its storage as it is sent, a chunk at a time, and only the range the browser asks for when it seeks: no copy of the file, wherever it is. A server that cannot seek (an SMB share, S3) is read up to the range and that part dropped.
The socket protocol
The protocol is newline-delimited JSON: one request per line, and one answer per request.
→ {"v":1,"id":"a2","op":"player.command","args":{"action":"pause"}}
← {"v":1,"id":"a2","ok":true,"result":{"connected":true,"status":"paused", …}}
→ {"v":1,"id":"a3","op":"wifi.connect","args":{"ssid":"Home","psk":"…"}}
← {"v":1,"id":"a3","ok":false,"error":{"code":"invalid_argument","field":"psk","message":"…"}}A connection that sends subscribe stays open and receives events such as {"event":"player.changed","seq":412,"data":{…}}. An event always carries the full snapshot of its section (player, bluetooth, audio, sounds, history, wifi, system, homeassistant), so a client that missed one is whole again with the next.
Operations: hello, state.get, player.*, bluetooth.*, audio.*, sounds.*, history.*, wifi.*, system.*. The sim.* operations exist only on the simulated backend.
Live updates
sequenceDiagram
participant P as Phone
participant A as boombox-agent
participant H as Mercure hub (Caddy)
participant T as TYPO3 API
participant B as Browser
B->>T: GET /api/boombox/session (logged in)
T-->>B: CSRF token + Set-Cookie mercureAuthorization (HttpOnly, path=/.well-known/mercure)
B->>H: EventSource /.well-known/mercure?topic=boombox/…
P->>A: (via BlueZ) track changes
A->>A: snapshot differs from last published
A->>H: POST boombox/player (private, publisher JWT)
H-->>B: player.changed
Note over B: Without a confirmed hub connection,<br/>the page polls GET /api/boombox/state every 5 s,<br/>not while it is hidden. A stream the hub closed<br/>(an expired cookie) reopens with a fresh session.<br/>With one, a shown page still reads the state every 30 s:<br/>news there means the stream misses messages<br/>(an ad blocker holding it back), and it polls again<br/>until a message arrives.
The captive portal
sequenceDiagram
participant S as Speaker (agent)
participant N as NetworkManager + dnsmasq
participant Ph as Phone
participant C as Caddy
participant T as TYPO3
S->>S: no known Wi-Fi for 45 s (fallbackSeconds)
S->>N: bring up "boombox-setup" AP (WPA2, setup secret)
S->>S: touch /run/boombox/ap-active
Ph->>N: join Boombox-XXXX, DHCP (option 114 = portal URL)
Ph->>N: DNS connectivitycheck.gstatic.com?
N-->>Ph: 10.42.0.1 (every name)
Ph->>C: GET http://connectivitycheck…/generate_204
C-->>Ph: 302 http://10.42.0.1/portal
Ph->>T: /portal → 302 the page with the Wi-Fi networks (/settings/wifi)
Ph->>T: /settings/wifi → 303 /login?redirect_url=/settings/wifi
Ph->>T: log in as owner (setup secret) → /settings/wifi
Ph->>T: POST /api/boombox/wifi/connect
T->>S: wifi.connect
S->>N: stop AP, activate the new profile
alt connected
S->>S: remove ap-active, publish wifi.changed
else failed
S->>N: forget the profile, AP up again, lastError shown
end
The agent's Wi-Fi state machine:
stateDiagram-v2
[*] --> booting
booting --> client: connected
booting --> ap: no network after fallbackSeconds / no saved networks
client --> ap: connection lost for fallbackSeconds
ap --> connecting: credentials submitted / retry every 5 min (no AP clients)
connecting --> client: success
connecting --> ap: failure (profile forgotten, lastError set)
ap --> offline: AP cannot start
offline --> connecting: retry every 5 min
Access control
| Layer | Rule |
|---|---|
| Pages | Player, Bluetooth, Wi-Fi and Settings are restricted to the "Boombox owners" frontend group. A 403 redirects to /login?redirect_url=…. |
| API reads | Logged-in member of the owner group (boombox.speaker.ownerGroup). |
| API writes | The same, plus a JSON body, a same-origin request (Origin scheme, host and port, Sec-Fetch-Site) and an X-Boombox-Csrf header: an HMAC of the login session id. |
| Setup secret as password | After install and after a factory reset the owner's password is the setup secret. Until they choose their own, the API answers only the session and the state the pages draw from, and the password change; everything else (logs, history, recordings, the mirrored screen, every write) is refused with password_change_required. The secret is the setup network's password, on a label: whoever is near the speaker may know it. The page shows the password form first. |
| Password change | Needs the current password, at most 5 wrong ones per 15 min and account. Ends every other session of the account. |
| Live updates | The agent publishes privately; the hub accepts only subscriber JWTs naming the boombox/* topics. The pages' token lives in one cookie per browser, shared by all its tabs: it names every topic the account may have (never the TV's hidden ones), and each page's stream asks for its own topics. It lasts ten minutes and is renewed two minutes before; the hub ends a stream when its token expires, and the browser reconnects with the cookie as it is then. Logging out expires the cookie. |
| Login | felogin, with TYPO3's own rate limit (FE.loginRateLimit: 5 attempts per 15 min). |
| Simulator | sim.* operations do not exist on the Linux backend, and the API also closes them in the Production context. |
| Home Assistant | ESPHome API on TCP 6053, only while the owner turned it on. Without a key only during the owner's adoption window; afterwards Noise-encrypted under Home Assistant's key only. See Home Assistant. |
| Song covers | Off by default. When on, curl runs as nobody, HTTPS only, against MusicBrainz, the Cover Art Archive and Apple; only a JPEG or PNG up to 2 MB is kept. The web app serves covers by their hash name only. |
| Music library | Uploads are the owner's only (never the TV's), checked chunk by chunk: a path that leaves the music folder, a file over 200 MB or one that is no MP3 is refused. Files are served through the API only, from the music folder only. The agent plays a path only after resolving it below BOOMBOX_MEDIA_ROOTS, and decodes as nobody. |
| Storage | The owner's only (never the TV's). Cards are mounted by systemd for www-data with noexec,nosuid,nodev; the agent's own disk is never offered. Servers are storages made by an admin in the backend; their passwords stay in config/system/file-storage-secrets.json (0660), never in the state the pages see. An empty mount point is removed, so nothing writes onto the speaker's card in its place. See Storage. |
| Recordings | Off by default. The tap's socket is for bluealsa-aplay's group only; recordings are served to the owner (and the TV) through the API, only from the chosen folder, never by public URL. See Recording. |
| MQTT | Outgoing only, to the broker the owner entered, while turned on. Whoever may publish to the speaker's command topics controls it; the broker's users and ACLs decide who that is. See MQTT. |
Security model
Who can do what on a speaker, and the trade-offs that were made on purpose.
| Who | Can |
|---|---|
| Someone nearby | See the Bluetooth name. Pair only inside the owner's pairing window. Join the setup network only with the setup secret, and only while it is open (no known Wi-Fi). |
| Anyone on the home network | Reach the web pages and the TYPO3 backend, over plain HTTP unless HTTPS is on (see below). Reach port 6053 while Home Assistant is turned on. |
| The owner (web login) | Everything the pages offer, through the API and the agent's allow-list of operations. |
The TV's helpers (boombox-cec, boombox-wiimote, boombox-mouse) | Run as the kiosk's user, beside its browser, to reach it over its session bus (cogctl). They read input from the TV over HDMI-CEC and from a Wiimote over Bluetooth. They reach the agent only on /run/boombox/remote.sock (group boombox-remote), which takes the volume keys (Runner::REMOTE_OPERATIONS) and nothing else; agent.sock (group boombox) is the web server's. On both the agent asks the kernel who connected (PeerCredentials: the caller's pid, its user from /proc): agent.sock takes root and www-data, remote.sock root and the kiosk's user; anyone else the group lets in is refused and logged. |
The TV account (tv, group "Boombox TV") | What the owner allows on the Settings page: look only, control playback, or everything but the owner's password, the TV settings and the Home Assistant key (ApiGuard::requireTvAccess). It logs in only from the speaker itself: /tv/login checks the connection's own loopback address, and its random password in /etc/boombox/tv-password is readable by root and the web server only. The state and the hub topics it gets leave out what its routes refuse: storage, backups, the broker, Home Assistant, updates and the saved Wi-Fi networks (TvSections). Every page, the owner's too, asks for and subscribes to the sections its elements show, not all of them. |
User boombox-kiosk | Runs sway and cog on tty1; no rights beyond its session and the screen. |
User boombox-tunein | Runs the live stream (boombox-tunein, only with --tunein=on): reads the loopback sound card, answers on 127.0.0.1:8099 to a request with a backend user's ticket. It cannot reach anything else. |
Group boombox (www-data) | Every agent operation on the socket, including the factory reset and reading the Home Assistant key. A compromised web server controls the speaker, but not the system. |
| The agent (root, sandboxed) | Bluetooth, Wi-Fi profiles, the hostname, ALSA, the GPIO line, and mounting cards through systemd (its sandbox cannot mount). Every external tool gets an argument vector, never a shell line; values that reach a tool's command line end its options with -- or are refused when they start with -. |
Files and who writes them
| Path | Owner, group, mode | Written by |
|---|---|---|
/var/www/boombox/releases/<date> | root, www-data (setgid releases/), 2775 | install.sh --release from the package (root); read by everyone |
releases/<date>/var, releases/<date>/public/typo3temp | root or www-data, www-data, 2775 / 664 | the web server; handed to www-data by --release |
shared/var, shared/public/fileadmin | root or www-data, www-data, 2775 / 664 | the web server |
shared/var/sqlite, shared/var/log | root, www-data, 2770 | the web server only |
/var/spool/boombox | root, boombox, 0750 / 0640 | the agent; the web app reads and imports |
/var/cache/boombox/covers | root, boombox, 0750 / 0640 | the agent; the web app reads |
/var/lib/boombox | root, root, 0700 | the agent |
/media/boombox/<id> | www-data, www-data, 0770 / 0660 (mount options) | the web server; mounted and unmounted by systemd for the agent |
TYPO3 creates folders 0775 and gives them group www-data by name (folderCreateMask and createGroup in config/system/additional.php): the web server and the import service run with systemd's RestrictSUIDSGID=yes, which refuses a folder asking for the setgid bit, TYPO3's default 2775, with EPERM ("Could not create directory").
Only root writes a release: the package's files, copied by install.sh --release, which gives var/ and public/typo3temp/ to www-data and runs the TYPO3 commands as www-data. install.sh --app repairs fileadmin, var/ and typo3temp/ of the live release when anything there is not group www-data, not group-writable or world-writable (web_permissions).
- Signed releases. A package or UxPlay build is installed only when the project's release key (Ed25519, pinned on the speaker as
/etc/boombox/release-signing.pub) signed its checksum: a GitLab project someone took over, its runner, or a GitLab that answers with another file cannot have a speaker install code of theirs. See deploy/package/README.md.
Trade-offs kept on purpose:
- Plain HTTP by default. A speaker on a home network has no name a public certificate could be issued for. Out of the box the login and its cookie can be read by anyone on the Wi-Fi. Serve the pages over HTTPS (Settings → System) uses Caddy's own certificate authority for the speaker's
.localname and addresses and sends browsers there; each device trusts that authority once (/boombox-ca.crt), so no warning has to be clicked away. The TV's loopback, the setup network, Prometheus, Home Assistant's covers and the slicers stay on plain HTTP: they would refuse a certificate they do not know. - The TYPO3 backend is reachable from the home network, protected by the admin password
install.shgenerates (/etc/boombox/admin-password) and TYPO3's login rate limit. Pages sendX-Frame-Options: SAMEORIGIN,nosniffandReferrer-Policy: same-origin. - Home Assistant's adoption window works like ESPHome's: while it is open, whoever on the network sends a key first adopts the speaker. Open it only while adding the speaker to Home Assistant.
- Streams from Home Assistant may come from private addresses, since its media proxy lives on the LAN: curl fetches them as
boombox-stream, the one user the egress wall lets into the home network. Host names are resolved once and curl is pinned to the checked address; loopback and link-local addresses are refused. The speaker's own LAN address is not: a keyed Home Assistant could make it fetch its own pages without seeing them. - Blocking calls. Some agent requests run tools synchronously, up to 10 s (busctl, nmcli). A hung tool is killed after its timeout; turning these into asynchronous calls is follow-up work.