Snapcast: Groups vs. Zones

Created on 14 Nov 2017  Â·  13Comments  Â·  Source: badaix/snapcast

Hi, nice work!

I just moved my home audio from a pulseaudio/airplay based distribution to snapcast. Doing this I come upon a few snags; metadata and zones.

I've been trying to create static zones for areas in my house but it seems the groups are dynamic and there is no json api to name them? I can edit the config file but the edits are forgotten once the group is empty (ie no clients left in group).

What I want to achieve is define static zones in my house which can be controlled independently (mute/volume), each with a dynamic (json api) set of speakers (snapclient). Each zone can then be assigned to play any of the defined input streams in the server.

It seems to me I need a json api to change a group name and mark it static for a setup like this to work?

Keep up the good work :+1:
Frafall

feature request

Most helpful comment

Sorry I haven't been around for over a year and I'm quite out of touch with what have been going on, I've been quite ill.

I have been running my own version with static groups for this period but there is issues with stuff that depends on the built in groups like the Android client. But, it have been working nicely with Home Assistant :)

I will need some time to get up to speed but would like to have the static groups at least as a compile option, I would hate to fork Snapcast as it tends to dillute the momentum (if any) of the forked package.

-f

All 13 comments

This is a problem for all of us using the API. We can't rely on groups right now, since the identifiers change every time the snapserver is restarted.

I completely agree that we need some way to define static groups, specifically so they can survive a restart, and be named.

I agree with this - defined zones would be outstanding!

On Wed, Nov 15, 2017 at 4:15 AM, happyleavesaoc notifications@github.com
wrote:

This is a problem for all of us using the API. We can't rely on groups
right now, since the identifiers change every time the snapserver is
restarted.

I completely agree that we need some way to define static groups,
specifically so they can survive a restart, and be named.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/badaix/snapcast/issues/308#issuecomment-344310258,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGU9IECZQrXt6iGLkzo6Fq6nmeRu5SrTks5s2byHgaJpZM4QdZhs
.

I have created a branch with static groups, don't want to send a pull request until it's tested as it breaks the android client. The metadata support is included, feel free to test :)

And I've also upgraded python-snapcast to support the new api to be able to test it and added a command line python control.

home@lappy:snapctl$ ./snapctl.py -s gandalf -vm group show
Group ID   : 049a3144-0842-0855-977a-2a4494d0ec3b
   name    : Zone Bedroom
   muted   : False
   stream  : Spotify

   Stream tags:
      Artist  : Alida
      Album   : -unknown-
      Title   : Cool With It

   clients :
      Home server

Group ID   : b66dd6c6-3c3b-8de9-5237-d287b1b8adaa
   name    : Zone Livingroom
   muted   : False
   stream  : Spotify

   Stream tags:
      Artist  : Alida
      Album   : -unknown-
      Title   : Cool With It

   clients :
      Pappas phone
      Pappas laptop
      Stue Hifi
      Stue Kodi
      Kodi soverom

home@lappy:snapctl$ 

To really test this you would need to build Librespot from my branch (for the metadata only) and compile Snapcast with "make -DHAS_EXPAT=1" which, ofc requires expat (for Snapcast-shair metadata parsing support).

If it works out ok expat should be added as an external...

Feedback appreciated.

regards,
frafall

This is awesome frafall. I'm aiming for a similar setup to you with hass + multiroom audio. Haven't had a chance to test your static groups yet though.

Definitely keen to see this in snapcast.

I would love to see this integrated in. I have the same usecase as @frafall it seems.

@badaix What are your thoughts on this? Do you intend on allowing groups to be static or was snapcast always supposed to work like it does now?

gentle bump a month later... static groups would be great, i'm struggling with the ideas and implementation of zones and groups. @badaix is this on the roadmap at all?
i have a simliar use case to @frafall and @happyleavesaoc

2 months later bump.

Please let us know @badaix =(
Snapcast is basically unusable in Home assistant because of the dynamic nature of the groups.

@frafall would you be willing to open a PR? This is a really difficult problem to work around in my experience.

Sorry I haven't been around for over a year and I'm quite out of touch with what have been going on, I've been quite ill.

I have been running my own version with static groups for this period but there is issues with stuff that depends on the built in groups like the Android client. But, it have been working nicely with Home Assistant :)

I will need some time to get up to speed but would like to have the static groups at least as a compile option, I would hate to fork Snapcast as it tends to dillute the momentum (if any) of the forked package.

-f

any updates? being able to configure static groups would be ideal

No updates yet, I have to think about a solution that will not break existing control clients.
And also details have to be considered like where to put new clients? In some "default" group or in it's own dynamic group (as it's done now)

default sounds intuitive to me.

Was this page helpful?
0 / 5 - 0 ratings