Is anyone using TTS with SoundTouch speakers and if so, how do you deal with source switching? I have tried ARC/CEC and direct HDMI in while set to AUX with the same outcome.
I will be listening to music or watching a movie/TV, and fire off a test TTS notification, it takes a couple of seconds to switch streams and starts out quiet (I will miss the first part of the speech unless I am excepting it) but it will play the notification and then I will manually have to switch back to the original source to get audio.
Its pretty awesome that TTS is now supported in SoundTouch (I would have sent it back if I could have), but the manual switching of the source is a PITA. I’m just curious to see if anyone else has any experience with this problem?
It took me a little bit to figure this out but I just found a workaround for switching the source to the TV by issuing a shell command Hope it works for you!
This is setting up a reverse proxy. I guess I’m confused as to how that relates to the SoundTouch switching source to play TTS, then not switching to the previous source?
Hi guys, Im new to HA and learning. I also have a soundtouch 300 and am setting it up with HA now.
The soundtouch component in HA doesn’t seem to map up so many of the functions on the soundtouch.
So we could improve it. I’ve done some research and found that soundtouch has an API och tcp port 8090.
The API isn’t a normal REST, it communicates with XML but normal HTTP GET and POST commands.
For example:
Open a shell and use cURL to get the sources with:
curl -X GET http://bose:8090/sources
The bose returns output like:
<?xml version="1.0" encoding="UTF-8" ?>
Plex Media Server: JF-DELL
ZEN: ben:
Ben laptop mp3
HDMI_1
To select one of the sources listed by the command above you have to post back
XML like this:
I feel this is doable with Node-red. Not sure how the TTS is setup but in node-red what you can do is call the service and have SoundTouch play your audio and then second node would set the source back to what it was.
I am very happy to announce that I have a working version of the SoundTouch component that is able to snapshot and restore. I saw your post and I also wanted to have this feature for a long time.
The only issue I have is that libsoundtouch v0.8 doesn’t support Tune In and HDMI switching (like the lifestyle 600/650 product). I was able to fix that, but the last time that I opened a Pull request to the Home assistant core project, they refused this kind of fix.
I have a working version of the Soundtouch component in my home assistant by putting the ‘soundtouch’ folder in my custom_components folder.
Do you have HACS? I can provide a custom component over HACS.
Some questions as second user, to hear about your expectations:
Does this work like expected?
Volume is part of the snapshot & restore service. Is this applicable for all your use cases? Or should that be a boolean option to choose for a volume snapshot or not?
This module is replacing the entire original soundtouch component, is that ok for you? Or should this HACS component only register the snapshot and restore service? (still need to test if this is feasible)
it is a nice integration. I have one question. In the example I see that restore and snapshot are shown only for one entity. Does the normal notation for entity_id’s like
entity_id: mediaplayer_one, mediaplayer_two, …
also works for this component or can I only save one snapshot for one entity? Objective is to write a script for tts message and select based on status on/off whether a snapshot is made and the entity is switched off after the tts message.
I have a similar task I’d like to setup a script for:
I’d like to save the state (check if switched on/off and if on, save the source playing) of all Bose Soundtouch (2x ST10, 4x ST20, 1x ST30) speakers in the house.
Then I’d like to broadcast a TTS to all speakers and afterwards restore back all the previous states:
If the SoundTouch was on and playing before the broadcast, switch back to the previous source and play.
If the SoundTouch was off before the broadcast, switch it off again after the broadcast.
I am not sure, whether you meanwhile figured it out, but I use a general automatization in which I assign values to fields and hand them over to scripts. I replaced names with general placeholders in the text below.
The script does not work seamless yet. The tts signal is only transmitted to the master. The slaves are switched on, but they do not broadcast the message. I tested the general syntax in the developer section without fields and then it works. I must have made a small error in the field definition. In addition, as described in other posts the bose speakers are delicate. Everything works for weeks and months and suddenly you have a hickup and cannot adress them well, neither via home assistant nor via spotify directly.
Hi Volker,
Very much appreciated, thank you very much! That looks promising, I will check it out when there’s more time during the holiday season.
Best
Andreas
I’ve installed your latest build in custom components and used your script but I get an error saying it cant find the soundtouch.snapshot service. Any suggestions as to what this might be ?
Not sure if this thread is still followed, but thought I would mention …
I just developed a new SoundTouchPlus custom component if you’re interested. It can easily be installed via HACS as well. More information can be found in this forum post.
It supports the snapshot store / restore functionality, as well as extended source_select processing for both source= and sourceaccount= values required by Bose SoundTouch devices.
It also supports a Play TTS custom service that plays a Google TTS message via a service call and automatically resumes playing of previous source (no snapshot store / restore required). Note that the notification functionality is only supported on the ST-10,20,30 devices and NOT the ST-300 for some odd reason (Bose limitation, not mine). Example:
service: soundtouchplus.play_tts
data:
entity_id: media_player.soundtouch_10
message: Hello World, this is a TTS notification message
artist: TTS Notification
album: Google TTS
track: Hello World
tts_url: >-
http://translate.google.com/translate_tts?ie=UTF-8&tl=EN&client=tw-ob&q={saytext}
volume_level: 50