Gonos

package module
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2026 License: MIT Imports: 24 Imported by: 0

README

Gonos

This module aims to implement an easy and simple way to control Sonos devices while keeping advanced control possible.

The documentation from svrooij can be referenced for the base implementation.
Many thanks for the documentation as without it, this module would not exist.

Next to the base implementation some helper function are present for easier use.
For all helper functions please refer to the files in the top level directory of this project.

Note that most of this project is untested, as such not all functions might not work as expected.
Do you're own testing and see if the functionality you need actually works.

Usage

Creating a ZonePlayer for controlling a Sonos device can be done by any of these methods:

zp, err := Gonos.NewZonePlayer("127.0.0.1") // Use the IpAddress of the Sonos device.
zp, err := Gonos.DiscoverZonePlayer(time.Second) // Discover a Sonos device using SSDP.
zp, err := Gonos.ScanZonePlayer("127.0.0.0/8", time.Second) // Scan a network for Sonos devices.

After a ZonePlayer is successfully created the associated Sonos device can be controlled.
This can be done using either the Sonos services (base implementation) or the helpers.

The available Sonos services are:

Examples

Some examples for controlling a Sonos device using the Sonos services:

timeServer, err := zp.AlarmClock.GetTimeServer() // Get the current time server.
err := zp.AudioIn.SetLineInLevel(10, 10) // Set left and right line in level to 10.
err := zp.AVTransport.Play() // Play current track.
connectionIDs, err := zp.ConnectionManager.GetCurrentConnectionIDs() // Get ids of current connections.
queInfo, err := zp.ContentDirectory.Browse(Gonos.lib.ContentTypes.QueueMain, "BrowseDirectChildren", "dc:title,res,dc:creator,upnp:artist,upnp:album,upnp:albumArtURI", 0, 0, "") // Get info of the current main que.
zoneAttributes, err := zp.DeviceProperties.GetZoneAttributes() // Get attributes of current zone.
err := zp.GroupManagement.RemoveMember("id") // Remove a group member.
volume, err := zp.GroupRenderingControl.GetGroupVolume() // Get the current group volume.
err := zp.HTControl.SetLEDFeedbackState(true) // Set the LED feedback state.
availableServices, err := zp.MusicServices.ListAvailableServices() // Get available music services.
qPlayAuth, err := zp.QPlay.QPlayAuth("seed") // Does something, probably, idk.
id, err := zp.Queue.RemoveTrackRange(10, 6) // Starting at track 10 remove 6 tracks from que.
err := zp.RenderingControl.SetVolume(10) // Set volume to 10.
err := zp.SystemProperties.EnableRDM(1) // Enable RDM.
err := zp.VirtualLineIn.Play() // Play virtual line in.
zoneGroupAttributes, err := zp.ZoneGroupTopology.GetZoneGroupAttributes() // Get attributes of current zone group.

Some examples for controlling a Sonos device using the helpers:

err := zp.Play() // Play current track.
isPlaying, err := zp.GetPlay() // Check if current track is playing.

err := zp.Pause() // Pause current track.
isPaused, err := zp.GetPause() // Check if current track is paused.

err := zp.Stop() // Stop current track.
isStopped, err := zp.GetStop() // Check if current track is stopped.

isTransitioning, err := zp.GetTransitioning() // Check if current track is transitioning.

err := zp.Next() // Go to next track.
err := zp.Previous() // Go to previous track.

err := zp.SetShuffle(true) // Enable shuffle.
isShuffle, err := zp.GetSuffle() // Check if shuffle is enabled.

err := zp.SetRepeat(true) // Enable repeat (Disables reapeat one).
isRepeat, err := zp.GetRepeat() // Check if repeat is enabled.

err := zp.SetRepeatOne(true) // Enable reapeat one (Disables repeat).
isRepeatOne, err := zp.GetRepeatOne() // Check if repeat one is enabled.

err := zp.SeekTrack(10) // Go to 10th track in the que (Count start at 1).
err := zp.SeekTime(69) // Go to the 69th second in the track.
err := zp.SeekTimeDelta(-15) // Go back 15 seconds in the track.

queInfo, err := zp.GetQue() // Get the current que.

Structure

