Bose SoundTouch
Integration of smart speakers SoundTouch from Bose, one of the leading brands in audio equipment.
I tested the entire integration process with the Bose SoundTouch 20 product, which is no longer sold. Its certain successor is the Bose Smart Speaker 500, which has also been discontinued. I could not find out exactly which products the integration supports.
The integration uses the Python library libsoundtouch
, which has its last update on GitHub 6 years ago, so it is definitely not new, and it is possible that due to this, the integration will eventually disappear from HomeAssistant.
Personally, I prefer the direction taken by Sonos and recommend checking out their products as well.
Bose SoundTouch App
Not only for integration into HA but also for usage, you will need to install the Bose SoundTouch app on your mobile phone.
Integrating Bose into HA
-
Adding the Bose Integration:
-
Automatically - if the Bose SoundTouch device is on the same network as Home Assistant, it should be found automatically using the auto-discovery feature and you will find it in the Integrations section under Discovered:
-
Manually:
- Go to the Settings -> Devices & Services menu and make sure you are on the Integrations tab.
- Click on Add Integration and search for Bose SoundTouch.
or click on:
-
-
Setting up Bose: Click on the setup button and if everything is fine, you should see the Success! screen, where you can also set the area where the device is located. The specific device type is also visible in the dialog.
-
New Entity:
You should now have one new entity of type
media_player
available, which can be used, for example, in the media-control UI.
Services
Playing Music
By calling the media_player.play_media
service, you can start playing one of the six presets, simulating pressing one of the physical buttons on the device.
# Playing from a preset
- service: media_player.play_media
target:
entity_id: media_player.bose_speaker
data:
media_content_id: 1 # 1-6
media_content_type: PLAYLIST
Setting Volume
By calling the media_player.volume_set
service, you can set the volume in the range of 0 .. 1, where 0 is silent and 1 is the maximum volume.
# Setting volume
- service: media_player.volume_set
target:
entity_id: media_player.bose_speaker
data:
volume_level: 0.25 # setting volume to a quarter of the maximum
Stopping Playback
By calling the media_player.media_stop
service, you can immediately stop the music playback.
# Stopping playback
- service: media_player.media_stop
target:
entity_id: media_player.bose_speaker
UI Control in Lovelace
Mini Media Player
I recommend using Mini Media Player from the HACS store.
It has many options, and in the case of the Bose speaker, you can easily add 6 buttons to the UI just like you have on the speaker.
In the Lovelace UI settings, you need to switch to manual YAML, as only basic options are available in the UI. For a full list of options, check out the repository.
# Example configuration for Bose speaker
type: custom:mini-media-player
entity: media_player.bose_speaker
group: false
volume_stateless: false
toggle_power: true
artwork: full-cover
shortcuts:
columns: 6
buttons:
- data:
entity_id: media_player.bose_speaker
media_content_id: 1
media_content_type: PLAYLIST
id: media_player.play_media
name: 1
type: service
- data:
entity_id: media_player.bose_speaker
media_content_id: 2
media_content_type: PLAYLIST
id: media_player.play_media
name: 2
type: service
- data:
entity_id: media_player.bose_speaker
media_content_id: 3
media_content_type: PLAYLIST
id: media_player.play_media
name: 3
type: service
- data:
entity_id: media_player.bose_speaker
media_content_id: 3
media_content_type: PLAYLIST
id: media_player.play_media
name: 4
type: service
- data:
entity_id: media_player.bose_speaker
media_content_id: 3
media_content_type: PLAYLIST
id: media_player.play_media
name: 5
type: service
- data:
entity_id: media_player.bose_speaker
media_content_id: 3
media_content_type: PLAYLIST
id: media_player.play_media
name: 6
type: service
Comments