SoundTouchPlus Custom Integration

@terhofte7553
In looking closer at this, I think I will try to add a configuration options handler (e.g. a user-interface) that allows the user to enable / disable the sources that they see in the source_list value.

I am researching that now, and will keep you posted as to my progress.

Thanks for bringing this to my attention - it will be a good feature to add.

@terhofte7553
I just pushed out v1.0.23 of the integration, which supports source selection options. After installing the update, check out the Device Configuration Options wiki page for details on how to remove the sources you donā€™t want to display in the media player.

Please let me know if you have any issues with the changes.

Thanks!

hello Lucas,

thanks for the good work you do here. I really appreciate it, as the original Bose integration kind of sucks :slight_smile:
ā€¦
I opened a ticket on github as I can not attache the .xml files hereā€¦

FYI for anyone who has the Bose 520, cinemate, ST-520, or whatever name may be referenced, it would appear the 412451 is the SoundTouch wireless adapter version 1. This adapter was limited using HA. Some features worked. However I just upgraded to version 2 adapter the model number ends with ā€œSM2ā€. This adapter adds Bluetooth and gives more options within HA. As Todd explain in a chat you still will not be able to control local source selection like TV, AUX, etc, but everything else seems to be great!

1 Like

@zdale59 I copied the following from our PM chat, as I donā€™t think I mention it clearly in the above thread. I also updated my SoundTouch Model Notes wiki page with your findings.

What I have found (thus far) is that the SoundTouch Wireless Adapter box simply adds SoundTouch sources (e.g. Bluetooth, Pandora, Spotify, TuneIn, etc) that get fed into the main console (e.g. ST-520, ST-120, etc) via a dedicated SoundTouch input, and cannot control the other console inputs (e.g. AUX, HDMI 1-5, etc) themselves.

For example, you cannot switch to the consoleā€™s HDMI 1 input via the soundtouchplus integration nor using services calls (e.g. media_player.select_source). You can switch to the LOCAL source (e.g. the dedicated SoundTouch input) like so:

# select dedicated SoundTouch source.
service: media_player.select_source
data:
  source: LOCAL
target:
  entity_id: media_player.soundtouch_520_1

You could also try source: LASTSOUNDTOUCHSOURCE or source: LASTSOURCE to switch to the last SoundTouch Source or last source respectively. I have not had anyone try those last two, so please let me know if it works for you. That would at least let you select the previous SoundTouch source you were playing after switching to your console source (e.g. AUX, HDMI1, etc).

The ST-300 device is different, in that it has the Wireless Adapter capabilities built into it, so it can control the other inputs (AUX, HDMI1-5, etc). The ST-520, ST-120 is different hardware unfortunately.

unfortunately they are both also not working :frowning:

@Bingo2023 Thanks for trying those commands, they were worth a shot. I was pretty sure they were not going to work with the Wireless Adapter (attached to an ST-520), but wanted to confirm. Those commands will work for the ST-10 and ST-300 though, as I have confirmed, in case anyone follows this thread in the future.

With that said, I think we have tried everything that we can and just have to accept the fact that the Bose Wireless Adapter has limited SoundTouch functionality when it comes to the WebServices API. I wish Bose had done a better job integrating it with their supporting products, but it at least give you some other sources (Spotify, Pandora, TuneIn, etc) that the original device does not.

Thanks for getting back to me on the results. I will go ahead and close the GitHub thread for this issue as well.

Hi, Iā€™m trying to turn on my ST-300 by using automation every weekday morning but without success. Iā€™m quite new to HA. I managed to turn it on and off with the volume and channel it had on the last day.
Can you please help me how to turn it on with preset 1 and with a volume set to 15? Thanks

@bencsikzoli Hello, and welcome to the community.

The following automation script should do what you need. It also assumes you have the soundtouchplus integration installed.

Just change all media_player.bose_st300 references to your Bose ST-300 entity id.

alias: Morning Wakeup Call Bose ST300
description: >-
  Turn on Bose ST-300 every weekday morning at 07:00 am, with volume at 15% and Preset 1 selected.
trigger:
  - platform: time
    at: "07:00:00"
condition:
  - condition: time
    weekday:
      - mon
      - tue
      - wed
      - thu
      - fri
