Sound without the hub
nidoo-sound is the part of Nidoo that plays music in every room at once. It
runs on its own: no hub, no MQTT broker, no database. Use it to try
multi-room audio with a media player that can send to it, then add the hub later if you want dashboards, rooms and voice.
What you get without the hub:
- one music input played on every speaker, in sync;
- speakers: ESP32-S3 boards running ESPHome, and browser tabs;
- approve, forget, and set each speaker's volume and mute over a small HTTP API (a media player can do it from its speaker settings).
What needs the hub: names and rooms given in Nidoo, dashboards and flows, spoken answers and announcements, "Hey Jarvis".
1. Start nidoo-sound
Pick a Linux machine that stays on (a mini PC, for example), on the same network as the speakers: speakers are found with mDNS, which does not cross routers.
With Docker (the simplest):
git clone https://github.com/Gekkotron/Nidoo.git
cd Nidoo
echo 'NIDOO_SOUND_HTTP_BIND=0.0.0.0' >> .env # only if the music app runs on another machine
docker compose up -d --build sound
This builds and starts nidoo-sound alone. The hub, broker and database in the
same compose.yml are not started. The first build takes several minutes.
Without Docker, from the same clone, with Rust:
NIDOO_SOUND_HTTP_BIND=0.0.0.0 cargo run --release -p nidoo-sound -- run
Settings and speaker approvals are kept in ./data/sound/ (data/sound/ in the
clone with Docker). Keep that folder: it holds the server's identity key.
Check that it runs:
docker compose logs -f sound
The log says MQTT off: no broker set and, once a speaker shows up,
satellite connected. Every setting is in crates/nidoo-sound/README.md.
Firewall: allow in 4953/TCP (music in), 4954/TCP (HTTP API, from the music app), 8927/TCP (browser speakers) and 5353/UDP (mDNS).
2. Add speakers
New speakers play nothing until you allow them (step 3), so a neighbour's device on the same network can't join by itself.
An ESP32 board. A Seeed Studio XIAO ESP32S3 and a PCM5102A DAC, wired to
powered speakers or an amplifier. Flash the music-only configuration, which
needs no microphone and no key from the hub: see "Music only" in
satellite/README.md.
Within a few seconds of joining Wi-Fi it is waiting for approval.
A browser tab, no hardware. If your media player offers browser speakers, turn them on in its speaker settings. Two phones are enough to hear two rooms in sync.
3. Allow them
From a media player: point its output at the machine running
nidoo-sound (port 4953). New speakers are listed as waiting in its speaker
settings; allow one and it joins the music in sync, or forget it.
From a terminal (replace HOST):
curl http://HOST:4954/players/waiting # [{"id":"0123456789ab","name":"satellite-kitchen","connected":true}]
curl -X POST http://HOST:4954/players/0123456789ab/allow
curl -X DELETE http://HOST:4954/players/0123456789ab # forget it
curl http://HOST:4954/players # the allowed speakers, with volume and mute
A forgotten speaker that is still on the network comes back under Waiting. To keep one out for good, switch it off or don't allow it.
The HTTP API has no login. With NIDOO_SOUND_HTTP_BIND=0.0.0.0, anyone on your
network can allow a speaker or change a volume: keep it off networks you don't
trust.
4. Play music
Send the music to port 4953: raw PCM, 16-bit little-endian, 48 kHz, stereo. A media player does it when its output points there. One sender at a time.
Adding the hub later
Install the hub (Install on Linux) in the same clone.
Once its broker is set up, restart the service
(docker compose up -d --force-recreate sound): it finds the broker in
data/hub.json, the speakers appear in Settings → Assistant → Sound with
their volumes and approvals kept, and everything in Sound satellites
applies.