spotifywebapipython.models.zeroconfdiscoveryresult

@export
class ZeroconfDiscoveryResult:

Zeroconf Discovery Result object.

Information about the Zeroconf entry for a SpotifyConnect device as found by Zeroconf (mDNS).

ZeroconfDiscoveryResult()

Initializes a new instance of the class.

Description: bool

Returns a basic description of the device, and how source info was obtained.

This is a helper property, and not part of the Zeroconf ServiceInfo result.

DeviceName: str

Device name (e.g. "Bose-ST10-1").

Domain: str

Domain on which the service is located, which should match the one passed in during the query (e.g. "local.").

HostIpAddress: str

IP address at which the host can be reached (e.g. "192.168.1.81").

This value may also contain a DNS alias, if no IP addresses were discovered for the device. This is very rare, but possible.

HostIpAddresses: list

IP address(es) at which the host can be reached (e.g. ["192.168.1.81", "172.30.32.1"]).

Note that this value can contain multiple addresses.

HostIpPort: int

Port number (as an integer) for the service on the host (e.g. 8080).

HostIpTitle: int

Host IP Address and Port number for the service on the host (e.g. 8080).

Note that this value is a convenience property derived from the following properties: HostIpAddress,HostIpPort.

HostTTL: int

Host Time-To-Live value (as an integer) for the service on the host (e.g. 1200).

Id: str

Result ID (e.g. "Bose-ST10-1" (192.168.1.81:8200)).

This is a helper property, and not part of the Zeroconf interface.

IsDynamicDevice: bool

Returns True if the device is a dynamic device; otherwise, False.

Dynamic devices are Spotify Connect devices that are not found in Zeroconf discovery process, but still exist in the player device list. These are usually Spotify Connect web or mobile players with temporary device id's.

IsChromeCast: bool

True if the device is a Google ChromeCast device; otherwise, False.

IsChromeCastGroup: bool

True if the device is a Google ChromeCast Group device; otherwise, False.

This is indicated by the ServerKey value starting with "Google-Cast-Group-".

IsHostIpV6: bool

Returns True if the HostIpAddress is a IPV6 formatted address; otherwise, False.

Key: str

Service key (e.g. "bose-st10-2._spotify-connect._tcp.local.").

Name: str

Service name (e.g. "Bose-ST10-2._spotify-connect._tcp.local.").

Priority: int

Priority value (as an integer) for the service on the host (e.g. 0).

OtherTTL: int

Other Time-To-Live value (as an integer) for the service on the host (e.g. 5400).

Discovered properties.

Server: str

Server name (e.g. "Bose-SM2-341513fbeeae.local.").

ServerKey: str

Server key (e.g. "bose-sm2-341513fbeeae.local.").

ServiceType: str

Service type, which should match the one passed in during the query name (e.g. "_spotify-connect._tcp.").

Weight: int

Weight value (as an integer) for the service on the host (e.g. 0).

SpotifyConnectCPath: str

Spotify Connect CPath property value (e.g. "/zc").

SpotifyConnectVersion: str

Spotify Connect Version property value (e.g. null, "1.0").

ZeroconfApiEndpointAddUser: str

Zeroconf API endpoint to add a user to a Spotify Connect device (e.g. "http://192.168.1.81:8200/zc?action=addUser&version=2.10.0").

ZeroconfApiEndpointGetInformation: str

Zeroconf API endpoint to retrieve device information for a Spotify Connect device (e.g. "http://192.168.1.81:8200/zc?action=getInfo&version=2.10.0").

ZeroconfApiEndpointResetUsers: str

Zeroconf API endpoint to reset users (e.g. Logoff) currently active on a Spotify Connect device (e.g. "http://192.168.1.81:8200/zc?action=resetUsers&version=2.10.0").

def Equals(self, obj) -> bool:

Returns true if the specified object instance contains the same argument values as our object instance values; otherwise, False.

Arguments:
  • obj (ZeroconfDiscoveryResult): Object instance to compare.
def GetEndpointUrl(self, action: str) -> str:

Gets a Spotify Zeroconf API endpoint url for the specified action key.

Arguments:
  • action (str): Spotify Zeroconf endpoint action to formulate (e.g. 'getInfo', 'addUser', 'resetUsers', etc).
Returns:

A string containing the endpoint url for the specified action key.

def ToDictionary(self) -> dict:

Returns a dictionary representation of the class.

def ToString(self, includeTitle: bool = True) -> str:

Returns a displayable string representation of the class.

Arguments:
  • includeTitle (str): True to include the class name title prefix.