action:
  - service: media_player.turn_on
    metadata: {}
    data: {}
    target:
      entity_id: media_player.bose_st300
  - service: media_player.volume_set
    metadata: {}
    data:
      volume_level: 0.15
    target:
      entity_id: media_player.bose_st300
  - service: soundtouchplus.remote_keypress
    data:
      entity_id: media_player.bose_st300
      key_id: PRESET_1
      key_state: release
    alias: Select Preset 1
mode: single

To import it into your HA:

  • go to the Settings \ Automation dashboard.
  • click Create Automation in lower right to create a new automation.
  • select create new empty automation from scratch.
  • at the top right, click the 3 dots menu and select Edit in yaml mode.
  • copy / paste the above script into the form, overlaying the existing default content.
  • click Save button in the lower right to save it.
  • click Rename on the prompt after save to save it as-is (unless you want to give it another name).

Hope it helps!

Hello @thlucas , thanks for the help however I still have problems.
ST turned on with the correct volume but the preset 1 wasnā€™t selected. I have the soundtouch plus installed but maybe it is not configured correctly.
If I select the presets via the mini media player it works fine.

@bencsikzoli - Can you reply with the modified automation script so I can take a look at it? Make sure you paste it between a set of 3 slanted ticks so that I can see the spacing correctly. Like so:
```
paste text here
```

Also, can you paste your mini media player configuration that you mentioned was working? We could use portions of that in the script I created as well, which would not require the soundtouchplus component.

Sure, here is the automation:

alias: Morning Wakeup Call Bose ST300
description: >-
  Turn on Bose ST-300 every weekday morning at 06:00 am, with volume at 15% and
  Preset 1 selected.
trigger:
  - platform: time
    at: "06:00:00"
condition:
  - condition: time
    weekday:
      - mon
      - tue
      - wed
      - thu
      - fri
  - condition: device
    device_id: 5386659b1e282d208ec54481d8c7cadd
    domain: device_tracker
    entity_id: 483d7eff40cf520fb04e48d916580845
    type: is_home
action:
  - service: media_player.turn_on
    metadata: {}
    data: {}
    target:
      entity_id: media_player.soundtouch300
  - service: media_player.volume_set
    metadata: {}
    data:
      volume_level: 0.15
    target:
      entity_id: media_player.soundtouch300
  - service: soundtouchplus.remote_keypress
    data:
      entity_id: media_player.soundtouch300
      key_id: PRESET_1
      key_state: release
    alias: Select Preset 1
mode: single

And the mini media player:

type: custom:mini-media-player
name: Bose Soundtouch 300
entity: media_player.soundtouch300
shortcuts:
  buttons:
    - type: service
      name: 1
      data:
        entity_id: media_player.soundtouch300
        media_content_id: 1
        media_content_type: PLAYLIST
      id: media_player.play_media
    - type: service
      name: 2
      data:
        entity_id: media_player.soundtouch300
        media_content_id: 2
        media_content_type: PLAYLIST
      id: media_player.play_media
    - type: service
      name: 3
      data:
        entity_id: media_player.soundtouch300
        media_content_id: 3
        media_content_type: PLAYLIST
      id: media_player.play_media
    - type: service
      name: 4
      data:
        entity_id: media_player.soundtouch300
        media_content_id: 4
        media_content_type: PLAYLIST
      id: media_player.play_media
    - type: service
      name: 5
      data:
        entity_id: media_player.soundtouch300
        media_content_id: 5
        media_content_type: PLAYLIST
      id: media_player.play_media
    - type: service
      name: 6
      data:
        entity_id: media_player.soundtouch300
        media_content_id: 6
        media_content_type: PLAYLIST
      id: media_player.play_media
  columns: 6
source: icon
sound_mode: full
artwork: cover

@bencsikzoli - Try this ā€¦

alias: Morning Wakeup Call Bose ST300
description: >-
  Turn on Bose ST-300 every weekday morning at 06:00 am, with volume at 15% and Preset 1 selected.
trigger:
  - platform: time
    at: "06:00:00"
