Configuration
In the web interface
Everything an owner normally changes lives in the web interface, and the agent stores it in /var/lib/boombox/config.json. The agent applies these settings at boot, before the web server is even up.
| Page | Setting | Default | Notes |
|---|---|---|---|
| Bluetooth | Speaker name | Boombox | What phones see (the adapter alias). |
| Bluetooth | Devices connected at once | 2 | 1–3. When one more connects, the device connected longest is dropped. |
| Bluetooth | Reconnect the last device on start | on | |
| Sounds | Play sounds | on | Every prompt: ready, pairing, connect, disconnect. Bundled tones from packages/boombox-agent/resources/sounds. |
| Wi-Fi | Open the setup network after (seconds without Wi-Fi) | 45 | 15–600. |
| Wi-Fi | Setup network name | Boombox- + last 4 hex digits of the Bluetooth address | Set through the API (PUT wifi/settings {"apSsid": …}). |
| Settings → Audio → Output | Output | the I2S card, else the first card | Every ALSA card is offered: I2S DAC, HDMI, USB. |
| Settings → Audio → Volume | Speaker volume, mute | 60 % | The softvol "Boombox" control in front of the card. |
| Settings → Audio → Volume | Volume limit | 100 % | Speaker volume never exceeds it. About 90 % with the MAX98306 at 12 dB, 80 % with the TPA2012 at 12 dB. |
| Settings → Audio → Volume | Volume after switching on | 40 % | Applied at every boot. |
| Settings → Audio → Standby | Standby | 15 min | Amplifier off after this much silence; needs BOOMBOX_AMP_GPIO. |
| Settings → Audio → Output | Listen on | Speakers | Speakers, or headphones and line out: the amplifier stays off. For a DAC with a jack; needs BOOMBOX_AMP_GPIO. |
| Settings → Audio → Volume | Headphone volume limit | 50 % | The volume limit while listening on headphones. |
| Settings → Audio → Playback | Something new starting to play | Takes over | A phone, a playlist or a Home Assistant stream starting while another plays. Takes over stops what played; a playlist that gave way picks up 3 s after the speaker went quiet. Waits pauses a phone that starts and refuses other newcomers (HTTP 409). Announcements always play and resume what they interrupted. |
| Settings → Recording → Song covers | Look up song covers online | off | Artist and album to coverartarchive.org (via musicbrainz.org) and itunes.apple.com; covers kept in /var/cache/boombox/covers. |
| Settings → Recording → Song covers | Keep covers up to | 50 MB | 10–500 MB (the API takes 5–2000). The covers shown longest ago go first. |
| Settings → Storage | Music libraries | one: the music folder | Folders songs are picked from, each with a name, on any storage; each shows in Your music and in Add songs. One takes the uploads: its folder is the music folder. See Storage. |
| Music → Music folder | Music folder | 1:/music/ | Where uploads go and the library is browsed: the folder of the library marked for uploads. On any storage: the speaker's own card, a card or stick from Settings → Storage, or a server set up in the backend under Storages. Songs on a server play in the page; a playlist plays the speaker's copy of them (playback cache, 2 GB, var/boombox-cache). |
| Settings → Storage | Cards and sticks | none | Included cards are mounted whenever they are plugged in. Servers are storages made in the backend (Boombox → Storages). See Storage. |
| Settings → Backup | Parts, keep, store on, also copy to, back up by itself and when | every part; 5; /var/backups/boombox; no server; off, 0 3 * * * | See Backup. |
| Settings → Recording | Recording: on, storage and folder, quality, keep at most | off; 1:/recordings/, 192 kbit/s, 2000 MB | See Recording. |
| Settings → Theming | Logo | the Boombox | An SVG, PNG, JPEG, GIF or WebP up to 1 MB (raster images up to 4096 pixels) for the pages' header, the favicon (/favicon.svg: the logo on a tile of the menu's colour, so a white logo reads in a light browser tab too; a PNG logo is also the touch icon) and the e-Paper display. Kept as fileadmin/boombox/logo.<ext> (an SVG sanitised by TYPO3), before the site setting boombox.brand.logo; the display's copy is in /var/lib/boombox/display/. Reset logo removes both. |
| Settings → Theming | Colours: accent, menu background, open page in the menu, page background | the site setting boombox.brand.accentColor; #f5efe6; a tint of the accent; #ffffff | Six-digit hex colours, kept in TYPO3's registry (boombox / theme). Text on each turns dark or light (WCAG contrast). Each resets on its own; dark mode only takes a tint. |
| Settings → Display | Display: when nothing plays, show | The logo and "Boombox" | The logo and a text, or the last song. The text is up to 4 lines and 160 characters; empty shows the logo alone. Only on a speaker set up with --epaper. |
| Settings → Display → Knob | Press, double press, triple press; next press within | play/pause, next song, previous song; 400 ms | What the knob's presses do outside the display's menu (play or pause, next, previous, mute, nothing) and how quickly they follow each other (200–1000 ms). Only with --knob=on. |
| Settings → System | Network name | boombox | http://<name>.local. Lowercase letters, digits and dashes. |
| Settings → System | Serve the pages over HTTPS | off | The pages also at https://<name>.local and the speaker's IPv4 addresses, with a certificate of Caddy's own authority (tls internal); a browser on plain HTTP is sent there. Each phone or computer trusts the authority once: Download the certificate (/boombox-ca.crt). Plain HTTP stays for the TV (loopback), the setup network (10.42.0.0/24), /metrics, /cover/, /models/ and the certificate itself. The agent writes /etc/boombox/web-https.caddy and web-redirect.caddy, which the Caddyfile imports, and restarts the web server; a new name or address rewrites them. |
| Settings → System | Prometheus metrics | off | http://<name>.local/metrics (web server: requests, latency, PHP workers), /metrics/system (node_exporter: CPU, memory, temperature, card, network) and /metrics/speaker (what plays, Bluetooth, volume, playlists, recordings, Wi-Fi). Answered for private, loopback and link-local addresses only, without a password; off, all three answer 404. Caddy serves its metrics on 127.0.0.1:9180, node_exporter on 127.0.0.1:9100. See Prometheus metrics. |
| Settings → User | Password | setup secret, until the first login asks for your own | For the owner login. At least 8 characters. See The owner's password. |
| Settings → System | Switch the screen off after | Never | 5–120 min of silence: the TV kiosk stops and the HDMI connector is forced off (/sys/class/drm/card*-HDMI-A-1/status). |
| Settings → System | CPU speed | as the image set it | The cpufreq governor of every policy. Not stored until changed. |
| Settings → System | Wi-Fi power save | off | NetworkManager's 802-11-wireless.powersave on every saved network. Not stored until changed. |
| Settings → Smart Home | Let Home Assistant control the speaker | off | ESPHome API on TCP 6053 and its mDNS announcement. See Home Assistant. |
| Settings → Smart Home | MQTT: broker, port, connection, user name, password, topic prefix, discovery prefix | off; 1883, plain; network name; homeassistant | See MQTT. |
| Settings → Spotify | Client ID, the connected account | none | The Client ID of your app on developer.spotify.com; the refresh token stays in the agent. See Spotify. |
On the device
/var/www/boombox/shared/.env (web server and TYPO3)
| Variable | Default | Purpose |
|---|---|---|
TYPO3_CONTEXT | Production | |
TYPO3_DB_DRIVER | pdo_sqlite | config/system/additional.php keeps the SQLite path from settings.php. |
TYPO3_DB_PATH | unset | Overrides the SQLite file. |
TYPO3_BASE_URL | / | Host-agnostic: the speaker answers under boombox.local, its IP and 10.42.0.1. |
TYPO3_TRUSTED_HOSTS_PATTERN | *.local, IPs, localhost | |
TYPO3_ENCRYPTION_KEY | random | |
MERCURE_PUBLISHER_JWT_KEY / MERCURE_SUBSCRIBER_JWT_KEY | random | The hub's keys. The publisher key is shared with the agent. |
BOOMBOX_AGENT_SOCKET | /run/boombox/agent.sock |
/etc/boombox/agent.env (agent, root only)
| Variable | Default | Purpose |
|---|---|---|
MERCURE_INTERNAL_URL | http://127.0.0.1/.well-known/mercure | Where the agent publishes. |
MERCURE_PUBLISHER_JWT_KEY | from .env | |
BOOMBOX_AMP_GPIO | unset | Amplifier enable line, as gpiochipN:LINE. MAX98306 SD (or TPA2012 SDL+SDR) on header pin 15: gpiochip3:8. With it the DAC's start and stop pops are muted: the agent keeps the DAC running with silence while the amplifier is on (Wiring). |
BOOMBOX_AMP_CHANNELS | both | left when the enable line reaches only the left channel's shutdown pin (a TPA2012 board that breaks out SDL only): the right speaker keeps playing on headphones and in standby, and the page and the display's menu say so. |
BOOMBOX_WIFI_INTERFACE | wlan0 | Also the MAC Home Assistant identifies the speaker by. |
BOOMBOX_HOMEASSISTANT_LISTEN | 0.0.0.0:6053 | Address of the Home Assistant (ESPHome) API while it is on. |
BOOMBOX_BACKUP_STORE | none | Development only: what the simulated backup runs to copy a backup to a server (DDEV: php vendor/bin/typo3 speaker:backup:store). The speaker's boombox-backup runs it itself. |
BOOMBOX_MEDIA_ROOTS | /var/www/boombox/shared/public/fileadmin:/var/www/boombox/shared/var/boombox-cache | Where the web app's Local storages and its playback cache (copies of songs on servers) are, :-separated. Playlists play MP3s below them only, and below the mount root. |
BOOMBOX_MOUNT_ROOT | /media/boombox | Where cards are mounted (Storage). The units' ReadWritePaths name it too. |
Restart after changes: sudo systemctl restart boombox-agent.
Files owned by root
| File | Content |
|---|---|
/var/www/boombox/shared/config/ | sites/boombox (the site, also what the backend's Site settings change) system/settings.php and system/file-storages.yaml (the storages of the cards and shares, see Storage). Every release links to them. A release creates the site files that are missing there and leaves the rest as it is, so a change survives an upgrade. The web user writes sites/ and system/file-storages.yaml. system/additional.php is not here: it comes with each release. |
/etc/boombox/setup-secret | Setup network passphrase, and the owner password until its first login. Show it with sudo cat /etc/boombox/setup-secret. |
/etc/boombox/admin-password | TYPO3 backend admin password. |
/etc/boombox/asound.conf | Generated by the agent when the output changes. |
/var/lib/boombox/config.json | The settings above, and Home Assistant's encryption key once it adopted the speaker. |
/etc/avahi/services/boombox-esphome.service | Written by the agent while Home Assistant is on. |
/etc/NetworkManager/system-connections/boombox-*.nmconnection | Saved networks and the setup access point, mode 0600. |
/etc/boombox/spotify.env | Optional, for boombox-spotify.service: SPOTIFY_NAME, the speaker's name in the Spotify app (default: the network name). See Spotify. |
/var/lib/boombox/spotify-receiver.env | Spotify Soloist's API key from Settings → Spotify, root only (mode 0600). |
/var/lib/boombox-spotify-bin | Spotify Soloist as downloaded by boombox-spotify-update: current and the build before. |
/var/lib/boombox-spotify | The Spotify receiver's login for Spotify Connect, owned by boombox-spotify, mode 0700. |
Agent command line
text
boombox-agent run [--backend=linux|simulated] [--socket=PATH] [--state=DIR]
[--secret-file=PATH] [--ap-marker=PATH] [--mercure-url=URL] [--verbose]
boombox-agent client OP [JSON] # one request, e.g. client state.get
boombox-agent secret # print the setup secret (root)
boombox-agent version # print the agent's versionEach option also has an environment variable (BOOMBOX_AGENT_BACKEND, BOOMBOX_AGENT_SOCKET, BOOMBOX_AGENT_STATE, BOOMBOX_SECRET_FILE, BOOMBOX_AP_MARKER, MERCURE_INTERNAL_URL).
In TYPO3
| Where | Setting |
|---|---|
| Site settings → Boombox → Speaker control | boombox.speaker.ownerGroup (frontend group allowed to control the speaker; default 1), loginPath (/login), portalPath (empty: the page the captive portal opens is the first visible page with the Wi-Fi networks element, wherever it is; a path or a whole URL here overrides that. The web server, DHCP and the phones' connectivity checks all go to /portal, which leads there) |
| Site settings → Boombox → Branding | boombox.brand.name (shown next to the logo), boombox.brand.logo (an EXT: path, a path below fileadmin/, or empty for the name only; an unknown path falls back to the default logo and logs a warning), boombox.brand.accentColor (#rgb or #rrggbb; buttons, sliders and the active page derive from it, in light and dark mode) |
| Site settings → Frontend Login | felogin.pid = the "Users" folder (10), felogin.redirectMode = getpost |
EXT:boombox_speaker, ext_localconf.php | FE.sessionTimeout = 86400: the owner's login ends after 24 hours without a request. The cookie is a session cookie (FE.lifetime 0), so closing the browser logs out too, and there is no "stay logged in" box. |
| Content elements | "Boombox" group in the new content element wizard: Now playing, Playlists, History, Recordings, Bluetooth devices, Wi-Fi setup, Logs; the settings in pieces - Output, Volume, Playback, Standby, Sounds, Song covers, Recording, Display, Knob, Home Assistant, MQTT, Logo, Colours, Password - and System (all sections at once, kept for speakers set up before the split). Larger settings come in a content element per section too: System (Status, Network name, TV, Mouse and keyboard, AirPlay, Power saving, Prometheus metrics, Power, Factory reset), Backup (Back up now, Backups, What to back up, How many and where, Schedule, Restore from a file), Storage (SD cards and USB sticks), Spotify (Connect, Account), Wi-Fi (Connection, Networks, Saved networks, Setup access point) and Bluetooth (Pairing, Devices, Settings), so a page shows only the ones you want, in the order you want. A speaker already set up keeps its pages as they are; install.sh --reseed puts the split ones in (it replaces the pages and their content with the defaults). Each piece works alone on any page restricted to the owner group; its header is its title. A new speaker puts them on the subpages of Settings (Audio, Backup, Display, Logs, Password, Recording, Smart Home, Sounds, Spotify, Storage, System, Theming: in alphabetical order). Subpages show in the menu below their parent while one of them is open, and on phones as a second row of tabs. |