DIY Sonos (ish)

Today we’re going to talk about music. I’m all about the audio.

My living room speakers are connected to a mixer that combines output from my projector, DJ set, laptop dock & a Windows VM running on my server. This is so I don’t have to change inputs when switching audio sources. It’s great.

The Windows VM has a GPU, USB PCIe card & Audio Interface passed through, so it’s as functional as a normal desktop.

Okay, so what’s so special about this? I recently joined Spotify and there was one feature I was not aware of but I had been looking everywhere for (apparently not enough), SPOTIFY CONNECT!

I can use my phone to control audio on that Windows VM, meaning I could take a phone call or play a voice note without interrupting the music. Similar to the Chromecast Audio, rest in peace. B.S. (before Spotify) I only was able to control the music directly from Windows, which kinda sucked if I was over in the Kitchen.

So we’ve addressed the living room, all is great there. Now what about the bedroom? My server’s audio interface has a second output so two audio destinations show up in Windows, meaning we can switch between Living Room & Bedroom. That’s cool but wouldn’t it be great if we could execute an SSH command via the iOS Shortcuts App to change the audio destination? Yes I’m sure that’s exactly what you were thinking.

nircmd setdefaultsounddevice Bedroom

Where does this leave us now? I can have Spotify play music on Windows from my phone, and use Siri to choose between my Living Room Speakers & Bedroom Speakers.

I eventually found out that Spotify Connect doesn’t work with the sleep timer, so I had to write a script that’s also called from iOS Shortcuts to reintroduce that ability. Maybe I’ll come back and update this with more info on that.

Happy Sunday


Posted