Hi,
This is a basic question but I’m new to all of this, I have added both of my bose soundtouch speakers to HA manually since it couldnt pick them up automatically!!!
It works fine but when I tried to add the presets I’m getting below error
Invalid config for [media_player]: required key not provided @ data['platform']. Got None
@Andreas_R - I use the mini-media-player and SoundTouchPlus integrations (both installable via HACS) for playing pre-defined presets on my ST-10 and ST-300 SoundTouch devices. Note that you have to have presets defined to your SoundTouch speaker in order to select them - that is done in the Bose SoundTouch app.
Here’s what my mini-media-player looks like in the HA UI:
Here’s the mini-media-player dashboard yaml that I’m using:
If you don’t want to use mini-media-player, then you can issue the following service call (like @jones mentioned in a previous reply). The following is what I issue from a Settings\Developer Tools\Services tab (yaml mode); it will select the pre-defined preset #2 on my SoundTouch device named soundtouch_10:
@Andreas_R , @jones Hey Guys. I just updated the SoundTouchPlus integration with a new service called “Play Content Item” to allow media content from sources (e.g. TUNEIN, LOCAL_MUSIC, etc) to be played directly. You should not have to have them saved as a preset on the device.
However, you must know the content item specifics (source, location, etc). Here’s a couple of examples to get you started:
# play tunein radio station content.
service: soundtouchplus.play_contentitem
data:
entity_id: media_player.soundtouch_10
name: K-LOVE Radio
source: TUNEIN
item_type: stationurl
location: /v1/playback/station/s33828
container_art: http://cdn-profiles.tunein.com/s33828/images/logog.png?t=637986894890000000
is_presetable: false
# play dlna local music content.
service: soundtouchplus.play_contentitem
data:
entity_id: media_player.soundtouch_10
name: Welcome to the New
source: LOCAL_MUSIC
source_account: 3f205110-4a57-4e91-810a-ad949d25abb2
item_type: album
location: album:983
container_art: http://192.168.1.1:8085/v1/albums/983/image?_=1&w=62
is_presetable: true
@Andreas_R@jones
Hey guys - I added preset, recent stations, and Pandora music service station support to the SoundTouchPlus integration. It retrieves the current lists (presets, recents, and Pandora stations) from the device and populates a dashboard with the results. It also allows tap actions to play items, as well as hold actions to store presets.
Really love your work! Do you know if it is possible to combine your latest implementation of the Soundtouch presets with the Shortcut Object of the Mini-Media-Player? Would be nice to have the cover image directly shown in the media player using the image parameter.
I don’t think it is possible, unless the MMP shortcut can support templates.
I tried the following with the custom:auto-entities card, but could not get it to work. I think it has to resolve the template items to a list of entity objects, which the bookmark name is not. Now if the MMP supported templates in the shortcuts option it would be possible I would think.
type: custom:auto-entities
card:
type: custom:mini-media-player
entity: media_player.bose_st10_1
artwork: cover
source: icon
hide:
volume: true
shortcuts:
columns: 6
card_param: buttons
filter:
template: >-
{% set serviceResponse = None -%}
{%- set itmMediaPlayerEntityId = 'media_player.bose_st10_1' -%}
{%- if has_value('sensor.soundtouchplus_list_presets') -%}
{%- set serviceResponse = state_attr('sensor.soundtouchplus_list_presets','serviceResponse') -%}
{%- endif -%}
{%- if serviceResponse != None -%}
{%- for preset in serviceResponse['presets']['preset'] -%}
{%- set itmId = preset['@id'] | default(0) -%}
{%- set itmSourceTitle = preset['@SourceTitle'] | default('') -%}
{%- set itmContainerArt = preset['ContentItem']['containerArt'] | default('/local/images/soundtouchplus_no_image.png') -%}
{%- set itmItemName = preset['ContentItem']['itemName'] | default('') -%}
{%- set itmSource = preset['ContentItem']['@source'] | default('') -%}
{%- set itmSourceAccount = preset['ContentItem']['@sourceAccount'] | default('') -%}
{%- set itmItemType = preset['ContentItem']['@type'] | default('') -%}
{%- set itmLocation = preset['ContentItem']['@location'] | default('') -%}
{%- set itmIsPresetable = preset['ContentItem']['@isPresetable'] | default('false') -%}
{%- if itmItemName != 'empty preset' -%}
{{
'name': itmItemName,
'type': 'service',
'id': 'soundtouchplus.play_contentitem',
'data': {
'entity_id': itmMediaPlayerEntityId,
'name': itmItemName,
'source': itmSource,
'source_account': itmSourceAccount,
'item_type': itmItemType,
'location': itmLocation,
'container_art': itmContainerArt,
'is_presetable': itmIsPresetable
} # data
}}, # button
{%- endif -%}
{%- endfor -%}
{%- endif -%}
Hi together,
I am not sure, if I am right here. I want to use the ST300 with ioBroker, but it seems, that it is not possible to change the source from BLUETOOTH to TV or DVD or GAME.
Do you know if there is a possibility using port 8090 to change the source? I found a lot of code (python, curl), for example to switch the presets via curl and a post command, which works perfectly, but nothing to switch to “TV” for example.
Thank you in advance, BR Olli
Hi @olligut - yes, it is. I own an ST-300 (with bass module) and do this all of the time. I am not familiar with IOBroker, but assume it is something similar to Home Assistant. Regardless, you can get this to work a number of ways - using a curl POST command with an XML payload, using a Python-based API such as my bosesoundtouchapi, etc.
The first thing you want to do is figure out what source and sourceAccount values are defined for your ST-300. To do that, issue a call to the /sources service from your desktop browser using a url of http://192.168.x.x:8090/sources (change 192.168.x.x ip address to your ST-300 ip address). In the output that is generated, look for the source="PRODUCT" attributes and their corresponding sourceAccount attribute values (e.g. ... source="PRODUCT" sourceAccount="TV" ...>). You should have one or more PRODUCT sources listed, one for each input that is being used on the ST-300. Note that a source will not show up unless something is plugged into that input.
Once you have the source and sourceAccount values, it’s a pretty simple call to the /select service to select the source.
Python example using the bosesoundtouchapi package:
from bosesoundtouchapi import *
try:
# create SoundTouch device instance.
device:SoundTouchDevice = SoundTouchDevice("192.168.1.131")
# create SoundTouch client instance from device.
client:SoundTouchClient = SoundTouchClient(device)
# select an input source.
client.SelectSource("PRODUCT", "TV")
except Exception as ex:
print("** Exception: %s" % str(ex))
Hi Todd,
thank you for your detailed explanation.
I think my problem is the missing source “TV”.
That is, what I see when TV ist activated. What do I wrong?
@olligut Hmmmmmm … It’s odd that it does not have the “PRODUCT” entries listed in the source list. I have only ever seen the source="LOCAL" on devices that utilize the SoundTouch Wireless Adapter add-on product (e.g. ST-520), but then again I have only owned the ST-300 and the ST-10 devices from the SoundTouch line. I wonder if the source="LOCAL" is caused by an older generation ST-300 maybe? I purchased my ST-300 in December of 2017, so it was (probably?) one of the last generation devices. I have current firmware installed as well.
Can you list the contents of the /info service output for your ST-300? Use a http://yourip:8090/info.
I am sooo sorry…
I bought this Bose system years ago and I am of the sure that it was a ST300. Now I searched for details because of your hint with ST-520. When I look at the bose homepage I can not find my configuration. It is " SoundTouch® 120 home cinema system".
Do I searched for the wrong syntax then or is it not possible with such a modell.
@olligut Not a problem - I forget stuff like this all of the time as well.
I believe the ST-120 (that you have) behaves along the same lines as the ST-520, as it states in the ST-120 manual that it utilizes the wireless adapter for its SoundTouch capabilities …
Introducing SoundTouch™ from Bose®
With the SoundTouch™ wireless adapter (available separately), you can stream
Internet radio, music services (where available) and your music library. If you have
Wi-Fi® at home, you’re ready to enjoy your favorite music in any room you want.
Just to verify, do you have the SoundTouch Wireless Adapter for your ST-120 system? It would be a separate box that plugs into the main ST-120 console per the manual.
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 (ST-120 in your case) console via a dedicated SoundTouch input, and cannot control the other console inputs (e.g. AUX, HDMI 1-5, etc) themselves.
I updated my SoundTouch Model Notes page with this information, in the event it can help future users.
As a side note, you should still be able to do the following if you have the ST Wireless Adapter:
Hi and thank you for that great Model Notes page. As described there, it is not possible to switch to the source “TV” at my Bose AV120. I can confirm that!
BR Olli