This project is structured as follows:

  • Gonos (/Gonos.go; Entrypoint and main functions to get started)
  • lib (/lib/lib.go; Contains functions and variables that are used throughout the project)
  • Sonos Services (/*/*.go; Implements base as documented in svrooij)
  • Sonos Service Helpers (Ex: /*.go; Build upon the base implementation for easier use)

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSonos                      = lib.ErrSonos
	ContentTypes                  = lib.ContentTypes
	SeekModes                     = lib.SeekModes
	PlayModes                     = lib.PlayModes
	PlayModeMap                   = lib.PlayModeMap
	PlayModeMapReversed           = lib.PlayModeMapReversed
	RecurrenceModes               = lib.RecurrenceModes
	AlbumArtistDisplayOptionModes = lib.AlbumArtistDisplayOptionModes
	UpdateTypes                   = lib.UpdateTypes
)

Functions

func SendAndVerify added in v0.1.3

func SendAndVerify(url string, endpoint string, action string, body string, targetTag string) (string, error)

Types

type AvailableServices

type AvailableServices struct {
	DescriptorList string
	TypeList       string
	ListVersion    string
}

type ConnectionInfo

type ConnectionInfo struct {
	RcsID                 int
	AVTransportID         int
	ProtocolInfo          string
	PeerConnectionManager string
	PeerConnectionID      int
	// Possible values: `Input`, `Output`
	Direction string
	// Possible values: `OK`, `ContentFormatMismatch`, `InsufficientBandwidth`, `UnreliableChannel`, `Unknown`
	Status string
}

type LibraryInfo

type LibraryInfo struct {
	Count      int
	TotalCount int
	Librarys   []LibraryInfoItem
}

type LibraryInfoItem

type LibraryInfoItem struct {
	AlbumArtURI string
	Title       string
	Description string
	Ordinal     string
	Class       string
	Type        string
}

type PLaylistInfo

type PLaylistInfo struct {
	Count      int
	TotalCount int
	Playlists  []PlaylistInfoItem
}

type PlaylistInfoItem

type PlaylistInfoItem struct {
	AlbumArtURI string
	Title       string
	Description string
	Ordinal     string
	Class       string
	Type        string
}

type QueInfo

type QueInfo struct {
	Count      int
	TotalCount int
	Tracks     []QueInfoItem
}

type QueInfoItem

type QueInfoItem struct {
	AlbumArtURI string
	Title       string
	Class       string
	Creator     string
	Album       string
}

type TrackInfo

type TrackInfo struct {
	QuePosition int
	Duration    string
	URI         string
	Progress    string
	AlbumArtURI string
	Title       string
	Class       string
	Creator     string
	Album       string
}

type ZoneInfo

type ZoneInfo struct {
	SerialNumber           string
	SoftwareVersion        string
	DisplaySoftwareVersion string
	HardwareVersion        string
	IPAddress              string
	MACAddress             string
	CopyrightInfo          string
	ExtraInfo              string
	// SPDIF input, `0` not connected, `2` stereo, `7` Dolby 2.0, `18` dolby 5.1, `21` not listening, `22` silence
	HTAudioIn int
	Flags     int
}

type ZonePlayer

type ZonePlayer struct {
	// Full url address packets will be send to.
	URL string
	// GetZoneInfo call is made to confirm if the requested ZonePlayer exists opon creation, might as well store the returned data.
	ZoneInfo ZoneInfo

	// Sonos SOAP Service `AlarmClock`.
	//
	// Prefer methods in `zp` over methods in `zp.AlarmClock`.
	//
	// Control the sonos alarms and times.
	AlarmClock AlarmClock.AlarmClock

	// Sonos SOAP Service `AudioIn`.
	//
	// Prefer methods in `zp` over methods in `zp.AudioIn`.
	//
	// Control line in.
	AudioIn AudioIn.AudioIn

	// Sonos SOAP Service `AVTransport`.
	//
	// Prefer methods in `zp` over methods in `zp.AVTransport`.
	//
	// Service that controls stuff related to transport (play/pause/next/special URLs).
	AVTransport AVTransport.AVTransport

	// Sonos SOAP Service `ConnectionManager`.
	//
	// Prefer methods in `zp` over methods in `zp.ConnectionManager`.
	//
	// Services related to connections and protocols.
	ConnectionManager ConnectionManager.ConnectionManager

	// Sonos SOAP Service `ContentDirectory`.
	//
	// Prefer methods in `zp` over methods in `zp.ContentDirectory`.
	//
	// Browse for local content.
	ContentDirectory ContentDirectory.ContentDirectory

	// Sonos SOAP Service `DeviceProperties`.
	//
	// Prefer methods in `zp` over methods in `zp.DeviceProperties`.
	//
	// Modify device properties, like LED status and stereo pairs.
	DeviceProperties DeviceProperties.DeviceProperties

	// Sonos SOAP Service `GroupManagement`.
	//
	// Prefer methods in `zp` over methods in `zp.GroupManagement`.
	//
	// Services related to groups.
	GroupManagement GroupManagement.GroupManagement

	// Sonos SOAP Service `GroupRenderingControl`.
	//
	// Prefer methods in `zp` over methods in `zp.GroupRenderingControl`.
	//
	// Volume related controls for groups.
	GroupRenderingControl GroupRenderingControl.GroupRenderingControl

	// Sonos SOAP Service `HTControl`.
	//
	// Prefer methods in `zp` over methods in `zpTControl`.
	//
	// Service related to the TV remote control.
	HTControl HTControl.HTControl

	// Sonos SOAP Service `MusicServices`.
	//
	// Prefer methods in `zp` over methods in `zp.MusicServices`.
	//
	// Access to external music services, like Spotify or Youtube Music.
	MusicServices MusicServices.MusicServices

	// Sonos SOAP Service `QPlay`.
	//
	// Prefer methods in `zp` over methods in `zp.QPlay`.
	//
	// Services related to Chinese Tencent Qplay service.
	QPlay QPlay.QPlay

	// Sonos SOAP Service `Queue`.
	//
	// Prefer methods in `zp` over methods in `zp.Queue`.
	//
	// Modify and browse queues.
	Queue Queue.Queue

	// Sonos SOAP Service `RenderingControl`.
	//
	// Prefer methods in `zp` over methods in `zp.RenderingControl`.
	//
	// Volume related controls.
	RenderingControl RenderingControl.RenderingControl

	// Sonos SOAP Service `SystemProperties`.
	//
	// Prefer methods in `zp` over methods in `zp.SystemProperties`.
	//
	// Manage system-wide settings, mainly account stuff.
	SystemProperties SystemProperties.SystemProperties

	// Sonos SOAP Service `VirtualLineIn`.
	//
	// Prefer methods in `zp` over methods in `zp.//`.
	VirtualLineIn VirtualLineIn.VirtualLineIn

	// Sonos SOAP Service `ZoneGroupTopology`.
	//
	// Prefer methods in `zp` over methods in `zp.ZoneGroupTopology`.
	//
	// Zone config stuff, eg getting all the configured sonos zones.
	ZoneGroupTopology ZoneGroupTopology.ZoneGroupTopology
}

func DiscoverZonePlayer

func DiscoverZonePlayer(timeout time.Duration) ([]*ZonePlayer, error)

Create new ZonePlayer using discovery for controling a Sonos speaker.

`timeout` of 1-3 second is recomended.

func NewZonePlayer

func NewZonePlayer(ipAddress string) (*ZonePlayer, error)

Create new ZonePlayer for controling a Sonos speaker.

func ScanZonePlayer

func ScanZonePlayer(cidr string, timeout time.Duration) ([]*ZonePlayer, error)

Create new ZonePlayer using network scanning for controling a Sonos speaker.

`timeout` of 1 second is recomended.

func (*ZonePlayer) AddMember

func (zp *ZonePlayer) AddMember(memberID string, bootSeq int) (string, error)

Short for `zp.GroupManagement.AddMember'`.

func (*ZonePlayer) BrowseMusicLibrary

func (zp *ZonePlayer) BrowseMusicLibrary(objectID string) (LibraryInfo, error)

Prefer methods `zp.LibraryArtist`, `zp.LibraryAlbumArtist`, `zp.LibraryAlbum`, `zp.LibraryGenre`, `zp.LibraryComposer`, `zp.LibraryTracks`, `zp.LibraryPlaylists`.

`objectID` may be one of `Gonos.ContentTypes.*` or a custom id

func (*ZonePlayer) BrowsePlaylist

func (zp *ZonePlayer) BrowsePlaylist(objectID string) (PLaylistInfo, error)

Prefer methods `zp.GetShare`, `zp.GetSonosPlaylists`, `zp.GetSonosFavorites`, `zp.GetRadioStations` or `zp.GetRadioShows`.

`objectID` may be one of `Gonos.ContentTypes.*` or a custom id

func (*ZonePlayer) BrowseQue

func (zp *ZonePlayer) BrowseQue(objectID string) (QueInfo, error)

Prefer methods `zp.GetQue` or `zp.GetQueSecond`.

func (*ZonePlayer) CreateAlarm

func (zp *ZonePlayer) CreateAlarm(startLocalTime time.Time, seconds int, roomUUID string, programURI string, volume int) (string, error)

Set a alarm.

func (*ZonePlayer) DestroyAlarm

func (zp *ZonePlayer) DestroyAlarm(id int) error

Short for `zp.AlarmClock.DestroyAlarm`

func (*ZonePlayer) EnableRDM

func (zp *ZonePlayer) EnableRDM(state bool) error

Short for `zp.SystemProperties.EnableRDM`.

func (*ZonePlayer) GetBass

func (zp *ZonePlayer) GetBass() (int, error)

Short for `zp.RenderingControl.GetBass`.

func (*ZonePlayer) GetConfiguration

func (zp *ZonePlayer) GetConfiguration() (string, error)

Get ZoneAttribute Configuration

func (*ZonePlayer) GetCurrentConnectionIDs

func (zp *ZonePlayer) GetCurrentConnectionIDs() (string, error)

Short for `zp.ConnectionManager.GetCurrentConnectionIDs`.

func (*ZonePlayer) GetCurrentConnectionInfo

func (zp *ZonePlayer) GetCurrentConnectionInfo(connectionID string) (ConnectionInfo, error)

Short for `zp.ConnectionManager.GetCurrentConnectionInfo`.

func (*ZonePlayer) GetCurrentSpeed

func (zp *ZonePlayer) GetCurrentSpeed() (string, error)

Get current speed.

func (*ZonePlayer) GetCurrentTransportState

func (zp *ZonePlayer) GetCurrentTransportState() (string, error)

Return may be one of `Gonos.TransportStates.*`.

func (*ZonePlayer) GetCurrentTransportStatus

func (zp *ZonePlayer) GetCurrentTransportStatus() (string, error)

Get current transport status.

func (*ZonePlayer) GetEQDialogLevel

func (zp *ZonePlayer) GetEQDialogLevel() (bool, error)

func (*ZonePlayer) GetEQHeightChannelLevel

func (zp *ZonePlayer) GetEQHeightChannelLevel() (int, error)

func (*ZonePlayer) GetEQMusicSurroundLevel

func (zp *ZonePlayer) GetEQMusicSurroundLevel() (int, error)

func (*ZonePlayer) GetEQNightMode

func (zp *ZonePlayer) GetEQNightMode() (bool, error)

func (*ZonePlayer) GetEQSubGain

func (zp *ZonePlayer) GetEQSubGain() (int, error)

func (*ZonePlayer) GetEQSurroundEnable

func (zp *ZonePlayer) GetEQSurroundEnable() (bool, error)

func (*ZonePlayer) GetEQSurroundLevel

func (zp *ZonePlayer) GetEQSurroundLevel() (int, error)

func (*ZonePlayer) GetEQSurroundMode

func (zp *ZonePlayer) GetEQSurroundMode() (bool, error)

func (*ZonePlayer) GetGroupMute

func (zp *ZonePlayer) GetGroupMute() (bool, error)

Short for `zp.GroupRenderingControl.GetGroupMute'`.

func (*ZonePlayer) GetGroupVolume

func (zp *ZonePlayer) GetGroupVolume() (int, error)

Short for `zp.GroupRenderingControl.GetGroupVolume'`.

func (*ZonePlayer) GetIRRepeaterState

func (zp *ZonePlayer) GetIRRepeaterState() (bool, error)

Short for `zp.HTControl.GetIRRepeaterState'`.

func (*ZonePlayer) GetIcon

func (zp *ZonePlayer) GetIcon() (string, error)

Get ZoneAttribute Icon

func (*ZonePlayer) GetLED

func (zp *ZonePlayer) GetLED() (bool, error)

Short for `zp.DeviceProperties.GetLEDState`.

func (*ZonePlayer) GetLibraryAlbum

func (zp *ZonePlayer) GetLibraryAlbum() (LibraryInfo, error)

Short for `zp.BrowseMusicLibrary(lib.ContentTypes.Album)`.

func (*ZonePlayer) GetLibraryAlbumArtist

func (zp *ZonePlayer) GetLibraryAlbumArtist() (LibraryInfo, error)

Short for `zp.BrowseMusicLibrary(lib.ContentTypes.AlbumArtist)`.

func (*ZonePlayer) GetLibraryArtist

func (zp *ZonePlayer) GetLibraryArtist() (LibraryInfo, error)

Short for `zp.BrowseMusicLibrary(lib.ContentTypes.Artist)`.

func (*ZonePlayer) GetLibraryComposer

func (zp *ZonePlayer) GetLibraryComposer() (LibraryInfo, error)

Short for `zp.BrowseMusicLibrary(lib.ContentTypes.Composer)`.

func (*ZonePlayer) GetLibraryGenre

func (zp *ZonePlayer) GetLibraryGenre() (LibraryInfo, error)

Short for `zp.BrowseMusicLibrary(lib.ContentTypes.Genre)`.

func (*ZonePlayer) GetLibraryPlaylists

func (zp *ZonePlayer) GetLibraryPlaylists() (LibraryInfo, error)

Short for `zp.BrowseMusicLibrary(lib.ContentTypes.Playlists)`.

func (*ZonePlayer) GetLibraryTracks

func (zp *ZonePlayer) GetLibraryTracks() (LibraryInfo, error)

Short for `zp.BrowseMusicLibrary(lib.ContentTypes.Share)`.

func (*ZonePlayer) GetLineInLevel

func (zp *ZonePlayer) GetLineInLevel() (int, int, error)

Short for `zp.AudioIn.GetLineInLevel`.

func (*ZonePlayer) GetLineInLevelLeft

func (zp *ZonePlayer) GetLineInLevelLeft() (int, error)

Short for `zp.AudioIn.GetLineInLevel` (Left).

func (*ZonePlayer) GetLineInLevelRight

func (zp *ZonePlayer) GetLineInLevelRight() (int, error)

Short for `zp.AudioIn.GetLineInLevel` (Right).

func (*ZonePlayer) GetLoudness

func (zp *ZonePlayer) GetLoudness() (bool, error)

Short for `zp.RenderingControl.GetLoudness`.

func (*ZonePlayer) GetMuseHouseholdId

func (zp *ZonePlayer) GetMuseHouseholdId() (string, error)

Get ZoneGroupAttribute MuseHouseholdId

func (*ZonePlayer) GetMute

func (zp *ZonePlayer) GetMute() (bool, error)

Short for `zp.RenderingControl.GetMute`.

func (*ZonePlayer) GetPause

func (zp *ZonePlayer) GetPause() (bool, error)

Short for `zp.GetCurrentTransportState() == Gonos.TransportStates.PausedPlayback`.

func (*ZonePlayer) GetPlay

func (zp *ZonePlayer) GetPlay() (bool, error)

Short for `zp.GetCurrentTransportState() == Gonos.TransportStates.Playing`.

func (*ZonePlayer) GetPlayMode

func (zp *ZonePlayer) GetPlayMode() (shuffle bool, repeat bool, repeatOne bool, err error)

Will always return false for all if a third party application is controling playback.

func (*ZonePlayer) GetProtocolInfo

func (zp *ZonePlayer) GetProtocolInfo() (string, string, error)

Short for `zp.ConnectionManager.GetProtocolInfo`.

func (*ZonePlayer) GetQue

func (zp *ZonePlayer) GetQue() (QueInfo, error)

Get que, in case no que is active a empty que will be returned.

Will return incorrect data if a third party application is controling playback.

func (*ZonePlayer) GetQueSecond

func (zp *ZonePlayer) GetQueSecond() (QueInfo, error)

Get secondairy que, in case no que is active a empty que will be returned.

Will return incorrect data if a third party application is controling playback.

func (*ZonePlayer) GetRDM

func (zp *ZonePlayer) GetRDM() (bool, error)

Short for `zp.SystemProperties.GetRDM`.

func (*ZonePlayer) GetRadioShows

func (zp *ZonePlayer) GetRadioShows() (PLaylistInfo, error)

Short for `zp.BrowsePlaylist(lib.ContentTypes.RadioShows)`.

func (*ZonePlayer) GetRadioStations

func (zp *ZonePlayer) GetRadioStations() (PLaylistInfo, error)

Short for `zp.BrowsePlaylist(lib.ContentTypes.RadioStations)`.

func (*ZonePlayer) GetRecQualityMode

func (zp *ZonePlayer) GetRecQualityMode() (string, error)

Returns `NOT_IMPLEMENTED`.

func (*ZonePlayer) GetRepeat

func (zp *ZonePlayer) GetRepeat() (bool, error)

Will always return false if a third party application is controling playback.

func (*ZonePlayer) GetRepeatOne

func (zp *ZonePlayer) GetRepeatOne() (bool, error)

Will always return false if a third party application is controling playback.

func (*ZonePlayer) GetShare

func (zp *ZonePlayer) GetShare() (PLaylistInfo, error)

Short for `zp.BrowsePlaylist(lib.ContentTypes.Share)`.

func (*ZonePlayer) GetShuffle

func (zp *ZonePlayer) GetShuffle() (bool, error)

Will always return false if a third party application is controling playback.

func (*ZonePlayer) GetSonosFavorites

func (zp *ZonePlayer) GetSonosFavorites() (PLaylistInfo, error)

Short for `zp.BrowsePlaylist(lib.ContentTypes.SonosFavorites)`.

func (*ZonePlayer) GetSonosPlaylists

func (zp *ZonePlayer) GetSonosPlaylists() (PLaylistInfo, error)

Short for `zp.BrowsePlaylist(lib.ContentTypes.SonosPlaylists)`.

func (*ZonePlayer) GetStop

func (zp *ZonePlayer) GetStop() (bool, error)

Short for `zp.GetCurrentTransportState() == Gonos.TransportStates.Stopped`.

func (*ZonePlayer) GetTargetRoomName

func (zp *ZonePlayer) GetTargetRoomName() (string, error)

Get ZoneAttribute TargetRoomName

func (*ZonePlayer) GetTrackInfo

func (zp *ZonePlayer) GetTrackInfo() (TrackInfo, error)

Get simplified info about currently playing track.

func (*ZonePlayer) GetTransitioning

func (zp *ZonePlayer) GetTransitioning() (bool, error)

Short for `zp.GetCurrentTransportState() == Gonos.TransportStates.Transitioning`.

func (*ZonePlayer) GetTreble

func (zp *ZonePlayer) GetTreble() (int, error)

Short for `zp.RenderingControl.GetTreble`.

func (*ZonePlayer) GetVolume

func (zp *ZonePlayer) GetVolume() (int, error)

Short for `zp.RenderingControl.GetVolume`.

func (*ZonePlayer) GetVolumeDB

func (zp *ZonePlayer) GetVolumeDB() (int, error)

Short for `zp.RenderingControl.GetVolumeDB`.

func (*ZonePlayer) GetZoneGroupID

func (zp *ZonePlayer) GetZoneGroupID() (string, error)

Get ZoneGroupAttribute ZoneGroupID

func (*ZonePlayer) GetZoneGroupName

func (zp *ZonePlayer) GetZoneGroupName() (string, error)

Get ZoneGroupAttribute ZoneGroupName

func (*ZonePlayer) GetZoneInfo

func (zp *ZonePlayer) GetZoneInfo() (ZoneInfo, error)

Short for `zp.DeviceProperties.GetZoneInfo`.

func (*ZonePlayer) GetZoneName

func (zp *ZonePlayer) GetZoneName() (string, error)

Get ZoneAttribute ZoneName

func (*ZonePlayer) GetZonePlayerUUIDsInGroup

func (zp *ZonePlayer) GetZonePlayerUUIDsInGroup() (string, error)

Get ZoneGroupAttribute ZonePlayerUUIDsInGroup

func (*ZonePlayer) ListAvailableServices

func (zp *ZonePlayer) ListAvailableServices() (AvailableServices, error)

Short for `zp.MusicServices.ListAvailableServices'`.

func (*ZonePlayer) Next

func (zp *ZonePlayer) Next() error

Short for `zp.AVTransport.Next`.

func (*ZonePlayer) Pause

func (zp *ZonePlayer) Pause() error

Short for `zp.AVTransport.Pause`

func (*ZonePlayer) Play

func (zp *ZonePlayer) Play() error

Short for `zp.AVTransport.Play`

func (*ZonePlayer) Previous

func (zp *ZonePlayer) Previous() error

Short for `zp.AVTransport.`.

func (*ZonePlayer) QPlayAuth

func (zp *ZonePlayer) QPlayAuth(seed string) error

Short for `zp.QPlay.QPlayAuth`.

func (*ZonePlayer) QueAdd added in v0.1.1

func (zp *ZonePlayer) QueAdd(uri string, index int, next bool) error

Short for `zp.AVTransport.AddURIToQueue`.

func (*ZonePlayer) QueClear

func (zp *ZonePlayer) QueClear() error

Short for `zp.AVTransport.RemoveAllTracksFromQueue`.

func (*ZonePlayer) QueRemove

func (zp *ZonePlayer) QueRemove(track int) error

Short for `zp.AVTransport.RemoveTrackFromQueue`.

func (*ZonePlayer) RampToVolumeAlarm

func (zp *ZonePlayer) RampToVolumeAlarm(volume int, resetVolumeAfter bool, programURI string) (int, error)

func (*ZonePlayer) RampToVolumeAutoPlay

func (zp *ZonePlayer) RampToVolumeAutoPlay(volume int, resetVolumeAfter bool, programURI string) (int, error)

func (*ZonePlayer) RampToVolumeSleepTimer

func (zp *ZonePlayer) RampToVolumeSleepTimer(volume int, resetVolumeAfter bool, programURI string) (int, error)

func (*ZonePlayer) RemoveMember

func (zp *ZonePlayer) RemoveMember(memberID string) error

Short for `zp.GroupManagement.RemoveMember'`.

func (*ZonePlayer) RemoveTrackRange

func (zp *ZonePlayer) RemoveTrackRange(start int, count int) error

Short for `zp.Queue.RemoveTrackRange`.

func (*ZonePlayer) ReorderTracks

func (zp *ZonePlayer) ReorderTracks(start int, count int, insertBefore int) error

Short for `zp.Queue.ReorderTracks`.

func (*ZonePlayer) ResetExtEQDialogLevel

func (zp *ZonePlayer) ResetExtEQDialogLevel() error

func (*ZonePlayer) ResetExtEQHeightChannelLevel

func (zp *ZonePlayer) ResetExtEQHeightChannelLevel() error

func (*ZonePlayer) ResetExtEQMusicSurroundLevel

func (zp *ZonePlayer) ResetExtEQMusicSurroundLevel() error

func (*ZonePlayer) ResetExtEQNightMode

func (zp *ZonePlayer) ResetExtEQNightMode() error

func (*ZonePlayer) ResetExtEQSubGain

func (zp *ZonePlayer) ResetExtEQSubGain() error

func (*ZonePlayer) ResetExtEQSurroundEnable

func (zp *ZonePlayer) ResetExtEQSurroundEnable() error

func (*ZonePlayer) ResetExtEQSurroundLevel

func (zp *ZonePlayer) ResetExtEQSurroundLevel() error

func (*ZonePlayer) ResetExtEQSurroundMode

func (zp *ZonePlayer) ResetExtEQSurroundMode() error

func (*ZonePlayer) SeekTime

func (zp *ZonePlayer) SeekTime(seconds int) error

Go to track time (Absolute).

func (*ZonePlayer) SeekTimeDelta

func (zp *ZonePlayer) SeekTimeDelta(seconds int) error

Go to track time (Delta).

func (*ZonePlayer) SeekTrack

func (zp *ZonePlayer) SeekTrack(track int) error

Go to track by index (index starts at 1).

Will always fail if a third party application is controling playback.

func (*ZonePlayer) SendAVTransport

func (zp *ZonePlayer) SendAVTransport(action, body, targetTag string) (string, error)

func (*ZonePlayer) SendAlarmClock

func (zp *ZonePlayer) SendAlarmClock(action, body, targetTag string) (string, error)

func (*ZonePlayer) SendAudioIn

func (zp *ZonePlayer) SendAudioIn(action, body, targetTag string) (string, error)

func (*ZonePlayer) SendConnectionManager

func (zp *ZonePlayer) SendConnectionManager(action, body, targetTag string) (string, error)

func (*ZonePlayer) SendContentDirectory

func (zp *ZonePlayer) SendContentDirectory(action, body, targetTag string) (string, error)

func (*ZonePlayer) SendDeviceProperties

func (zp *ZonePlayer) SendDeviceProperties(action, body, targetTag string) (string, error)

func (*ZonePlayer) SendGroupManagement

func (zp *ZonePlayer) SendGroupManagement(action, body, targetTag string) (string, error)

func (*ZonePlayer) SendGroupRenderingControl

func (zp *ZonePlayer) SendGroupRenderingControl(action, body, targetTag string) (string, error)

func (*ZonePlayer) SendHTControl

func (zp *ZonePlayer) SendHTControl(action, body, targetTag string) (string, error)

func (*ZonePlayer) SendMusicServices

func (zp *ZonePlayer) SendMusicServices(action, body, targetTag string) (string, error)

func (*ZonePlayer) SendQPlay

func (zp *ZonePlayer) SendQPlay(action, body, targetTag string) (string, error)

func (*ZonePlayer) SendQueue

func (zp *ZonePlayer) SendQueue(action, body, targetTag string) (string, error)

func (*ZonePlayer) SendRenderingControl

func (zp *ZonePlayer) SendRenderingControl(action, body, targetTag string) (string, error)

func (*ZonePlayer) SendSystemProperties

func (zp *ZonePlayer) SendSystemProperties(action, body, targetTag string) (string, error)

func (*ZonePlayer) SendVirtualLineIn

func (zp *ZonePlayer) SendVirtualLineIn(action, body, targetTag string) (string, error)

func (*ZonePlayer) SendZoneGroupTopology

func (zp *ZonePlayer) SendZoneGroupTopology(action, body, targetTag string) (string, error)

func (*ZonePlayer) SetBass

func (zp *ZonePlayer) SetBass(volume int) error

Short for `zp.RenderingControl.SetBass`.

func (*ZonePlayer) SetConfiguration

func (zp *ZonePlayer) SetConfiguration(configuration string) error

Set ZoneAttribute Configuration

func (*ZonePlayer) SetEQDialogLevel

func (zp *ZonePlayer) SetEQDialogLevel(state bool) error

func (*ZonePlayer) SetEQHeightChannelLevel

func (zp *ZonePlayer) SetEQHeightChannelLevel(volume int) error

func (*ZonePlayer) SetEQMusicSurroundLevel

func (zp *ZonePlayer) SetEQMusicSurroundLevel(volume int) error

func (*ZonePlayer) SetEQNightMode

func (zp *ZonePlayer) SetEQNightMode(state bool) error

func (*ZonePlayer) SetEQSubGain

func (zp *ZonePlayer) SetEQSubGain(volume int) error

func (*ZonePlayer) SetEQSurroundEnable

func (zp *ZonePlayer) SetEQSurroundEnable(state bool) error

func (*ZonePlayer) SetEQSurroundLevel

func (zp *ZonePlayer) SetEQSurroundLevel(volume int) error

func (*ZonePlayer) SetEQSurroundMode

func (zp *ZonePlayer) SetEQSurroundMode(full bool) error

func (*ZonePlayer) SetGroupMute

func (zp *ZonePlayer) SetGroupMute(state bool) error

Short for `zp.GroupRenderingControl.SetGroupMute'`.

func (*ZonePlayer) SetGroupVolume

func (zp *ZonePlayer) SetGroupVolume(volume int) error

Short for `zp.GroupRenderingControl.SetGroupVolume'`.

func (*ZonePlayer) SetIcon

func (zp *ZonePlayer) SetIcon(icon string) error

Set ZoneAttribute Icon

func (*ZonePlayer) SetLED

func (zp *ZonePlayer) SetLED(state bool) error

Short for `zp.DeviceProperties.SetLEDState`.

func (*ZonePlayer) SetLEDFeedbackState

func (zp *ZonePlayer) SetLEDFeedbackState(state bool) error

Short for `zp.HTControl.SetLEDFeedbackState'`.

func (*ZonePlayer) SetLineInLevel

func (zp *ZonePlayer) SetLineInLevel(volume int) error

Short for `zp.AudioIn.SetLineInLevel`.

func (*ZonePlayer) SetLineInLevelLeft

func (zp *ZonePlayer) SetLineInLevelLeft(volume int) error

Short for `zp.AudioIn.SetLineInLevel` (Left).

func (*ZonePlayer) SetLineInLevelRight

func (zp *ZonePlayer) SetLineInLevelRight(volume int) error

Short for `zp.AudioIn.SetLineInLevel` (Right).

func (*ZonePlayer) SetLoudness

func (zp *ZonePlayer) SetLoudness(volume bool) error

Short for `zp.RenderingControl.SetLoudness`.

func (*ZonePlayer) SetMute

func (zp *ZonePlayer) SetMute(volume bool) error

Short for `zp.RenderingControl.SetMute`.

func (*ZonePlayer) SetRelativeGroupVolume

func (zp *ZonePlayer) SetRelativeGroupVolume(volume int) (int, error)

Short for `zp.GroupRenderingControl.SetRelativeGroupVolume'`.

func (*ZonePlayer) SetRepeat

func (zp *ZonePlayer) SetRepeat(state bool) error

If enabled then repeat one will be disabled.

Will always disable other playmodes if a third party application is controling playback, as we can not determine the actual state.

func (*ZonePlayer) SetRepeatOne

func (zp *ZonePlayer) SetRepeatOne(state bool) error

If enabled then repeat will be disabled.

Will always disable other playmodes if a third party application is controling playback, as we can not determine the actual state.

func (*ZonePlayer) SetShuffle

func (zp *ZonePlayer) SetShuffle(state bool) error

Will always disable other playmodes if a third party application is controling playback, as we can not determine the actual state.

func (*ZonePlayer) SetTargetRoomName

func (zp *ZonePlayer) SetTargetRoomName(targetRoomName string) error

Set ZoneAttribute TargetRoomName

func (*ZonePlayer) SetTreble

func (zp *ZonePlayer) SetTreble(volume int) error

Short for `zp.RenderingControl.SetTreble`.

func (*ZonePlayer) SetVolume

func (zp *ZonePlayer) SetVolume(volume int) error

Short for `zp.RenderingControl.SetVolume`.

func (*ZonePlayer) SetVolumeDB

func (zp *ZonePlayer) SetVolumeDB(volume int) error

Short for `zp.RenderingControl.SetVolumeDB`.

func (*ZonePlayer) SetVolumeDelta

func (zp *ZonePlayer) SetVolumeDelta(volume int) (int, error)

Short for `zp.RenderingControl.SetRelativeVolume`.

func (*ZonePlayer) SetZoneName

func (zp *ZonePlayer) SetZoneName(zoneName string) error

Set ZoneAttribute ZoneName

func (*ZonePlayer) Stop

func (zp *ZonePlayer) Stop() error

Short for `zp.AVTransport.Stop`

func (*ZonePlayer) UpdateAlarm

func (zp *ZonePlayer) UpdateAlarm(id int, startLocalTime time.Time, seconds int, roomUUID string, programURI string, volume int) error

Update a alarm.

func (*ZonePlayer) UpdateAvailableServices

func (zp *ZonePlayer) UpdateAvailableServices() error

Short for `zp.MusicServices.UpdateAvailableServices'`.

func (*ZonePlayer) VLINext

func (zp *ZonePlayer) VLINext() error

Short for `zp.VirtualLineIn.Next`.

func (*ZonePlayer) VLIPause

func (zp *ZonePlayer) VLIPause() error

Short for `zp.VirtualLineIn.Pause`.

func (*ZonePlayer) VLIPlay

func (zp *ZonePlayer) VLIPlay() error

Short for `zp.VirtualLineIn.Play`.

func (*ZonePlayer) VLIPrevious

func (zp *ZonePlayer) VLIPrevious() error

Short for `zp.VirtualLineIn.Previous`.

func (*ZonePlayer) VLISetVolume

func (zp *ZonePlayer) VLISetVolume(volume int) error

Short for `zp.VirtualLineIn.SetVolume`.

func (*ZonePlayer) VLIStop

func (zp *ZonePlayer) VLIStop() error

Short for `zp.VirtualLineIn.Stop`.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL