What Was Actually Needed
This started as a request from my household's primary end user (my family),though she wasn't initially sure what she wanted — the requirements emerged through trial and error.
In the end, it boiled down to:
- Stream music through living room speakers.
- Song selection by keyword — no need for favorites or playlists.
- Easy playback start — voice or phone, either works, but no walking over to press hardware buttons.
- iPhone must stay usable while music plays — can't be locked into one app.
- After a song ends, auto-play related tracks.
- Skip or switch to a different related track mid-playback if the current one is unwanted.
- Responsiveness is nice but not critical — a slow start is tolerable since it runs continuously anyway.
- No unwanted appliances turning on during playback.
- A monthly subscription for content is acceptable, but only if the content library is good enough.
The Final System
The flow: tell Siri "Search YouTube for 〇〇" on iPhone, then share the result to the Workflow app, which sends a request to Node-RED on Raspberry Pi.
Alternatively, type a keyword directly into the Workflow app.
Node-RED passes the YouTube content ID or keyword to a shell script.
The shell script internally calls mps-youtube (mpsyt) to search and play the track from YouTube.
On Raspberry Pi Zero W, startup takes a while (around a minute),
so Open JTalk announces "Starting playback" to let the user know something is happening.
Once that's in place, using mpsyt's related-search commands makes continuous playback easy.
However, the system is slow enough that commands sent mid-playback sometimes don't register.
For stop and skip, the shell script force-kills the process.
As a bonus: saying "Stop the jukebox" to Amazon Echo triggers Node-RED to stop playback.
What I Tried Before Getting Here
The path to this setup involved several failed attempts:Amazon Echo Dot + Amazon Music Unlimited
Amazon· Selection: Amazon Echo Dot
· Content: Amazon Music
· Playback device: Amazon Echo Dot
· Output: Amazon Echo Dot
Just ask and it plays. Responsive. Great as a playback device.
But the content library wasn't satisfying enough — rejected by the household.
Looked into Google Home, but that was also vetoed immediately.
iPad + YouTube + AirPlay + Amazon Fire TV Stick
Amazon· Selection: iPad + YouTube app
· Content: YouTube
· Playback device: iPad + AirPlay
· Output: Amazon Fire TV Stick
If Amazon Music's library isn't good enough, use YouTube.
(Apple Music was passed over on principle — the household budget follows Amazon's subscription ecosystem exclusively.)
Installed an AirPlay receiver app on Fire TV Stick and streamed YouTube audio from iPad.
Content-wise, approved. But the moment AirPlay connected to Fire TV Stick, the HDMI signal woke up the projector — rejected.
Well, it's a video playback device — what did we expect.
Also: on iPad, YouTube didn't auto-play related tracks. Complaint registered.
iPhone + YouTube + AirPlay + Raspberry Pi + Speaker
· Selection: iPhone + YouTube app· Content: YouTube
· Playback device: iPhone + AirPlay
· Output: Raspberry Pi + speaker
If Fire TV Stick wakes the projector, go headless with Raspberry Pi.
Setup details from the earlier article.
On iPhone, YouTube related-track autoplay works.
Worked well for a while — but backgrounding the YouTube app to use the phone for something else cut the audio, which got annoying fast.
There are workarounds using the browser, but doing that every time was deemed unacceptable. Rejected.
iPhone + Workflow App + Raspberry Pi + Node-RED + YouTube + mpsyt + Open JTalk + Speaker
· Selection: iPhone + Workflow app (keyword only)· Content: YouTube
· Playback device: Raspberry Pi + mpsyt
· Output: Raspberry Pi + speaker
This is what we landed on.
In the end, search, playback, and everything else moved to Raspberry Pi —
at which point it's basically just a music player. But it works.
Getting long — details in the next post.
No comments:
Post a Comment