condition:
  - condition: time
    weekday:
      - mon
      - tue
      - wed
      - thu
      - fri
  - condition: device
    device_id: 5386659b1e282d208ec54481d8c7cadd
    domain: device_tracker
    entity_id: 483d7eff40cf520fb04e48d916580845
    type: is_home
action:
  - service: media_player.turn_on
    metadata: {}
    data: {}
    target:
      entity_id: media_player.soundtouch300
  - service: media_player.volume_set
    metadata: {}
    data:
      volume_level: 0.15
    target:
      entity_id: media_player.soundtouch300
  - service: media_player.play_media
    metadata: {}
    data:
      media_content_id: "1"
      media_content_type: PLAYLIST
    target:
      entity_id: media_player.soundtouch300
    alias: Select Preset 1
mode: single

The following should have worked to select the preset, IF the soundtouchplus integration was properly configured for the ST-300:

service: soundtouchplus.remote_keypress
data:
  entity_id: media_player.bose_st10_1
  key_id: PRESET_1
  key_state: release

With that said, the media_player.play_media call above should work even if the soundtouchplus integration is not installed.

Also, I like the extra touch you put in the automation with the device tracking - only need to play something if someone is home to hear it. :smiley:

1 Like

@jasebob
I pushed out a new version of the SoundTouchPlus integration today. It adds media browsing support of Spotify content, both Premium and Free accounts. Take a look at the SoundTouchPlus wiki page for more info on what it looks like and how to customize it.

Note that this requires the SpotifyPlus integration in order to work. Take a look at the SpotifyPlus wiki page for more info on what it looks like and how to customize it.

Iā€™m trying this integration, but I donā€™t know if itā€™s right for me. I would like to be able to send the latest music that was playing on my Spotify account to Bose, is this possible? At home I use google home and it is very easy, unfortunately this is not possible on the Bose, because it is not compatible with google home. I was wondering if this integration was possible. Thank you

@Diegocampy It is possible if your Bose speakers are SoundTouch and you have a Spotify premium level account. What model of Bose speaker do you have? The newer Bose speaker line is not SoundTouch.

Combined with the SpotifyPlus integration, you would be able to call the ā€œPlayback Transferā€ service to transfer player control from one Spotify account to another. Assuming you also have a Spotify premium account.

1 Like

Youā€™re a fucking genius! Iā€™ve been trying for a year. My Bose is Soundtouch 30 and I have Spotify premium. Iā€™m going to try the integration right now

@Diegocampy LOL - Iā€™ve been called worse, so the genius compliment is refreshing.

After you get both SpotifyPlus and SoundTouchPlus installed, you can use the following Player Transfer Playback service call example to transfer playback (adjust to your player and device idā€™s).

service: spotifyplus.player_transfer_playback
data:
  entity_id: media_player.spotifyplus_john_s           # Bose ST-10 device
  device_id: 6f66ef4fbf687bbba393d8c38599aad484b30901  # Bose ST-300 device id
  play: True

ok, Iā€™m almost there, now my bose has a lot of sources, which I donā€™t even know exactly where they come from anymore


I have no idea where Spotify (SpotifyAlexaUserName), Spotify (SpotifyConnectUserName), Stored Music Media Rendered comes from.
I set SpotifyPlus as default, I think itā€™s the one highlighted in blue, indicated with the email I hid.

Now all I have to do is make a boolean switch and associate a routine with its activation, so that I can use it by voice with Google Home. Maybe the code you gave me I should insert into this script and invoke it with the press of that boolean switch to do this?

Sorry, as you may have understood Iā€™m not very expert

@Diegocampy You can configure what sources get displayed in the sources list via the integration Configuration Options. Just use the Source List Selections portion of the options to select which sources you want to display in the list. The SpotifyAlexaUserName and SpotifyConnectUserName are system sources used by Bose, so you will want exclude those from the list. Note that excluding an entry from the list does not disable any functionality for that source - it simply wonā€™t show up in the sources list in the media player.

I donā€™t have much experience with Google Home or voice commands, so not sure on what to advise there on placement of the service call. It sounds like you are on the right track though, as it will need to be called from somewhere.

Did you get the SpotifyPlus integration installed as well? Itā€™s the integration that contains the Player Transfer Play service.

1 Like