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