You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0b29e10
Browse filesBrowse the repository at this point in the historyBrowse files
authored
Add --manufacturer and --product-name flags (#206)
# Motivation
When running sendspin daemon inside a Docker container (e.g. to turn a
USB speaker into a Sendspin receiver), the device identity reported to
the server in the client hello is not meaningful:
- product_name is auto-detected from /etc/os-release — inside a
container it ends up as something like "Debian GNU/Linux 12 (bookworm)"
instead of a human-readable device name.
- manufacturer is always None — there is no way to set it at all.
This makes it hard to identify the physical device on the server side
when multiple receivers are connected.
# Changes
New CLI flags (both sendspin and sendspin daemon):
- --manufacturer — sets the manufacturer string sent in the client hello
(e.g. "Acme Corp")
- --product-name — overrides the auto-detected OS/platform name (e.g.
"Living Room Speaker")
New settings file keys (settings-tui.json / settings-daemon.json):
- "manufacturer" — same as --manufacturer
- "product_name" — same as --product-name
CLI flags take precedence over the settings file. When neither is
provided, the existing auto-detection behaviour is unchanged
(non-breaking).
Bug fixed in the process: --manufacturer and --product-name were missing
from the daemon subparser (the daemon parser has its own argument list,
separate from _add_player_runtime_options). This was caught by the new
tests.
Usage
# CLI flags
sendspin daemon \
--url ws://192.168.1.72:8927/sendspin \
--name "Living Room" \
--manufacturer "Acme" \
--product-name "Living Room Speaker"
# Or via settings-daemon.json
{
"manufacturer": "Acme",
"product_name": "Living Room Speaker"
}
Tests
26 new tests in tests/test_device_identity.py covering:
- get_device_info() with each override combination
- ClientSettings load/save round-trip for both fields
- parse_args() for both flags on the TUI and daemon subparser
- Precedence: CLI flag wins over settings file; missing flag falls back
to settings; neither → None
Manually tested against a Music Assistant server with both the CLI flags
and the settings file approaches.
---------
Co-authored-by: Filipe Doutel Silva <filipe@doutelsilva.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@@ -170,6 +172,8 @@ Settings are stored in `~/.config/sendspin/`:
170
172
|`hook_set_volume`| string | TUI/daemon | Script to run for external volume control (`--hook-set-volume`). Receives the effective volume 0-100 as the last argument |
171
173
|`hook_start`| string | TUI/daemon | Command to run when audio stream starts |
172
174
|`hook_stop`| string | TUI/daemon | Command to run when audio stream stops |
175
+
|`manufacturer`| string | TUI/daemon | Manufacturer name reported in the client hello (`--manufacturer`) |
176
+
|`product_name`| string | TUI/daemon | Product name reported in the client hello (`--product-name`); defaults to auto-detected OS/platform name |
In daemon mode without `--url`, the client listens for incoming server connections and advertises itself via mDNS. The `--name` option (or `name` setting) is used as the friendly name in the mDNS advertisement, making it easy for servers to identify this client on the network.
306
310
311
+
Use `--manufacturer` and `--product-name` to override the device identity reported to the server in the client hello. This is useful when running the daemon in a container or on a custom device where the auto-detected OS name is not meaningful:
0 commit comments