All notable changes to this project are listed here.
Change are listed in reverse chronological order (newest to oldest).
- Fixed various python
SyntaxWarning: "is not" with 'int' literal.
warnings that were being generated when code was executed. Something changed with Home Assistant (or python) recently that turned these "used to be ignored" warnings into actual warnings that wind up in the HA System Log.
- Fixed various python
SyntaxWarning: invalid escape sequence '\ '
warnings that were being generated when code was executed. Something changed with Home Assistant recently that turned these "used to be ignored" warnings into actual warnings that wind up in the HA System Log! This is due to invalid escaped characters in various string comments that are used for documentation purposes (e.g. """ this is a code comment """).
- Updated recently played cache processing to remove older cache items if the
RecentListCacheMaxItems
value is changed. The previous release was only removing old cache items if a NEW cache entry was being created. This fix will also remove the items if an existing item is updated.
- Updated recently played cache processing to remove older cache items if the
RecentListCacheMaxItems
value is changed.
- Updated
RecentList
andPresetList
to default theirLastUpdatedOn
properties to the current date if not set.
- Updated Recently Played List cache logic to be thread-safe to avoid duplicate recently played items.
- Updated Recently Played List cache logic to set the SourceTitle value for recently played items.
- Updated Recently Played List cache logic to convert Spotify tracklisturl references to uri references. If the playing content is a context (e.g. artist, playlist, album, etc), then the context info is in the NowPlayingStatus contentItem data and the TRACK info is in the individual fields. Failure to do this results in duplicate items in the cache with just the contentItem Name field different.
- Added Recently Played List cache processing. This allows a cache of recently played content items to be stored on the local file system. WebSocket support must be enabled for the caching to work, as it utilizes the nowPlayingUpdated event to drive played content to the cache.
- Updated
Recent
model with setter properties so that a recent item could be created without xml.
- Removed
xmltodict
requirement. - Added method
ContentItem.ToDictionary
to return a dictionary representation of the class. - Added method
MediaItemContainer.ToDictionary
to return a dictionary representation of the class. - Added method
NavigateItem.ToDictionary
to return a dictionary representation of the class. - Updated
NavigateResponse.ToDictionary
method to remove the xmltodict requirement. - Added method
Preset.ToDictionary
to return a dictionary representation of the class. - Updated
PresetList.ToDictionary
method to remove the xmltodict requirement. - Added method
Recent.ToDictionary
to return a dictionary representation of the class. - Updated
RecentList.ToDictionary
method to remove the xmltodict requirement. - Updated
SearchResponse.ToDictionary
method to remove the xmltodict requirement. - Added method
SearchResult.ToDictionary
to return a dictionary representation of the class. - Updated
SearchStationArtists.ToDictionary
method to remove the xmltodict requirement. - Added method
SearchStationResults.ToDictionary
to return a dictionary representation of the class. - Updated
SearchStationSongs.ToDictionary
method to remove the xmltodict requirement. - Added method
SourceItem.ToDictionary
to return a dictionary representation of the class. - Updated
SourceList.ToDictionary
method to remove the xmltodict requirement.
- Updated
NowPlayingStatus.ContainerArtUrl
property to return the correct image url of the playing content: theArtUrl
value is returned if present; otheriwse theContentItem.ContainerArt
url is returned if present; otherwise, None is returned. Prior to this fix, theContentItem.ContainerArt
value was considered first which did not always match theArtUrl
value and thus caused an incorrect image to be displayed for the currently playing artist and track value.
- Added
NowPlayingStatus.ContainerArtUrl
property to return theContentItem.ContainerArt
url if present; otherwise, theArtUrl
value is returned.
- Added method
SoundTouchClient.UpdateNowPlayingStatusForSource
to update source-specific NowPlayingStatus object for a given source and sourceAccount value. - Updated model
NowPlayingStatus
to allow creating an instance with specified values. - Replaced
requests
import withurllib3.request
import inSoundTouchFirmware
class.
- Updated
SoundTouchWebSocket
.NotifyListeners
method to suppress logging of exception details to the system logger for websocket error events.
- Updated
SoundTouchWebSocket
.StopNotification
method to ensure that the underlying event loop thread is shut down when notifications are stopped. - Updated
SoundTouchWebSocket
.StartNotification
method to ensure that the underlying event loop thread is a daemon thread, so it does not delay process termination.
- Updated
SoundTouchWebSocket
.ToString
method to correct a bug that was referencing an undefined attribute.
- Updated urllib3 requirements to "urllib3>=1.21.1,<1.27", to ensure urllib3 version 2.0 is not used. Home Assistant requires urllib3 version less than 2.
- Updated
SoundTouchClient
.GetRecentList
- Added capability to filter the recently played list by source title.
- Updated model
NowPlayingStatus.IsShuffleEnabled
property, as it was reporting the wrong shuffle setting.
- Added model
RepeatSettingTypes
- repeat setting types enumeration. - Added model
ShuffleSettingTypes
- shuffle setting types enumeration.
- Added method
SoundTouchClient
.MediaSeekToTime
- Start playing the current media at the specified position in seconds (e.g. seek to time) if the currently playing media supports it.
- Adjusted the maxsize value of the PoolManager constructor. This WILL fix the "Connection pool is full, discarding connection ..." messages for environments with a large number of SoundTouch devices. The attempts prior to this fix were adjusting the wrong parameter (num_pools instead of maxsize).
- Added SourceTitle property to the
NavigateResponse
class. This returns a user-friendly source title for theSoundTouchClient
.GetMusicServiceStations
andGetMusicLibraryItems
methods.
- Increased number of connection pools in PoolManager constructor from 30 to 75. This should fix the "Connection pool is full, discarding connection ..." messages for environments with a large number of SoundTouch devices.
- Added method
SoundTouchClient
.ToggleZoneMember
- Toggles the given zone member in the master device's zone. If the member exists in the zone then it is removed; if the member does not exist in the zone, then it is added. A new zone is automatically created if necessary.
- Added
resolveSourceTitles:bool
argument toSoundTouchClient
.GetPresetList
andGetRecentList
methods, so that a friendly source title can be displayed in user-interfaces. - Added
Preset
.SourceTitle
property - contains a friendly source title that can be displayed in user-interfaces. - Added
Recent
.SourceTitle
property - contains a friendly source title that can be displayed in user-interfaces.
- Added
includeEmptyPresets:bool
argument to variousPresetList
methods - True if the method should return all 6 preset slots, including empty ones; otherwise, False (default) to return only non-empty presets.
- Increased number of connection pools in PoolManager constructor from the default (10) to 30. This should fix the "Connection pool is full, discarding connection ..." messages for environments with a large number of SoundTouch devices.
- Fixed a bug in
SourceList
.GetTitleBySource
model that was incorrectly resolving the 'AUX' title. Also return 'source:sourceAccount' for title if title could not be resolved.
- Fixed a bug in
SourceList
.GetTitleBySource
model that was incorrectly resolving a title by it's source value. - Updated
SoundTouchWebSocket
.NotifyListeners
method to log any exceptions that occur in user event handlers.
- Fixed a bug in
NowPlayingStatus
model that was reporting incorrect values forIsSkipPreviousSupported
,IsSeekSupported
, andisFavorite
properties.
- Added method
AudioDspControls
.ToSupportedAudioModeTitlesArray
- Returns a string array of titles for SupportedAudioModes. - Added method
AudioDspAudioModes
.GetNameByValue
- Returns a name for the given audioMode value; No exception will be thrown by this method if the value is not found. - Added method
AudioDspAudioModes
.GetValueByName
- Returns a value for the given audioMode name; No exception will be thrown by this method if the name is not found.
- Updated socket close processing in
SoundTouchWebSocket
to include a close status code and message upon socket closure.
- Added method
SourceList
.GetTitleBySource
- Returns aSourceItem
.SourceTitle
string for the given source and sourceAccount values. - Renamed method
SourceList
.FromSourceTitle
toGetSourceItemByTitle
- Returns aSourceItem
instance for the given source title value. - Added model
PlayStatusTypes
- play status types enumeration.
- Added property
SourceItem
.SourceTitle
- source title of media content (e.g. "Tunein", "Airplay", "NAS Music Server", etc). - Added method
SourceList
.FromSourceTitle
- Returns aSourceItem
instance for the given source title value. - Added method
SourceList
.ToSourceTitleArray
- Returns an array of source title strings.
- Fixed error processing logic for
SoundTouchClient
. Prior to this fix, some error conditions were not being caught.
- Fixed logging of eventhandler exceptions in
SoundTouchWebSocket
. Prior to this fix, exceptions were being ignored.
- Added logging of eventhandler exceptions in
SoundTouchWebSocket
. Prior to this fix, exceptions were being ignored. - Added property
PresetList
.LastUpdatedOn
- indicates when the list was last updated. - Added property
RecentList
.LastUpdatedOn
- indicates when the list was last updated.
- Added
Information
andSupportedURLs
objects toSoundTouchClient
.ConfigurationCache
upon class initialization. These are used by theSoundTouchDevice
class. - Added properties to
SoundTouchDevice
class -UnknownUrlNames
,UnSupportedUrlNames
.
- Added method
SoundTouchClient
.GetInformation
- Gets the information configuration of the device. - Added method
SoundTouchClient
.GetIntrospectData
- Gets introspect data for a specified source. - Added model
Component
- component configuration. - Added model
Information
- info configuration. - Added model
InformationNetworkInfo
- info network information configuration. - Added model
Introspect
- introspect configuration. - Added model
SupportedUrl
- supported url configuration. - Added model
SupportedUrls
- supported urls configuration. - Removed
SoundTouchDeviceComponent
class, as it was replaced by theComponent
model. - Removed
InfoNetworkConfig
model, as it was replaced by theInformationNetworkInfo
model.
- Updated method
SoundTouchWebSocket
._OnWebSocketClose
- Close event handler was missing 2 arguments that are passed for the event.
- Added method
SoundTouchDevice
.RebootDevice
- Reboots the operating system of the SoundTouch device. - Removed method
SoundTouchClient
.Bookmark
- No longer necessary, as Pandora removed bookmark functionality; per Pandora, use thumbs up / down instead. - Added method
SoundTouchClient
.SetUserPlayControl
- Sends a user play control type command to stop / pause / play / resume media content playback. - Added method
SoundTouchClient
.SetUserRating
- Rates the currently playing media, if ratings are supported. - Added method
SoundTouchClient
.SetUserTrackControl
- Sends a user track control type command to control track playback (next, previous, repeat, shuffle, etc). - Added model
UserPlayControl
- user play control configuration. - Added model
UserPlayControlTypes
- user play control types enumeration. - Added model
UserRating
- user rating configuration. - Added model
UserRatingTypes
- user rating types enumeration. - Added model
UserTrackControl
- user track control configuration. - Added model
UserTrackControlTypes
- user track control types enumeration.
- Added method
SoundTouchClient
.RemoveGroupStereoPair
- Removes an existing left / right stereo pair speaker group configuration from the device. - Removed the
SoundTouchException
class, as it was not used; SoundTouchError class is used instead. - cleaned up some unused references.
- Updated code to include pretty print of raw xml responses for easier debugging.
- Added method
SoundTouchClient
.CreateGroupStereoPair
- Creates a new left / right stereo pair speaker group configuration for the device. - Added method
SoundTouchClient
.GetGroupStereoPairStatus
- Gets the current left / right stereo pair speaker group configuration of the device. - Added method
SoundTouchClient
.SetBalanceLevel
- Sets the device balance level to the given level. - Added method
SoundTouchClient
.UpdateGroupStereoPairName
- Updates the name of the current left / right stereo pair speaker group configuration for the device. - Added model
Group
- group (stereo pair) configuration. - Added model
GroupRole
- group (stereo pair) role configuration. - Added model
GroupRoleTypes
- group (stereo pair) role types enumeration. - Added model
GroupStatusTypes
- group (stereo pair) status types enumeration. - Updated property descriptions for various classes.
- Added model
KeyStates
- key states enumeration. - Updated methods in
SoundTouchClient
class that send remote keypress commands, based upon 2019 SoundTouch API reference specifications. For example, the client used to send both press and release keys when a preset was selected; this was actually issuing a set preset command (via key press) and then selecting the preset (via key release).
- Added method
SoundTouchClient
.SearchMusicLibrary
- Searches a specified music library container (e.g. STORED_MUSIC, etc). - Added model
AudioDspAudioModes
- media product cec hdmi modes enumeration. - Added model
KeyStates
- key states enumeration. - Added model
ProductCecHdmiModes
- media product cec hdmi modes enumeration. - Removed class
SoundTouchAudioModes
- replaced with AudioDspAudioModes model. - Removed class
SoundTouchHdmiCecModes
- replaced with NavigateMenuTypes model. - Updated methods in
SoundTouchClient
class that send remote keypress commands, based upon 2019 SoundTouch API reference specifications. For example, the client used to send both press and release keys when a preset was selected; this was actually issuing a set preset command (via key press) and then selecting the preset (via key release).
- Added method
SoundTouchClient
.GetMusicLibraryItems
- Gets a list of music library data from the specified music library (e.g. STORED_MUSIC, etc). - Added method
SoundTouchClient
.PowerStandbyLowPower
- Sets power to low-power standby, if the device is currently powered on. - Added model
MediaItemContainer
- media item container configuration. - Added model
NavigateMenuTypes
- navigate menu types enumeration. - Added model
NavigateSortTypes
- navigate sort types enumeration. - Added model
Search
- search configuration. - Added model
SearchFilterTypes
- search filter types enumeration. - Added model
SearchResponse
- search response configuration. - Added model
SearchSortTypes
- search sort types enumeration. - Added model
SearchTerm
- search terms configuration. - Removed class
SoundTouchMenuTypes
- replaced with NavigateMenuTypes model. - Removed class
SoundTouchSortOrders
- replaced with SearchSortTypes model. - Changed all sort references to account for lower-case values, so they are properly sorted. Prior behavior was placing lower-case results after all upper-case results.
- Removed quite a few unused import references (too many to list).
- Updated rebuilt documentation index.
- Added method
SoundTouchClient
.GetMusicServiceStations
- Gets a list of your stored stations from the specified music service (e.g. PANDORA, etc). This has only been tested with Pandora at this point, so not sure if it will work for Spotify, Amazon Music, etc. - Added method
SoundTouchClient
.AddMusicServiceStation
- Adds a station to a music service (e.g. PANDORA, etc) collection of previously stored stations. This has only been tested with Pandora at this point, so not sure if it will work for Spotify, Amazon Music, etc. - Added method
SoundTouchClient
.RemoveMusicServiceStation
- Removes a station from a music service (e.g. PANDORA, etc) collection of previously stored stations. This has only been tested with Pandora at this point, so not sure if it will work for Spotify, Amazon Music, etc. - Added method
SoundTouchClient
.SearchMusicServiceStations
- Searches a music service (e.g. PANDORA, etc) for stations that can be added to a users collection of stations. This has only been tested with Pandora at this point, so not sure if it will work for Spotify, Amazon Music, etc. - Added method
SoundTouchClient
.GetTrackInfo
- Gets extended track information for the current playing music service media. - Added method
SoundTouchClient
.Bookmark
- Bookmarks the current playing music service media. - Updated method
SoundTouchClient
.RemoveAllPresets
to return a PresetList object that contains the updated list of presets. - Updated method
SoundTouchClient
.RemovePreset
to return a PresetList object that contains the updated list of presets. - Updated method
SoundTouchClient
.StorePreset
to return a PresetList object that contains the updated list of presets. - Added model
AddStation
- addStation configuration. - Added model
Navigate
- navigate configuration. - Added model
NavigateItem
- navigate item configuration. - Added model
NavigateResponse
- navigate response configuration. - Added model
SearchResult
- searchResult configuration. - Added model
RemoveStation
- removeStation configuration. - Added model
TrackInfo
- trackInfo configuration. - Added class
SoundTouchMenuTypes
- menu types enumeration. - Added class
SoundTouchSortOrders
- sort orders enumeration. - Updated model
ContentItem
- added new properties: IsNavigate, Offset. - Updated model
NowPlayingStatus
- added new properties: ArtistId, ArtImageStatus, DeviceId, IsAdvertisement, IsRatingEnabled, Rating, SessionId, SourceAccount, TrackId. - Updated model
NowPlayingStatus
- changedImage
property name toArtUrl
to more closely match the SoundTouch API schema.
- SmartInspect SIConfigurationTimer changes to remove interval value.
- Added method to
SoundTouchClient
:ClearBluetoothPaired
- Clears all bluetooth pairings from the device. - Added method to
SoundTouchClient
:EnterBluetoothPairing
- Enters bluetooth pairing mode, and waits for a compatible device to pair with.
- Added VS test class
testVS_SoundTouchDiscovery.py
to test Zeroconf discovery scenarios. - Updated VS test class
testVS_SoundTouchClient
with missing testing scenarios.
- Added method to
SoundTouchClient
: AddMusicServiceSources - Adds any servers in theMediaServerList
to the sources list if they do not exist in the sources list as a "STORED_MUSIC" source. - Added method to
SoundTouchClient
: RemoveMusicServiceAccount - Removes an existing music service account from the sources list. - Added method to
SoundTouchClient
: SetMusicServiceAccount - Adds a music service account to the sources list. - Updated model
PlayInfo
: ToXmlRequestBody method - changed default encoding value from 'unicode' to 'utf-8', which is what the ST webservices API expects. - Updated model
SourceItem
: UserName property - changed toFriendlyName
, as the value is a display name. - Updated model
MusicServiceAccount
: UserName property - changed toUserAccount
, as the value is an account name and not a user name. - Updated model
MusicServiceAccount
: DisplayName property - changed toFriendlyName
, to use the same naming standards for UI display fields. - Updated any classes that did not have a
__str__
or__repr__
method to call theirToString
method.
- Updated model
AudioDspControls
.ToSupportedAudioModesArray
method to return a sorted list of supported audio modes. - Added method
ToMinMaxString
to modelControlLevelInfo
to retrieve a description of the allowed Min / Max range values. - Added new method to
SoundTouchClient
: PlayNotificationBeep - Plays a quick beep notification sound on devices that support it. - Added new method to
SoundTouchClient
: GetSoftwareUpdateCheckInfo - Gets the latest available software update release version information for the device. - Added new method to
SoundTouchClient
: GetSoftwareUpdateStatus - Gets the status of a SoundTouch software update for the device. - Added new method to
SoundTouchClient
: GetWirelessSiteSurvey - Gets a list of wireless networks that can be detected by the device. - Added new method to
SoundTouchClient
: SelectLastWiFiSource - Selects the last wifi source that was selected.
- Add sort support to model
MediaServerList
, to allow sorting on any column. - Add sort support to model
PresetList
, to allow sorting on any column. - Add sort support to model
RecentList
, to allow sorting on any column. - Add sort support to model
ServiceAvailability
, to allow sorting on any column. - Add sort support to model
SourceList
, to allow sorting on any column. - Updated
SoundTouchClient
: GetMediaServerList method - automatically sorts the returned list objects by FriendlyName. - Updated
SoundTouchClient
: GetServiceAvailability method - automatically sorts the returned list objects by ServiceType. - Updated
SoundTouchClient
: GetSourceList method - automatically sorts the returned list objects by Source.
- Changed Zeroconf dependency, as it was interfering with Home Assistant dependencies.
- Added new class
SoundTouchDiscovery
to support discovery of SoundTouch devices on the network using Zeroconf MDNS. - Added new method to
SoundTouchClient
: GetServiceAvailability - Gets the current service availability configuration of the device. - Added new method to
SoundTouchClient
: GetSoundTouchConfigurationStatus - Gets the current SoundTouch configuration status of the device.
- Added new method to
SoundTouchClient
: GetAudioSpeakerAttributeAndSetting - allows speaker attribute and settings to be retrieved (Rear, SubWoofer01, SubWoofer02). - Added new method to
SoundTouchClient
: GetAudioProductLevelControls - allows speaker levels to be retrieved (FrontCenterSpeakerLevel, RearSurroundSpeakersLevel). - Added new method to
SoundTouchClient
: SetAudioProductLevelControls - allows speaker levels to be adjusted (FrontCenterSpeakerLevel, RearSurroundSpeakersLevel). - Added new method to
SoundTouchClient
: SetAudioDspControls - allows audio dsp controls to be adjusted (AudioMode, VideoSyncAudioDelay, SupportedAudioModes). - Removed method from
SoundTouchClient
: SetAudioDspControlsAudioMode - replaced this with the more robust SetAudioDspControls method. - Added class
SoundTouchHdmiCecModes
to define HDMI CEC Mode values. - Added class
SoundTouchAudioModes
to define Audio Mode values. - Updated documentation for various classes and sample code snippets.
- Added new method to
SoundTouchClient
: SetProductCecHdmiControl - allows HDMI CEC mode to be turned ON/OFF. - Updated documentation for various classes and sample code snippets.
- Added new methods to
SoundTouchClient
: GetAudioProductToneControls, SetAudioProductToneControls. - Updated
SoundTouchClient
methods GetAudioDspControls, GetBlueToothInfo, GetProductCecHdmiControl, GetProductHdmiAssignmentControls, GetRebroadcastLatencyMode, and SetAudioDspControlAudioMode to check device capabilities prior to executing the request. ASoundTouchError
will be thrown if the device does not support the capability.
- Added several new methods to SoundTouchClient: GetAudioDspControls, GetBlueToothInfo, GetProductCecHdmiControl, GetProductHdmiAssignmentControls, GetRebroadcastLatencyMode, SetAudioDspControlAudioMode.
- Added several new methods to SoundTouchClient: SelectLastSoundTouchSource(), SelectLastSource(), SelectLocalSource().
- Accidentally changed the GetrSourceList() method to GetCapabilities() method while testing and pushed the change to PyPi.org. Changed it back, but hda to update the release to 1.0.9.
- Added SoundTouchWebSocket.ClearListeners() method to allow all listeners to be removed with one call.
- Changed classifier to "Development Status 5 - Production/Stable".
- Added SourceList.ToSourceArray() method that returns an array of available source list items.
- Added Ping and Pong functionality to the SoundTouchWebSocket class. This allows 'keep-alive' ping send requests and pong responses to be tracked by the websocket. PingInterval is also configurable, and can also be disabled (default setting) if configured to do so.
- Updated Firmware namespace classes to more closely resemble the index.xml output (e.g. changed property names, fixed PROTOCOL processing, etc). Also added sample code to the SoundTouchFirmware class.
- Updated SoundTouchWebSocket OnClose event processing to only pass 2 parameters instead of 3. There is no message argument when a connection is closed. I also added an OnOpen event to allow the user to listen for when a connection is opened.
- Updated SoundTouchClient
PlayUrl
method to handle metadata retrieval errors more gracefully.
- Updated documentation link for PyPi.org.
- Added support for ReadtheDocs documentation hosting.
- Version 1 initial release.