Apart from homeassistant/FHEM what are the best options to control which snapcast client gets which stream/volume etc? I have tried homeassistant but with the latest verison of homeassistant there are issues loading the snapcast component.
I also looked at the JSON-RPC client but it appears that I cannot assign streams to clients? Is that correct?
Without some way to control which stream plays where, I am struggling with snapcast a bit and one of the main features goes away..
I am having the same question.
It is possible to create groups of several clients and then to assign a specific stream to each of these groups. However, it is currently not possible to directly assign a stream to a single client.
Let's say I have e.g., 3 clients at home (kitchen, living room and office). All are assigned to the Spotify stream. I now want to keep streaming Spotify to the kitchen and the living room, but want to listen to the radio in the office. I then have to remove the office client from the Spotify stream which creates a new group with only the office client in it (which still listens to the Spotify stream btw!). Then I have to change the stream of this new group to the radio stream.
It would be great to have a control command for each client which does this all in one step. Setting the stream for the client then invokes to remove the client from the old group and if there is already a group listening to the requested stream the client will just be added to this group. If there is no group listening to this stream, a new group is created which listens to the requested stream and has the client in it.
Actually, it would make sense to pre-define groups per available streams. If you have two different streams, you will only need two groups. Multiple groups for a the same stream does not make much sense, because all clients in these groups should be in sync anyway.
This issue also relates to my issue #260
If you have one group per stream you could easily check if there is a client assigned to the group. If there is none, you could stop the stream and also stop the streaming process to free up ressources.
The group thing is a new addition to Snapcast. a while back it worked by assigning a stream to a client. However this new group approach really messes things up when using something like Openhab or home assistant. I have been working on a Openhab binding to support Snapcast, but with the new api it have become quite difficult to make it work. As far as I have observed, is that groups come and go. But it does not make any sense, when you have to define the groups somewhere in a configuration file, and/or script in order to interact with them.
I'm so +1 for the one group per stream, and then being able to say something like client.setGroup would really make it easier to integrate with 3rd party software like HA or OH. we need something that will make this easier to work with
duplicate of #308
Most helpful comment
The group thing is a new addition to Snapcast. a while back it worked by assigning a stream to a client. However this new group approach really messes things up when using something like Openhab or home assistant. I have been working on a Openhab binding to support Snapcast, but with the new api it have become quite difficult to make it work. As far as I have observed, is that groups come and go. But it does not make any sense, when you have to define the groups somewhere in a configuration file, and/or script in order to interact with them.
I'm so +1 for the one group per stream, and then being able to say something like client.setGroup would really make it easier to integrate with 3rd party software like HA or OH. we need something that will make this easier to work with