SoundTouchPlus-Card HA UI Card

OK, bingo

I deleted the device and re-added it like so

But I still get the same message in the HA logs. The Kitchen and Dining ST20 devices are original releases and my oldest devices. Maybe they really don’t support it?

Looking at another device, a Wireless Link Adapter, I rejoined it to ensure websockets were enabled but “sound_mode” is still not capable. All of my devices report that.

Calling Get Recent List Cache still returns an empty list.

Based on your State screen captures … It looks like you enabled websockets for the Family Room device (192.168.50.88). Are you still referencing the Kitchen device in the STP card? If so, change the entity_id in the STP card to Family Room. Or delete / re-add the Kitchen device with websockets enabled.

btw, thanks for your patience on this. I really appreciate you helping me out.

Forgot to mention … “sound_mode” is only supported (AFAIK) by the SoundTouch 300 soundbar model. ST-10 / 20 do not support sound modes, audio tone controls, nor DSP audio controls.

Ahh, your annotation on the screen grab was bracketing these two items, not pointing to “sound_mode”!

  • soundtouchplus_recents_cache_enabled: true
  • soundtouchplus_recents_cache_max_items: 20

Yes, I updated the card to point to family room, but more to the point, the service call is still returning an empty list.

Have you tried playing Spotify content in HA on the Family Room media player? The recent list cache will be empty initially (e.g device recent list is not copied to the cache), and items have to be played on the device to start accumulating in the cache. The ‘soundtouchplus_recents_cache_lastupdated’ attribute will be greater than 0 after the first item has been cached.

Hey Todd

I am please to say it seems to be working. I have found that “Family Room” Cache is not really updating. I cant see why. But “Sitting Room” is updating and working. I’m still monitoring, but I suspect the inconsistencies are from Bose and not your code! And the cashe update on Sitting Room are from joining another master, not playing directly on Sitting Room as the master.

So I think I am going to be looking at a dashboard which is build from

  • custom:mini-media-player wrapped within config-template-card. This lets me switch the “Master” device of the system. I generally switch master between Kitchen and Family room as a master which comes from an input select.
  • SoundTouchPlus card for Presets + Recent list, set to pull information from “Sitting Room” which seems to be working. Ideally, I’d want to wrap your card inside config-template-card to change the master in the same way. But the sticking point for me is you only have one parameter as the “entity”. I need “player_entity” to which you send control and tap actions to, and “info_entity” from which you retrieve the preset and recent lists. I realize my very old ST20s are the reason for this and it may not be a popular use case.

What about an optional sensor configuration for Presets and Recent? If this sensor is provided then you dont call the get_xxx on the player, you use the sensor data instead. Then I can call get_xxx in my own template sensor.

@jasebob
Progress is good!

I just released an update that adds a display of 2 new STP state variables that could help with the debugging (see screenshot below):

  • Added extra state variable: soundtouchplus_websockets_enabled. Returns true if websocket support is enabled for the device; otherwise, false if device does not support websockets or if websockets were disabled during device setup.
  • Added extra state variable: soundtouchplus_polling_enabled. Returns true if device polling is enabled; otherwise, false. Polling can be a temporary condition, in that it will be enabled if websocket support is enabled and the connection is lost and has not been re-established yet.

I am thinking the ST-20’s do not support websocket notifications; to know for sure you can issue a call to http://192.168.1.xxx:8090/capabilities (change the ip to your ST-20 device IP) and look for the <wsapiproxy>???</wsapiproxy> setting; websockets are supported if wsapiproxy = true. I would like to know this either way, so that I can update my device-specific support notes, if you don’t mind.

Back to states … Install the STP update, and look for the new state variables on your Bose media player states.

If soundtouchplus_websockets_enabled = false, then recents cache will be disabled (websockets required). if true, then it should be capturing events to update the recents cache. Recents cache could still be disabled though based on the next 2 state variables …

if soundtouchplus_recents_cache_enabled: true and soundtouchplus_recents_cache_max_items: value is greater than zero, then it should be updating the cache with captured event data. If the cache has been updated, then the soundtouchplus_recents_cache_lastupdated will be greater than zero. Note that the soundtouchplus_recents_cache_max_items will reflect the value that is configured in the SoundTouchPlus media player options.

Here’s an example of my Bose ST-10-4 player:

Confirming that websockets are not enabled on the old ST20s

<capabilities deviceID="000C8AC06D11">
<networkConfig>
<hostedWifiConfigWebPage hostedBy="BCO" generation="1" port="80">true</hostedWifiConfigWebPage>
<wsapiproxy>false</wsapiproxy>
<allInterfacesSupported/>
<wlanInterfaces/>
<security/>
</networkConfig>
<dspCapabilities>
<dspMonoStereo available="false"/>
</dspCapabilities>
<lightswitch>true</lightswitch>
<clockDisplay>true</clockDisplay>
<capability name="systemtimeout" url="/systemtimeout" info=""/>
<capability name="rebroadcastlatencymode" url="/rebroadcastlatencymode" info=""/>
<lrStereoCapable>false</lrStereoCapable>
<bcoresetCapable>true</bcoresetCapable>
<disablePowerSaving>true</disablePowerSaving>
</capabilities>

@jasebob
Thanks for the info - device documentation has been updated.

FYI - I just released a new version of the SoundTouchPlus Card with the following changes:

[ 1.0.4 ] - 2024/06/13

  • Added UserPreset section to allow an unlimited number of user-defined presets to be selected for playing. Note that these are not SoundTouch device presets, but user-defined presets. They can be added in the card configuration, or a specified as a JSON data file (for sharing among multiple card instances).
  • Added title formatter options support to playerHeaderNoMediaPlayingText configuration value.
  • Added customImageUrls keys to support setting player background images: playerBackground sets the background image to display for the Player section when the player is powered on; playerOffBackground sets the background image to display for the Player section when the player is powered off.
  • Miscellaneous bug fixes.

FYI - I just released a new version of the SoundTouchPlus Card

[ 1.0.5 ] - 2024/08/29

  • Fixed various card configuration issues, which will make the card easier to configure via the HA UI.
  • Miscellaneous bug fixes.

FYI - I just released a new version of the SoundTouchPlus Card

[ 1.0.6 ] - 2024/09/01

  • Changed medialist to use a cached list when card is displayed in configuration editor. The medialist will be retrieved once while the card is being edited, and stored in a cache until the card editor is closed.

FYI - I just released a new version of the SoundTouchPlus Card

[ 1.0.11 ] - 2024/09/20

  • Gave the player UI a little bit of a facelift to make it easier to see the player control icons and header information. Also styles the footer bar to match colors in the artwork image.
  • Updated event processing in various parts of the card; corrected duplicate refresh updates, removed the double progress rings that were displayed in the card editor when refreshing media lists, etc.
  • Removed card configuration playerHeaderBackgroundOpacity property (replaced by new playerHeaderBackgroundColor property).
  • Added card configuration property playerHeaderBackgroundColor: Color value (e.g. “#hhrrggbb”) for header area background gradient. Specify ‘transparent’ to hide the background area. Default is ‘#000000bb’.
  • Removed card configuration playerControlsBackgroundOpacity property (replaced by new playerControlsBackgroundColor property).
  • Added card configuration property playerControlsBackgroundColor: Color value (e.g. “#hhrrggbb”) for Player controls area background gradient. Specify ‘transparent’ to hide the background area. Default is ‘#000000bb’.