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.
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.