I am not certain I understand correctly - is there some way I can install it already before you will make it available in HACS?
Regarding selecting Spotify as a source I have found a workaround. By installing Spotify integration from HACS it is possible to select the Soundtouch speaker as a source and it works well. Just as if you selected the speaker from the Spotify app.
I could zip up what I am currently testing if you would like to try it. Note that I have only tested it with a Bose ST10 and an ST300. It should work with the ST20 and ST30, and anything that supports the Bose SoundTouch WebSocket API.
It may take me a week or so to get the HACS install put together, as I have never done that before.
Let me know, and I can PM you what I have. I believe it’s just a simple unzip to the config\custom_components folder and restart of HA to recognize it.
I had some time today, and put together a HACS installer for my SoundTouchPlus integration. Use the following to install from HACS:
go to HACS main menu.
click on the 3-dot “overflow menu” in the upper right, and select “custom repositories” item.
copy / paste https://github.com/thlucas1/homeassistantcomponent_soundtouchplus in the Repository textbox and select Integration for the category entry.
click on “Add” to add the custom repository.
you can then click on the SoundTouchPlus repository entry (you may need to filter your list first to find the new entry).
click on “download” to start the download. It will install the soundtouchplus integration to your config/custom_components directory.
restart HA to start using the component.
Note that I haven’t submitted any icons to the HACS branding repository yet, so the integration will show default icon placeholders. Everything else should work as expected though.
Let me know if you run into any issues.
btw, what Bose SoundTouch speaker models are you using? Just curious, as I have only tested with the ST10 and ST300 models.
Bad to the bone Todd. Way to take matters into your own hands but still take the time to HACS it up for the rest of us. Inspiring me… I just don’t have the technical chops quite yet.
I have followed your steps and installed everything. I tried the select source option, but unfortunately it doesn’t work. PRODUCT:TV has turned on the speaker to the Soundtouch mode so there is some response but it didn’t then switch to TV mode and it threw an error: Failed to call service media_player.select_source. Unknown error
Your sources look similar to my ST300, but I do not see a PRODUCT source.
I forgot to mention in the reply above that CasE is important in the select_source values (e.g. PRODUCT:TV is different than product:tv).
Lets try this - turn on your ST520 and set it manually to the mode that you need it to be in to watch TV. Once you have that, go to a browser and bring up the following link (substitute x.x.x.x with your ip address for the ST520 device): http://x.x.x.x:8090/nowPlaying.
Paste a copy of that back to me in a reply - I’m looking to see what you have for the source= and sourceAccount= values. You will need to specify the values for those in the media_player.select_source service.
btw, here is a list of my ST300 sources to compare:
Notice that I have 2 “PRODUCT” sources - “TV” and “HDMI_1”. One is for the direct connection to the TV, the other is for an HDMI input. It’s odd though, as I do not see any “PRODUCT” sources in your list.
Also, you should be able to switch to your Spotify account using the select_source service call as well. You blurred out the sourceAccount value (and rightly so in a public forum) so I cannot tell you what to put exactly, but it will look something like this:
service: media_player.select_source
data:
source: SPOTIFY:<your spotify sourceAccount value from sources>
target:
entity_id: media_player.trash_2
I also created an “official announcement” of the new SoundTouchPlus component, for future readers of this thread …
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.
So did that do what you needed then? It sounds like it’s still not working maybe. To be clear, did you generate the nowPlaying output when the ST-520 was playing content? or maybe when the input was idle (e.g. selected, but not playing any sound)?
Assuming your nowPlaying output was generated while the TV was playing sound, all you should need is this:
service: media_player.select_source
data:
source: LOCAL
target:
entity_id: media_player.trash_2
OK … I wonder if it has something to do with ARC or HDMI CEC control. How do you have your TV hooked up to the ST-520; e.g. what input on the ST-520 is the TV plugged into? And are you using any optical, coaxial or analog stereo audio cables? or just a single HDMI cable?
Also, what button(s) do you press on the ST-520 remote control to switch the input? There may be a possibility to call the remote_keypress service to select the correct input. Something like this, changing the key_id value from AUX_INPUT to your key id maybe:
Please do ask as much as it’s needed. I will try my best to provide the information to help me as well as other users who also might have called their speakers trash out of frustration with this topic haha
I have the Tv connected via single HDMI cable. The input name (physical print) in the Bose system is “TV” and at the TV’s side it is the ARC HDMI output. I have CEC enabled so the speakers turn on when the TV is on and vice versa. However, if the Soundtouch mode is already playing for example spotify or any other source is selected, when the TV is turned on, the sound source on the speakers will not change to TV on the speakers automatically.
That’s why I have to press “TV” button on the remote to be able to use the TV.
On a separate note, having ability to press remote buttons from HA would be amazing as the home theatre speakers that are supposed to be behind you - I am using them to have audio in other areas of the long room where the speakers are located. I achieved that by setting the Surround value with the remote to max, and then I have music in the whole room. When I’m watching TV though, I would prefer to have the surround mode back to normal setting as it creates a lot of unwanted reverberance. It’s of course too much of a hassle to change it each time with the physical remote, but if I had an option for that through HA it would be amazing.
I think the next thing to try would be to “Enable debug logging” under the soundtouchplus integration settings (http://homeassistantvm:8123/config/integrations/integration/soundtouchplus). Click the “Enable debug logging” to start logging. While it is logging, select the Spotify source to play a few seconds of a song, then switch the source back to TV to play a few seconds of audio from the TV. It’s critical for the logging output to change the source completely, so that it logs the differences. After that, you can click on the “Enable debug logging” to stop logging. When you do this, Home Assistant should prompt you to save the logging output file.
Save the file to your local computer and open it up to take a look at the contents. I need to see what all of the NowPlayingStatus: source= lines say, specifically the ones for the actual source change.
For example, here is some debug log entries from my ST-300:
That’s really odd - it almost seems like the ST-520 does not support websocket notifications, as all I am seeing in the file is the ‘update’ polling output.
Can you issue the following command from a web browser to check the device capabilities: http://x.x.x.x:8090/capabilities
From that output, do you see a wsapiproxy= value? something like this: <wsapiproxy>true</wsapiproxy>
When looking at your media player in Home Assistant UI that is associated with the SoundTouchPlus device, do you see the volume slider move when you turn the volume up or down using the ST-520 remote?
Ok, so that tells me that you are receiving updates from the ST-520 to the integration (e.g. HA media player volume sliders move when you press volume up on the remote, wsapiproxy=true, etc). If that is the case, then you should be receiving NowPlaying updates as well.
Prior to doing any further debugging, go ahead and update to the latest version of the SoundTouchPlus component (v1.0.4). To do this, click on “Settings” menu. You should see an entry at the top that says an update is available for SoundTouchPlus integration. If not, try uninstalling the SoundTouchPlus, then reinstall it from HACS. You will need to restart HA after the SoundTouchPlus update as well.
To confirm, do you have the SoundTouchPlus player mapped to a mini-media player on a UI dashboard? If not, you might want to define a temp dashboard that uses the media-player. Here’s some YAML for that if you need it:
restart Home Assistant and wait for it to fully start up.
switch the source on the ST-520 to play any other source besides your TV, and let it play for a couple of minutes.
press the volume up and down buttons on the ST-520 remote, and see if the volume slider moves on the HA UI dashboard media player that references the SoundTouchPlus integration.
switch the source on the ST-520 to your TV and let it play for a couple of minutes.
switch the source on the ST-520 to play any other source besides your TV, and let it play for a couple of minutes.
disable logging for the SoundTouchPlus component, and download the log file to your computer.
If you don’t mind, PM me the log file so I can take a look at it.
If you don’t want to do that I understand as it may contain personal info; in that case, view the log file and search for all lines that contain “ContentItem:”. Those entries have to be showing up in the log somewhere that show the source and sourceAccount values that are changing.
If this doesn’t work, then the next ask would be for a SmartInspect debug log file. This would involve adding a “smartinspect.cfg” file to your config folder and performing the above steps again. It generates more detailed information than the HA logger. But let’s try the above first.
Thanks for your patience; debugging remotely is tough, but hopefully we can get it figured out.