[Suggestion] Grouping Mycroft devices for audio playing

We’re seeing lately a great community effort to provide music skills to Mycroft. At my home, I already have a few Mycroft instances on several devices, and my idea is to have one at each room of the house, so I can use them as intercom, or interact with my smarthome system from everywhere.

But, what about to play the very same music on all or some of my devices at the same time? It would be great to let mycroft devices to “group” for music playing, so I can say from any of them to play something in some room, a group of rooms or a complete home.

I know this is rather a smart speaker feature, but it would be cool to have it in Mycroft as well. The idea is the CommonPlay Framework should handle this and make sure all the devices are playing the same at the very exact time, so the music is playing around the house like a big stereo system, and skill developers can just call the CommonPlay Framework as usual.

What do you think about?

1 Like

Nice idea.

As you said it’s a smart speaker thing primarily.
Just as an idea on multiroom setup.
I made a multiroom speaker setup based on pulseaudio with multiple mpd instances.

In pulseaudio you can defined virtual sinks and group rooms in that way. Maybe mycroft can read defined sinks for being dynamic.

pactl list sinks


That would be more or less the idea, plus controlling the audio from any of the mycroft instances (I could start playing music on my office, listening in all the house, but then stopping the audio on the kitchen).

Could this location independency be expanded to other skills, eg. being in the living room and saying : set a kitchen timer for 10 minutes and mycroft users kitchen PA sink for output.
But this goes to another direction as I think you planned it with this thread.

Yes, that is outside the scope of the idea. And I think, but not pretty sure, that @JarbasAl Hive Mind can do something like those you’re saying.

1 Like

I am pretty sure that @j1nx has implemented snapcast into his MycroftOS. I suspect snapcast is what @Thorsten is using with MPD.

I’ve no snapcast installation running, but it looks interesting.

1 Like

Snapcast is doing exact that and more such as syncing the playback.

Configure pulseaudio to use snapcast as default sink.
Configure mycroft to use pulseaudio

You can then use the snapcast API for all the stuff such as grouping etc.

Wow, didn’t know that software! So, a snapcast-skill would be awesome then, as I see snapcast has group support!

The only thing I cannot see is controlling playing from any snapclient, but I guess this could be handled by something like the mesh-skill o hive mind, don’t it?

A snapcast skill would be very welcome.

I posted more info about it including a link to the API elsewhere on the forums. Not sure where it was exactly.

Don’t know what is supposed to be this JSONs, I guess is a way to control what’s playing from any snapcast client?