Bose soundtouch with tunein - setup and details

Greatings…

I have a Bose A140 with soundtouch. Using homeassistant, I wanted to be able to change the radio station. It took some figuring out… but I got something. this post is only to share knowledge, in case someone else is also trying to get it to work. If you have any improvement, feel free to comment/share.

First I had the bose connected using the standard Bose SoundTouch integration; Bose SoundTouch - Home Assistant (home-assistant.io).
But this addon uses an old library (libsoundtouch), which has not been updated since 2018 and does not support https. See GitHub - CharlesBlonde/libsoundtouch: Bose Soundtouch Python library. I added the soundtouchplus addon (GitHub - thlucas1/homeassistantcomponent_soundtouchplus: Home Assistant integration for Bose SoundTouch speakers) using HACS. After install, it detected the device, added it and this works also with the original soundtouch addon active.

I wanted to use a media player to change stations, but keep using the display on the device to see channel and current song/artist.
screen1
This component is the mini media player. See GitHub - kalkih/mini-media-player: Minimalistic media card for Home Assistant Lovelace UI

You can start a direct streaming url, but this does not give you any details and the display shows unknown stream text. I wanted to use tunein without presetting station on the device, so this information is shown and also shown in HA.

Add the mini-media-player custom card in your UI. Example yaml:

type: custom:mini-media-player
entity: media_player.a140_st20_kantoor_3
name: Radio Veronica
artwork: cover
source: icon
volume_stateless: false
hide:
  power: false
  source: true
  mute: false
shortcuts:
  buttons:
    - icon: mdi:radio
      type: service
      id: soundtouchplus.play_contentitem
      data:
        is_presetable: false
        name: Veronica
        entity_id: media_player.a140_st20_kantoor_3
        item_type: stationurl
        location: /v1/playback/station/s6717
        source: TUNEIN
      name: Radio Veronica

id: soundtouchplus.play_contentitem. This is the service called when changing. The data is the payload to that method.
item_type: stationurl
location: this is always fixed: /v1/playback/station/#tune-in-id-station
Source: TUNEIN
name under data I do not know… the name on the button is retrieved a button higher.

What is the tune-in-id-station? Go to tune-in and go to your desired station. The s number is in the URL:


So for radio 10 the location is /v1/playback/station/s16793, for radio veronica the location is /v1/playback/station/s6717. Note: keep the ‘s’ in front of it.

Display now works on the Bose and home assistant changes the background and also shows details.

1 Like

@ghulleman
Awesome tutorial on finding TUNEIN source stations - thank you. Would you mind if I added your tutorial (and credit to you) to my SoundTouchPlus documentation wiki? I’m trying to create a centralized location of knowledge for SoundTouch related information. If not, that is ok too - I can just link this thread.

I also created the SoundTouchPlus Card UI component. It currently supports a player, device preset (1-6) selections, recently played selections, and source selections.

Based on your feedback above, I am also going to add a “custom presets” section, so that you can define your own presets like you do for your TUNEIN stations. It’s still pretty new, so I’m looking for ideas for future enhancements. Give it a try and let me know what you think.

@thlucas Thank you for your work on the soundtouchplus card. I will check it out.

Feel free to (re)use, modify, link or otherwise use this information I have provided. No need to credit me, I am just happy to contribute to the community. It is what makes something like HA great.

1 Like