Replies: 3 comments 8 replies
-
I'm not familiar with this article but I would guess those extra Mopidy instances mean that you can have each room choose to either use its Snapclient output (i.e. music coming from the shared "server" Mopidy instance), or its Mopidy output (i.e. music coming from the room's local Mopidy instance). This would allow you to listen to different songs in each room at the same time, you cannot do that with just a single shared Mopidy instance on the "server". |
Beta Was this translation helpful? Give feedback.
-
It's not quite clear what you're trying to achieve. Don't mix "groups" with "scenarios", like predefined groupings of clients playing together! It's not possible with snapcast to group clients into some kind of "listening scenarios", like maybe "cooking" having kitchen and living room as clients or "ambient" having living room and bedroom as clients! A "group" is a set of clients assigned to the same "stream". Ergo: One stream => one group! I know the HA setup you talked about. Advantage there is, like with my server being setup as snapserver & snapclient simultaneously, so every client is able to play it's own source (own group as it has its own stream) in a kinda "pass-through" way, while also being able to be added to another group (another stream) for acting as a client to that stream. This way the kids are able to play their own music independently from their parents who are listening in living room & kitchen, but are also able to switch over to the parent's stream. Does that help? |
Beta Was this translation helpful? Give feedback.
-
Hi, maybe someone here can help me with the snapcast groups too. I don't understand why it is possible to have multiple groups playing the same stream. Would it not be enough to have one group per stream? Is there a difference in syncing if clients play the same stream but in different groups? I also don't understand why groups change all the time. I would like to use snapcast with Home Assistant and the mini-media-player Lovelace card. But it is hard to have a system that always works because of changing group and client names. Thanks for any help or insight on this :) |
Beta Was this translation helpful? Give feedback.
-
Hey guys,
hopefully someone can help me out here. I started my journey with snapcast with a really minimalistic setup, so I could get the hang of how snapcast works and how it will fit my requirements. So here is what I did and where I have trouble understanding some functionality.
snapcast server
Set up a dedicated lxc container with a snapcast server. The only change I made in the config file, is giving the only source stream a different name:
source = pipe:///tmp/snapfifo?name=mopidy
snapcast clients
In order to keep it really simple, I just used an android tablet and my android phone with the snapdroid clients.
Starting the server and both clients
The clients are connected to the server and are showing up in the app. I can do cat /dev/urandom > /tmp/snapfifo and the noise is played on both devices. Simple enough and it works, but it also raises some questions.
My understanding of how snapcast works:
Groups are created by or for the individual streams defined in the server, in my case the source is tmp/snapfifo with the name mopidy. I can then pipe whatever audio output I have into this pipe, snapserver distributes that to connected clients.
Problem description
Now, doing so results in two groups within the snapdroid app with each client under one group. Both groups are named mopidy and both clients are already playing the noise from /dev/urandom. I can open the settings for the first group and add the second client to this group as well, resulting in only one group. But so far, the only difference that seems to make is that I can change the volume for the group and therefore, for both clients. But is there any other advantage? Is there not a way to stop playback for one client? Or can I only mute the client in order to "stop" playback? Or stop the snapcast client where playback should be stopped?
I saw in the documentation for the API of snapcast, that I can join or unjoin clients for a group. But like I mentioned earlier, removing one of the clients from the group just results in two group entries with one client in it. They both are playing the same output from /dev/urandom.
What I want to achieve as a starting point:
Pipe /dev/urandom into /tmp/snapfifo and just play it on one device. I can achieve that by stopping the snapclient but that doesn't seem very practical.
So, how do I do achieve: Start playback on the server, have two clients running, but only play back on one device. Or to put it differently: Sometimes I want to playback music in the kitchen, sometimes in the living room, sometimes on both at the same time.
To make matters worse, there is a blog entry from home assistant (granted, from 2016) that has each room listed with both a snapcast client AND a mopidy instance which confuses me even more.
EDIT: Link to article
I'm pretty sure I'm being really stupid here and not seeing the obvious, so I would appreciate a hint in the right direction, but I couldn't really find an answer to my question, or maybe I didn't look in the right places.
Beta Was this translation helpful? Give feedback.
All reactions