Following @lwis comment on the PR #4523 I take a look at the Sonos component and SoCo library. I think we can add a standard media_player interface for multi-room zone support (Starting with Sonos and Bose Soundtouch). And I hope it can be later implemented with other multi-room devices (Samsung SHAPE, Harman, LG MusicFlow, etc …)
The commons features I can see:
Create a multi-room zone from one coordinator/master and play on select or all other devices:
sonos_group_players (Sonos)
soundtouch_play_everywhere (Soundtouch)
Remove a member/slave from a multi-room zone:
sonos_unjoin (Sonos)
remove_zone_slave (Soundtouch)
Add a member/slave to a multi-room zone:
not implemented in Sonos component but seems to be available in SoCo library (join method)
add_zone_slave (Soundtouch)
Some features seems not available for Sonos (maybe I’m wrong, I haven’t any Sonos device) but implemented for Soundtouch:
Create a custom multi-room zone: for example, if you have 3 devices and you want to create a multi-room with only 2 devices. I think it can be simulated by creating a multi-room zone and then remove members.
Create many multi-room zones. From my SoCo library understanding, if you create a multi-room zone, you can not choose members so you will not be able to create many multi room zones. One more time, I haven’t any Sonos devices so I can’t test (and at least 4 devices are required in order to create 2 multi-room zones …).
My proposition:
media_multi_room_create
Create a multi-room zone from a coordinator/master and play content on selected or all other devices.
| Service data attribute | Optional | Description |
|------------------------|----------|----------------------------------------------------------------------------------|
| entity_id | no | Coordinator/master |
| members | yes | Members to add to the multi-room zone. If not set, play on all available devices |
media_multi_room_leave
Remove a member from a multi-room zone.
| Service data attribute | Optional | Description |
|------------------------|----------|----------------------------------------|
| entity_id | no | Member to remove from multi-room zone |
media_multi_room_join
Add a member to a multi-room zone
| Service data attribute | Optional | Description |
|------------------------|----------|------------------------------------|
| entity_id | no | Coordinator/master |
| member | no | Member to add to a multi-room zone |
media_multi_room_destroy
Destroy a multi room zone
| Service data attribute | Optional | Description |
|------------------------|----------|------------------------------------|
| entity_id | no | Coordinator/master |
Any feedback are welcome but if you agree with this proposition, I can start working on it.
We could use partymode if media_multi_room_create is called without any members, and loop over the members adding them to the coordinator otherwise.
Question, how do you handle devices that are already part of a zone, and you execute the service to add them to a new zone?
Another question; media_multi_room_destroy - would this just disband all members from their respective zones? In Sonos if the coordinator is removed, the zone continues without it.
First question:
Good question. I’ll remove the device from the first zone and add them in the new zone. It should not be a problem with Soundtouch API because zone seems to be totally independent (but I can’t test, I haven’t enough devices )
Or easier solution: It is not valid to add a device to a new multi-room zone if it is already in an existing zone.
Second question:
From my point of view, destroy should remove all no-coordinator members but continue playing on it. Something I’m not sure to understand with Sonos: does the end user know who is the coordinator or it is only a developer/API concept ?
If the end user don’t know who is the coordinator (and don’t know what it is), it make no sense to destroy a zone because one of the device will continue to play but without control on which one.
Soundtouch only support Bass level (no treble or loudness). And the values are between -9 and 0.
There is also an API call to known what are the min and the max.
I have 2 devices (one Soundtouch 10 and one Soundtouch 20) and both have values between -9 and 0 but I suppose if this API request is available, other devices can have different values. And the documentation says some devices doesn’t support bass settings (which one ? I don’t know).
For me it make sense to add:
bass: 0…1 (decimal, like volume)
treble: 0…1 (decimal, like volume). Not implemented by Soundtouch component.
loudness: I don’t know because I don’t know what it is and the link in the SoCo documentation is down. But it seems to be really Sonos
Remind me to buy you a beer when you get Soundtouch support going strong. I have been wanting this for a long time. A Soundtouch without any Apple devices seems like a crippled device so getting this going would be nice.
Samsung Shape should work just fine, Is based on Allconnect by Tuxera. Saw Allshare in apk.
I tired and now am succesfully using the current Samsung TV component to have basic control (volume, play, pause, on.off) of my Shape M5 since it uses same SOAP/HTTPS protocol. What you are suggesting would be welcomed.
Was about to ask @stefan-jonasson and @fabaff if they would be so kind and morf/copy the TV component in a audio version.
The complete key list for Samsung TV (and what us usefull for Shape is in there as well) is as follows
Any update on this? Would love to see an interface for multi-room audio for my bose soundtouch devices. I’ve tried to do this in homeassistant but I think it is not possible because the soundtouch devices do not show who is current master and who is slaves. Do you have a solution that works in hommeassistant?