Has anyone a working UI for managing multi-room zones with Bose’s Soundtouch systems? I’m looking for an easy way to create zones and adding/removing slaves.
My problem: The fact that the Soundtouch component has no states for zone information. Therefore you don’t know if the device is a master or a slave. See below example of a zoning Soundtouch 10 speaker:
{
"media_track": "Destiny - KFOG Live Session",
"volume_level": 0.38,
"is_volume_muted": false,
"media_title": "Zero 7 - Destiny - KFOG Live Session",
"supported_features": 17853,
"entity_picture": "xxx",
"media_album_name": "Simple Things Special Edition",
"friendly_name": "Soundtouch 1",
"media_artist": "Zero 7",
"media_duration": 239
}
So whats my plan: I need a python script for HASS that is triggered in the background whenever the state of one of my Soundtouch 10’s change state. Then the script should run and list current master and zones.
So I started to fiddle around with the libsoundtouch by @CharlesBlonde. You know, I cannot program at all but I’ve tried and created this:
from libsoundtouch import soundtouch_device
from libsoundtouch.utils import Source, Type
devices = ['192.168.XXX.XX', # Kueche
'192.168.XXX.XX', # Room2
'192.168.XXX.XX', # Schlafzimmer
'192.168.XXX.XX'] # Wohnzimmer
def find_master():
for device in devices:
device = soundtouch_device(device)
status = device.status()
zone_status = device.zone_status()
if zone_status:
if zone_status.is_master:
master = device.config.name
print (str(master) + " is Master")
def find_slaves():
for i in devices:
device = soundtouch_device(i)
status = device.status()
zone_status = device.zone_status()
if zone_status:
if not zone_status.is_master:
slave = device.config.name
print (str(slave) + " is Slave")
find_master()
find_slaves()
But somehow there must be an error in this script. It’s strange. Sometimes it prints the right master but another time it prints two master devices:
Room2 is Master
Schlafzimmer is Master
Kueche is Slave
So, this is obviously wrong. Maybe someone could help me with these two functions or even better already has a working solution?
Yes. My script was built on top of that to find the master and the corresponding slaves. But as I said. I’m not a programmer. I would love to have a nice interface to dynamically create zones but somehow libsoundtouch seems completely dead on github. Try your best! I’d love to see some progress on this topic.
The big think i need to determine first is what’s so unreliable?
Is it the implementation of the HA soundtouch component (maybe because its out of date)?
The IOS Bose app seems better at creating zones but for me it has trouble discovering devices.
Is the fundamental problem the soundtouch devices themselves such that there is never going to be a reliable solution? Is so its folly to try!
Follow the complex process I did (details are in the thread I posted above) and replace libsoundtouch and soundtouch with the files in my zip file.
or
Follow this thread where @da-anda is working on a subset of changes that will only change libsoundtouch (and should be far easier to release into HA). I am going to try test this so we can get it released.
I think you missed the hyperlink to your mentioned threat. What’s your plan to get upstream libsountouch replaced in hass? I’ve tried several times to get in touch with it’s maintainer but he doesn’t reply so he probably wont hand over the repo to you